/* Shared header/footer component styles */
.header-logo__image {
  display: block;
  height: 52px;
  max-width: 180px;
  object-fit: contain;
  width: auto;
}

.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { white-space: nowrap; flex-shrink: 0; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.mega-menu { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, visibility .25s; }
.mega-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; }
.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu,
.nav-item.is-open .mega-menu { opacity: 1; visibility: visible; pointer-events: auto; }
.category-mega-menu { background: #fdfbf7; }
.category-mega-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 390px;
}
.category-mega-copy { padding: 34px 42px 36px; }
.category-menu-kicker {
  color: #c9a84c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  margin-bottom: 24px;
  text-transform: uppercase;
}
.category-menu-grid {
  column-gap: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 0;
}
.category-menu-link {
  align-items: center;
  border-bottom: 1px solid rgba(14,13,12,.08);
  color: #0e0d0c;
  display: flex;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  font-weight: 700;
  justify-content: space-between;
  line-height: 1.2;
  min-height: 42px;
  transition: color .2s, padding-left .2s, border-color .2s;
}
.category-menu-link::after {
  color: rgba(201,168,76,.8);
  content: "›";
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s, transform .2s;
}
.category-menu-link:hover { border-color: rgba(201,168,76,.38); color: #c9a84c; padding-left: 6px; }
.category-menu-link:hover::after { opacity: 1; transform: translateX(0); }
.category-menu-feature {
  background: #0e0d0c;
  color: #fff;
  display: block;
  min-height: 100%;
  overflow: hidden;
  position: relative;
}
.category-menu-feature img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  opacity: .72;
  position: absolute;
  transition: transform .7s ease, opacity .3s ease;
  width: 100%;
}
.category-menu-feature::after {
  background: linear-gradient(to top, rgba(14,13,12,.96), rgba(14,13,12,.35) 58%, rgba(14,13,12,.08));
  content: "";
  inset: 0;
  position: absolute;
}
.category-feature-content {
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 0;
  padding: 32px;
  position: absolute;
  right: 0;
  z-index: 1;
}
.category-feature-kicker {
  color: #c9a84c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.category-feature-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
  font-weight: 700;
  line-height: .98;
}
.category-feature-link {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  margin-top: 8px;
  text-transform: uppercase;
}
.category-menu-feature:hover img { opacity: .82; transform: scale(1.05); }
.category-menu-feature:hover .category-feature-link { color: #c9a84c; }

.mobile-nav { transform: translateX(100%); transition: transform .4s cubic-bezier(.4,0,.2,1); }
.mobile-nav.open { transform: translateX(0); }
#headerActions { flex-shrink: 0; }
#hamburger { display: none; width: 24px; height: 24px; align-items: center; justify-content: center; flex-shrink: 0; }
#header { position: fixed; top: 36px; left: 0; right: 0; z-index: 50; }

.nl-input:focus { outline: none; border-color: #c9a84c; box-shadow: 0 0 0 3px rgba(201,168,76,.2); }

body[data-page="home"] .layout-nav-link[data-page="home"],
body[data-page="collection"] .layout-nav-link[data-page="collection"],
body[data-page="product"] .layout-nav-link[data-page="product"] { color: #c9a84c; }

/* ── Fixed header offset ── */
/* Topbar is always visible at top:0. Nav is at top:36px (below topbar). Total reserved = 108px */
body { padding-top: 108px; }
/* When nav is hidden via scroll, only topbar padding remains */
body.header-hidden { padding-top: 36px; }

/* ── Mobile overlay z-index fix for fixed header ── */
#mobileMenuLayer { z-index: 70; }
#mobileNav { z-index: 71; }
.mobile-overlay { position: fixed; inset: 0; background: rgba(14,13,12,.5); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.mobile-overlay.show { opacity: 1; pointer-events: auto; }

.store-search-modal,
.store-cart-drawer {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity .22s ease, visibility .22s ease;
  visibility: hidden;
  z-index: 90;
}
.store-search-modal.is-open,
.store-cart-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.store-panel-backdrop {
  background: rgba(8,7,6,.58);
  backdrop-filter: blur(4px);
  inset: 0;
  position: absolute;
}
.store-search-dialog,
.store-cart-panel {
  background: #fff;
  color: #111;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
}
.store-search-dialog {
  margin: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 56px 24px 32px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.store-search-modal.is-open .store-search-dialog {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  border-radius: 0;
}
.store-search-box {
  max-width: 560px;
  width: 100%;
}
@media (min-width: 640px) {
  .store-search-dialog {
    padding: 72px 48px 48px;
  }
  .store-search-box {
    max-width: 640px;
  }
}
.store-cart-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-left: auto;
  max-width: min(430px, 100vw);
  transform: translateX(100%);
  transition: transform .28s ease;
  width: 100%;
}
.store-cart-drawer.is-open .store-cart-panel { transform: translateX(0); }
.store-panel-close {
  align-items: center;
  background: #fff;
  border: 1px solid #ece8e1;
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  display: grid;
  height: 38px;
  justify-content: center;
  place-items: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 38px;
}
.store-panel-close svg,
.store-search-box svg,
.store-cart-remove svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.store-panel-close svg { width: 16px; height: 16px; }
.store-panel-kicker {
  color: #b8943f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  margin: 0 48px 8px 0;
  text-transform: uppercase;
}
.store-search-dialog h2,
.store-cart-head h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}
.store-search-box {
  align-items: center;
  border: 1px solid #ded8ce;
  display: grid;
  gap: 10px;
  grid-template-columns: 20px 1fr;
  margin-top: 22px;
  padding: 0 14px;
  max-width: 560px;
  width: 100%;
}
.store-search-box svg { color: #746d64; height: 18px; width: 18px; }
.store-search-box input {
  border: 0;
  font: inherit;
  height: 48px;
  min-width: 0;
  outline: none;
}
@media (min-width: 640px) {
  .store-search-box {
    max-width: 640px;
  }
}
.store-search-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-width: 560px;
  width: 100%;
}
@media (min-width: 640px) {
  .store-search-results {
    max-width: 640px;
  }
}
.store-result,
.store-cart-item {
  align-items: center;
  border: 1px solid #eee9e1;
  color: #111;
  display: grid;
  gap: 12px;
  grid-template-columns: 70px 1fr auto;
  padding: 10px;
  text-decoration: none;
}
.store-result img,
.store-cart-item img {
  aspect-ratio: 1;
  display: block;
  height: 70px;
  object-fit: cover;
  width: 70px;
}
.store-result strong,
.store-cart-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.store-result span,
.store-cart-copy span {
  color: #746d64;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}
.store-result em {
  color: #b8943f;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.store-empty {
  border: 1px dashed #ded8ce;
  color: #746d64;
  font-size: 14px;
  padding: 24px;
  text-align: center;
}
.store-cart-head {
  border-bottom: 1px solid #ece8e1;
  padding: 24px 70px 20px 24px;
  position: relative;
}
.store-cart-items {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
}
.store-cart-copy { min-width: 0; }
.store-cart-qty {
  align-items: center;
  background: #f4f2ef;
  border-radius: 999px;
  display: inline-grid;
  grid-template-columns: 28px 26px 28px;
  height: 32px;
  margin-top: 10px;
  overflow: hidden;
  text-align: center;
}
.store-cart-qty button {
  border: 0;
  background: transparent;
  cursor: pointer;
  height: 100%;
}
.store-cart-remove {
  background: #fff;
  border: 1px solid #ece8e1;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}
.store-cart-remove svg { height: 14px; width: 14px; }
.store-cart-footer {
  border-top: 1px solid #ece8e1;
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 18px;
}
.store-cart-total {
  align-items: center;
  display: flex;
  font-size: 14px;
  justify-content: space-between;
}
.store-checkout-btn,
.store-clear-btn {
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  height: 44px;
}
.store-checkout-btn {
  background: #050505;
  border-radius: 999px;
  color: #fff;
}
.store-clear-btn {
  background: transparent;
  color: #746d64;
}
body.store-panel-open { overflow: hidden; }

@media (max-width: 1280px) {
  #mainNav > div { padding-left: 20px; padding-right: 20px; }
  #desktopNav { gap: 1.1rem; min-width: 0; }
  .mega-menu {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
  }
  .category-mega-shell { grid-template-columns: minmax(0, 1fr) 310px; }
  .category-mega-copy { padding: 30px 32px 32px; }
  .category-menu-grid { column-gap: 36px; }
  .category-menu-link { font-size: 17px; }
  .category-feature-title { font-size: 30px; }
}

@media (max-width: 1023px) {
  body { padding-top: 100px; }
  body.header-hidden { padding-top: 100px; }
  #header { transform: translateY(0) !important; }
  #mainNav > div { height: 64px; padding-left: 16px; padding-right: 16px; }
  #headerActions { gap: 16px; }
  #hamburger { display: flex; }
  #desktopNav { display: none !important; }
  .marquee-track span { padding-left: 2rem !important; padding-right: 2rem !important; }
  .mobile-nav {
    width: min(88vw, 320px) !important;
    z-index: 71;
  }
  .mobile-overlay { z-index: 55; }
}

@media (max-width: 480px) {
  body { padding-top: 96px; }
  #mainNav > div { height: 60px; gap: 12px; padding-left: 16px; padding-right: 16px; }
  #headerActions { gap: 12px; }
  #cartBtn { display: inline-grid; }
  .marquee-track span { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  .store-result,
  .store-cart-item { grid-template-columns: 58px 1fr auto; }
  .store-result img,
  .store-cart-item img { height: 58px; width: 58px; }
}

/* Mobile spacing pass for public pages that use Tailwind utility markup. */
@media (max-width: 767px) {
  .px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .py-28,
  .py-24,
  .py-20 {
    padding-bottom: 3.5rem !important;
    padding-top: 3.5rem !important;
  }

  .pt-28,
  .pt-24,
  .pt-20 {
    padding-top: 3.5rem !important;
  }

  .pb-28,
  .pb-24,
  .pb-20 {
    padding-bottom: 3.5rem !important;
  }

  .py-16 {
    padding-bottom: 3rem !important;
    padding-top: 3rem !important;
  }

  .pt-16 { padding-top: 3rem !important; }
  .pb-16 { padding-bottom: 3rem !important; }
  .mb-16 { margin-bottom: 2.5rem !important; }
  .mt-16 { margin-top: 2.5rem !important; }
  .gap-16 { gap: 2rem !important; }
  .gap-12,
  .gap-10 {
    gap: 1.75rem !important;
  }

  .p-10 {
    padding: 1.5rem !important;
  }

  .p-8 {
    padding: 1.5rem !important;
  }

  section[class*="h-[80vh]"],
  section[class*="h-[70vh]"],
  section[class*="h-[65vh]"],
  section[class*="h-[50vh]"],
  section[class*="h-[40vh]"] {
    height: auto !important;
    min-height: clamp(300px, 58vh, 460px) !important;
  }

  section[class*="h-[80vh]"] {
    min-height: clamp(380px, 68vh, 520px) !important;
  }

  section[class*="h-[40vh]"] {
    min-height: 280px !important;
  }

  .font-display.text-5xl,
  .font-display.text-6xl,
  .font-display.text-7xl {
    font-size: clamp(2.3rem, 12vw, 3.5rem) !important;
    line-height: .98 !important;
  }

  .footer,
  footer.bg-obsidian {
    padding-top: 3.5rem !important;
  }

  footer .pb-16 {
    padding-bottom: 2.5rem !important;
  }
}

@media (max-width: 480px) {
  .py-28,
  .py-24,
  .py-20 {
    padding-bottom: 3rem !important;
    padding-top: 3rem !important;
  }

  .pt-28,
  .pt-24,
  .pt-20 {
    padding-top: 3rem !important;
  }

  .pb-28,
  .pb-24,
  .pb-20 {
    padding-bottom: 3rem !important;
  }

  .py-16 {
    padding-bottom: 2.5rem !important;
    padding-top: 2.5rem !important;
  }

  section[class*="h-[80vh]"],
  section[class*="h-[70vh]"],
  section[class*="h-[65vh]"],
  section[class*="h-[50vh]"],
  section[class*="h-[40vh]"] {
    min-height: 300px !important;
  }

  section[class*="h-[80vh]"] {
    min-height: 420px !important;
  }
}
