/* All destinations share the header. */
html[lang] .header.has-account-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  height: auto; min-height: 78px; padding: 14px 0; gap: 6px;
  border-bottom: 1px solid #0f3d2e20;
}
.header .nav-toggle { display: none !important; }
html[lang] .header .brand { flex: 0 0 auto; margin: 0 8px 0 0; gap: 7px; font-size: 17px; letter-spacing: -.7px; }
html[lang] .header .brand-mark { width: 34px; height: 34px; flex-basis: 34px; margin: 0; border-radius: 11px; }
html[lang] .header.has-account-actions .header-nav,
html[lang] .header .header-actions,
html[lang] .header .header-account-links {
  display: contents; margin: 0; padding: 0; border: 0;
}
html[lang] .header .header-nav > a {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  min-height: 38px; margin: 0; padding: 7px 6px; border-radius: 8px;
  font-size: 11px; line-height: 1.4; white-space: nowrap; text-decoration: none;
}
html[lang] .header .header-nav > a:not(.order-link):hover { background: #0f3d2e09; }
html[lang] .header .header-nav > a[aria-current="page"]:not(.order-link) { background: #0f3d2e0c; color: #0f3d2e; text-decoration: none; }
html[lang] .header .header-nav .order-link { padding-inline: 14px; border-radius: 999px; }
html[lang] .header .header-nav > a.order-link { background: #0f3d2e; color: #fffefd; }
html[lang] .header .header-nav > a.order-link:hover { background: #0b3024; color: #fffefd; }
html[lang] .header .language-switcher { order: 1; flex: 0 0 auto; margin: 0 0 0 6px; padding: 2px; border: 0; border-radius: 999px; background: #0f3d2e09; }
html[lang] .header .language-switcher button { min-width: 28px; min-height: 30px; padding-inline: 5px; border-radius: 999px; font-size: 10px; }
html[lang] .header .header-account-links a { order: 1; min-height: 38px; padding: 7px 6px; font-size: 11px; white-space: nowrap; }
html[lang] .header .header-account-links .account-register-link { padding-inline: 10px; border-radius: 999px; background: transparent; }
html:has(.header.has-account-actions) { scroll-padding-top: 110px; }
@media (min-width: 1400px) {
  html[lang] .header .brand { font-size: 20px; gap: 9px; }
  html[lang] .header .brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  html[lang] .header .header-nav > a { font-size: 12px; padding-inline: 8px; }
}
@media (max-width: 1000px) {
  html[lang] .header.has-account-actions { justify-content: flex-start; gap: 6px 8px; }
  html[lang] .header .header-nav > a { background: #0f3d2e05; padding-inline: 10px; }
}
@media (max-width: 600px) {
  html[lang] .header.has-account-actions { position: relative; min-height: 0; padding: 14px 0; gap: 6px; }
  html[lang] .header .brand { font-size: 16px; margin-right: 4px; }
  html[lang] .header .header-nav > a { min-height: 36px; font-size: 11px; padding-inline: 9px; }
  html[lang] .header .language-switcher { margin-left: 0; }
  html:has(.header.has-account-actions) { scroll-padding-top: 20px; }
}

/* Phones and narrow tablets keep a compact header with an accessible menu. */
@media (max-width: 1000px) {
  html[lang] .header.has-account-actions.has-mobile-nav {
    position: sticky; top: 0; height: 76px; min-height: 76px;
    flex-wrap: nowrap; justify-content: flex-start; padding: 10px 0; gap: 8px;
  }
  html[lang] .header.has-mobile-nav .brand { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; }
  html[lang] .header.has-mobile-nav .language-switcher { order: 0; margin: 0; }
  html[lang] .header.has-mobile-nav .language-switcher button { min-height: 40px; min-width: 32px; }
  html[lang] .header.has-mobile-nav .nav-toggle {
    display: block !important; position: relative; order: 2; flex: 0 0 44px;
    width: 44px; height: 44px; padding: 0; border: 1px solid #0f3d2e24;
    border-radius: 50%; background: transparent; color: #0f3d2e;
  }
  html[lang] .header.has-mobile-nav .nav-toggle > span { position: absolute; left: 12px; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .24s ease, opacity .18s ease; }
  html[lang] .header.has-mobile-nav .nav-toggle > span:nth-child(1) { top: 14px; }
  html[lang] .header.has-mobile-nav .nav-toggle > span:nth-child(2) { top: 21px; }
  html[lang] .header.has-mobile-nav .nav-toggle > span:nth-child(3) { top: 28px; }
  html[lang] .header.has-mobile-nav .nav-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  html[lang] .header.has-mobile-nav .nav-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  html[lang] .header.has-mobile-nav .nav-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  html[lang] .header.has-account-actions.has-mobile-nav .header-nav {
    display: flex; position: absolute; inset: 100% 0 auto; width: 100%;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    flex-wrap: nowrap; margin: 0; padding: 14px; gap: 4px;
    max-height: calc(100dvh - 86px); overflow-y: auto;
    background: #f5f6f2; border: 1px solid #0f3d2e20; border-radius: 0 0 18px 18px;
    box-shadow: 0 16px 30px #0f3d2e12; visibility: hidden;
    pointer-events: none; opacity: 0; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  html[lang] .header.has-account-actions.has-mobile-nav.is-nav-open .header-nav { visibility: visible; pointer-events: auto; opacity: 1; transform: none; }
  html[lang] .header.has-mobile-nav .header-nav > a,
  html[lang] .header.has-mobile-nav .header-account-links a {
    min-height: 44px; padding: 11px 14px; font-size: 14px;
    justify-content: flex-start; white-space: normal; text-align: left;
  }
  html[lang] .header.has-mobile-nav .header-nav .order-link { justify-content: center; margin-top: 6px; }
  html[lang] .header.has-mobile-nav .header-account-links a { order: 0; }
  html:has(.header.has-account-actions) { scroll-padding-top: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  html[lang] .header.has-mobile-nav .nav-toggle > span,
  html[lang] .header.has-mobile-nav .header-nav { transition: none; }
}

/* A conventional single-line desktop header. */
@media (min-width: 1001px) {
  html[lang] .header.has-account-actions {
    display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between;
    gap: 20px; height: 80px; min-height: 80px; top: 0;
    margin: 0 -16px; padding: 0 16px;
    border: 0; border-bottom: 1px solid #0f3d2e20; border-radius: 0;
    background: #f5f6f2; box-shadow: none;
  }
  html[lang] .header .brand { flex: 0 0 auto; margin: 0; gap: 9px; font-size: 19px; letter-spacing: -.7px; }
  html[lang] .header .brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  html[lang] .header.has-account-actions .header-nav {
    display: flex; order: 1; flex: 1 1 auto; min-width: 0; width: auto;
    align-items: center; justify-content: center; flex-wrap: nowrap;
    gap: clamp(4px, .65vw, 10px); margin: 0; padding: 0;
    border: 0; border-radius: 0; background: transparent; overflow: visible;
  }
  html[lang] .header .header-nav > a {
    flex: 0 0 auto; width: auto; min-height: 44px; height: auto; margin: 0;
    padding: 10px 2px; border-radius: 0; background: transparent;
    font-size: 11px; font-weight: 650; line-height: 1.4;
    white-space: nowrap; text-align: center;
  }
  html[lang="ka"] .header .header-nav > a { font-size: 11px; }
  html[lang] .header .header-nav > a:not(.order-link):hover,
  html[lang] .header .header-nav > a[aria-current="page"]:not(.order-link) { background: transparent; color: #0f3d2e; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1.5px; }
  html[lang] .header .header-nav > a.order-link { min-height: 40px; padding: 10px 17px; border-radius: 999px; }
  html[lang] .header .header-actions { display: flex; order: 2; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 12px; width: auto; margin: 0; padding: 0; }
  html[lang] .header .header-account-links { display: flex; order: 0; align-items: center; gap: 6px; }
  html[lang] .header .header-account-links a { min-height: 40px; padding: 8px 2px; font-size: 12px; }
  html[lang] .header .header-account-links .account-link:only-child { border: 0; border-radius: 0; }
  html[lang] .header .language-switcher { order: 1; margin: 0; }
  html:has(.header.has-account-actions) { scroll-padding-top: 105px; }
  .page-order .order-summary { top: 105px; }
}
@media (min-width: 1001px) and (max-width: 1100px) {
  html[lang] .header.has-account-actions { gap: 12px; }
  html[lang] .header .brand-name { display: none; }
  html[lang] .header.has-account-actions .header-nav { gap: 5px; }
  html[lang="ka"] .header .header-nav > a { font-size: 11px; padding-inline: 0; }
  html[lang] .header .header-nav > a.order-link { padding-inline: 12px; }
  html[lang] .header .language-switcher button { min-width: 24px; padding-inline: 3px; }
}

@media (min-width: 1001px) and (max-width: 1250px) {
  html[lang="ka"] .header:has(.account-register-link) .brand-name { display: none; }
}

/* Desktop profiles follow the language selector; phones use a menu row. */
html[lang] .header.has-account-actions .header-account-links.is-signed-in { order: 2; }
html[lang] .header.has-account-actions .header-account-links a.account-icon {
  display: inline-flex; order: 2; flex: 0 0 44px; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-height: 44px; padding: 4px; border: 0; border-radius: 50%;
  color: #0f3d2e; background: transparent; text-decoration: none;
}
html[lang] .header.has-account-actions .account-icon:hover,
html[lang] .header.has-account-actions .account-icon[aria-current="page"] { background: #0f3d2e0b; }
.header .account-icon > .account-icon-symbol { display: block; width: 34px; height: 34px; background: currentColor; -webkit-mask: url('assets/profile-icon.png') center / contain no-repeat; mask: url('assets/profile-icon.png') center / contain no-repeat; }
.header .account-icon > .account-icon-label { display: none; }
@media (max-width: 1000px) {
  html[lang] .header.has-account-actions .header-actions { display: flex; order: 1; flex: 0 0 auto; width: auto; min-width: 0; flex-wrap: nowrap; align-items: center; gap: 4px; }
  html[lang] .header.has-account-actions .header-nav .header-account-links { display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch; width: 100%; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #0f3d2e20; }
  html[lang] .header.has-account-actions .header-nav .header-account-links .account-register-link { display: inline-flex; }
  html[lang] .header.has-account-actions .header-nav .header-account-links a.account-icon { justify-content: flex-start; flex: 0 0 auto; width: 100%; height: auto; gap: 12px; padding: 11px 14px; border-radius: 10px; }
  html[lang] .header.has-account-actions .header-nav .account-icon > .account-icon-symbol { width: 26px; height: 26px; flex: 0 0 26px; }
  html[lang] .header.has-account-actions .header-nav .account-icon > .account-icon-label { display: inline; font-size: 14px; font-weight: 750; }
}
