/* Header: sticky, near-black like the hero, constant. Three zones (1fr auto 1fr): logo left, the page links exactly centred on the
   full screen width whatever the width of logo or tools, search / language / cart right. Nothing changes on scroll. */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(9, 9, 11, 0.96); color: var(--white); border-bottom: 1px solid #1c1c1f; }
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu. */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); max-width: none; margin: 0; padding-inline: clamp(16px, 2.5vw, 40px); gap: 24px; }

/* Logo: official wordmark (dark, transparent PNG, 760 px source) */
.logo { display: inline-flex; align-items: center; justify-self: start; height: 44px; }
.logo img { height: 19px; width: auto; max-width: none; }

.main-nav { justify-self: center; }
.main-nav ul { display: flex; gap: 40px; }
.main-nav .nav-secondary { display: none; }
.nav-link { position: relative; display: inline-flex; align-items: center; height: 44px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; color: #9b9ba0; transition: color var(--dur-fast) var(--ease); }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: var(--white); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--white); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Tools: search, language, cart. Same 44px hit area and 4px rhythm. */
.header-actions { justify-self: end; display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--white); transition: color var(--dur-fast); }
.icon-btn:hover { color: #ff5c73; }
/* Cart count: a small white pill with the number in near-black, a thin ring in the header colour so it sits cleanly on the icon.
   It pops in softly when the number changes (see render() in js/cart.js). Black, white and a single quiet detail, like the rest of the header. */
.cart-count { position: absolute; top: 4px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; box-sizing: border-box; border-radius: 9px; background: var(--white); color: var(--ink); box-shadow: 0 0 0 2px #09090b; font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; opacity: 0; transform: scale(0.6); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); pointer-events: none; }
.cart-count.has-items { opacity: 1; transform: none; }
.cart-count.is-bump { animation: cart-bump 0.4s var(--ease); }
@keyframes cart-bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cart-count.is-bump { animation: none; } }

.menu-toggle { display: none; width: 44px; height: 44px; position: relative; color: var(--white); }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform 0.35s var(--ease), top 0.35s var(--ease); }
.menu-toggle span:first-child { top: 18px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle.is-open span:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-toggle.is-open span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* Announcement marquee above the header: slow, endless right-to-left scroll of four benefits.
   Two identical groups; the track moves by exactly one group (-50%), so the loop is seamless. Scrolls away with the page. */
.announce { position: relative; height: 42px; overflow: hidden; background: #f4f5f8; color: var(--ink); border-bottom: 1px solid #e6e6ea; }
.announce::before, .announce::after { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(32px, 6vw, 96px); z-index: 1; pointer-events: none; }
.announce::before { left: 0; background: linear-gradient(90deg, #f4f5f8, rgba(244, 245, 248, 0)); }
.announce::after { right: 0; background: linear-gradient(270deg, #f4f5f8, rgba(244, 245, 248, 0)); }
.announce-track { display: flex; width: max-content; height: 100%; animation: announce-scroll var(--marquee-duration, 60s) linear infinite; will-change: transform; }
.announce:hover .announce-track { animation-play-state: paused; }
.announce-group { display: flex; flex: none; align-items: center; margin: 0; padding: 0; list-style: none; }
.announce-item { display: inline-flex; align-items: center; gap: 10px; padding-inline: 28px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.announce-item svg { flex: none; color: #6c6c73; }
@keyframes announce-scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@media (max-width: 600px) { .announce { height: 40px; } .announce-item { font-size: 11px; padding-inline: 22px; } }
/* Less motion: no scrolling, the four benefits are shown once, centred */
@media (prefers-reduced-motion: reduce) {
  .announce { height: auto; }
  .announce::before, .announce::after { display: none; }
  .announce-track { animation: none; width: 100%; justify-content: center; }
  .announce-group:nth-child(2) { display: none; }
  .announce-group { flex-wrap: wrap; justify-content: center; padding-block: 6px; }
  .announce-group .announce-item:nth-child(n+5) { display: none; }
}

/* Desktop header, one row (like a shop front): logo left with the page links right next to it, the search field and the
   language / cart tools on the right. On phones the search stays an icon and the links live in the menu. */
.header-search { display: none; }
@media (min-width: 861px) {
  .header-inner { grid-template-columns: auto auto 1fr auto auto; grid-template-areas: "logo nav . search actions"; gap: 0 clamp(24px, 3vw, 48px); }
  .logo { grid-area: logo; }
  .main-nav { grid-area: nav; justify-self: start; }
  .header-search { grid-area: search; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: clamp(220px, 22vw, 340px); height: 44px; padding: 0 16px 0 18px; font: inherit; font-size: 14.5px; color: #9b9ba0; text-align: left; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 12px; cursor: text; transition: border-color var(--dur-fast), background var(--dur-fast); }
  .header-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-search svg { flex: none; color: var(--white); }
  .header-search:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.1); }
  .header-search:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
  .header-actions { grid-area: actions; }
  .header-actions .icon-btn[data-search-open] { display: none; }
}
