/* Mobile navigation for the standalone homepage. Desktop remains unchanged. */
.home-mobile-icon,
.home-mobile-menu-overlay,
.home-search-close {
  display: none;
}

@media (max-width: 768px) {
  html.home-mobile-scroll-lock,
  html.home-mobile-scroll-lock body {
    overflow: hidden;
  }

  .topbar {
    display: none;
  }

  header.head {
    min-height: 64px;
    background: rgba(11, 11, 14, .98);
    backdrop-filter: blur(12px);
  }

  .head .container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    height: 64px;
    padding: 8px 16px;
  }

  .head .logo {
    min-width: 0;
    margin-right: auto;
  }

  .head .logo-img {
    width: auto;
    height: 42px;
    max-width: 118px;
    object-fit: contain;
  }

  .head .phone,
  .head .head-contacts,
  .head .head-call,
  .head .head-contacts-mob,
  .head .cta {
    display: none;
  }

  .home-mobile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #f4f4f5;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
  }

  .home-mobile-icon svg {
    width: 22px;
    height: 22px;
  }

  .home-mobile-icon:hover,
  .home-mobile-icon:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
  }

  .home-mobile-icon:focus-visible,
  .home-mobile-menu button:focus-visible,
  .home-mobile-menu a:focus-visible,
  .home-search-close:focus-visible {
    outline: 2px solid rgba(228, 50, 43, .85);
    outline-offset: 2px;
  }

  .home-mobile-cart {
    position: relative;
  }

  .home-mobile-cart-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #101014;
    border-radius: 9px;
    background: #e4322b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    white-space: nowrap;
    pointer-events: none;
  }

  .head .search {
    display: none;
  }

  body.home-mobile-search-active .head .search {
    position: fixed;
    z-index: 96;
    top: 8px;
    right: 12px;
    left: 12px;
    display: flex;
    width: auto;
    height: 48px;
    margin: 0;
    padding: 0 8px 0 14px;
    border-color: rgba(255, 255, 255, .16);
    background: #15151a;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .48);
  }

  body.home-mobile-search-active .home-mobile-search-toggle {
    visibility: hidden;
  }

  .head .search input {
    min-width: 0;
    font-size: 16px;
  }

  .head .search .home-search-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    color: #e4322b;
  }

  .home-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, .7);
    cursor: pointer;
  }

  .home-search-close svg {
    width: 20px;
    height: 20px;
  }

  .home-search-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
  }

  .home-mobile-menu-overlay {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, .66);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
  }

  .home-mobile-menu-overlay[hidden] {
    display: none;
  }

  .home-mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .home-mobile-menu-backdrop {
    position: absolute;
    inset: 0 0 0 min(360px, calc(100vw - 24px));
    width: auto;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
  }

  .home-mobile-menu {
    position: absolute;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: min(360px, calc(100vw - 24px));
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, .1);
    background: #0e0e12;
    color: #f4f4f5;
    box-shadow: 18px 0 44px rgba(0, 0, 0, .42);
    transform: translateX(-100%);
    transition: transform .24s ease;
  }

  .home-mobile-menu-overlay.is-open .home-mobile-menu {
    transform: translateX(0);
  }

  .home-mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 14px 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .home-mobile-menu-title {
    font-size: 16px;
    font-weight: 750;
  }

  .home-mobile-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, .7);
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
  }

  .home-mobile-menu-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
  }

  .home-mobile-menu-close svg,
  .home-mobile-submenu-open svg,
  .home-mobile-submenu-back svg {
    width: 21px;
    height: 21px;
  }

  .home-mobile-menu-view {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .home-mobile-menu-view[hidden] {
    display: none;
  }

  .home-mobile-menu-links,
  .home-mobile-catalog-links {
    display: block;
  }

  .home-mobile-menu-links > a,
  .home-mobile-menu-row,
  .home-mobile-catalog-links > a {
    min-height: 54px;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
  }

  .home-mobile-menu-links > a,
  .home-mobile-menu-row > a,
  .home-mobile-catalog-links > a {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    color: #f4f4f5;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
    transition: color .16s ease, background-color .16s ease;
  }

  .home-mobile-menu-links > a:hover,
  .home-mobile-menu-row > a:hover,
  .home-mobile-catalog-links > a:hover {
    color: #ff5a4d;
    background: rgba(255, 255, 255, .035);
  }

  .home-mobile-menu-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .home-mobile-submenu-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .075);
    background: transparent;
    color: rgba(255, 255, 255, .72);
    cursor: pointer;
  }

  .home-mobile-submenu-open:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
  }

  .home-mobile-submenu-back {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 10px 18px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: #15151a;
    color: #f4f4f5;
    font: 650 14px/1.2 'Manrope', sans-serif;
    cursor: pointer;
  }

  .home-mobile-catalog-links > a {
    min-height: 50px;
    padding-top: 11px;
    padding-bottom: 11px;
    font-size: 14px;
    font-weight: 550;
  }

  .home-mobile-catalog-links > .home-mobile-catalog-all {
    color: #ff5a4d;
    font-weight: 750;
  }

  .home-mobile-contact-block,
  .home-mobile-email {
    display: block;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, .075);
  }

  .home-mobile-contact-label {
    display: block;
    margin-bottom: 6px;
    color: #9a9aa4;
    font: 600 11px/1.25 'JetBrains Mono', monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .home-mobile-region-slot .citysel {
    display: block;
  }

  .home-mobile-region-slot .citysel-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 32px;
    color: #f4f4f5;
    font-size: 14px;
    font-weight: 700;
  }

  .home-mobile-region-slot .citysel-list {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }

  .home-mobile-phone-slot .phone {
    display: block;
    font-size: 17px;
    font-weight: 750;
  }

  .home-mobile-phone-slot .phone a,
  .home-mobile-email strong {
    color: #f4f4f5;
  }

  .home-mobile-email strong {
    font-size: 14px;
  }

  .hero .hero-actions > a {
    flex: 1 1 220px;
    text-align: center;
  }

  .hero .hero-actions > a.btn-outline[href="/catalog/"] {
    border-color: rgba(255, 255, 255, .26);
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-weight: 700;
    transition: background-color .2s, border-color .2s, color .2s;
  }

  .hero .hero-actions > a.btn-outline[href="/catalog/"]:hover {
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .11);
  }

  .hero .hero-actions > a.btn-outline[href="/catalog/"]:focus-visible {
    outline: 2px solid rgba(229, 50, 36, .85);
    outline-offset: 2px;
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .11);
  }

  .hero .hero-actions > a.btn-outline[href="/catalog/"]:active {
    border-color: rgba(255, 255, 255, .48);
    background: rgba(255, 255, 255, .15);
  }
}

@media (max-width: 360px) {
  .head .container {
    gap: 6px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .head .logo-img {
    height: 38px;
    max-width: 105px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-mobile-menu-overlay,
  .home-mobile-menu {
    transition: none;
  }
}
