/* Shared mobile shell. Linked last, so page-specific legacy rules cannot fork it. */
.mobile-app-nav[data-mobile-navigation],
[data-mobile-navigation-language],
[data-mobile-navigation-utility] { display: none; }
.mobile-navigation-menu { display: none; }

@media (max-width: 820px) {
  body { --mobile-bottom-nav-h: 72px; }
  body .mobile-app-nav[data-mobile-navigation] {
    box-sizing: border-box;
    position: fixed;
    z-index: 120;
    inset: auto 12px max(8px, env(safe-area-inset-bottom, 0px));
    width: auto;
    height: 72px;
    min-height: 72px;
    margin: 0;
    padding: 7px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 82px 1fr 1fr;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    background: rgba(250, 253, 255, .94);
    box-shadow: 0 12px 36px rgba(20, 45, 72, .16), inset 0 1px 0 #fff;
    backdrop-filter: blur(16px);
  }
  body .mobile-app-nav[data-mobile-navigation] > button {
    box-sizing: border-box;
    position: relative;
    inset: auto;
    align-self: center;
    justify-self: stretch;
    width: auto;
    min-width: 0;
    height: 56px;
    min-height: 56px;
    padding: 0;
    margin: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 18px;
    color: #607184;
    background: transparent;
    box-shadow: none;
    transform: none;
    cursor: pointer;
  }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="catalog"] { grid-column: 1; }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="cart"] { grid-column: 2; }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="account"] { grid-column: 4; color: #006fba; }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="operator"] { grid-column: 5; }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="search"] {
    position: absolute;
    inset: -18px auto auto 50%;
    width: 78px;
    height: 78px;
    min-height: 78px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    color: #006fba;
    background: radial-gradient(ellipse at 60% 65%, #daedf9, #f6fbff 75%);
    box-shadow: 0 10px 28px rgba(0, 111, 186, .2), 0 0 0 4px rgba(0, 111, 186, .06);
    transform: translateX(-50%);
  }
  body .mobile-app-nav[data-mobile-navigation] > button > svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="search"] > svg { width: 36px; height: 36px; }
  body .mobile-app-nav[data-mobile-navigation] > [data-mobile-action="catalog"] > svg { fill: currentColor; stroke: none; }
  body .mobile-app-nav[data-mobile-navigation] > button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  body .mobile-app-nav[data-mobile-navigation] > button:focus-visible { outline: 2px solid #006fba; outline-offset: 3px; }
  body.is-catalog-open .mobile-app-nav[data-mobile-navigation] { z-index: 133; }
  body.is-mobile-search-modal-open .mobile-app-nav[data-mobile-navigation] { z-index: 210; }
  body .mobile-navigation-menu { display: block; }
  body.is-catalog-open .category-nav::before {
    content: "" !important;
    position: fixed;
    inset: 0;
    z-index: 131;
    background: rgba(12, 31, 44, .32);
    opacity: 1;
    width: auto;
    height: auto;
    transform: none;
  }
  body .catalog-popover {
    box-sizing: border-box;
    position: fixed;
    inset: max(12px, env(safe-area-inset-top, 0px)) 12px auto;
    z-index: 132;
    width: auto;
    max-height: calc(100dvh - 110px - env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 0 0 12px;
    display: none;
    overflow-y: auto;
    border: 1px solid #daeaf4;
    border-radius: 24px;
    background: #fbfdff;
    box-shadow: 0 16px 40px rgba(20, 45, 72, .18);
    transform: none;
    scrollbar-width: thin;
    scrollbar-color: #5a9fc8 #eaf3f8;
  }
  body .catalog-popover::-webkit-scrollbar { width: 6px; }
  body .catalog-popover::-webkit-scrollbar-track { background: #eaf3f8; border-radius: 10px; }
  body .catalog-popover::-webkit-scrollbar-thumb { background: #5a9fc8; border: 1px solid #eaf3f8; border-radius: 10px; }
  body.is-catalog-open .catalog-popover { display: block; }
  body .catalog-popover__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
  body .catalog-popover__head > span,
  body .catalog-popover__head > strong { display: none; }
  body .catalog-popover__grid { display: none; }
  body .catalog-popover.is-mobile-catalog-grid-open .catalog-popover__grid { display: grid; }
  body .catalog-popover [data-mobile-navigation-language] { display: flex; }
  body .catalog-popover [data-mobile-navigation-utility] { display: flex; flex-direction: column; }
  body .catalog-popover [data-mobile-navigation-utility] .catalog-popover__utility-link {
    box-sizing: border-box;
    min-height: 52px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #193e50;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
  }
  body .catalog-popover [data-mobile-navigation-utility] .catalog-popover__utility-link + .catalog-popover__utility-link { border-top: 1px solid #e2edf4; }
  body .catalog-popover [data-mobile-navigation-utility] svg { width: 24px; height: 24px; color: #006fba; fill: none; stroke: currentColor; stroke-width: 1.8; }
  body .catalog-popover [data-mobile-navigation-utility] .catalog-popover__utility-link span { font-size: 15px; line-height: 1.3; color: inherit; }
  body .catalog-popover .catalog-popover__grid {
    grid-template-columns: minmax(0, 1fr);
    max-height: min(42dvh, 360px);
    margin: 8px 14px 0;
    padding: 10px 5px 4px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #5a9fc8 #eaf3f8;
  }
  body .catalog-popover .catalog-popover__grid::-webkit-scrollbar { width: 6px; }
  body .catalog-popover .catalog-popover__grid::-webkit-scrollbar-track { background: #eaf3f8; border-radius: 10px; }
  body .catalog-popover .catalog-popover__grid::-webkit-scrollbar-thumb { background: #5a9fc8; border-radius: 10px; border: 1px solid #eaf3f8; }
  body .catalog-popover .catalog-popover__grid::-webkit-scrollbar-thumb:hover { background: #006fba; }
  body .catalog-popover .catalog-popover__grid > a {
    box-sizing: border-box;
    height: auto;
    min-height: 64px;
    display: grid;
    grid-template-columns: 22px 56px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
  }
  body .catalog-popover .catalog-popover__grid .catalog-popover__thumb { width: 56px; height: 44px; }
  body .catalog-popover .catalog-popover__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
  body .catalog-popover .catalog-popover__grid strong { min-width: 0; font-size: 12px; line-height: 1.3; }
}

