/* ============================================================
   Sunlight's — Global Stylesheet v1.0
   Locked to the Phase 1 Design System. Do not drift from tokens.
   ============================================================ */

/* ------------------------------------------------------------
   GOLD RULE — #C9A227 is a locked accent token. Approved uses:
   .btn-gold, .t-overline--gold (dark backgrounds only),
   .badge-gold, gold hover borders (.product-card),
   marquee/arch decorative accents, favicon "S", category-card
   gold count badges.

   CONFIRMED EXCEPTION (approved 2026-08-09): testimonial star
   ratings on cream use gold — they are decorative icons (not
   body text) and pass WCAG 1.4.11 non-text contrast. Kept in
   .testimonial-stars. Do NOT extend the gold whitelist further
   without user sign-off.
   ------------------------------------------------------------ */

:root {
    --color-primary: #7A1F2B;
    --color-primary-dark: #5C1620;
    --color-accent: #C9A227;
    --color-bg: #FDFBF7;
    --color-bg-alt: #F6F0E7;
    --color-text: #1A1A1A;
    --color-text-secondary: #5C5450;
    --color-border: #E8E0D8;
    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #1DA851;
    --color-error: #B3261E;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --radius-card: 16px;
    --radius-input: 12px;
    --radius-modal: 24px;

    --shadow-card: 0 1px 2px rgb(26 26 26 / 0.04), 0 8px 24px rgb(26 26 26 / 0.06);
    --shadow-hover: 0 2px 4px rgb(26 26 26 / 0.05), 0 16px 40px rgb(122 31 43 / 0.12);
    --shadow-gold: 0 0 0 1px rgb(201 162 39 / 0.35), 0 8px 24px rgb(201 162 39 / 0.15);
  }

  * { border-color: var(--color-border); }

  html { scroll-behavior: smooth; }

  body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  ::selection {
    background: var(--color-primary);
    color: var(--color-bg);
  }

  img { max-width: 100%; display: block; }

  [x-cloak] { display: none !important; }

  :focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
  }
  .on-dark :focus-visible { outline-color: var(--color-accent); }

  /* ---------------- Container & section padding ---------------- */
  .container-max {
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: 1.25rem;
  }
  @media (min-width: 768px) { .container-max { padding-inline: 2rem; } }

  .section-pad { padding-block: 4rem; }
  @media (min-width: 768px) { .section-pad { padding-block: 6rem; } }
  @media (min-width: 1024px) { .section-pad { padding-block: 7.5rem; } }

  /* ---------------- Typography (locked Phase 1 scale) ----------------
     Color is applied via Tailwind utilities at the usage site. */
  .t-h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.5rem, 1.25rem + 4.4vw, 4rem); line-height: 1.1; letter-spacing: -0.01em; }
  .t-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.375rem + 2.4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.005em; }
  .t-h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; line-height: 1.4; }
  .t-lead { font-size: 1.1875rem; line-height: 1.6; }
  .t-body { font-size: 1rem; line-height: 1.7; }
  .t-small { font-size: 0.875rem; line-height: 1.6; }
  .t-caption { font-size: 0.78125rem; line-height: 1.5; }
  .t-overline { font-size: 0.75rem; font-weight: 600; line-height: 1.2; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-primary); }
  .t-overline--gold { color: var(--color-accent); }
  .t-italic { font-family: var(--font-display); font-style: italic; font-weight: 500; }

  /* ---------------- Buttons ---------------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1;
    height: 3rem;
    padding: 0 1.5rem;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  }
  .btn:active { transform: scale(0.98); }
  .btn-lg { height: 3.5rem; padding: 0 2rem; }
  .btn-sm { height: 2.75rem; padding: 0 1.25rem; font-size: 0.875rem; }

  .btn-primary { background: var(--color-primary); color: var(--color-bg); }
  .btn-primary:hover { background: var(--color-primary-dark); }
  .btn-gold { background: var(--color-accent); color: var(--color-primary-dark); }
  .btn-gold:hover { background: #D9B23A; }
  .btn-whatsapp { background: var(--color-whatsapp); color: #FFFFFF; }
  .btn-whatsapp:hover { background: var(--color-whatsapp-dark); }
  .btn-secondary { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
  .btn-secondary:hover { background: rgb(122 31 43 / 0.06); }

  /* ---------------- Navbar ---------------- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(253 251 247 / 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
  }
  .wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--color-text);
    text-decoration: none;
    padding-block: 0.625rem;
  }
  .wordmark-accent { color: var(--color-accent); }
  .nav-link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    padding-block: 0.5rem;
    transition: color 0.2s ease;
  }
  .nav-link:hover { color: var(--color-primary); }
  .nav-link.is-active { color: var(--color-primary); font-weight: 600; }
  .nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 9999px;
    background: var(--color-accent);
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    color: var(--color-primary);
  }
  .nav-toggle:hover { background: rgb(122 31 43 / 0.08); }
  .nav-link-mobile {
    display: block;
    padding: 0.75rem 0;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
  }
  .nav-link-mobile:hover { color: var(--color-primary); }
  .nav-link-mobile.is-active { color: var(--color-primary); }

  /* ---------------- Skip link ---------------- */
  .skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: var(--color-primary);
    color: var(--color-bg);
    border-radius: 0 0 12px 0;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
  }
  .skip-link:focus { left: 0; }

  /* ---------------- Badges ---------------- */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    padding: 0.3125rem 0.75rem;
    font-size: 0.71875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .badge-new { background: var(--color-primary); color: var(--color-bg); }
  .badge-gold { background: var(--color-accent); color: var(--color-primary-dark); }
  .badge-sale { background: var(--color-error); color: #FFFFFF; }

  /* ---------------- Testimonial star ratings (GOLD EXCEPTION) ----------------
     Approved 2026-08-09: decorative icons on cream, pass WCAG 1.4.11
     non-text contrast. The ONLY approved gold-on-light usage beyond
     .btn-gold, badges and overline accents. Do not extend further. */
  .testimonial-stars {
    display: inline-flex;
    gap: 0.25rem;
    color: var(--color-accent);
  }

  /* ---------------- Product gallery thumbs (product page) ---------------- */
  .thumb {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    padding: 0;
    background: var(--color-bg);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
  }
  .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .thumb:hover { border-color: var(--color-primary); }
  .thumb-active {
    border-color: var(--color-primary);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  .gallery-main-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
  }
  .gallery-expand {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }
  .gallery-expand:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    transform: scale(1.05);
  }
  .gallery-expand:focus-visible,
  .gallery-main-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

  /* ---------------- Lightbox (product page) ---------------- */
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 12, 0.92);
    padding: 1rem;
  }
  .lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 92vw;
    max-height: 88vh;
  }
  .lightbox-img {
    max-width: 92vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
  }
  .lightbox-caption {
    color: rgba(253, 251, 247, 0.8);
    font-size: 0.875rem;
    font-family: var(--font-body);
  }
  .lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
  }
  .lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
  }
  .lightbox-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }
  .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }
  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
  }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  @media (max-width: 640px) {
    .lightbox-nav { width: 2.5rem; height: 2.5rem; }
    .lightbox-close { width: 2.5rem; height: 2.5rem; }
  }

  /* ---------------- Filter chips (catalog) ---------------- */
  .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.75rem;
    padding: 0 1rem;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .chip:hover { border-color: var(--color-primary); background: rgb(122 31 43 / 0.06); }
  .chip-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-bg); }
  .chip-active:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: var(--color-bg); }

  .chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.375rem;
    font-size: 0.71875rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    background: rgb(122 31 43 / 0.1);
    color: inherit;
  }
  .chip-active .chip-count { background: rgb(253 251 247 / 0.22); }

  /* ---------------- Filter strips (mobile: horizontal scroll per group) ----------------
     Chips scroll sideways on small screens (Myntra/Nykaa pattern) instead of wrapping.
     Edge fade: .chip-strip-wrap is the scrollport; .chip-fade is an absolutely
     positioned right-edge gradient that hides when the strip is fully scrolled (.is-end). */
  .chip-strip-wrap { position: relative; }
  .chip-fade {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0.375rem;
    width: 2.5rem;
    background: linear-gradient(to left, rgb(246 240 231), rgb(246 240 231 / 0));
    pointer-events: none;
  }
  @media (max-width: 767.98px) {
    .chip-strip-wrap { position: relative; }
    .chip-strip {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0.5rem;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 0 0 0.375rem;
      scroll-snap-type: x proximity;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .chip-strip::-webkit-scrollbar { display: none; }
    .chip-strip .chip { scroll-snap-align: start; flex: 0 0 auto; }
    .chip-strip-wrap .chip-fade { display: block; }
    .chip-strip-wrap.is-end .chip-fade { opacity: 0; }
  }

  /* ---------------- Product card ---------------- */
  .product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgb(201 162 39 / 0.45);
  }
  .product-card .card-img {
    aspect-ratio: 4 / 5;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  .product-card:hover .card-img { transform: scale(1.05); }

  /* ---------------- Hero arch image ---------------- */
  .arch {
    border-radius: 999px 999px var(--radius-card) var(--radius-card);
    overflow: hidden;
  }
  .arch-ring {
    border-radius: 999px 999px calc(var(--radius-card) + 8px) calc(var(--radius-card) + 8px);
    outline: 1px solid rgb(201 162 39 / 0.35);
    outline-offset: 8px;
  }

  /* ---------------- Category cards ---------------- */
  .category-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-card);
    aspect-ratio: 4 / 5;
  }
  .category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  .category-card:hover img { transform: scale(1.06); }
  .category-card .cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgb(26 26 26 / 0.62), rgb(26 26 26 / 0.05) 55%);
  }
  .category-card .cat-label {
    position: absolute;
    left: 1.125rem;
    right: 1.125rem;
    bottom: 1.125rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.375rem;
    line-height: 1.3;
    color: var(--color-bg);
  }
  .category-card .cat-count {
    position: absolute;
    left: 1.125rem;
    top: 1.125rem;
  }
  .category-card .cat-arrow {
    position: absolute;
    right: 1.125rem;
    bottom: 1.125rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(253 251 247 / 0.16);
    color: var(--color-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background-color 0.2s ease, transform 0.2s ease;
  }
  .category-card:hover .cat-arrow {
    background: rgb(253 251 247 / 0.32);
    transform: translateX(2px);
  }

  /* ---------------- Marquee strip ---------------- */
  .marquee {
    overflow: hidden;
    background: var(--color-primary-dark);
    color: var(--color-bg);
    padding-block: 0.875rem;
  }
  .marquee-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
  }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }
  @media (prefers-reduced-motion: reduce) {
    .marquee-track {
      animation: none;
      width: 100%;
      flex-wrap: wrap;
      justify-content: center;
      row-gap: 0.5rem;
    }
  }

  /* ---------------- Footer ---------------- */
  .site-footer {
    background: var(--color-primary-dark);
    color: #F6F0E7;
  }
  .footer-link {
    display: inline-block;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: rgb(246 240 231 / 0.78);
    text-decoration: none;
    transition: color 0.2s ease;
  }
  .footer-link:hover { color: var(--color-bg); }

  /* ---------------- Floating WhatsApp button ---------------- */
  .wa-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: var(--color-whatsapp);
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgb(37 211 102 / 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease;
    animation: wa-in 0.5s ease-out both, wa-pulse 1.6s ease-out 0.6s 1;
  }
  .wa-float:hover { background: var(--color-whatsapp-dark); transform: translateY(-2px); }
  @keyframes wa-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
  @keyframes wa-pulse {
    0% { box-shadow: 0 0 0 0 rgb(37 211 102 / 0.55); }
    70% { box-shadow: 0 0 0 18px rgb(37 211 102 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(37 211 102 / 0); }
  }
  @media (min-width: 768px) { .wa-float { right: 1.75rem; bottom: 1.75rem; } }

  /* ---------------- Sticky enquiry bar (product page, mobile) ---------------- */
  .sticky-enquiry { display: none; }
  @media (max-width: 767.98px) {
    .sticky-enquiry {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 55;
      padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
      background: rgb(253 251 247 / 0.95);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-top: 1px solid var(--color-border);
      box-shadow: 0 -8px 24px rgb(26 26 26 / 0.06);
    }
    /* The enquiry bar is the WhatsApp CTA on product pages, so hide the float there to avoid overlap. */
    body[data-page="product"] .wa-float { display: none; }
    body[data-page="product"] .site-footer { padding-bottom: 5.5rem; }
  }

  /* ---------------- Scroll reveal (GSAP) ---------------- */
  /* Content is fully visible by default; GSAP only animates when present. */
  [data-reveal] { will-change: transform, opacity; }
