/* Keep a fixed layout slot while the pinned navigation quietly becomes smaller. */
:root { --header-paper: #f9f7ff; }
.container { width: calc(100% - clamp(32px, 6vw, 112px)); max-width: 1536px; }
.header-slot {
    --bar-height: 56px; --header-height: var(--bar-height); --header-rest-height: 56px;
    --brand-width: 140px; --brand-space: 146px; --search-height: 34px;
    --header-ease: 300ms cubic-bezier(.22,.7,.25,1);
    position: sticky; top: var(--sticky-offset, 0px); z-index: 40; height: var(--header-rest-height);
}
.header-slot.is-compact { --bar-height: 46px; --brand-width: 84px; --search-height: 30px; }
.site-header { height: var(--header-height); background: var(--bg); transition: height var(--header-ease), box-shadow var(--header-ease); }
.site-header::before { content: ''; position: absolute; inset: 0 0 auto; height: var(--bar-height); background: var(--header-paper); transition: height var(--header-ease); }
.header-slot.is-compact .site-header { box-shadow: 0 8px 26px #04051038; }
.header-inner { position: relative; height: var(--header-height); min-height: 0; gap: 18px; padding: 0; transition: height var(--header-ease); }
.brand-lockup { position: relative; flex: 0 0 var(--brand-space); height: var(--bar-height); margin-right: 8px; transition: height var(--header-ease); }
.site-header .wordmark {
    position: absolute; top: calc(var(--bar-height) - var(--brand-width) * 325 / 1215);
    left: calc((var(--brand-space) - var(--brand-width)) / 2); width: var(--brand-width);
    aspect-ratio: 1215 / 700; overflow: visible; mix-blend-mode: normal;
    transition: top var(--header-ease), left var(--header-ease), width var(--header-ease);
}
.brand-art { display: block; width: 100%; height: 100%; overflow: visible; }
.brand-boundary { transition: opacity 220ms ease; }
.header-slot.is-compact .brand-boundary { opacity: 0; }
.header-slot.is-compact .wordmark { top: calc((var(--bar-height) - var(--brand-width) * 700 / 1215) / 2); }
.brand-night { fill: var(--bg); }
.brand-paper { fill: var(--header-paper); }
.site-header a { color: var(--ink); }
.site-header button { color: var(--ink); background: transparent; border: 0; box-shadow: none; }
.site-header :is(a, button):focus-visible { outline: 2px solid #9d58d9; outline-offset: 3px; }
.wordmark:focus-visible { border-radius: 6px; }
.site-footer a { color: inherit; }
.desktop-nav { font-size: .77rem; gap: 3px; }
.desktop-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid transparent; border-radius: 20px; transition: color .18s, background .18s, border-color .18s; }
.desktop-nav .nav-catalog { background: #eee6fa; border-color: #e4d9f4; }
.desktop-nav .nav-catalog span { font-size: .85rem; opacity: .65; }
.header-search { min-width: 140px; height: var(--search-height); margin: 0; background: #eeecf6; border: 1px solid #e2ddef; border-radius: 11px; transition: height var(--header-ease), background .18s, border-color .18s, box-shadow .18s; }
.header-search:focus-within { background: #fff; border-color: #b984df; box-shadow: 0 0 0 3px #bf83f518; }
.header-search input { height: 100%; min-height: 0; min-width: 0; padding: 6px 12px; font-size: .75rem; }
.header-search button { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 26px; padding: 4px; margin-right: 3px; border-radius: 8px; background: #e4daf3; transition: background .18s; }
.header-search .icon, .header-actions .icon, .location-trigger > .icon { width: 18px; height: 18px; }
.header-actions { gap: 8px; }
.header-actions > a, .header-actions > button { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid #e5dff0; border-radius: 11px; background: #f2edf9; transition: background .18s, border-color .18s, transform .18s; }
.header-actions .cart-link { background: #edf6df; border-color: #e0eccc; }
.header-actions .mobile-menu-toggle { display: none; }
.site-header .location-trigger { gap: 7px; padding: 5px 8px; border-radius: 10px; transition: background .18s; }
.location-trigger small { font-size: .58rem; line-height: 1.2; }
.location-trigger strong { font-size: .70rem; line-height: 1.3; }
.cart-count { right: -4px; top: -5px; font-size: .55rem; min-width: 15px; height: 15px; line-height: 15px; box-shadow: 0 0 0 2px var(--header-paper); }
@media (hover: hover) {
    .desktop-nav a:hover { color: #6b2fa3; background: #e9dcf8; border-color: #decaef; }
    .site-header .header-search button:hover { background: #d5b7ed; }
    .site-header .location-trigger:hover { background: #ece4f7; }
    .header-actions > a:hover, .header-actions > button:hover { background: #e6d5f8; border-color: #cfb2e9; transform: translateY(-1px); }
    .header-actions .cart-link:hover { background: #d5f2a9; border-color: #c3e891; }
}
body:not(.home) #main, body.home #main:not(:has(.hero)) { padding-top: 62px; }
html { scroll-padding-top: calc(110px + var(--sticky-offset, 0px)); scrollbar-color: #8c819e var(--bg); scrollbar-width: thin; }
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: #8c819e; border: 2px solid var(--bg); border-radius: 10px; min-height: 28px; }
.interaction-smoke { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 25; contain: strict; }
.product-card.is-opening, .category-card.is-opening, .flavor-card.is-opening { border-color: var(--purple); box-shadow: 0 0 22px #bf83f530; transition: border-color .15s, box-shadow .15s; }
@media (max-width: 1150px) {
    .header-inner { gap: 12px; }
    .header-slot { --brand-width: 130px; --brand-space: 134px; }
    .header-slot.is-compact { --brand-width: 84px; }
    .desktop-nav a { padding-inline: 8px; }
    .header-actions { gap: 6px; }
}
.mobile-back-button { display: none; }
@media (max-width: 800px) {
    .header-slot { --bar-height: 48px; --brand-width: 116px; --brand-space: 119px; --header-height: 92px; --header-rest-height: 92px; --search-height: 32px; --search-row: 40px; }
    .header-slot.is-compact { --bar-height: 42px; --brand-width: 102px; --header-height: 82px; --search-height: 30px; --search-row: 36px; }
    .header-slot.is-compact .brand-boundary { opacity: 1; }
    .header-slot.is-compact .wordmark { top: calc(var(--bar-height) - var(--brand-width) * 325 / 1215); }
    .header-inner { display: grid; grid-template-columns: 125px 1fr auto; grid-template-rows: var(--bar-height) var(--search-row); padding: 0 0 4px; column-gap: 12px; row-gap: 0; transition: height var(--header-ease), grid-template-rows var(--header-ease); }
    .brand-lockup { grid-column: 1; grid-row: 1; width: var(--brand-space); margin: 0; }
    .mobile-back-button { grid-column: 1; grid-row: 2; display: inline-flex; align-items: center; justify-self: start; align-self: center; gap: 5px; min-height: 40px; max-width: 100%; padding: 5px 8px 5px 4px; border: 0; background: transparent; color: #51475f; font-size: .7rem; font-weight: 800; line-height: 1; }
    .mobile-back-button .icon { width: 18px; height: 18px; }
    .mobile-back-button:active { color: #7c4ca2; }
    .desktop-nav { display: none; }
    .site-header .location-trigger { grid-column: 2; grid-row: 1; order: initial; margin-left: auto; padding: 4px 6px; min-width: 0; }
    .location-trigger small { font-size: .54rem; }
    .location-trigger strong { font-size: .64rem; }
    .header-actions { grid-column: 3; grid-row: 1; order: initial; gap: 6px; margin: 0; }
    .header-actions .mobile-menu-toggle { display: flex; }
    .header-search { grid-column: 2 / -1; grid-row: 2; order: initial; width: 100%; min-width: 0; margin: 0; }
    .header-search input { font-size: .72rem; padding: 5px 10px; }
    .header-search button { width: 25px; height: 24px; }
    body:not(.home) #main, body.home #main:not(:has(.hero)) { padding-top: 32px; }
    html { scroll-padding-top: calc(114px + var(--sticky-offset, 0px)); }
}
@media (max-width: 520px) {
    .header-slot { --brand-width: 108px; --brand-space: 110px; }
    .header-slot.is-compact { --brand-width: 96px; }
    .header-inner { grid-template-columns: 112px 1fr auto; column-gap: 7px; }
    .header-actions { gap: 5px; }
    .header-actions > a[aria-label="Особистий кабінет"] { display: none; }
    .location-trigger > .icon { display: none; }
    .site-header .location-trigger { text-align: right; padding: 4px 0; }
    .location-trigger strong { font-size: .62rem; }
    .container { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
    .header-slot, .header-slot *, .site-header::before { transition: none; }
    .interaction-smoke { display: none; }
    .product-card.is-opening, .category-card.is-opening, .flavor-card.is-opening { transition: none; box-shadow: none; }
}

#home-products > .muted { grid-column: 1 / -1; padding: 16px 0; }


/* HL-07: strength choices stay green, readable and touch-safe. */
.strength-options a {
  background: var(--lime);
  border-color: #aada59;
  color: var(--ink);
  font-weight: 800;
  min-height: 44px;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.strength-options .strength-bars i {
  background: #31401666;
}
.strength-options .strength-bars i.on {
  background: #253311;
  box-shadow: 0 0 0 1px #25331122;
}
.strength-options a:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-color: #253311;
}
.strength-options a[aria-current="true"],
.strength-options a[aria-current="page"] {
  background: #c5ed79;
  border-color: #253311;
  box-shadow: inset 0 0 0 2px #253311;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.strength-options a[aria-disabled="true"] {
  opacity: .48;
  pointer-events: none;
  filter: saturate(.35);
}
.strength-options a:active {
  transform: translateY(1px);
}
@media (hover: hover) {
  .strength-options a:hover {
    background: #d5fb96;
    border-color: #d5fb96;
    color: var(--ink);
  }
}
@media (max-width: 520px) {
  .strength-options a { min-height: 44px; }
}
@media (forced-colors: active) {
  .strength-options a { border: 2px solid ButtonText; }
}

/* HLF-000010: hidden absolute dropdowns must not enlarge scrollHeight.
 * Verified in Chromium: the old hidden menu created 3166 px past the footer. */
.desktop-nav .category-menu-panel{display:none!important}
.desktop-nav .category-menu.is-open .category-menu-panel{display:block!important}
.nav-category-panel{display:none!important}
.nav-category-item:hover>.nav-category-panel,.nav-category-item:focus-within>.nav-category-panel{display:block!important}
/* HLF-000014: the existing sticky slot needs a second actual header row.
 * Keep its outer height in sync with the visible menu and logo. */
@media(min-width:801px){
 .header-slot{--header-height:112px;--header-rest-height:112px}
 .header-slot.is-compact{--header-height:94px;--header-rest-height:94px}
 .site-header,.header-inner{height:var(--header-height)}
 .site-header::before{height:var(--header-height)}
 .header-inner{display:flex;flex-wrap:wrap;align-content:start;align-items:center;gap:0 14px;padding:0}
 .header-inner .brand-lockup{order:0}
 .header-inner .header-search{order:1}
 .header-inner .location-trigger{order:2}
 .header-inner .header-actions{order:3}
 .desktop-nav{order:9;flex:1 0 calc(100% - 160px);max-width:calc(100% - 160px);margin-left:160px;height:calc(var(--header-height) - var(--bar-height));padding:0 0 5px;align-items:center;justify-content:space-between;gap:3px}
 .desktop-nav a{padding:5px 4px}
}
