/* Canonical header bands, loaded after every page skin. */
body.shop-public.reference-shell[data-shop-page] {
  --shop-utility-height: 54.5px;
  --shop-header-height: 155px;
}
/* Shared header geometry, applied after the legacy reference skin. */
body.shop-public.reference-shell[data-shop-page] .header-actions {
  width: max-content !important;
  min-width: 0 !important;
  gap: 8px !important;
  align-items: center;
}
body.shop-public.reference-shell[data-shop-page] .header-actions > * { flex: 0 0 auto; }
body.shop-public.reference-shell[data-shop-page] .header-actions .language-menu { flex-basis: auto; }
body.shop-public.reference-shell[data-shop-page] .language-menu-trigger {
  width: 76px !important;
  height: 44px !important;
  padding: 0 8px !important;
  gap: 6px;
  border-radius: 8px;
  box-sizing: border-box;
}
body.shop-public.reference-shell[data-shop-page] .header-search {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 !important;
  border-radius: 8px !important;
  overflow: hidden;
  transform: none !important;
}
body.shop-public.reference-shell[data-shop-page] .header-search input {
  flex: 1 1 0;
  width: 0 !important;
  min-width: 0;
  box-sizing: border-box;
}
body.shop-public.reference-shell[data-shop-page] .header-search button {
  flex: 0 0 44px;
  width: 44px !important;
}
body.shop-public.reference-shell[data-shop-page] .site-header :is(.header-account > summary, .header-login-menu > summary) {
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  box-sizing: border-box;
  gap: 8px;
}
body.shop-public.reference-shell[data-shop-page] .site-header .header-cart {
  width: auto !important;
  min-width: 152px !important;
  flex: 0 0 auto !important;
  height: 64px !important;
  min-height: 64px !important;
  padding: 12px 16px !important;
  gap: 12px !important;
  border-radius: 12px !important;
}
body.shop-public.reference-shell[data-shop-page] .site-header .header-cart svg { width: 28px; height: 28px; }
body.shop-public.reference-shell[data-shop-page] .site-header .header-cart b {
  top: 6px !important;
  left: 7px !important;
  right: auto !important;
  min-width: 20px;
  height: 20px;
  font-size: 11px;
}
@media (min-width: 801px) {
  body.shop-public.reference-shell[data-shop-page] .site-header {
    grid-template-columns: var(--shop-header-identity-width) minmax(0, 1fr) max-content !important;
    column-gap: 24px !important;
  }
  body.shop-public.reference-shell[data-shop-page] .header-search {
    width: min(var(--shop-header-search-width), 100%) !important;
    max-width: 100% !important;
    height: 44px !important;
  }
  body.shop-public.reference-shell[data-shop-page] .header-search :is(input, button) {
    height: 44px !important;
    min-height: 44px !important;
  }
}
@media (max-width: 1100px) {
  body.shop-public.reference-shell[data-shop-page] .site-header .header-cart {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
    border-radius: 8px !important;
    box-shadow: none;
  }
  body.shop-public.reference-shell[data-shop-page] .site-header .header-cart-total { display: none !important; }
  body.shop-public.reference-shell[data-shop-page] .site-header .header-cart b { top: -4px !important; left: -4px !important; }
}
@media (max-width: 800px) {
  body.shop-public.reference-shell[data-shop-page] .language-menu-trigger { width: 64px !important; padding-inline: 5px !important; gap: 4px; }
  body.shop-public.reference-shell[data-shop-page] .header-actions { gap: 8px !important; }
  body.shop-public.reference-shell[data-shop-page] .site-header .header-account:not([hidden]) { display: block !important; }
  body.shop-public.reference-shell[data-shop-page] .site-header :is(.header-account > summary, .header-login-menu > summary) {
    width: 44px !important;
    min-width: 44px !important;
    padding: 8px !important;
    justify-content: center;
  }
  body.shop-public.reference-shell[data-shop-page] .site-header :is(.header-account > summary span, .header-account > summary .header-chevron) { display: none; }
}
@media (max-width: 360px) {
  body.shop-public.reference-shell[data-shop-page] .header-actions { gap: 4px !important; }
  body.shop-public.reference-shell[data-shop-page] .site-header .brand strong { font-size: 22px !important; }
}
/* Legacy mobile rules must never reveal the inactive account state. */
/* Country and language remain visible with full touch targets on small phones. */
@media (max-width: 600px) {
  body.shop-public.reference-shell[data-shop-page] .site-header {
    grid-template-columns: minmax(0, 1fr) 44px !important;
    grid-template-rows: 44px 44px 44px !important;
    height: auto !important;
    min-height: 168px !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  body.shop-public.reference-shell[data-shop-page] .site-header .header-actions {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: start;
    max-width: 100%;
  }
  body.shop-public.reference-shell[data-shop-page] .site-header .nav-toggle {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  body.shop-public.reference-shell[data-shop-page] .site-header .header-search {
    grid-row: 3 !important;
  }
  body.shop-public.reference-shell[data-shop-page] .site-header .site-nav {
    top: 168px !important;
  }
}
body.shop-public.reference-shell[data-shop-page] .header-actions [hidden] { display: none !important; }
body.shop-public.reference-shell[data-shop-page] .site-header .header-actions .header-guest[hidden],
body.shop-public.reference-shell[data-shop-page] .site-header .header-actions .header-account[hidden] { display: none !important; }
/* Anchor the language options inside the phone header instead of off-screen. */
@media (max-width: 600px) {
  body.shop-public.reference-shell[data-shop-page] .language-menu-panel {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
  }
}

/* One light buyer header, including the homepage utility strip. */
body.shop-public.reference-shell[data-shop-page] :is(.storefront-utility, .site-header) {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
}
body.shop-public.reference-shell[data-shop-page] .storefront-utility a,
body.shop-public.reference-shell[data-shop-page] .storefront-utility .utility-contact :is(span, a, svg) {
  color: var(--color-text) !important;
}
body.shop-public.reference-shell[data-shop-page] .storefront-utility a:hover,
body.shop-public.reference-shell[data-shop-page] .storefront-utility a:hover :is(span, svg) {
  color: var(--color-action) !important;
}
body.shop-public.reference-shell[data-shop-page] .storefront-utility .utility-overview,
body.shop-public.reference-shell[data-shop-page] .storefront-utility .utility-overview:hover {
  color: var(--color-surface) !important;
}

@media (max-width: 800px) {
  body.shop-public.reference-shell[data-shop-page] { --shop-header-height: 152px; }
  body.shop-public.reference-shell[data-shop-page] .site-header {
    height: auto !important;
    min-height: var(--shop-header-height) !important;
  }
}
@media (max-width: 760px) {
  body.shop-public.reference-shell[data-shop-page] { --shop-header-height: 112px; }
}

/* Header search uses the shared blue action on every buyer page. */
body.shop-public.reference-shell[data-shop-page] .header-search button {
  background: var(--color-action) !important;
  border-color: var(--color-action) !important;
  color: var(--color-surface) !important;
}
body.shop-public.reference-shell[data-shop-page] .header-search button :is(svg, span) {
  color: var(--color-surface) !important;
}
body.shop-public.reference-shell[data-shop-page] .header-search button:hover {
  background: var(--color-action-hover) !important;
  border-color: var(--color-action-hover) !important;
}
