/* Product list page (Product/ProductView): brand banner slider and vouchers. The filters + grid are in
   product-listing.css. Design: docs/productdesign/product1.html, beautymarketplace_plp.html */

/* Brand banner slider (design: docs/productdesign/beautymarketplace_plp.html hero): a rounded, auto-playing slider
   with a big centred title and dots. Each slide is a real brand; clicking it filters the list by that brand.
   Text on a pastel tint with the brand's own portrait photo on the right, so nothing needs cropping. */
.v1-plp-hero {
  --swiper-theme-color: var(--brand-primary-hover);
  --swiper-pagination-bullet-inactive-color: #94a3b8;
  --swiper-pagination-bullet-inactive-opacity: 0.5;
  border-radius: 16px;
  background: var(--brand-secondary);
}

.v1-plp-hero .swiper-slide {
  height: 250px;
}

/* the tint is set on this inner card, not on the slide: initSwiper() destroys the slider msglow-slider.js created
   first, and Swiper strips every inline style from the slides when it does */
.v1-plp-card {
  display: flex;
  height: 100%;
  background: var(--tint, var(--brand-secondary));
}

.v1-plp-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 28px 40px;
}

.v1-plp-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  line-height: 1.1;
  text-wrap: balance;
}

.v1-plp-sub {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1.1rem;
}

/* the whole slide is the click target (stretched-link); filled = shop, outlined + check = this brand is active */
.v1-plp-cta {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  margin-top: 16px;
  white-space: nowrap;
}

.v1-plp-cta .v1-cta-on,
.v1-plp-cta.is-active .v1-cta-shop {
  display: none;
}

.v1-plp-cta.is-active .v1-cta-on {
  display: inline;
}

.v1-plp-cta.is-active {
  --bs-btn-bg: #fff;
  --bs-btn-color: var(--brand-primary-hover);
  --bs-btn-border-color: var(--brand-primary-hover);
  --bs-btn-hover-bg: var(--brand-secondary);
  --bs-btn-hover-color: var(--brand-primary-hover);
  --bs-btn-hover-border-color: var(--brand-primary-hover);
  --bs-btn-active-bg: var(--brand-secondary);
  --bs-btn-active-color: var(--brand-primary-hover);
}

.v1-plp-photo {
  flex: 0 0 190px;
}

.v1-plp-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

@media (max-width: 575.98px) {
  .v1-plp-hero .swiper-slide {
    height: 190px;
  }

  .v1-plp-copy {
    padding: 16px 12px 34px 16px;
  }

  .v1-plp-photo {
    flex-basis: 118px;
  }

  .v1-plp-sub {
    margin-top: 4px;
    font-size: 0.85rem;
  }

  .v1-plp-cta {
    margin-top: 10px;
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem;
  }
}

/* Claim Your Vouchers (design: docs/productdesign/beautymarketplace_plp.html): ticket-style cards, dashed pink border
   with a notch on each side. The row scrolls sideways on its own; the negative margin / padding keep the notches (which
   stick out 8px) from being clipped while the cards still line up with the heading. */
.v1-vouchers {
  display: flex;
  gap: 20px;
  margin: 0 -8px;
  padding: 4px 8px 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 0 8px; /* snapping a card to the row's edge must keep the 8px notch room, or the row starts scrolled */
  scrollbar-width: none;
}

.v1-vouchers::-webkit-scrollbar {
  display: none;
}

.v1-voucher {
  position: relative;
  flex: 0 0 auto;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  background: #fff;
  border: 1px dashed var(--brand-primary);
  border-radius: 12px;
  scroll-snap-align: start;
}

.v1-voucher::before,
.v1-voucher::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background: #f8fafc;
  border: 1px dashed var(--brand-primary);
  border-radius: 50%;
}

.v1-voucher::before {
  left: -8px;
  border-color: transparent var(--brand-primary) transparent transparent;
}

.v1-voucher::after {
  right: -8px;
  border-color: transparent transparent transparent var(--brand-primary);
}

.v1-voucher-btn {
  padding: 4px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-primary-hover);
  background: #fff;
  border: 1px solid var(--brand-primary);
  border-radius: 20px;
  box-shadow: none;
  transition: background-color 0.2s, color 0.2s;
}

.v1-voucher-btn:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  color: #fff;
}

/* claimed = pale fill with a check; still clickable (it toggles back), hover just deepens the tint */
.v1-voucher-btn.is-claimed {
  background: var(--brand-secondary);
  color: var(--brand-primary-hover);
}

.v1-voucher-btn.is-claimed:hover {
  background: #fbcfe8;
  border-color: var(--brand-primary-hover);
  color: var(--brand-primary-hover);
}

.v1-vouchers-title,
.v1-voucher-title {
  font-size: 1.25rem;
}
