/* ============================================================
   PRIMARY mobile/tablet rules — driven by inline JS in <head> that
   tags <html> with .vp-mobile / .vp-tablet / .vp-desktop BEFORE CSS loads.
   These rules do NOT rely on @media queries, so they work even when
   the viewport meta tag is parsed late (Chrome DevTools Responsive Mode bug).
   ============================================================ */
/* Header / footer / cat-nav containers — must work on EVERY page (header & footer
   are global), so we don't restrict them to common-home. */
html.vp-mobile .top-bar > .container,
html.vp-mobile .header > .container,
html.vp-mobile .cat-nav > .container,
html.vp-mobile .footer__main > .container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Homepage-only container reset — protects Bootstrap layout on inner pages */
html.vp-mobile body.common-home,
html.vp-tablet body.common-home {
  min-width: 0 !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}
html.vp-mobile body.common-home .container,
html.vp-mobile body.common-home .row,
html.vp-mobile body.common-home .hero > .container,
html.vp-mobile body.common-home .trust-bar > .container,
html.vp-mobile body.common-home .categories > .container,
html.vp-mobile body.common-home .products > .container,
html.vp-mobile body.common-home .why-us > .container,
html.vp-mobile body.common-home .compare > .container,
html.vp-mobile body.common-home .reviews > .container,
html.vp-mobile body.common-home .faq > .container,
html.vp-mobile body.common-home .seo-text > .container,
html.vp-mobile body.common-home .subscribe > .container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Header — show burger + иконку поиска, hide desktop nav/search/help */
html.vp-mobile .header__nav,
html.vp-mobile .header__search,
html.vp-mobile .header__help,
html.vp-mobile .header__icon--desktop { display: none !important; }
html.vp-mobile .burger-btn { display: flex !important; }
html.vp-mobile .header__icon--search { display: flex !important; }
html.vp-mobile .header { padding: 10px 0 !important; position: sticky !important; top: 0 !important; z-index: 200 !important; }
/* Логотип «резиновый» (см. header.css @768): жёсткий height:30px+width:auto
   выпихивал ряд иконок за экран на 360px. max-height сохраняет прежние 30px там,
   где место есть. */
html.vp-mobile .header__logo { flex: 0 1 auto !important; min-width: 0 !important; }
html.vp-mobile .header__logo img {
  height: auto !important;
  max-height: 30px !important;
  width: auto !important;
  max-width: 100% !important;
}
html.vp-mobile .header__icons { gap: 2px !important; flex: 0 0 auto !important; }

/* Top bar — only the slider visible */
html.vp-mobile .top-bar { height: 36px !important; }
html.vp-mobile .top-bar__left,
html.vp-mobile .top-bar__right { display: none !important; }
html.vp-mobile .top-bar__center { flex: 1 !important; }

/* Cat nav — sticky under header + horizontal scroll.
   Sticky rule mirrors header.css:374 — duplicated here under html.vp-mobile so it
   survives the first-paint window where @media (max-width: 768px) can lag behind
   the JS-driven class (Chrome DevTools Responsive Mode bug, iOS viewport-meta delay). */
html.vp-mobile .cat-nav {
  position: sticky !important;
  top: 65px !important;       /* actual header height: 44px content + 2×10px padding + 1px border-bottom */
  z-index: 199 !important;    /* one below the sticky .header (z-index 200) */
  background: var(--brand-teal) !important;
}
html.vp-mobile .cat-nav > .container {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none !important;
}
html.vp-mobile .cat-nav > .container::-webkit-scrollbar { display: none !important; }
html.vp-mobile .cat-nav a {
  flex-shrink: 0 !important; white-space: nowrap !important;
  padding: 10px 14px !important; font-size: 12px !important;
}

/* Hero */
html.vp-mobile .hero { min-height: 380px !important; padding: 40px 0 !important; }
html.vp-mobile .hero > .container {
  flex-direction: column !important;
  text-align: center !important;
  padding-top: 30px !important;
  padding-bottom: 30px !important;
}
html.vp-mobile .hero__product { display: none !important; }
html.vp-mobile .hero h1 { font-size: 24px !important; line-height: 1.25 !important; }
html.vp-mobile .hero__subtitle { font-size: 14px !important; }
html.vp-mobile .hero__cta-group { flex-direction: column !important; gap: 10px !important; align-items: stretch !important; }
html.vp-mobile .hero__cta,
html.vp-mobile .hero__cta--secondary {
  min-height: 50px !important; width: 100% !important; max-width: 100% !important;
  font-size: 15px !important; justify-content: center !important;
}
html.vp-mobile .hero__usps { flex-direction: column !important; gap: 6px !important; align-items: center !important; }

/* Trust bar: колонок столько, сколько влезает.
   Было жёстко 2×2 — на 390px колонка получалась ~170px, и подписи ломались по
   два-три слова («100% оригинальная / продукция»), а пункты перестали быть
   парными: контроллер прячет те, для которых нет данных, и их бывает 2, 3 или 4.
   auto-fit сам решает: на узком экране — один пункт в строку и текст не рвётся,
   на планшете — два. Боковые отступы пункта на мобиле не нужны, они съедали
   ширину, из-за которой всё и ломалось. */
html.vp-mobile .trust-bar > .container {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 8px !important;
}
html.vp-mobile .trust-item {
  padding: 10px 0 !important;
}
html.vp-mobile .trust-item__text {
  min-width: 0 !important;
}
html.vp-mobile .trust-item:not(:last-child)::after { display: none !important; }

/* Categories — horizontal scroll.
   Полосу прокрутки НЕ прячем: раньше scrollbar-width:none + ::-webkit-scrollbar
   {display:none} убирали единственный намёк на то, что справа есть ещё карточки. */
html.vp-mobile .categories__grid {
  display: flex !important;
  grid-template-columns: none !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 10px !important;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--brand-teal) rgba(0, 0, 0, 0.10) !important;
  padding-bottom: 10px !important;
}
html.vp-mobile .categories__grid::-webkit-scrollbar {
  display: block !important;
  height: 4px !important;
  -webkit-appearance: none;
}
html.vp-mobile .categories__grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.10);
  border-radius: 2px;
}
html.vp-mobile .categories__grid::-webkit-scrollbar-thumb {
  background: var(--brand-teal);
  border-radius: 2px;
}
/* Мягкий фейд у правого края — тот же приём, что уже работает в секции .compare.
   На iOS оверлейные полосы прокрутки видны только во время скролла, поэтому
   именно фейд + «выглядывающая» карточка несут признак прокручиваемости. */
html.vp-mobile .categories > .container { position: relative !important; }
html.vp-mobile .categories > .container::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 34px;
  background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
  z-index: 4;
}
/* Пропорция карточки = пропорция самой картинки (600×432 = 1.39). Было 3/4 = 0.75:
   object-fit:cover срезал по ~77px с каждой стороны и вместе с ними — вожжённое в
   JPEG название категории. Ширину берём от вьюпорта, чтобы соседняя карточка
   заметно выглядывала (признак, что полосу можно листать) — было видно 4px. */
html.vp-mobile .category-card {
  flex: 0 0 min(100% - 52px, 300px) !important;
  scroll-snap-align: start !important;
  aspect-ratio: 600/432 !important;
}

/* Products grid 2 cols.
   max-width: none / margin: 0 — resets the @media (max-width: 480px) rule below
   that wants `max-width: 340px; margin: auto` for the 1-col narrow-phone layout.
   Since vp-mobile keeps 2 cols, the 340px clamp would squeeze the grid into a
   narrow centred strip with huge empty side margins.

   ТЗ: тонкая равная полоска со ВСЕХ сторон между карточками. Боковой padding
   секции уменьшен до 6px (см. .products > .container override ниже), gap между
   карточками - тот же 6px. Это даёт визуальную «решётку» где все промежутки
   одинаковой толщины. Если нужно ещё уже - снизить оба значения синхронно. */
html.vp-mobile .products__grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Override общего .container padding (16px из строк 16-17 / 45-46) специально
   для секции .products на мобиле — чтобы боковая полоска совпадала с gap. */
html.vp-mobile body.common-home .products > .container,
html.vp-mobile .products > .container {
  padding-left: 6px !important;
  padding-right: 6px !important;
}
html.vp-mobile .counters { gap: 16px !important; flex-direction: row !important; justify-content: space-around !important; }
html.vp-mobile .counter:not(:last-child)::after { display: none !important; }
html.vp-mobile .counter__number { font-size: 22px !important; }

/* Sticker "Хит продаж" — visible on mobile (display:none removed).
   Sits in the bottom-right corner of the card, same as on desktop. */

/* Why-us 1 col */
html.vp-mobile .why-us__grid { grid-template-columns: 1fr !important; gap: 12px !important; }

/* Compare "Топ моделей" — horizontal scroll carousel (like categories) */
html.vp-mobile .compare__grid {
  display: flex !important;
  grid-template-columns: none !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 12px !important;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: none !important;
  max-width: none !important;
  padding-bottom: 8px !important;
}
html.vp-mobile .compare__grid::-webkit-scrollbar { display: none !important; }
html.vp-mobile .compare__card { flex: 0 0 clamp(180px, 62vw, 230px) !important; scroll-snap-align: start !important; }
html.vp-mobile .compare__card--featured { transform: none !important; }
/* Carousel affordance: next card always peeks + soft fade on the right edge */
html.vp-mobile .compare > .container { position: relative !important; }
html.vp-mobile .compare > .container::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 36px;
  background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
  z-index: 4;
}

/* Footer 1 col */
html.vp-mobile .footer__grid { grid-template-columns: 1fr !important; gap: 24px !important; }

/* Subscribe form vertical */
html.vp-mobile .subscribe__form { flex-direction: column !important; gap: 10px !important; }
html.vp-mobile .subscribe__input,
html.vp-mobile .subscribe__btn { width: 100% !important; border-radius: 10px !important; }

/* ============================================================
   TABLET (≤1024px)
   ============================================================ */
html.vp-tablet .compare__grid { grid-template-columns: repeat(2, 1fr) !important; max-width: 720px !important; }
html.vp-tablet .compare__card--featured { transform: none !important; }
html.vp-tablet .why-us__grid { grid-template-columns: repeat(2, 1fr) !important; }
html.vp-tablet .footer__grid { grid-template-columns: repeat(2, 1fr) !important; }
html.vp-tablet .hero__product { display: none !important; }
html.vp-tablet .hero > .container { flex-direction: column !important; text-align: center !important; }
html.vp-tablet .categories__grid { grid-template-columns: repeat(2, 1fr) !important; }
html.vp-tablet .products__grid { grid-template-columns: repeat(3, 1fr) !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero .container { flex-direction: column; text-align: center; }
  .hero__product { display: none; }
  .hero h1 { font-size: 32px; }
  .hero__usps { justify-content: center; }
  .hero__cta-group { justify-content: center; }
  .hero__subtitle { max-width: 100%; }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .products__grid { grid-template-columns: repeat(3, 1fr); }
  .why-us__grid { grid-template-columns: repeat(2, 1fr); }
  .compare__grid { grid-template-columns: repeat(2, 1fr) !important; max-width: 720px !important; }
  .compare__card--featured { transform: none !important; }
  .review-card { flex: 0 0 320px; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom-row { flex-direction: column; gap: 12px; text-align: center; }
  .footer__legal-info { justify-content: center; }
}

@media (max-width: 768px) {
  /* Container reset only for OUR sections (homepage, header & footer) — never
     touch a bare .container so Bootstrap layouts on inner pages keep working. */
  .top-bar > .container,
  .header > .container,
  .cat-nav > .container,
  .footer__main > .container,
  body.common-home .hero > .container,
  body.common-home .trust-bar > .container,
  body.common-home .categories > .container,
  body.common-home .why-us > .container,
  body.common-home .compare > .container,
  body.common-home .reviews > .container,
  body.common-home .faq > .container,
  body.common-home .seo-text > .container,
  body.common-home .subscribe > .container,
  body.common-home .products > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* — Force any wide hero/sections content to never overflow viewport — */
  .hero,
  .trust-bar,
  .categories,
  .products,
  .why-us,
  .compare,
  .reviews,
  .faq,
  .seo-text,
  .subscribe,
  .footer {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* — Top bar — */
  .top-bar { height: 36px; font-size: 12px; }
  .top-bar .container { justify-content: center; }
  .top-bar__left { display: none; }
  .top-bar__right { display: none; }
  .top-bar__center { flex: 1; }

  /* — Header: sticky + burger — */
  .header {
    position: sticky; top: 0; z-index: 200;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  .header__nav { display: none; }
  .header__search { display: none; }
  /* Логотип «резиновый» — см. комментарий в верхней части файла и header.css.
     Было height:30px + width:auto, из-за чего на 360px ряд иконок вылезал на 11px. */
  .header__logo { flex: 0 1 auto; min-width: 0; }
  .header__logo img { height: auto; max-height: 30px; width: auto; max-width: 100%; }
  .header__icons { gap: 2px; flex: 0 0 auto; }
  .header__icon { width: 44px; height: 44px; }
  .burger-btn { display: flex; }
  .header__icon--desktop { display: none; }
  .header__help { display: none; }
  .header__icon--search { display: flex; }

  /* — Cat-nav: горизонтальный скролл с индикатором "ещё пункты справа" — */
  .cat-nav {
    position: sticky;
    top: 65px;
    z-index: 199;
    overflow: hidden;       /* контейнер задаёт фейд через ::after */
  }
  .cat-nav::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 32px;
    background: linear-gradient(to left, var(--brand-teal), rgba(130, 180, 189, 0));
    pointer-events: none;
    z-index: 1;
  }
  .cat-nav > .container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
    flex-wrap: nowrap;
    scrollbar-width: none;
    gap: 0 !important;
    padding-left: 12px !important;
    padding-right: 36px !important;  /* запас под градиент-индикатор */
  }
  .cat-nav > .container::-webkit-scrollbar { display: none; }
  .cat-nav a {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 11px 14px;
    font-size: 12px;
    letter-spacing: 0.4px;
  }
  .cat-nav a.cat-nav--highlight {
    border-bottom-width: 2px;
  }

  /* — Hero — */
  .hero { min-height: 380px; padding: 40px 0; }
  .hero h1 { font-size: 24px; line-height: 1.25; }
  .hero__badge { font-size: 10px; padding: 6px 14px; letter-spacing: 1px; }
  .hero__subtitle { font-size: 14px; margin-bottom: 20px; }
  .hero__cta-group { flex-direction: column; gap: 10px; align-items: stretch; }
  .hero__cta, .hero__cta--secondary {
    min-height: 50px; width: 100%; max-width: 100%;
    font-size: 15px; justify-content: center; padding: 14px 24px;
  }
  /* Make secondary CTA more visible on dark hero */
  .hero__cta--secondary {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.5);
  }
  .hero__usps { flex-direction: column; gap: 6px; font-size: 13px; align-items: center; }
  .hero__usp { justify-content: flex-start; max-width: 280px; width: 100%; }

  /* — Trust bar — */
  .trust-bar { padding: 16px 0; }
  .trust-bar .container {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 8px; justify-items: stretch;
  }
  .trust-item { padding: 10px 8px; width: 100%; justify-content: flex-start; }
  .trust-item:not(:last-child)::after { display: none; }
  .trust-item__icon { width: 36px; height: 36px; min-width: 36px; border-radius: 10px; }
  .trust-item__icon svg { width: 16px; height: 16px; }
  .trust-item__text strong { font-size: 12px; }
  .trust-item__text span { font-size: 10px; }

  /* — Categories: горизонтальный скролл — */
  .categories { padding: 40px 0 32px; }
  .categories h2 { font-size: 22px; margin-bottom: 20px; }
  .categories__grid {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-teal) rgba(0, 0, 0, 0.10);
  }
  .categories__grid::-webkit-scrollbar { display: block; height: 4px; }
  .categories__grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.10); border-radius: 2px; }
  .categories__grid::-webkit-scrollbar-thumb { background: var(--brand-teal); border-radius: 2px; }
  .categories > .container { position: relative; }
  .categories > .container::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 34px;
    background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
    pointer-events: none;
    z-index: 4;
  }
  .category-card {
    flex: 0 0 min(100% - 52px, 300px); scroll-snap-align: start; aspect-ratio: 600/432;
  }
  .category-card__name { font-size: 14px; letter-spacing: 0.8px; }
  .category-card__overlay { padding: 14px; }
  .category-card__icon { width: 32px; height: 32px; margin-bottom: 6px; }
  .category-card__icon svg { width: 15px; height: 15px; }
  .category-card__count { font-size: 11px; }
  .category-card__arrow { display: none; }

  /* — Products / "Популярные модели" — */
  .products { padding: 40px 0; }
  .products h2 { font-size: 22px; margin-bottom: 18px; }
  .counters {
    gap: 16px !important;
    margin: 6px 0 24px !important;
    padding: 12px 0 !important;
    flex-direction: row !important;
    justify-content: space-around !important;
  }
  .counter:not(:last-child)::after { display: none; }
  .counter__number { font-size: 22px !important; }
  .counter__label { font-size: 10px !important; }
  .products__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .product-card { border-radius: 10px; }
  .product-card__name { font-size: 12px; line-height: 1.3; }
  .product-card__info { padding: 10px 10px 12px; }
  .product-card__price { font-size: 14px; }
  .product-card__delivery { font-size: 10px; padding: 0; }
  .product-card__delivery svg { width: 12px; height: 12px; }
  .product-card__rating { font-size: 11px; }
  .product-card__specs { font-size: 10px; }
  .product-card__buy { padding: 8px 12px; font-size: 11px; }
  .product-card__compare { width: 36px; height: 36px; }
  .product-card__sticker { width: 64px; height: 64px; }
  .product-card__sticker-inner { font-size: 8px; padding: 2px 0; bottom: 11px; right: -35px; }
  .product-card__tools-badge .product-card__tools-num { width: 30px; height: 30px; font-size: 13px; }
  .product-card__size-badge { padding: 3px 6px; }
  .product-card__size-badge .product-card__size-value { font-size: 13px; }

  /* — Why-us — */
  .why-us { padding: 40px 0; }
  .why-us h2 { font-size: 22px; margin-bottom: 8px; }
  .why-us__subtitle { font-size: 13px; margin-bottom: 24px; }
  .why-us__grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .why-us__item { padding: 24px 20px; }
  .why-us__icon { width: 60px; height: 60px; margin-bottom: 14px; }
  .why-us__icon svg { width: 28px; height: 28px; }
  .why-us__number { font-size: 26px; }
  .why-us__title { font-size: 15px; }
  .why-us__desc { font-size: 13px; }

  /* — Compare — */
  .compare { padding: 40px 0; }
  .compare h2 { font-size: 22px; }
  .compare__subtitle { font-size: 13px; }
  .compare__grid {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; gap: 12px;
    padding-bottom: 8px; scrollbar-width: none;
    max-width: none !important;
  }
  .compare__grid::-webkit-scrollbar { display: none; }
  .compare__card {
    flex: 0 0 clamp(180px, 62vw, 230px); scroll-snap-align: start;
    padding: 20px 16px;
  }
  .compare__card--featured { transform: none !important; }
  .compare > .container { position: relative; }
  .compare > .container::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 36px;
    background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
    pointer-events: none;
    z-index: 4;
  }

  /* — Reviews — */
  .reviews { padding: 40px 0; }
  .reviews h2 { font-size: 22px; }
  .review-card { flex: 0 0 280px !important; padding: 20px; }
  .reviews__avg { font-size: 32px; }

  /* — FAQ — */
  .faq { padding: 40px 0; }
  .faq h2 { font-size: 22px; }
  .faq__question { font-size: 14px; padding: 16px 14px; }

  /* — Subscribe — */
  .subscribe { padding: 40px 0; }
  .subscribe h2 { font-size: 22px; }
  .subscribe__form { flex-direction: column; gap: 10px; }
  .subscribe__input,
  .subscribe__btn {
    width: 100%;
    border-radius: 10px !important;
  }

  /* — Footer — */
  .footer__grid { grid-template-columns: 1fr !important; gap: 24px; }
  .footer__col h4 { margin-bottom: 12px; }
}

/* ============================================================
   ПРОВИСШИЙ ДИАПАЗОН 600–768px («маленький планшет»)
   Мобильная ветка (.vp-mobile / @media ≤768) включалась по ширине ≤768, а
   планшетная (.vp-tablet) — только с 769. В промежутке карусель категорий
   рисовала три карточки по 180px в контейнере 736px и оставляла справа
   пустую дыру 161px. Здесь возвращаем нормальную сетку.
   ============================================================ */
@media (min-width: 600px) and (max-width: 768px) {
  /* 2 колонки — ровно как в планшетной ветке html.vp-tablet (769–1024px),
     чтобы на границе 768/769 раскладка не прыгала. */
  html.vp-mobile .categories__grid,
  .categories__grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
  }
  html.vp-mobile .category-card,
  .category-card {
    flex: none !important;
    width: auto !important;
    aspect-ratio: 600/432 !important;
  }
  /* фейд-индикатор прокрутки в сетке не нужен */
  html.vp-mobile .categories > .container::after,
  .categories > .container::after { display: none !important; }

  html.vp-mobile .products__grid,
  .products__grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ============================================================
   МОБИЛЬНЫЕ ЦЕЛИ НАЖАТИЯ — норма 44×44px по обеим сторонам.
   Дублируем правила и под .vp-mobile (класс ставится инлайн-скриптом до
   загрузки CSS), и под @media ≤768 — как и всё остальное в этом файле.
   ============================================================ */
html.vp-mobile .product-layout .btn-addtocart,
html.vp-mobile .product-layout .btn-addtocart.nostock {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
}
html.vp-mobile .product-layout .btn-compare {
  display: inline-flex !important;
  height: 44px !important;
  width: 44px !important;
  margin-left: 14px !important;   /* было 10px между двумя целями по 25px */
  background-size: 22px 22px !important;
  vertical-align: middle !important;
  position: relative !important;
  z-index: 2 !important;
}
/* Уголок-ленточка «ХИТ продаж» / «Новинка» — чистая декорация, но лежит поверх
   кнопки сравнения в правом нижнем углу карточки и перехватывает тап (после
   увеличения кнопки до 44×44 перекрытие стало полным: 4 из 5 точек попадали в
   ленточку, а не в кнопку). Пропускаем нажатия насквозь. */
html.vp-mobile .product-layout .bmarker,
html.vp-mobile .product-layout .amarker { pointer-events: none !important; }

/* Пагинация: было 34×34 */
html.vp-mobile .pagination > li > a,
html.vp-mobile .pagination > li > span {
  min-width: 44px !important;
  height: 44px !important;
  line-height: 42px !important;
  padding: 0 10px !important;
  font-size: 15px !important;
}

/* Чекбоксы фильтра (были 20×20) и строка-«мишень» вокруг них */
html.vp-mobile .filter_groups .checkbox { margin: 0 !important; }
html.vp-mobile .filter_groups .checkbox > label {
  display: flex !important;
  align-items: center !important;
  min-height: 44px !important;
  padding-left: 34px !important;
  margin: 0 !important;
}
html.vp-mobile .filter_groups .checkbox input[type="checkbox"] {
  width: 24px !important;
  height: 24px !important;
  margin-top: -12px !important;
}

/* «Показывать только отличия» на странице сравнения и «Уведомить по e-mail»
   в форме отзыва — нативные чекбоксы 13×13 */
html.vp-mobile #onlydiff,
html.vp-mobile #product-review input[type="checkbox"],
html.vp-mobile .checkbox input[type="checkbox"],
html.vp-mobile .radio input[type="radio"] {
  width: 22px !important;
  height: 22px !important;
}
html.vp-mobile #product-review .checkbox label,
html.vp-mobile .compare-page .checkbox label,
html.vp-mobile label[for="onlydiff"] {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 44px !important;
}

/* Карточка товара: «Добавить к сравнению» было 174×20 */
html.vp-mobile .compare-info a,
html.vp-mobile .lowprice-info a {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
}
/* «ДОБАВИТЬ В КОРЗИНУ» было 258×41 */
html.vp-mobile #button-cart,
html.vp-mobile #button-schet,
html.vp-mobile .btn.btn-block {
  min-height: 48px !important;
}
/* Количество: «−»/«+» были 28×38. Блоку даём место — раньше .line-quantity
   был зажат в 122px и три элемента по 44px туда бы не влезли. */
html.vp-mobile #product-top .line-quantity { width: 144px !important; }
html.vp-mobile #product-top .line-bcart { width: calc(100% - 144px) !important; }
html.vp-mobile .group-quantity .btn.btn-minus,
html.vp-mobile .group-quantity .btn.btn-plus,
html.vp-mobile .quantity-block .btn.btn-minus,
html.vp-mobile .quantity-block .btn.btn-plus {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  line-height: 44px !important;
}
html.vp-mobile .quantity-block input {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  font-size: 16px !important;
}
html.vp-mobile .line-onequantity .oqty-block .group-quantity { width: auto !important; }


/* Мобильная панель сортировки/фильтра над списком товаров (рендерится только в
   мобильной ветке шаблона, т.е. при мобильном User-Agent): «Фильтр» и
   «Сортировка» были 86×30 и 125×30. */
html.vp-mobile .container.category-page .sort-box.sort-mobile { padding: 6px 0 !important; }
html.vp-mobile #filter_btn,
html.vp-mobile .sort-mobile .sort-block .dropdown > a,
html.vp-mobile #dropdownsort {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
}
html.vp-mobile .sort-mobile .sort-block .dropdown-menu li > a { min-height: 44px !important; display: flex !important; align-items: center !important; }

/* ============================================================
   iOS: любое поле ввода мельче 16px заставляет Safari зумить страницу на
   фокусе и обратно не отматывать. Норма — ровно 16px.
   Затрагивает в т.ч. #input-coupon (поле купона в корзине, было 14px).
   ============================================================ */
html.vp-mobile input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
html.vp-mobile select,
html.vp-mobile textarea,
html.vp-mobile .form-control {
  font-size: 16px !important;
}
/* поля с жёсткой высотой под 14px — даём дорасти под 16px */
html.vp-mobile .form-control,
html.vp-mobile input.form-control,
html.vp-mobile select.form-control {
  height: auto !important;
  min-height: 44px !important;
}
html.vp-mobile textarea.form-control { height: auto !important; }
html.vp-mobile .container.category-page .sort-block .form-control {
  height: 44px !important;
  min-height: 44px !important;
  background-position: right 10px center !important;
  padding-right: 32px !important;
}

/* ============================================================
   SEO-ТЕКСТ ПОД КАТЕГОРИЕЙ (.description-line .well)
   Держал десктопные padding:30px 40px поверх padding контейнера — текст
   ужимался до 295px из 375. Плюс h2/h3 внутри были КРУПНЕЕ h1 страницы (22px).
   Правило mobile.css выше ограничено body.common-home и сюда не доставало.
   ============================================================ */
html.vp-mobile .container.category-page .description-line,
html.vp-mobile .description-line { padding-left: 0 !important; padding-right: 0 !important; }
html.vp-mobile .container.category-page .description-line .well,
html.vp-mobile .description-line .well {
  padding: 16px 12px !important;
}
html.vp-mobile .description-line .well h2 { font-size: 19px !important; line-height: 1.3 !important; margin-top: 0 !important; }
html.vp-mobile .description-line .well h3 { font-size: 16px !important; line-height: 1.35 !important; }
html.vp-mobile .description-line .well h4 { font-size: 15px !important; }
html.vp-mobile .description-line .well ul,
html.vp-mobile .description-line .well ol { padding-left: 18px !important; }
html.vp-mobile .description-line .well img { max-width: 100% !important; height: auto !important; }
html.vp-mobile .description-line .well table { display: block !important; overflow-x: auto !important; max-width: 100% !important; }

/* ============================================================
   Зеркало блока выше через @media — на случай, когда инлайн-скрипт, ставящий
   .vp-mobile, не отработал (JS отключён). Порядок и значения те же.
   ============================================================ */
@media (max-width: 768px) {
  .product-layout .btn-addtocart,
  .product-layout .btn-addtocart.nostock {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 18px !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    vertical-align: middle !important;
  }
  .product-layout .btn-compare {
    display: inline-flex !important;
    height: 44px !important;
    width: 44px !important;
    margin-left: 14px !important;
    background-size: 22px 22px !important;
    vertical-align: middle !important;
    position: relative !important;
    z-index: 2 !important;
  }
  .product-layout .bmarker,
  .product-layout .amarker { pointer-events: none !important; }
  .pagination > li > a,
  .pagination > li > span {
    min-width: 44px !important;
    height: 44px !important;
    line-height: 42px !important;
    padding: 0 10px !important;
    font-size: 15px !important;
  }
  .filter_groups .checkbox { margin: 0 !important; }
  .filter_groups .checkbox > label {
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    padding-left: 34px !important;
    margin: 0 !important;
  }
  .filter_groups .checkbox input[type="checkbox"] {
    width: 24px !important; height: 24px !important; margin-top: -12px !important;
  }
  #onlydiff,
  #product-review input[type="checkbox"],
  .checkbox input[type="checkbox"],
  .radio input[type="radio"] { width: 22px !important; height: 22px !important; }
  #product-review .checkbox label,
  .compare-page .checkbox label,
  label[for="onlydiff"] {
    display: flex !important; align-items: center !important;
    gap: 10px !important; min-height: 44px !important;
  }
  .compare-info a,
  .lowprice-info a { display: inline-flex !important; align-items: center !important; min-height: 44px !important; }
  #button-cart, #button-schet, .btn.btn-block { min-height: 48px !important; }
  #product-top .line-quantity { width: 144px !important; }
  #product-top .line-bcart { width: calc(100% - 144px) !important; }
  .group-quantity .btn.btn-minus,
  .group-quantity .btn.btn-plus,
  .quantity-block .btn.btn-minus,
  .quantity-block .btn.btn-plus {
    width: 44px !important; height: 44px !important; padding: 0 !important; line-height: 44px !important;
  }
  .quantity-block input { width: 44px !important; height: 44px !important; padding: 0 !important; font-size: 16px !important; }
  .line-onequantity .oqty-block .group-quantity { width: auto !important; }


  .container.category-page .sort-box.sort-mobile { padding: 6px 0 !important; }
  #filter_btn,
  .sort-mobile .sort-block .dropdown > a,
  #dropdownsort {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 44px !important;
  }
  .sort-mobile .sort-block .dropdown-menu li > a { min-height: 44px !important; display: flex !important; align-items: center !important; }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
  select, textarea, .form-control { font-size: 16px !important; }
  .form-control, input.form-control, select.form-control { height: auto !important; min-height: 44px !important; }
  textarea.form-control { height: auto !important; }
  .container.category-page .sort-block .form-control {
    height: 44px !important; min-height: 44px !important;
    background-position: right 10px center !important; padding-right: 32px !important;
  }

  .container.category-page .description-line,
  .description-line { padding-left: 0 !important; padding-right: 0 !important; }
  .container.category-page .description-line .well,
  .description-line .well { padding: 16px 12px !important; }
  .description-line .well h2 { font-size: 19px !important; line-height: 1.3 !important; margin-top: 0 !important; }
  .description-line .well h3 { font-size: 16px !important; line-height: 1.35 !important; }
  .description-line .well h4 { font-size: 15px !important; }
  .description-line .well ul,
  .description-line .well ol { padding-left: 18px !important; }
  .description-line .well img { max-width: 100% !important; height: auto !important; }
  .description-line .well table { display: block !important; overflow-x: auto !important; max-width: 100% !important; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 21px; }
  .hero__badge { font-size: 9px; padding: 5px 12px; }
  .hero__subtitle { font-size: 13px; }

  .products__grid {
    grid-template-columns: 1fr !important;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .counters { gap: 10px !important; }
  .counter__number { font-size: 20px !important; }
}


/* ============================================================
   «УЗНАТЬ О ПОСТУПЛЕНИИ» НЕ ВЛЕЗАЛА В КАРТОЧКУ (11.08.2026)
   Правило целей нажатия выше задаёт всем кнопкам карточки height 44px и
   padding 0 18px. Для короткой «В корзину» это верно, а длинная надпись
   «Узнать о поступлении» при 13px давала 202px в колонке 165px — и её
   правый край срезал .pricerate (overflow:hidden в style.css:837).
   Ужимаем только эту кнопку и разрешаем перенос на две строки; высота
   остаётся не меньше 44px, то есть цель нажатия не страдает.
   ============================================================ */
html.vp-mobile .product-layout .btn-addtocart.nostock {
  max-width: 100% !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  height: auto !important;
  min-height: 44px !important;
}
@media (max-width: 768px) {
  .product-layout .btn-addtocart.nostock {
    max-width: 100% !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    height: auto !important;
    min-height: 44px !important;
  }
}
