.spell-categories {
  padding: 2rem 1rem;
}

.spell-categories__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.spell-categories__text {
  flex: 1 1 25%;
  text-align: left;
}

.spell-categories__text h2 {
  margin: 0;
  line-height: 1.3;
  font-size: var(--spell-text-size, 2rem);
  color: var(--spell-text-color, #f4812e);
  font-family: var(--spell-text-font, sans-serif);
}

.spell-categories__slider {
  flex: 1 1 70%;
  overflow: hidden;
}

.spell-categories__item {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
}

.spell-categories__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spell-categories__item span {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--spell-category-bg, rgba(0, 0, 0, 0.7));
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}
.spell-categories-preview .spell-categories__slider {
  overflow-x: auto;
  display: flex;
  padding: 1rem 0;
}

.spell-categories__preview-wrapper {
  display: flex;
  gap: 1rem;
}

.spell-categories__item {
  flex: 0 0 auto;
  width: 150px;
  text-align: center;
}

.spell-categories__item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.spell-categories__label {
  display: block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.5rem;
  color: #fff;
  font-weight: bold;
  border-radius: 4px;
}


/* PREVIEW */

/* Editor preview - spell-categories */

.spell-categories-preview {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px dashed #ccc;
  padding: 2rem;
  background: #fafafa;
}

.spell-categories-preview__text {
  flex: 1 1 30%;
  font-size: 1rem;
  color: #333;
}

.spell-categories-preview__slider {
  flex: 1 1 65%;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.spell-categories-preview__item {
  flex: 0 0 150px;
  height: 150px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  position: relative;
  box-shadow: 0 0 0 1px #ddd inset;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.spell-categories-preview__name {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  width: 100%;
  padding: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  position: absolute;
  bottom: 0;
}
