/**
 * Valentte Sales Page — assets/css/sales-page.css
 *
 * Styles for:
 *  - Sales hero category icon navigation (.vts-hero)
 *  - Sales sections with product grids (.vts-section)
 *  - Inline promotional banners (.vts-banner)
 *  - Promo badge variant (.badge--promo)
 *
 * Uses theme design tokens from critical.css / global.css:
 *  --black (#565656), --white, --cream (#F4EDE3), --grey3 (#E9E9E8)
 *  --font-heading (Cormorant), --font-body (Ysabeau Office)
 *  --star-gold (#FFA222)
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   1. HERO — SHOP BY CATEGORY TILES
   ═══════════════════════════════════════════════════════════════════════════════ */

.vts-hero {
  background: var(--white, #fff);
  padding: 48px 0 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

/* Header: eyebrow + title + divider */
.vts-hero__header {
  text-align: center;
  margin-bottom: 16px;
}

.vts-hero__eyebrow {
  display: block;
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--star-gold, #FFA222);
  margin-bottom: 8px;
}

.vts-hero__title {
  font-family: var(--font-heading, 'Cormorant', Georgia, serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 400;
  color: var(--black, #565656);
  margin: 0;
  line-height: 1.2;
}

.vts-hero__title em {
  font-style: italic;
}

.vts-hero__divider {
  width: 40px;
  height: 2px;
  background: var(--black, #565656);
  margin: 16px auto 0;
}

/* Offer cards — circular icons with labels */
.vts-hero__cards {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 0 40px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.vts-hero__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.vts-hero__card-img-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white, #fff);
  border: 1.5px solid #e8e3dc;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vts-hero__card:hover .vts-hero__card-img-wrap {
  border-color: #c4b8a8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.vts-hero__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vts-hero__card-overlay {
  display: none;
}

.vts-hero__card-content {
  text-align: center;
}

.vts-hero__card-label {
  display: block;
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--black, #565656);
  line-height: 1.3;
  max-width: 160px;
}

.vts-hero__card-eyebrow {
  display: block;
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .vts-hero__cards {
    gap: 20px;
    padding: 0 20px 36px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .vts-hero__cards::-webkit-scrollbar { display: none; }
  .vts-hero__card {
    scroll-snap-align: center;
  }
  .vts-hero__card-img-wrap {
    width: 90px;
    height: 90px;
  }
  .vts-hero__card-label {
    font-size: 10px;
    max-width: 90px;
  }
  .vts-hero__card-eyebrow {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .vts-hero {
    padding: 24px 0 0;
  }
  .vts-hero__cards {
    gap: 16px;
    padding: 0 16px 24px;
  }
  .vts-hero__card-img-wrap {
    width: 72px;
    height: 72px;
    border-width: 1.5px;
  }
  .vts-hero__card {
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   2. SALES SECTIONS — PRODUCT GRIDS
   ═══════════════════════════════════════════════════════════════════════════════ */

.vts-section {
  background: var(--white, #fff);
  padding: 24px 40px 48px;
  scroll-margin-top: 100px; /* Offset for sticky header when scrolling from hero nav */
}

.vts-section + .vts-section {
  border-top: 1px solid var(--grey3, #E9E9E8);
  padding-top: 48px;
}

/* Section header */
.vts-section__header {
  text-align: center;
  margin-bottom: 24px;
}

.vts-section__header-left {
  min-width: 0;
}

.vts-section__title {
  font-family: var(--font-heading, 'Cormorant', Georgia, serif);
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 400;
  color: var(--black, #565656);
  margin: 0 0 4px;
  line-height: 1.2;
}

.vts-section__subtitle {
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}


/* SSR grid layout (non-promo sections) */
.vts-grid--ssr .products-grid {
  padding: 0;
}

.vts-grid--ssr[data-columns="2"] .products-grid { --cols: 2; }
.vts-grid--ssr[data-columns="3"] .products-grid { --cols: 3; }
.vts-grid--ssr[data-columns="4"] .products-grid { --cols: 4; }
.vts-grid--ssr[data-columns="5"] .products-grid { --cols: 5; }
.vts-grid--ssr[data-columns="6"] .products-grid { --cols: 6; }

/* Responsive override — the data-columns rules above have no media query of
   their own, so at every viewport width they override critical.css's/
   shop.css's own responsive .products-grid breakpoints by specificity
   (attribute selector + 2 classes beats a single class, regardless of
   source order). Without this, a 4-column Top Offers section stays 4
   columns even on a phone screen. Mirrors the exact breakpoints used
   there (critical.css:954-965) so product grids behave consistently
   site-wide regardless of how many columns were configured on desktop. */
@media (min-width: 601px) and (max-width: 900px) {
  .vts-grid--ssr[data-columns] .products-grid { --cols: 3; }
}
@media (max-width: 600px) {
  .vts-grid--ssr[data-columns] .products-grid { --cols: 2; --col-gap: 12px; row-gap: 12px; }
}
@media (max-width: 315px) {
  .vts-grid--ssr[data-columns] .products-grid { --cols: 1; }
}

/* Promo-group grids within sales sections */
.vts-section .vtpg-grid .products-grid {
  padding: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .vts-section {
    padding: 18px 16px 36px;
  }
  .vts-section + .vts-section {
    padding-top: 32px;
  }
  .vts-section__header {
    flex-direction: column;
    gap: 4px;
  }
  .vts-section__viewall {
    padding-top: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   3. PROMOTIONAL BANNER (INLINE)
   ═══════════════════════════════════════════════════════════════════════════════ */

.vts-banner {
  background: #f9fafb;
  border-top: 1px solid var(--grey3, #E9E9E8);
  border-bottom: 1px solid var(--grey3, #E9E9E8);
  padding: 16px 40px;
}

.vts-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.vts-banner__text {
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #C0392B;
}

.vts-banner__text--link {
  text-decoration: none;
  transition: opacity 0.15s;
}

.vts-banner__text--link:hover {
  opacity: 0.8;
}

.vts-banner__right {
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .vts-banner {
    padding: 14px 16px;
  }
  .vts-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .vts-banner__text {
    font-size: 13px;
  }
  .vts-banner__right {
    font-size: 11px;
    white-space: normal;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   4. PROMO BADGE VARIANT
   ═══════════════════════════════════════════════════════════════════════════════ */

.badge--promo {
  background: var(--sale-badge-bg, #212121);
  color: var(--sale-badge-text, #fff);
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body, 'Ysabeau Office', sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  line-height: 1;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   5. CATEGORY CARD GRID (.best-frag-wrapper)
   Raw pasted HTML: <section class="best-frag-wrapper"> of
   <a><article class="best-frag-item"><img><div class="text-wrapper"><h2>
   Ported from temp-legacy/time-limited-offers/time-limited-offers.css.
   ═══════════════════════════════════════════════════════════════════════════════ */

.best-frag-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1267px;
  margin: 20px 0 0;
  padding: 0 50px;
}

.best-frag-wrapper > a {
  display: block;
  text-decoration: none;
}

.best-frag-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.best-frag-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.best-frag-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.best-frag-item .text-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 16px 18px;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.best-frag-item .text-wrapper h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

@media (max-width: 1024px) {
  .best-frag-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .best-frag-wrapper {
    grid-template-columns: 1fr;
  }

  .best-frag-item .text-wrapper h2 {
    font-size: 20px;
  }
}
