/* ============================================
   LUNARCO — Luxury layer (loaded AFTER style.css)
   Header, region gate, category architecture, homepage sections.
   Kept separate so style.css behaviour is untouched and this is easy to review/revert.
   ============================================ */

/* ---------- Header: fixed over hero (home) / sticky solid elsewhere ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.header-inner {
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr !important;
  align-items: center; gap: 8px;
}
.header-left { display: flex; align-items: center; justify-content: flex-start; min-width: 0; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-4); min-width: 0; }

.menu-btn { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 0; color: inherit; background: none; border: 0; cursor: pointer; }
.menu-btn .menu-lines { display: flex; flex-direction: column; gap: 6px; width: auto; height: auto; background: none; }
.menu-btn .menu-lines span { display: block; width: 22px; height: 1px; background: currentColor; }
.menu-btn .menu-label { width: auto; height: auto; background: none; font: 500 12px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; }

.logo-text {
  font-family: "Cinzel", serif; font-weight: 400;
  font-size: clamp(17px, 4.4vw, 26px);
  letter-spacing: .24em; padding-left: .24em; line-height: 1;
  color: inherit; text-decoration: none; white-space: nowrap; justify-self: center;
  transition: opacity .25s ease;
}
.logo-text:hover { opacity: .65; }

.site-header .header-icons { gap: var(--s-4); }
.site-header .header-icons button, .site-header .header-icons a { color: inherit; background: none; border: 0; cursor: pointer; padding: 6px; }
.site-header .header-icons svg { stroke: currentColor; }

body.has-hero .site-header { position: fixed; left: 0; right: 0; top: 0; }
body.has-hero .site-header:not(.scrolled) {
  background: transparent; border-bottom-color: transparent; box-shadow: none; color: #fff;
}
body.has-hero .site-header:not(.scrolled) .badge { background: #fff; color: #111; }
body.has-hero .site-header.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,.04); }

/* dark veil so white nav stays readable on any hero photo */
.hero::after {
  background: linear-gradient(to bottom, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 100%) !important;
  height: 160px;
}
.hero .hero-content { z-index: 4; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (max-width: 420px) {
  .menu-btn .menu-label { display: none; }
  .logo-text { letter-spacing: .16em; padding-left: .16em; font-size: 17px; }
  .site-header .header-icons { gap: 2px; }
  .header-inner { gap: 4px; }
}
@media (max-width: 340px) {
  .logo-text { font-size: 15px; letter-spacing: .12em; padding-left: .12em; }
  .site-header .header-icons button, .site-header .header-icons a { padding: 5px; }
}

/* ---------- Women / Men band: sits BETWEEN two hairlines ---------- */
.lcat-section { border-top: 0; }
.lcat-tabs {
  display: flex; justify-content: center; align-items: center; gap: clamp(32px, 8vw, 72px);
  padding: 22px 0; margin: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.lcat-tab {
  font-family: var(--font-body); font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  padding: 6px 2px; color: var(--charcoal); background: none; border: 0;
  border-bottom: 1px solid transparent; cursor: pointer;
  transition: color .25s ease, border-color .25s ease;
}
.lcat-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.lcat-img { position: relative; background: var(--bg-soft); }
.lcat-img img { display: block; }
.lcat-img img:not([src]), .lcat-img img[hidden] { display: none; }
.lcat-img .lcat-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display, "Cormorant Garamond", serif); font-size: 20px; color: var(--charcoal); letter-spacing: .04em; padding: 12px; text-align: center; }
.lcat-card[aria-disabled="true"] { pointer-events: none; opacity: .6; }

/* ---------- smooth swaps ---------- */
.product-grid { transition: opacity .22s ease, transform .22s ease; }
.product-grid.is-fading { opacity: 0; transform: translateY(6px); }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
}
@media (prefers-reduced-motion: reduce) {
  .product-grid, .site-header, .lcat-panel.active { transition: none !important; animation: none !important; }
}

/* ---------- Category / gender listing pages ---------- */
.crumbs { font-size: 12px; letter-spacing: .08em; color: var(--charcoal); padding: var(--s-5) 0 0; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.cat-switch { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; padding: var(--s-4) 0 var(--s-5); border-bottom: 1px solid var(--line); margin-bottom: var(--s-6); }
.cat-switch a, .cat-switch button {
  font: 400 13px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--charcoal); text-decoration: none; background: none; border: 0; border-bottom: 1px solid transparent;
  padding: 6px 0; cursor: pointer; transition: color .25s, border-color .25s;
}
.cat-switch a:hover, .cat-switch button:hover { color: var(--ink); }
.cat-switch [aria-current="page"], .cat-switch .active { color: var(--ink); border-bottom-color: var(--ink); }
.cat-switch .cat-sep { margin-left: auto; }
.gender-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); margin-bottom: var(--s-7); }
@media (max-width: 1024px) { .gender-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cat-switch { gap: 6px 18px; } .cat-switch .cat-sep { margin-left: 0; } }

/* ---------- Menu groups ---------- */
.fs-group { display: block; }
.fs-sub { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 2px 0 18px; }
.fs-sub a { font: 400 13px/1.6 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--charcoal); text-decoration: none; }
.fs-sub a:hover { color: var(--ink); }

/* ---------- Footer region link ---------- */
.region-link { font: inherit; font-size: 12px; background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: inherit; }

/* ---------- Homepage editorial sections ---------- */
.home-section { padding-block: var(--s-8); }
.home-section[hidden] { display: none; }
.home-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; }
.home-split-media { aspect-ratio: 4/5; background: var(--bg-soft); overflow: hidden; }
.home-split-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-eyebrow { font: 500 11px/1 var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--charcoal); margin-bottom: var(--s-4); }
.home-h { font-family: "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.1; margin-bottom: var(--s-4); }
.home-p { font-size: 15px; line-height: 1.8; color: var(--charcoal); max-width: 46ch; margin-bottom: var(--s-5); }
.home-cta { display: inline-block; font: 500 12px/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.home-journal { text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .home-split { grid-template-columns: 1fr; gap: var(--s-5); } .home-section { padding-block: var(--s-7); } }

/* ---------- Region gate (cookies -> country) ---------- */
html.region-pending { overflow: hidden; }
html.region-pending body > *:not(#region-gate):not(.cookie-modal-overlay) { visibility: hidden; }
#region-gate {
  position: fixed; inset: 0; z-index: 9000; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center; overflow-y: auto;
  opacity: 0; transition: opacity .35s ease; padding: 24px 16px;
}
#region-gate.visible { opacity: 1; }
.region-inner { width: 100%; max-width: 420px; text-align: center; }
.region-brand { font-family: "Cinzel", serif; font-size: clamp(26px, 8vw, 36px); letter-spacing: .3em; padding-left: .3em; margin-bottom: 36px; }
.region-card { background: transparent; }
.region-h { font-family: "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(22px, 6vw, 28px); margin-bottom: 18px; }
.region-p { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,.78); margin: 0 auto 26px; max-width: 38ch; }
.region-label { display: block; text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.region-select {
  width: 100%; height: 48px; padding: 0 14px; background: #fff; color: #111; border: 0; border-radius: 0;
  font: 400 14px var(--font-body, Inter, sans-serif);
}
.region-note { min-height: 20px; font-size: 12px; color: rgba(255,255,255,.65); margin: 12px 0 18px; }
.region-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.region-btn { height: 48px; border: 1px solid #fff; background: transparent; color: #fff; font: 500 12px var(--font-body, Inter, sans-serif); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s, opacity .25s; }
.region-btn.solid { background: #fff; color: #000; }
.region-btn:hover:not(:disabled) { opacity: .85; }
.region-btn:disabled { opacity: .35; cursor: not-allowed; }
.region-link-btn { background: none; border: 0; color: rgba(255,255,255,.75); font-size: 12px; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; }
#region-gate :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.cookie-modal-overlay { z-index: 9500; }

/* ---------- small-screen safety (320px) ---------- */
.newsletter-form { display: flex; flex-wrap: nowrap; gap: 0; max-width: 300px; }
.newsletter-form input { flex: 1 1 auto; min-width: 0; width: auto; max-width: 100%; }
.newsletter-form button { flex: 0 0 auto; }
img, video { max-width: 100%; }
.search-box input { min-width: 0; font-size: clamp(17px, 5vw, 24px); }
.search-box { max-width: 100%; }
.search-overlay { overflow-x: hidden; }
/* Until search.js upgrades it (.sx), the search panel must be completely hidden.
   Otherwise it flashes over the page for a moment on every load. */
.search-overlay:not(.sx):not(.open) { opacity: 0; visibility: hidden; transform: none; transition: none; pointer-events: none; }

/* Women / Men band: remove the 64px gap + doubled line that used to sit above it */
.editorial-intro { margin-bottom: 0; border-bottom: 0; }
/* placeholder wordmark only while there is no image */
.lcat-img img:not([hidden]) ~ .lcat-fallback { display: none; }


/* ---------- Category chips (All / Bags / Ready-to-Wear / Perfume / Jewelry) ----------
   Text tabs with a thin underline on the active one. Never a filled/black box,
   whatever state (hover, tap, focus, active) the chip is in. */
.cat-switch .filter-chip,
.cat-switch .filter-chip:hover,
.cat-switch .filter-chip:focus,
.cat-switch .filter-chip:active {
  background: transparent; box-shadow: none; border-radius: 0;
  border-width: 0 0 1px; border-style: solid; border-color: transparent;
  padding: 6px 0; color: var(--charcoal);
  -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
}
.cat-switch .filter-chip:hover { color: var(--ink); }
.cat-switch .filter-chip.active,
.cat-switch .filter-chip.active:hover,
.cat-switch .filter-chip.active:focus,
.cat-switch .filter-chip[aria-pressed="true"] { background: transparent; color: var(--ink); border-bottom-color: var(--ink); }
.cat-switch .filter-chip:focus { outline: none; }
.cat-switch .filter-chip:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.cat-switch a, .cat-switch button { -webkit-tap-highlight-color: transparent; }

/* ---------- Footer: social icons ---------- */
.footer-social {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: var(--s-6) var(--s-5) var(--s-5);
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-social-label {
  font: 500 10px/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.footer-social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer-social-list a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.8);
  transition: color .25s ease, background-color .25s ease, border-color .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.footer-social-list a:hover, .footer-social-list a:focus-visible { color: var(--ink); background: #fff; border-color: #fff; }
.footer-social-list svg { width: 17px; height: 17px; fill: currentColor; display: block; }
@media (max-width: 480px) {
  .footer-social-list { gap: 10px; }
  .footer-social-list a { width: 42px; height: 42px; }
}
