/* Header section: sticky ivory bar with a gold hairline, script wordmark, nav, CTA, cart, mobile drawer */

.section-header,
.shopify-section:has(> .site-header) {
  position: sticky;
  top: 0;
  z-index: 40;
}
.section-header:has(> .site-header:not(.site-header--sticky)),
.shopify-section:has(> .site-header:not(.site-header--sticky)) {
  position: relative;
}

.site-header {
  position: relative;
  background-color: rgba(255, 253, 248, .96);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background-color: rgba(255, 253, 248, .88);
    -webkit-backdrop-filter: saturate(1.2) blur(12px);
    backdrop-filter: saturate(1.2) blur(12px);
  }
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 134, 43, 0), var(--c-gold) 18%, var(--c-gold) 82%, rgba(184, 134, 43, 0));
  opacity: .75;
}
.site-header.is-scrolled { box-shadow: 0 12px 28px -20px rgba(42, 33, 28, .45); }

.site-header__inner {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  column-gap: 8px;
  min-height: 72px;
  padding-block: 8px;
}

.site-header__menu-toggle { grid-column: 1; margin-left: -10px; }

.site-header__brand {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 6px 4px;
  text-decoration: none;
  border-radius: 8px;
}
.site-header__logo { display: block; width: min(var(--logo-width, 200px), 100%); }
.site-header__logo img { width: 100%; height: auto; }

/* Header and drawer use the compact lockup: "Naples Elves" on one line, large enough to read at a
   glance (stacked at bar size the script and the hat smudge together). The hat is worn only from
   990px up, where the word is big enough for it to read as a hat. The uneven padding centres the
   script's x-height band on the icons beside it and keeps the p's descender clear of the hairline. */
.wordmark--stacked.wordmark--header,
.wordmark--stacked.wordmark--drawer { flex-direction: row; align-items: baseline; column-gap: .27em; }
.wordmark--stacked.wordmark--header .wordmark__rest,
.wordmark--stacked.wordmark--drawer .wordmark__rest { position: static; margin-top: 0; font-size: 1em; }
.wordmark--header .wordmark__hat,
.wordmark--drawer .wordmark__hat { display: none; }
.wordmark--header {
  font-size: 2.5rem;
  padding: .19em 0 .11em;
}
/* Every fallback script font is wider than Great Vibes. Allowed to wrap, "Elves" drops to a second
   line on 360-413px phones until the web font arrives, and the header then shrinks by 40px (a 0.14
   layout shift on every page). Below 360px the word wraps with either font, so the height is stable. */
@media (min-width: 360px) {
  .wordmark--stacked.wordmark--header { flex-wrap: nowrap; }
}

.site-header__nav { display: none; }

.site-header__actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}
.site-header__cta { display: none; }

.site-header__cart { position: relative; margin-right: -10px; }
.cart-count {
  position: absolute;
  top: 5px;
  right: 3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--c-red);
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: .7rem;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0;
  text-align: center;
  box-shadow: 0 0 0 2px var(--c-ivory);
  pointer-events: none;
}
.cart-count.is-bumped { animation: ne-bump .5s var(--ease); }
@keyframes ne-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@media (min-width: 600px) {
  .wordmark--header { font-size: 2.75rem; }
}

@media (min-width: 990px) {
  .site-header__inner {
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
    column-gap: clamp(20px, 2.4vw, 40px);
    min-height: 92px;
  }
  .site-header__menu-toggle { display: none; }
  .site-header__brand { grid-column: 1; justify-self: start; margin-left: -4px; }
  .wordmark--header { font-size: 3rem; padding: .26em 0 .04em; }
  .wordmark--header .wordmark__hat { display: block; top: -.399em; }
  .site-header__nav { grid-column: 2; display: flex; justify-content: center; }
  .site-header__cta { display: inline-flex; }
  .site-header__cta.btn { min-height: 44px; padding: 12px 24px; font-size: .78rem; }
}

/* Desktop navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__item { position: relative; }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 2px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-ink);
  text-decoration: none;
  list-style: none;
}
.site-nav__link::-webkit-details-marker { display: none; }
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 6px;
  height: 1px;
  background: var(--c-gold);
  transition: left .3s var(--ease), right .3s var(--ease);
}
.site-nav__link:hover { color: var(--c-red); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after,
.site-nav__link[aria-current="page"]::after { left: 0; right: 0; }
.site-nav__link.is-active, .site-nav__link[aria-current="page"] { color: var(--c-green); }
.site-nav__link .icon { transition: transform .25s var(--ease); }
.site-nav__details[open] > .site-nav__link .icon { transform: rotate(180deg); }

.site-nav__submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 5;
  min-width: 220px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--c-ivory);
  border: 1px solid var(--c-gold-light);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  transform: translateX(-50%);
}
.site-nav__sublink {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .95rem;
  color: var(--c-ink);
  text-decoration: none;
}
.site-nav__sublink:hover, .site-nav__sublink[aria-current="page"] { background: var(--c-cream); color: var(--c-red); }

/* Mobile navigation drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .42s;
}
.nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.nav-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 32, 22, .5);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.nav-drawer.is-open .nav-drawer__overlay { opacity: 1; }

.nav-drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: min(88vw, 390px);
  padding: 14px 24px 36px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--c-ivory);
  background-image:
    radial-gradient(ellipse 90% 40% at 0% 0%, var(--c-glow), rgba(255, 244, 220, 0) 70%),
    radial-gradient(ellipse 80% 35% at 100% 100%, rgba(243, 233, 216, .9), rgba(243, 233, 216, 0) 70%);
  border-right: 1px solid var(--c-gold-light);
  box-shadow: 24px 0 48px -24px rgba(42, 33, 28, .45);
  transform: translateX(-104%);
  transition: transform .42s var(--ease);
}
.nav-drawer.is-open .nav-drawer__panel { transform: none; }
.nav-drawer__panel:focus { outline: none; }
.nav-drawer__panel > *:not(.sparkles) { position: relative; z-index: 1; }

.nav-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--c-gold-light);
}
.wordmark--drawer { font-size: 2.3rem; padding: .2em 0 .1em; }
.nav-drawer__close { margin-right: -10px; }

.nav-drawer__menu { margin: 0; padding: 0; list-style: none; }
.nav-drawer__item { border-bottom: 1px solid rgba(230, 207, 148, .7); }
.nav-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 2px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--c-green);
  text-decoration: none;
}
.nav-drawer__link .icon { color: var(--c-gold); transition: transform .25s var(--ease), color .25s var(--ease); }
.nav-drawer__link:hover { color: var(--c-red); }
.nav-drawer__link:hover .icon { transform: translateX(4px); color: var(--c-red); }
.nav-drawer__link[aria-current="page"] { color: var(--c-red); }
.nav-drawer__submenu { margin: -4px 0 12px; padding: 0 0 0 14px; list-style: none; border-left: 1px solid var(--c-gold-light); }
.nav-drawer__sublink { display: block; padding: 8px 4px; color: var(--c-ink); text-decoration: none; }
.nav-drawer__sublink:hover { color: var(--c-red); }

.nav-drawer__rule { margin-block: 2px; }

.nav-drawer__meta {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .98rem;
  color: var(--c-ink-soft);
}
.nav-drawer__meta li { display: flex; align-items: center; gap: 10px; }
.nav-drawer__meta .icon { color: var(--c-green); }
.nav-drawer__meta a { color: var(--c-ink); text-decoration-color: var(--c-gold-light); }
.nav-drawer__social { margin-top: -6px; }

.nav-drawer__sparkles .sparkle { opacity: .55; }

@media (min-width: 990px) {
  .nav-drawer { display: none; }
}
