/* A compact mobile header with a real, labeled navigation screen. */
.storefront .mobile-nav-toggle,
.storefront .mobile-nav-cart-shortcut,
.storefront .mobile-nav-panel { display: none; }
.storefront .mobile-nav-panel[hidden] { display: none !important; }

@media (max-width: 700px) {
  .storefront .site-header { background: #fff; }
  html.mobile-nav-open,
  body.storefront.mobile-nav-open { overscroll-behavior: contain; }

  .storefront .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 90px;
    grid-template-rows: 52px;
    width: min(100% - 24px, 1320px);
    height: auto;
    min-height: 0;
    column-gap: 6px;
    row-gap: 0;
    padding: 8px 0 10px;
  }
  .storefront .header-inner::before { content: none; display: none; }
  .storefront .header-primary,
  .storefront .header-discovery { display: contents; }
  .storefront .header-quick-actions { display: none !important; }
  .storefront .header-primary .brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    gap: 8px;
    margin: 0;
  }
  .storefront .header-primary .brand-mark {
    width: 39px;
    height: 39px;
    flex: none;
  }
  .storefront .header-primary .brand-name {
    font-size: clamp(14px, 4.15vw, 18px);
    letter-spacing: -.05em;
  }
  .storefront .header-discovery .locale-switcher {
    display: none;
  }
  .storefront .header-discovery .category-menu-button { display: none !important; }
  .storefront .header-discovery .category-menu-button {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    height: 56px;
    min-height: 56px;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid #e6e7e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(22, 25, 30, .055);
    color: #181c22;
    font-size: 0;
    font-weight: 800;
    white-space: nowrap;
  }
  .storefront .header-discovery .category-menu-button svg {
    order: 1;
    width: 35px;
    height: 35px;
    padding: 7px;
    border: 1px solid #e4e5e7;
    border-radius: 9px;
    background: #f7f7f8;
    color: #1b212a;
  }
  .storefront .header-discovery .category-menu-button > span { display: none; }
  .storefront .header-discovery .category-menu-button::before {
    content: "Каталог товаров";
    order: 2;
    font: 800 14px/1.25 Montserrat, Arial, sans-serif;
    position: absolute;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 108px);
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .storefront .header-discovery .category-menu-button::after { display: none; }
  .storefront .header-discovery .category-menu-button:hover {
    border-color: #e4e5e7;
    background: #f7f7f8;
    box-shadow: 0 4px 12px rgba(22, 25, 30, .06);
    transform: none;
  }
  .storefront .header-discovery .category-menu-button[aria-expanded="true"] {
    border-color: #e4e5e7;
    background: #f7f7f8;
    box-shadow: 0 4px 12px rgba(22, 26, 31, .055);
    color: #181c22;
    transform: none;
  }
  .storefront .header-discovery .category-menu-button[aria-expanded="true"] svg {
    color: #1a2029;
  }
  .storefront .header-discovery .category-menu-button::before { color: #181c22; }
  .storefront .header-discovery .category-menu-button .catalog-toggle-end {
    position: relative;
    order: 3;
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 1px solid #e4e5e7;
    border-radius: 10px;
    background: #fff;
    color: #1b212a;
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  }
  .storefront .header-discovery .category-menu-button .catalog-toggle-end svg {
    position: absolute;
    inset: 6px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: currentColor;
    transition: opacity .2s ease, transform .3s cubic-bezier(.2,.8,.2,1);
  }
  .storefront .header-discovery .category-menu-button .catalog-toggle-close { opacity: 0; transform: rotate(-70deg) scale(.6); }
  .storefront .header-discovery .category-menu-button[aria-expanded="true"] .catalog-toggle-end {
    border-color: #1b212a;
    background: linear-gradient(145deg,#202630,#191e26);
    color: #fff;
    box-shadow: 0 5px 12px #1b212a30;
  }
  .storefront .header-discovery .category-menu-button[aria-expanded="true"] .catalog-toggle-chevron { opacity: 0; transform: rotate(70deg) scale(.6); }
  .storefront .header-discovery .category-menu-button[aria-expanded="true"] .catalog-toggle-close { opacity: 1; transform: rotate(0) scale(1); }
  .storefront .header-discovery .category-menu-button:active .catalog-toggle-end { transform: scale(.92); }
  .storefront .header-discovery .category-menu-button:focus-visible { outline: 2px solid #202630; outline-offset: 2px; }

  .storefront .mobile-nav-cart-shortcut {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    place-items: center;
    align-self: center;
    position: relative;
    width: 44px;
    height: 46px;
    border: 1px solid #e4e5e7;
    border-radius: 12px;
    background: #f7f7f8;
    color: #1b212a;
    box-shadow: 0 4px 11px rgba(18, 21, 26, .05);
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
  }
  .storefront .mobile-nav-cart-shortcut svg { width: 22px; height: 22px; }
  .storefront .mobile-nav-cart-shortcut:hover,
  .storefront .mobile-nav-cart-shortcut[aria-current="page"] { border-color: #a3d4d1; background: #f6f6f7; }
  .storefront .mobile-nav-cart-shortcut:active { transform: scale(.96); }
  .storefront .mobile-nav-cart-shortcut-count {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #1b212a;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
  }
  .storefront .mobile-nav-cart-shortcut-count[hidden] { display: none !important; }
  .storefront .mobile-nav-toggle {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    position: relative;
    gap: 5px;
    width: 90px;
    height: 48px;
    padding: 0 6px;
    border: 1px solid #e4e5e6;
    border-radius: 12px;
    background: #fff;
    color: #15191e;
    box-shadow: 0 4px 11px rgba(18, 21, 26, .05);
    font: 800 13px/1.2 Montserrat, Arial, sans-serif;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  }
  .storefront .mobile-nav-toggle-icon { position: relative; display: block; width: 19px; height: 19px; flex: none; }
  .storefront .mobile-nav-toggle-icon i { position: absolute; left: 1px; width: 17px; height: 2px; border-radius: 2px; background: #1b212a; transform-origin: center; transition: top .28s cubic-bezier(.22,1,.36,1), transform .28s cubic-bezier(.22,1,.36,1), opacity .18s ease; }
  .storefront .mobile-nav-toggle-icon i:nth-child(1) { top: 4px; }
  .storefront .mobile-nav-toggle-icon i:nth-child(2) { top: 9px; }
  .storefront .mobile-nav-toggle-icon i:nth-child(3) { top: 14px; }
  .storefront .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i:nth-child(1) { top: 9px; transform: rotate(45deg); }
  .storefront .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i:nth-child(2) { opacity: 0; transform: scaleX(.35); }
  .storefront .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i:nth-child(3) { top: 9px; transform: rotate(-45deg); }
  .storefront .mobile-nav-toggle:hover,
  .storefront .mobile-nav-toggle[aria-expanded="true"] { border-color: #b9dfdd; background: #f7f7f8; box-shadow: 0 5px 15px rgba(26, 31, 40,.11); }
  .storefront .mobile-nav-toggle:active { transform: scale(.98); }
  .storefront .mobile-nav-toggle:focus-visible,
  .storefront .mobile-nav-cart-shortcut:focus-visible,
  .storefront .mobile-nav-panel a:focus-visible,
  .storefront .mobile-nav-panel button:focus-visible { outline: 3px solid #202630; outline-offset: 2px; }
  .storefront .mobile-nav-panel {
    position: fixed;
    inset: var(--storefront-header-bottom, 134px) 0 0;
    z-index: 96;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid #e8e9eb;
    background: #f7f7f8;
    box-shadow: 0 16px 30px rgba(18, 20, 25, .1);
    -webkit-overflow-scrolling: touch;
    animation: mobile-nav-in .22s cubic-bezier(.22, 1, .36, 1);
  }
  .storefront .mobile-nav-shell { width: min(100%, 660px); margin: 0 auto; padding: 18px 16px 24px; }
  .storefront .mobile-nav-head { display: block; margin-bottom: 16px; }
  .storefront .mobile-nav-head span { display: block; margin-bottom: 4px; color: #1a1f28; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
  .storefront .mobile-nav-head h2 { margin: 0; color: #14171c; font-size: 24px; font-weight: 850; line-height: 1.15; letter-spacing: -.045em; }
  .storefront .mobile-nav-currency {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e6e7;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 11px rgba(20, 22, 28, .035);
  }
  .storefront .mobile-nav-currency-copy { display: grid; gap: 3px; min-width: 0; }
  .storefront .mobile-nav-currency-copy strong { color: #14181d; font-size: 14px; font-weight: 800; line-height: 1.25; }
  .storefront .mobile-nav-currency-copy small { color: #758399; font-size: 11px; font-weight: 550; line-height: 1.25; }
  .storefront .mobile-nav-currency .locale-switcher { display: contents; }
  .storefront .mobile-nav-currency .locale-button {
    grid-column: 2;
    grid-row: 1;
    width: 116px;
    min-width: 116px;
    height: 45px;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid #e5e6e7;
    border-radius: 10px;
    background: #f8f8f9;
    box-shadow: none;
    color: #191d23;
    font-size: 11px;
  }
  .storefront .mobile-nav-currency .locale-button-globe { display: block; width: 24px; height: 18px; }
  .storefront .mobile-nav-currency #localeButtonLabel,
  .storefront .mobile-nav-currency .locale-button > svg { display: inline; }
  .storefront .mobile-nav-currency .locale-menu {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-height: none;
    margin-top: 2px;
    padding: 13px;
    overflow: visible;
    border-radius: 11px;
    box-shadow: none;
    animation: none;
  }
  .storefront .mobile-nav-currency .locale-menu::before { border-radius: 11px 11px 0 0; }
  .storefront .mobile-nav-currency .locale-menu-heading { margin-bottom: 11px; padding-bottom: 10px; }
  .storefront .mobile-nav-currency .locale-menu-heading strong { font-size: 15px; }
  .storefront .mobile-nav-list { display: grid; gap: 9px; }
  .storefront .mobile-nav-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 20px;
    align-items: center;
    width: 100%;
    min-height: 67px;
    gap: 12px;
    padding: 9px 13px;
    border: 1px solid #e5e6e7;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 11px rgba(20, 22, 28, .035);
    color: #16191f;
    text-align: left;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }
  .storefront .mobile-nav-item:hover { border-color: #b9dfdd; box-shadow: 0 7px 17px rgba(18, 22, 28, .09); transform: translateY(-1px); }
  .storefront .mobile-nav-item:active { transform: scale(.99); }
  .storefront .mobile-nav-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #f7f7f8; color: #1b212a; }
  .storefront .mobile-nav-icon svg { width: 24px; height: 24px; }
  .storefront .mobile-nav-icon img { width: 25px; height: 25px; }
  .storefront .mobile-nav-item.is-cart .mobile-nav-icon { background: #1b212a; color: #fff; }
  .storefront .mobile-nav-item.is-support .mobile-nav-icon { background: #f3f4f5; }
  .storefront .mobile-nav-copy { display: grid; gap: 3px; min-width: 0; }
  .storefront .mobile-nav-copy strong { color: #14181d; font-size: 14px; font-weight: 800; line-height: 1.25; }
  .storefront .mobile-nav-copy small { color: #758399; font-size: 11px; font-weight: 550; line-height: 1.35; }
  .storefront .mobile-nav-cart-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e5e6e7;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 11px rgba(20, 22, 28, .035);
  }
  .storefront .mobile-nav-cart-card.has-preview { border-color: #e4e5e7; box-shadow: 0 7px 19px rgba(16, 19, 25, .07); }
  .storefront .mobile-nav-cart-card .mobile-nav-item.is-cart { border: 0; border-radius: 0; box-shadow: none; }
  .storefront .mobile-nav-cart-card.has-preview .mobile-nav-item.is-cart { border-bottom: 1px solid #eaeaeb; }
  .storefront .mobile-nav-cart-card .mobile-nav-item.is-cart:hover { background: #f7f7f8; box-shadow: none; transform: none; }
  .storefront .mobile-nav-cart-card .mobile-nav-item.is-cart:active { transform: none; }
  .storefront .mobile-nav-cart-preview[hidden] { display: none !important; }
  .storefront .mobile-nav-cart-preview {
    min-width: 0;
    padding: 11px 13px 13px;
    background: linear-gradient(180deg, #fff 0%, #f7f7f8 100%);
  }
  .storefront .mobile-nav-cart-preview-heading { color: #1b202a; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
  .storefront .mobile-nav-cart-preview-list { display: grid; margin: 6px 0 10px; padding: 0; list-style: none; }
  .storefront .mobile-nav-cart-preview-list li { min-width: 0; }
  .storefront .mobile-nav-cart-preview-list li + li { border-top: 1px solid #f0edf0; }
  .storefront .mobile-nav-cart-product-link { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; min-height: 50px; padding: 7px 0; border-radius: 8px; color: #181c22; text-decoration: none; }
  .storefront .mobile-nav-cart-product-link:hover { background: #f7f7f8; }
  .storefront .mobile-nav-cart-product-link:focus-visible { outline: 2px solid #1b212a; outline-offset: 1px; }
  .storefront .mobile-nav-cart-preview-icon { width: 36px; height: 36px; }
  .storefront .mobile-nav-cart-product-link > span:not(.mobile-nav-cart-preview-icon) { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #191d23; font-size: 11px; font-weight: 700; line-height: 1.35; }
  .storefront .mobile-nav-cart-product-link b { min-width: 37px; padding: 5px 6px; border-radius: 7px; background: #f7f7f8; color: #1a2029; font-size: 10px; font-weight: 800; text-align: center; white-space: nowrap; }
  .storefront .mobile-nav-cart-preview > a { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 11px; border: 1px solid #e4e5e7; border-radius: 9px; background: #f7f7f8; color: #191e27; font-size: 11px; font-weight: 800; text-decoration: none; }
  .storefront .mobile-nav-cart-preview > a:hover { border-color: #b2dfdd; background: #f2f3f5; }
  .storefront .mobile-nav-chevron { color: #1b212a; font-size: 21px; font-weight: 500; text-align: right; }
  .storefront .mobile-nav-documents { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 19px; padding: 14px 2px 0; border-top: 1px solid #e6e7e9; text-align: center; }
  .storefront .mobile-nav-documents a { color: #64738a; font-size: 11px; font-weight: 700; text-decoration: none; }
  .storefront .mobile-nav-documents a:hover { color: #191e27; }
  .storefront .header-discovery .locale-menu { z-index: 130; }
  .storefront .mobile-nav-toggle { overflow: hidden; isolation: isolate; transition: background .28s ease, border-color .28s ease, color .28s ease, transform .2s ease, box-shadow .28s ease; }
  .storefront .mobile-nav-toggle::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(115deg,transparent 15%,#ffffff75 48%,transparent 78%); opacity: 0; transform: translateX(-120%); transition: opacity .25s ease, transform .55s ease; pointer-events: none; }
  .storefront .mobile-nav-toggle > span { position: relative; z-index: 1; }
  .storefront .mobile-nav-toggle:hover { border-color: #aedad7; background: linear-gradient(135deg,#fff,#f7f7f8); box-shadow: 0 7px 17px #1a1f2824; transform: translateY(-1px); }
  .storefront .mobile-nav-toggle:hover::before { opacity: .5; transform: translateX(110%); }
  .storefront .mobile-nav-toggle[aria-expanded="true"] { border-color: #191e26; background: linear-gradient(135deg,#202630,#171c24); color: #fff; box-shadow: 0 9px 21px #171c2450; transform: none; }
  .storefront .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i { background: #fff; }
  .storefront .mobile-nav-toggle[aria-expanded="true"]::before { opacity: .2; transform: translateX(25%); }
  .storefront .mobile-nav-toggle:focus-visible { outline: 2px solid #1b212a; outline-offset: 3px; }
  .storefront .mobile-nav-item.is-catalog { border-color: #e4e5e7; background: linear-gradient(115deg,#fff,#f7f7f8); box-shadow: 0 6px 17px #151a2111; }
  .storefront .mobile-nav-item.is-catalog .mobile-nav-icon { background: linear-gradient(145deg,#202630,#181d25); color: #fff; }
  .storefront .mobile-nav-item.is-supplier { border-color: #dadce1; background: linear-gradient(115deg,#f8f8f9,#f6f7f8); }
  .storefront .mobile-nav-item.is-supplier .mobile-nav-icon { background: #181c25; color: #fff; }
  .storefront .mobile-nav-item.is-supplier .mobile-nav-chevron { color: #37699c; }
  .storefront .mobile-nav-item.is-supplier:hover { border-color: #86acd2; box-shadow: 0 8px 20px #191f291a; }
}

@media (max-width: 360px) {
  .storefront .header-inner { grid-template-columns: minmax(0, 1fr) 42px 84px; column-gap: 6px; }
  .storefront .header-primary .brand-mark { width: 34px; height: 34px; }
  .storefront .header-primary .brand-name { font-size: 12px; }
  .storefront .mobile-nav-cart-shortcut { width: 42px; height: 44px; }
  .storefront .mobile-nav-toggle { width: 84px; min-width: 84px; font-size: 12px; }
  .storefront .header-discovery .category-menu-button { gap: 6px; padding: 0 10px; }
  .storefront .header-discovery .category-menu-button::before { font-size: 12.5px; }
  .storefront .header-discovery .category-menu-button::after { display: none; }
  .storefront .mobile-nav-shell { padding: 15px 12px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .storefront .mobile-nav-panel { animation: none !important; }
  .storefront .mobile-nav-toggle,
  .storefront .mobile-nav-toggle-icon i,
  .storefront .mobile-nav-toggle::before,
  .storefront .mobile-nav-cart-shortcut,
  .storefront .mobile-nav-item,
  .storefront .category-menu-button .catalog-toggle-end,
  .storefront .category-menu-button .catalog-toggle-end svg { transition: none !important; }
}

@keyframes mobile-nav-in {
  from { opacity: .75; transform: translateY(-8px); }
  /* A retained identity transform would offset fixed language popovers. */
  to { opacity: 1; transform: none; }
}
