/**
 * Мобильный UI — aquagrp.ru
 * Подключать после shop.css и home-landing.css
 */
@media (max-width: 768px) {
  .search-mobile-sticky ~ .search-mobile-sticky {
    display: none !important;
  }

  html {
    --trust-strip-h: 0px;
    --mobile-search-h: 50px;
    --mobile-chrome-h: calc(var(--header-h, 56px) + var(--mobile-search-h));
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  body {
    overflow-x: clip;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  /* ——— Меньше «липучек» сверху ——— */
  .site-trust-strip {
    display: none !important;
  }

  body.has-trust-strip .site-header {
    top: 0;
  }

  .search-mobile-sticky {
    top: var(--header-h, 56px);
    padding: 6px 0;
    z-index: 110;
  }

  .search--mobile-bar input {
    font-size: 16px;
    min-height: 44px;
  }

  /* ——— Шапка: иконки вместо длинного текста ——— */
  .header-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
  }

  .header-action-btn__label {
    display: none;
  }

  .header-action-btn__icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .header-actions .cart-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions .btn--ghost:not(.cart-btn):not(.header-action-btn) {
    display: none;
  }

  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .mobile-nav .search-mobile {
    display: none !important;
  }

  .mobile-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 1rem;
  }

  /* ——— Мобильное меню: полноэкранная панель ——— */
  .mobile-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h, 56px);
    bottom: 0;
    z-index: 136;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--bg, #fff);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    max-height: none;
  }

  .mobile-nav.is-open {
    display: flex;
    flex-direction: column;
  }

  .mobile-nav > a {
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-nav > a:last-of-type {
    border-bottom: none;
  }

  body.mobile-nav-open {
    overflow: hidden;
    touch-action: none;
  }

  html.mobile-nav-scroll-lock {
    overflow: hidden;
    height: 100%;
  }

  html.mobile-nav-scroll-lock body {
    overflow: hidden;
    touch-action: none;
  }

  body.mobile-nav-open .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 140;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg, #fff);
  }

  #mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(15, 25, 35, 0.42);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    pointer-events: none;
  }

  #mobile-nav-backdrop:not([hidden]) {
    display: block;
    pointer-events: auto;
  }

  body.mobile-nav-open::before {
    content: none;
  }

  body.mobile-nav-open .search-mobile-sticky,
  body.mobile-nav-open #messenger-fab,
  body.mobile-nav-open .cookie-banner,
  body.mobile-nav-open .contact-dock,
  body.mobile-nav-open .compare-bar {
    display: none !important;
  }

  .mobile-nav__messengers {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
  }

  .mobile-nav__msg {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    min-height: 48px;
    font-size: 0.95rem;
    gap: 10px;
    border-radius: var(--radius-sm, 8px);
    border: 0;
    color: #fff;
    font-weight: 600;
  }

  .mobile-nav__msg--wa,
  .mobile-nav__msg.btn--messenger-wa {
    background: #25d366;
    color: #fff;
  }

  .mobile-nav__msg--wa .msg-icon path,
  .mobile-nav__msg.btn--messenger-wa .msg-icon path {
    fill: #fff;
  }

  .mobile-nav__msg--tg,
  .mobile-nav__msg.btn--messenger-tg {
    background: #229ed9;
    color: #fff;
  }

  .mobile-nav__msg--max,
  .mobile-nav__msg.btn--messenger-max {
    background: #6b5ce7;
    color: #fff;
  }

  .mobile-nav a[href="/pages/favorites.html"] {
    display: none;
  }

  .mobile-nav__msg .msg-icon,
  .mobile-nav__msg .msg-icon--brand-max,
  .mobile-nav__msg .msg-icon--max-glyph {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
  }

  .mobile-nav__phone {
    display: none;
  }

  .mobile-nav__cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    min-height: 48px;
    margin-top: auto;
    padding-top: 16px;
  }

  /* ——— Главная: превью каталога на мобилке ——— */
  html.is-home .catalog-layout,
  body.page-home .catalog-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  html.is-home .catalog-home-lead,
  body.page-home .catalog-home-lead {
    display: block;
  }

  html.is-home .catalog--home-preview,
  body.page-home .catalog--home-preview {
    padding: 12px 0 8px;
  }

  html.is-home .catalog__title,
  body.page-home .catalog__title {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  html.is-home .home-catalog-cta,
  body.page-home .home-catalog-cta {
    display: block;
    text-align: center;
    padding: 16px 0 20px;
  }

  html.is-home .product-grid--featured,
  body.page-home .product-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html.is-home .product-card__tools,
  html.is-home .product-card__purchase,
  body.page-home .product-card__tools,
  body.page-home .product-card__purchase {
    display: none !important;
  }

  html.is-home .home-catalog-cta .btn,
  body.page-home .home-catalog-cta .btn {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  html.is-home .home-catalog-cta__hint,
  body.page-home .home-catalog-cta__hint {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
  }

  html.is-home .catalog-preview-more,
  body.page-home .catalog-preview-more {
    display: none !important;
  }

  html.is-home .aqu-hero__messengers {
    display: none !important;
  }

  html.is-catalog .home-catalog-cta,
  body.page-catalog .home-catalog-cta {
    display: none !important;
  }

  html.is-catalog .aqu-hero,
  html.is-catalog .aqu-benefits--compact,
  body.page-catalog .aqu-hero,
  body.page-catalog .aqu-benefits--compact {
    display: none !important;
  }

  /* ——— Каталог /catalog/ ——— */
  html.is-catalog .catalog,
  body.page-catalog .catalog {
    padding-top: 8px;
  }

  html.is-catalog .catalog__title,
  body.page-catalog .catalog__title {
    font-size: 1.25rem;
    margin-bottom: 4px;
  }

  html.is-catalog .catalog-page-lead,
  body.page-catalog .catalog-page-lead {
    font-size: 0.88rem;
    margin-bottom: 12px;
  }

  .catalog-tools-row {
    top: var(--mobile-chrome-h);
    z-index: 48;
    padding: 6px 0 8px;
    margin-bottom: 8px;
    box-shadow: 0 6px 12px rgba(26, 43, 60, 0.06);
  }

  html.is-catalog .catalog-nav-toggle,
  html.is-catalog .smart-filter-toggle,
  body.page-catalog .catalog-nav-toggle,
  body.page-catalog .smart-filter-toggle {
    width: 100%;
    margin: 0;
    display: flex;
    min-height: 48px;
  }

  .toolbar select,
  .toolbar--filters select,
  .smart-filter select {
    min-height: 44px;
    font-size: 16px;
  }

  .catalog-nav__head,
  .catalog-nav__subhead,
  .catalog-nav__link {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.95rem;
  }

  .toolbar {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }

  .toolbar select,
  .toolbar input[type="checkbox"] {
    min-height: 44px;
    font-size: 16px;
  }

  /* ——— Карточки товаров ——— */
  .product-card {
    overflow: hidden;
  }

  .product-card__body {
    padding: 12px 14px 14px;
  }

  .product-card__name {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .product-card__purchase {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .card-qty {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .card-qty__btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .card-qty__input {
    width: 64px;
    height: 44px;
    font-size: 16px;
  }

  .product-card__actions {
    gap: 8px;
  }

  .product-card__actions .btn {
    min-height: 44px;
    font-size: 0.92rem;
  }

  .qty button {
    width: 44px;
    height: 44px;
  }

  /* ——— Мессенджеры: горизонтальная панель ——— */
  .messenger-fab {
    flex-direction: row;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
    gap: 14px;
    width: auto;
  }

  body:has(#cookie-banner:not([hidden])) #messenger-fab {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  body:has(#cookie-banner:not([hidden])) {
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .messenger-fab__btn {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
  }

  .messenger-fab__btn--max .msg-icon {
    width: 52px;
    height: 52px;
  }

  .shop-toast {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .compare-bar {
    z-index: 95;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* ——— Лендинг ——— */
  .aqu-hero {
    padding: 16px 0 12px;
  }

  .aqu-hero__card {
    padding: 22px 18px;
  }

  .aqu-hero h1 {
    font-size: 1.32rem;
    margin-bottom: 12px;
  }

  .aqu-hero__lead {
    font-size: 0.92rem;
    margin-bottom: 16px;
  }

  .aqu-hero__cta {
    flex-direction: column;
  }

  .aqu-hero__cta .aqu-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .aqu-hero__messengers {
    justify-content: stretch;
    flex-direction: column;
    margin-top: 14px;
  }

  .aqu-hero__messengers .btn--messenger {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .aqu-benefits--compact {
    padding: 0 0 16px;
  }

  .aqu-benefits--compact .aqu-benefits__grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .aqu-card--compact {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
  }

  .aqu-card--compact h3 {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  /* ——— Модалки и корзина ——— */
  .cart-drawer__close,
  .modal__close,
  .smart-filter__close {
    min-width: 44px;
    min-height: 44px;
  }

  .cart-drawer {
    max-height: 92dvh;
  }

  .order-form input,
  .order-form textarea,
  .order-form select {
    font-size: 16px;
    min-height: 44px;
  }

  .order-form label,
  .order-form__consent-text {
    font-size: 0.875rem;
  }

  .site-footer--compact .site-footer__tagline,
  .site-footer__tagline,
  .site-footer__links a {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .site-footer--compact .site-footer__tagline {
    margin: 0;
  }
}

.home-catalog-cta {
  display: none;
}

@media (min-width: 769px) {
  .header-action-btn__icon {
    display: none;
  }
}
