/* =========================
   Core layout
========================= */

/* Scope slider accent to this block only (avoid global :root leakage) */
.carousel-block.discover-carousel {
  --slider-accent: #E30B5D;
}

.carousel-block {
  --cr-title-size: var(--wp--preset--font-size--h-2);
  position: relative;
  overflow: visible; /* Fix clipping of filter dropdown */
}

/* Empty State Styling */
.discover-carousel__empty-state {
    /* width: 100%; */
    padding: 60px 20px;
    text-align: center;
    background: #fdfdfd;
    border: 2px dashed #eee;
    border-radius: 24px;
    margin: 20px 200px;
}

.empty-state-inner i {
    font-size: 3rem;
    color: #ffd6e0;
    margin-bottom: 20px;
}

.empty-state-inner h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.empty-state-inner p {
    color: #777;
    margin-bottom: 24px;
}

.empty-state-inner .filter-reset-btn {
    display: inline-flex;
    padding: 10px 24px;
    background: #E30B5D;
    color: #fff;
    border: none;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.empty-state-inner .filter-reset-btn:hover {
    transform: scale(1.05);
}

.carousel-block.has-bg {
  padding-top: 2rem;
  padding-bottom: 2.25rem;
}

/* header for this block */

.discover-carousel {
  width: 100%;
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
}

.discover-carousel__header-wrap {
  padding-right: var(--page-gutter-right);
  padding-left: var(--page-gutter-left);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.discover-carousel__title {
  margin: 0 0 0.5rem;
  font-size: 55px;
  font-weight: 700;
  color: #000;
  line-height: 1.1;
  letter-spacing: -2.75px;
}

.discover-carousel__title-accent {
  color: #E30B5D;
}

.discover-carousel__subtitle {
    margin: 0;
    color: #555;
    max-width: 600px;
    font-size: var(--wp--preset--font-size--body);
    line-height: 1.5;
}

.discover-carousel__filter-wrap {
    display: flex;
    align-items: center;
}

.discover-carousel__filter-btn {
    background: #fff;
    border: 1px solid #000;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-size: var(--wp--preset--font-size--body);
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.discover-carousel__filter-btn:hover {
    background: #000;
    color: #fff;
}

/* Filter Dropdown Styling */
.discover-carousel__filter-dropdown {
    position: relative;
    display: inline-block;
}

.discover-carousel__filter-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: auto;
    z-index: 9999;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 250px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.discover-carousel__filter-dropdown:hover .discover-carousel__filter-menu,
.discover-carousel__filter-dropdown:focus-within .discover-carousel__filter-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-item {
    background: none;
    border: none;
    padding: 8px 12px;
    text-align: left;
    font-size: clamp(18px, 1.4vw, 20px);
    font-family: var(--wp--preset--font-family--proxima-nova);
    color: #444;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    width: 100%;
}

.filter-item:hover {
    background: #f5f5f5;
    color: #000;
}

.filter-item.is-active {
    background: #E30B5D;
    color: #fff;
}

.filter-divider {
    padding: 8px 12px 4px;
    font-size: clamp(18px, 1.4vw, 20px);
    font-family: var(--wp--preset--font-family--proxima-nova);
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* Filter menu grid (desktop keeps stacked layout; mobile becomes 2 columns) */
.filter-menu-grid {
    display: flex;
    flex-direction: column;
}

.filter-menu-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Ensure type buttons stay grouped */
.filter-menu-col--types .filter-group--types {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1061px) {
    .discover-carousel__filter-menu {
        /* Anchor to the button's RIGHT edge so the menu opens leftward (prevents off-screen overflow) */
        right: auto;
        left: 0;
        width: min(88vw, 560px);
        min-width: 0;
        max-width: calc(100vw - 24px);
        max-height: min(70dvh, 520px);
        overflow: auto;
        overscroll-behavior: contain;
        box-sizing: border-box;
    }

    .filter-menu-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
    }

    .filter-menu-col--types {
        grid-column: 1;
    }

    .filter-menu-col--controls {
        grid-column: 2;
    }

    /* Tighten padding so the menu isn’t too tall */
    .filter-divider {
        padding: 6px 10px 2px;
    }

    .filter-range-group {
        padding: 8px 10px;
    }

    .filter-footer {
        padding: 8px 10px 0;
        border-top: 0;
        margin-top: 0;
    }

    .filter-reset-btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .filter-item {
        padding: 6px 10px;
        font-size: 14px;
        white-space: normal;
    }

    .filter-divider {
        font-size: 12px;
        letter-spacing: 0.04em;
    }

    .range-labels {
        font-size: 13px;
    }

    .filter-reset-btn {
        font-size: 14px;
        padding: 8px 10px;
    }
}

/* =========================
   Product card visuals (User Reference)
========================= */

.product-card {
  width: 100%;
  border-radius: 24px;
  position: relative;
  /* Make sure card stretches to full height of parent slide */
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Top image block */
.product-card__media {
  width: 100%;
  aspect-ratio: 1 / .5;
  background: #f7a7b4;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.product-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Body uses SVG path as background */
.product-card__body {
  position: relative;
  margin-top: -4px;
  width: 100%;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.05)); /* Optional shadow for depth */
  flex: 1; /* Grow to fill space */
  display: flex;
  flex-direction: column;
}

.product-card__body-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* Centering logic when fewer items */
.peek-track.is-centered {
    justify-content: center;
}

.discover-carousel__filter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Range Slider Styling */
.filter-range-group {
    padding: 10px 12px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: clamp(18px, 1.4vw, 20px);
    font-family: var(--wp--preset--font-family--proxima-nova);
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.filter-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #eee;
    outline: none;
}

.filter-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #E30B5D;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #fff;
}

.filter-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #E30B5D;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #fff;
}

.filter-footer {
    padding: 12px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.filter-reset-btn {
    width: 100%;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: clamp(18px, 1.4vw, 20px);
    font-family: var(--wp--preset--font-family--proxima-nova);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-reset-btn:hover {
    background: #eee;
}

.filter-item:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.product-card__body-inner {
  position: relative;
  z-index: 1;
  padding: 16px 18px 22px;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header: title + heart */
.product-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.product-card__title {
  margin: 0;
  font-size: var(--wp--preset--font-size--h-3);
  color: #111827;
}

.product-card__favorite {
  border: none;
  background: none;
  padding: 0;
  font-size: 40px;
  color: #f97373;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.product-card__favorite:hover {
    transform: scale(1.1);
}

.product-card__favorite.is-active {
    color: #f97373; /* Ensure it stays the same color, or could be a deeper red if preferred */
    animation: favorpop 0.3s ease-out;
}

@keyframes favorpop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1.1); }
}

.product-card__description {
  margin: 0 0 12px;
  font-size: var(--wp--preset--font-size--body);
  line-height: 1.5;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* -webkit-box-orient: vertical; */
  width: 80%;
}

.product-card__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: auto;
}

.product-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-card__price {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
}

.product-card__price--old {
  font-size: 24px;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: line-through;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card__stars {
  font-size: var(--wp--preset--font-size--body);
  color: #fbbf24;
}

.product-card__rating-count {
  font-size: var(--wp--preset--font-size--body);
  color: #6b7280;
}

/* Cart icon button */
.product-card__cart {
  text-decoration: none;
  position: absolute;
  right: clamp(0.5rem, 2vw, 0.8rem);
  bottom: clamp(0.5rem, 2vw, 1.5rem);

  /* responsive square button (Base/Large Style) */
  width: clamp(2.6rem, 7vw, 5rem);
  height: clamp(2.6rem, 7vw, 5rem);

  border-radius: 15px;
  border: none;
  background: #ffffff;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

  /* keep transform for hover but base it here to look "detached" */
  transform: translate(20%, 20%);
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* icon inside the button */
.product-card__cart-icon {
  font-size: clamp(1.2rem, 4vw, 1.9rem);
  color: #E30B5D;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__cart:hover {
  background: #E30B5D;
  transform: translate(20%, 15%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.product-card__cart:hover .product-card__cart-icon {
  color: #ffffff;
}

/* Below 1750px: Integrated "Plain" Look (Matches Image) */
@media (max-width: 1749.98px) {
  /* Normalize the card body shape to a simple box */
  .product-card__body-bg {
    display: none;
  }

  .product-card__body {
    background: #ffffff;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  }

  .product-card__body-inner {
      padding-bottom: 24px;
  }

  /* Integrated button style */
  .product-card__cart {
    background: transparent;
    box-shadow: none;
    transform: none;
    width: auto;
    height: auto;
    border-radius: 0;
    right: 20px; 
    bottom: 24px; /* match inner padding */
    padding: 0;
  }

  .product-card__cart:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
  }

  .product-card__cart-icon {
    font-size: 2.4rem; /* Make icon slightly larger/visible as standalone */
    color: #E30B5D; /* Softer pink as seen in snapshot */
  }
  
  .product-card__cart:hover .product-card__cart-icon {
    color: #E30B5D; /* Darker pink on hover */
  }
}


/* Small-screen tuning */
@media (max-width: 480px) {
  .product-card__body-inner {
    padding: 12px 14px 18px;
  }

  .product-card__title {
    font-size: 1rem;
  }

  .product-card__price {
    font-size: 1rem;
  }

  .product-card__cart {
    width: 3.1rem;
    height: 3.1rem;
  }
}


/* =========================
   Desktop carousel chrome
========================= */

.generic-carousel {
  overflow: visible;
  position: relative;
  padding-bottom: 2rem;
}

/* Bootstrap controls with custom round arrows */

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  color: var(--slider-accent);
  border: 1px solid #e9ecef;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.generic-carousel .carousel-control-prev,
.generic-carousel .carousel-control-next {
  width: auto;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
  z-index: 5;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.generic-carousel .carousel-control-prev {
  left: -22px !important;
}

.generic-carousel .carousel-control-next {
  right: -22px !important;
}

.generic-carousel .carousel-control-prev .slider-prev:hover,
.generic-carousel .carousel-control-next .slider-next:hover {
  color: #fff !important;
  background-color: var(--slider-accent) !important;
}

/* Outer shell that arrows are anchored to */
.peek-shell {
  position: relative;
  /* padding-right: var(--page-gutter-right);
  padding-left: var(--page-gutter-left); */
}

/* Indicators */

.generic-carousel .carousel-indicators {
  bottom: -3rem;
  z-index: 4;
}

.generic-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fd593c;
  opacity: 0.35;
}

.generic-carousel .carousel-indicators .active {
  opacity: 1;
}

/* =========================
   Mobile / tablet / desktop: peek slider
========================= */

.peek-slider {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0 0.75rem 1.5rem;
  margin: 0 -0.75rem;
  scrollbar-width: none;
}

.peek-slider::-webkit-scrollbar {
  height: 0;
  display: none;
}

.peek-track {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.peek-slide {
  flex: 0 0 85%; /* Mobile: 1 item + peek */
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
}

/* Dots */
.peek-indicators {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.peek-indicators .pi-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fd593c;
  opacity: 0.35;
  cursor: pointer;
  border: none;
  padding: 0;
}

.peek-indicators .pi-dot.is-active {
  opacity: 1;
}

.peek-arrow {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: none;
  background: var(--slider-accent);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  /* Reset absolute positioning since they are now in header */
  position: static; 
  transform: none;
  opacity: 1;
  pointer-events: auto;
  font-size: 2rem;
}

.peek-arrow:hover {
  background: #fff;
  color: var(--slider-accent);
}

/* Filter button wrapper */
.discover-carousel__filter-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Arrows are now inside the carousel shell */
.peek-shell .discover-carousel__arrows {
  display: none; /* desktop hover will enable */
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  justify-content: space-between;
  align-items: center;
  padding-left: clamp(8px, 1.4vw, 18px);
  padding-right: clamp(8px, 1.4vw, 18px);
  pointer-events: none; /* allow swipe/scroll through */
  z-index: 6;
}

.peek-shell .discover-carousel__arrows .peek-arrow {
  pointer-events: auto; /* clickable buttons */
}

/* Desktop-only hover reveal: show arrows on hover (mouse/trackpad) */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .peek-shell .discover-carousel__arrows {
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-50% - 6px));
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .peek-shell:hover .discover-carousel__arrows,
  .peek-shell:focus-within .discover-carousel__arrows {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%);
  }
}

/* Touch devices: keep arrows hidden (swipe/drag only) */
@media (hover: none), (pointer: coarse) {
  .peek-shell .discover-carousel__arrows {
    display: none !important;
  }
}

/* No longer needed as arrows are not absolute/hover-based */

/* Replaced by the display:none above */

.discover-carousel__cta-wrap {
  display: flex;
  justify-content: center;
}

.discover-carousel__cta-btn {
  display: inline-flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 0.9rem 2.75rem;
  border-radius: 16px;
  border: none;
  background: #ff2b7b; /* strong pink */
  color: #ffffff;
  font-weight: 600;
  font-size: clamp(18px, 1.4vw, 24px);
  text-decoration: none;
  /* box-shadow: 0 10px 26px rgba(0,0,0,0.18); */
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  margin: 2rem 0px;
}

.discover-carousel__cta-btn:hover {
  background: #e12068;
  /* box-shadow: 0 12px 30px rgba(0,0,0,0.24); */
  transform: translateY(-1px);
}

/* =========================
   Responsive tweaks
========================= */

@media (min-width: 576px) {
  .peek-slide {
    flex-basis: 60%; /* Small tablet: 1.5 items */
  }
}

@media (min-width: 768px) {
  .peek-slide {
    flex-basis: 45%; /* Tablet: 2 items */
  }
}

@media (min-width: 992px) {
  .peek-slide {
    flex-basis: 31%; /* Desktop: 3 items */
  }
}

@media (min-width: 1200px) {
  .peek-slider {
    padding: 0 0 2rem;
    margin: 0;
    /* keep it scrollable horizontally */
    overflow-x: auto;
    overflow-y: visible;
  }

  .peek-track {
    flex-wrap: nowrap; /* Force horizontal */
  }

  .peek-slide {
    flex: 0 0 450px; /* Fixed width */
    width: 450px;
    height: auto; /* Let flexbox stretch determine height */
  }
}
