/* Shop By Category — Allure-style collections carousel */

.bsp-shop-categories--allure {
  background: var(--bsp-sc-section-bg, #ffffff);
  color: var(--bsp-sc-heading-color, #423f3f);
  padding: var(--bsp-sc-padding-y, 60px) 0;
  overflow: hidden;
}

.bsp-shop-categories--allure .bsp-shop-categories__container {
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

/* Stage: centered media card behind, horizontal titles carousel in front */
.bsp-shop-categories--allure .bsp-shop-categories__stage {
  position: relative;
  min-height: var(--bsp-sc-stage-h, clamp(420px, 46vw, 600px));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Media card (active collection image) */
.bsp-shop-categories--allure .bsp-shop-categories__media {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--bsp-sc-media-w, clamp(230px, 30vw, 420px));
  height: var(--bsp-sc-media-h, clamp(320px, 40vw, 540px));
  z-index: 1;
  pointer-events: none;
}

.bsp-shop-categories--allure .bsp-shop-categories__media-block {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.bsp-shop-categories--allure .bsp-shop-categories__media-block.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

.bsp-shop-categories--allure .bsp-shop-categories__media-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bsp-sc-media-bg, #e8e4df);
}

.bsp-shop-categories--allure .bsp-shop-categories__media-link img,
.bsp-shop-categories--allure .bsp-shop-categories__image-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.bsp-shop-categories--allure .bsp-shop-categories__image-placeholder {
  background: linear-gradient(165deg, #ebe7e2 0%, #ddd8d2 100%);
}

.bsp-shop-categories--allure .bsp-shop-categories__media-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--bsp-sc-image-overlay, rgba(0, 0, 0, 0.16));
}

/* View Collections button pinned to the bottom of the media card */
.bsp-shop-categories--allure .bsp-shop-categories__media-btn {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vw, 34px);
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(150px, 16vw, 190px);
  min-height: 48px;
  padding: 14px 26px;
  border: 1px solid var(--bsp-sc-btn-border, #ffffff);
  background: var(--bsp-sc-btn-bg, #ffffff);
  color: var(--bsp-sc-btn-text, #212121);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.bsp-shop-categories--allure .bsp-shop-categories__media-btn:hover {
  background: var(--bsp-sc-btn-hover-bg, #111111);
  border-color: var(--bsp-sc-btn-hover-border, #111111);
  color: var(--bsp-sc-btn-hover-text, #ffffff);
}

/* Titles carousel */
.bsp-shop-categories--allure .bsp-shop-categories__titles {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
}

.bsp-shop-categories--allure .bsp-shop-categories__titles-track {
  display: flex;
  align-items: center;
  width: max-content;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.bsp-shop-categories--allure .bsp-shop-categories__title {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--bsp-sc-title-w, clamp(280px, 30vw, 460px));
  height: var(--bsp-sc-stage-h, clamp(420px, 46vw, 600px));
  padding: 0 clamp(16px, 2vw, 36px);
  color: var(--bsp-sc-heading-color, #423f3f);
  font-family: var(--bsp-font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.4s ease, opacity 0.4s ease;
  opacity: 0.85;
}

.bsp-shop-categories--allure .bsp-shop-categories__title:hover {
  opacity: 1;
}

.bsp-shop-categories--allure .bsp-shop-categories__title.is-active {
  position: relative;
  z-index: 4;
  color: var(--bsp-sc-card-title, #ffffff);
  opacity: 1;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.28);
}

@media (min-width: 768px) {
  .bsp-shop-categories--allure {
    padding-top: var(--bsp-sc-padding-y, 100px);
    padding-bottom: var(--bsp-sc-padding-y, 100px);
  }
}

@media (max-width: 767px) {
  .bsp-shop-categories--allure {
    --bsp-sc-stage-h: clamp(360px, 92vw, 460px);
    --bsp-sc-media-w: clamp(210px, 62vw, 300px);
    --bsp-sc-media-h: clamp(300px, 86vw, 400px);
    --bsp-sc-title-w: clamp(220px, 70vw, 320px);
  }

  .bsp-shop-categories--allure .bsp-shop-categories__title {
    font-size: clamp(1.75rem, 9vw, 2.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bsp-shop-categories--allure .bsp-shop-categories__titles-track,
  .bsp-shop-categories--allure .bsp-shop-categories__media-block {
    transition: none;
  }
}
