/* ============================================================
   vn-almaty-app.css — «Видеонаблюдение в Алматы» на смартфоне.
   Подключается после встроенных стилей страницы.
   ============================================================ */
@media (max-width: 768px) {
  /* категории сверху: ниже карточки — первый экран не занят одной картинкой */
  html body .catalog-grid, html body .catalog-stack { gap: 10px !important; }
  html body .catalog-card-large,
  html body .catalog-card-top,
  html body .catalog-card-bottom { min-height: 0 !important; height: 210px !important; }
  html body .catalog-card { border-radius: 24px !important; }
  html body .catalog-title { font-size: 17px !important; line-height: 1.25; }

  /* HikConnect: картинка сверху, текст под ней — ничего не обрезается и не сжимается */
  html body .ki-hik { flex-direction: column !important; min-height: 0 !important; border-radius: 24px !important; }
  html body .ki-hik-image-col { flex: none !important; height: 190px; min-height: 0 !important; }
  html body .ki-hik-svg {
    left: 50% !important; right: auto !important; top: 14px !important; bottom: 0 !important;
    transform: translateX(-50%) !important; width: auto !important; height: calc(100% - 14px) !important; max-height: none !important;
  }
  html body .ki-hik-text-col { padding: 18px 20px 22px !important; }
  html body .ki-hik-title { font-size: 20px !important; line-height: 1.2; }
  html body .ki-hik-desc { font-size: 14px !important; line-height: 1.45; }

  /* «Установка за 1 день»: подпись переносится, а не обрезается */
  html body .ki-inst-desc { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.35; }

  /* тексты по левому краю — без «дыр» между словами на узком экране */
  html body .kits-intro-shell p,
  html body .vn-seo-shell p,
  html body .vn-seo-shell li { text-align: left !important; hyphens: auto; }

  /* кнопка «Подключить камеру» — в одну строку */
  html body .vn-cta-btn {
    height: 56px !important; min-height: 0 !important; padding: 0 28px !important; white-space: nowrap;
    display: inline-flex !important; align-items: center; justify-content: center;
    font-size: 16px !important; border-radius: 999px !important;
  }
}

/* ---------- «Выбери свою камеру»: шапка без наложений, карточки — лента вбок ---------- */
@media (max-width: 768px) {
  html body .cam-compare-wrap { padding: 24px 0 24px !important; border-radius: 26px !important; overflow: hidden; }
  html body .cam-compare-header { padding: 0 20px !important; text-align: left !important; }
  html body .cam-compare-heading { font-size: 22px !important; line-height: 1.2; }
  html body .cam-compare-sub { margin-top: 6px !important; font-size: 14px !important; line-height: 1.4; }
  /* «Сравнить камеры» — своей строкой под подзаголовком, а не поверх него */
  html body .cam-compare-btn {
    position: static !important; transform: none !important; display: inline-flex !important;
    margin: 14px 0 0 !important; height: 44px; padding: 0 12px 0 14px !important; gap: 10px;
  }
  html body .cam-compare-btn .cam-compare-toggle { transform: scale(.9); }

  /* карточки: одна большая лента, листается пальцем, следующая карточка выглядывает справа */
  html body .cam-cards-grid {
    display: grid !important; grid-template-columns: none !important;
    grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px !important;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin: 18px 0 0 !important; padding: 0 20px 4px !important; scroll-padding-left: 20px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  html body .cam-cards-grid::-webkit-scrollbar { display: none; }
  html body .cam-cards-grid > .cam-card { scroll-snap-align: start; min-width: 0; }
  html body .cam-cards-grid > .cam-card { min-height: 440px !important; }
  html body .cam-card-inner { min-height: 440px !important; }
  /* обратная сторона: ряд «стрелки · точки · закрыть» помещается в узкую карточку */
  html body .cam-back-controls { gap: 8px !important; justify-content: space-between; }
  html body .cam-back-pager { gap: 8px !important; }
  html body .cam-back-arrow { width: 34px !important; height: 34px !important; }
  html body .cam-back-close-label { display: none !important; }
  html body .cam-card-close-btn { width: 34px !important; height: 34px !important; }
  html body .cam-back-chips { gap: 6px !important; }
  html body .cam-back-chip { padding: 6px 10px !important; font-size: 12px !important; }
  html body .cam-back-desc { display: -webkit-box !important; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden !important; }

}

/* ---------- «IP Видеорегистраторы»: карточки — лента вбок, как у камер ---------- */
@media (max-width: 768px) {
  html body .dvr-catalog-grid {
    display: grid !important; grid-template-columns: none !important;
    grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px !important;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin: 16px -20px 0 !important; padding: 0 20px 6px !important; scroll-padding-left: 20px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  html body .dvr-catalog-grid::-webkit-scrollbar { display: none; }
  html body .dvr-catalog-grid > .prod-card { scroll-snap-align: start; min-width: 0; }
  html body .dvr-catalog-grid .prod-card-top { height: 210px !important; }
}
