/* assets/css/style.css — Снаб-Красногорск
   Светлая тема: графит #0F172A + электрик-синий #2563EB.
   Плотность Ozon-like marketplace, белые карточки, мягкие тени.
   Шрифт: Inter (подключается из header.php через preconnect+link).
*/

/* =====================================================
   ТОКЕНЫ
===================================================== */
:root {
  /* Палитра */
  --bg:           #ffffff;
  --bg-soft:      #f8fafc;       /* секции, фасеты, hover-state */
  --surface:      #ffffff;       /* карточки */
  --surface-2:    #f1f5f9;       /* hover row, активные строки */
  --text:         #0f172a;       /* основной */
  --text-2:       #334155;       /* вторичный */
  --text-muted:   #64748b;       /* подписи */
  --text-subtle:  #94a3b8;       /* тихий */
  --line:         #e2e8f0;
  --line-strong:  #cbd5e1;
  --line-field:   #8291a6;       /* рамка поля ввода: 3:1 к белому (WCAG 1.4.11), с #cbd5e1 поле терялось на белом */

  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --accent-soft:   #eff6ff;
  --accent-line:   #bfdbfe;
  --accent-on-dark:#60a5fa;

  --success:      #15803d;       /* мелкий текст «В наличии»: 5:1 к белому; #16a34a давал 3,3:1 */
  --success-soft: #dcfce7;
  --danger:       #dc2626;
  --danger-soft:  #fee2e2;
  --warning:      #c2410c;       /* «Под заказ»: 5,2:1 к белому; #ea580c давал 3,6:1 */
  --warning-soft: #fff7ed;

  /* Тени — мягкие */
  --shadow-sm:    0 1px 2px rgba(15,23,42,.05);
  --shadow:       0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:    0 4px 6px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg:    0 10px 24px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.04);

  --radius-sm:    6px;
  --radius:       8px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --radius-pill:  999px;

  --ease:         cubic-bezier(.2,.7,.2,1);
  --t-fast:       .15s;
  --t:            .2s;
  --t-slow:       .3s;

  --font-sans:    system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container:    1320px;
  --header-h:     64px;

  /* Алиасы для совместимости с inline-стилями старых страниц */
  --gold:          var(--accent);
  --gold-light:    #60a5fa;
  --gold-dark:     var(--accent-hover);
  --navy:          var(--text);
  --navy2:         var(--bg-soft);
  --navy3:         var(--surface);
  --navy4:         var(--bg-soft);
  --steel:         var(--line-strong);
  --cream:         var(--text);
  --cream-dim:     var(--text-muted);
  --white:         #ffffff;
  --border:        var(--line);
  --border-dim:    var(--line);
  --tg:            #0e7ab8;       /* белый текст на кнопке: 4,7:1; фирменный #29A9EB давал 2,6:1 */
  --tg-dark:       #0b6a9f;
  --max:           #6d3cff;
  --max-dark:      #5a2fd9;
  --green:         var(--success);
  --red:           var(--danger);
  --on-dark:       var(--text);
  --on-dark-mute:  var(--text-2);
  --on-dark-dim:   var(--text-muted);
  --dark:          var(--bg-soft);
  --dark-2:        var(--surface);
  --dark-3:        var(--surface-2);
  --dark-line:     var(--line);
  --dark-line-2:   var(--line-strong);
  --surface-warm:  var(--surface-2);
}

/* =====================================================
   RESET + BASE
===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-h);
  overflow-x: hidden;
}
body.no-pad { padding-top: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; cursor: pointer; }
img, svg { max-width: 100%; height: auto; display: block; }
input, textarea, select { font-family: inherit; }

::selection { background: var(--accent-soft); color: var(--text); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 10px;
  border: 3px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* =====================================================
   LAYOUT HELPERS
===================================================== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-soft { background: var(--bg-soft); }
@media (max-width: 768px) {
  .container, .container-narrow, .contracts { padding: 0 16px; }
  .section { padding: 36px 0; }
}

/* =====================================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
===================================================== */
/* Контент виден по умолчанию; гейтим скрытие на html.js (ставится синхронно в <head>),
   чтобы без JS / при сбое / до DOMContentLoaded первый экран не был пустым. */
.js .fx-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  will-change: opacity, transform;
}
.js .fx-in.is-in { opacity: 1; transform: none; }
.js .fx-in.fx-delay-1 { transition-delay: .08s; }
.js .fx-in.fx-delay-2 { transition-delay: .16s; }
.js .fx-in.fx-delay-3 { transition-delay: .24s; }
.js .fx-in.fx-delay-4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .js .fx-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================
   ТИПОГРАФИКА — СЛУЖЕБНЫЕ ЗАГОЛОВКИ
===================================================== */
.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 12px;
}
.section-title .accent, .section-title .gold { color: var(--accent); }
.section-sub {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 720px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.gold-divider { height: 1px; background: var(--line); }

/* =====================================================
   КНОПКИ
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease), transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.btn:active { transform: translateY(1px); }
/* На узком экране длинная подпись CTA («Бесплатный расчёт под ваши насосы») с
   nowrap задавала кнопке минимальную ширину ~305 px и растягивала всю страницу
   вбок: на 360 px лендинг СНТ уезжал горизонтально на 20 px. Ниже 420 px строкой
   такие подписи всё равно не помещаются — разрешаем перенос. На широких экранах
   правило не действует, вид кнопок прежний. */
@media (max-width: 420px) {
  .btn { white-space: normal; line-height: 1.25; text-align: center; }
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
/* 320 px: в плитке товара 118 px, «В корзину» с иконкой не влезал в строку и ломался на две. */
@media (max-width: 360px) {
  .btn-sm { padding-left: 8px; padding-right: 8px; gap: 6px; }
}
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }

.btn-primary, .btn-gold {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover, .btn-gold:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37,99,235,.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-dark {
  background: var(--text);
  color: #fff;
}
.btn-dark:hover { background: #1e293b; color: #fff; }

/* =====================================================
   БЕЙДЖИ
===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  letter-spacing: .01em;
  white-space: nowrap;
  line-height: 1.4;
}
.badge-discount { background: var(--accent-soft); color: #1e40af; }
.badge-discount-strong { background: var(--accent); color: #fff; }
.badge-stock-yes { background: var(--success-soft); color: var(--success); }
.badge-stock-no { background: #fef3c7; color: #92400e; }
.badge-new { background: #ddd6fe; color: #5b21b6; }
.badge-hit { background: #fce7f3; color: #9d174d; }

/* =====================================================
   ШАПКА
===================================================== */
nav.site-nav, .site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
nav.site-nav.is-scrolled {
  background: rgba(255,255,255,.98);
  box-shadow: 0 1px 8px rgba(15,23,42,.06);
}

.nav-inner {
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.nav-logo:hover { color: var(--text); }
.nav-logo b { font-weight: 700; }
.nav-logo svg { height: 22px; width: auto; display: block; }
.nav-logo span { color: var(--text); font-weight: 700; }

.nav-search {
  flex: 1 1 auto;
  max-width: 560px;
  display: flex;
  align-items: stretch;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  height: 40px;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.nav-search:hover { border-color: var(--line-strong); }
/* Главная: поиск в шапке скрыт, пока крупный герой-поиск в зоне видимости (видимость держим, чтобы не дёргалась раскладка) */
body.home .nav-search {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s var(--ease), visibility .25s var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
body.home nav.site-nav.is-past-hero .nav-search {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-search:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.nav-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 14px;
  color: var(--text);
  font: 500 13px/1.2 var(--font-sans);
  min-width: 0;
}
.nav-search input::placeholder { color: var(--text-subtle); font-weight: 400; }
.nav-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
  cursor: pointer;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease);
}
.nav-search button:hover { background: var(--accent-hover); }

/* nav-suggest dropdown */
.nav-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 110;
  overflow-x: hidden;
}
.nav-suggest.open { display: block; animation: dropIn var(--t-slow) var(--ease); }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.nav-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease);
}
.nav-suggest-item:last-child { border-bottom: none; }
.nav-suggest-item:hover { background: var(--surface-2); }
.nav-suggest-item img,
.nav-suggest-noimg {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  object-fit: contain;
  border: 1px solid var(--line);
}
.nav-suggest-body { flex: 1; min-width: 0; }
.nav-suggest-name {
  color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  word-break: break-word;
}
.nav-suggest-meta {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 4px;
  font-size: 11px; color: var(--text-muted);
}
.nav-suggest-art { letter-spacing: .03em; }
.nav-suggest-lot {
  color: var(--text-2);
  font-size: 11px;
  margin-left: 6px;
}
.nav-suggest-price {
  color: var(--text); font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nav-suggest-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* nav-links + cart */
.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  margin-left: auto;
}
.nav-links > li > a, .nav-links > li > .nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  position: relative;
}
.nav-links > li > a:hover, .nav-links > li > .nav-link-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav-links > li > a.is-active { color: var(--accent); }

.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cart-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  min-width: 20px;
  text-align: center;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* МЕГА-МЕНЮ — каталог */
.nav-catalog {
  position: relative;
}
.nav-catalog > .nav-link-btn::after,
.nav-catalog > a::after {
  content: '';
  display: inline-block;
  width: 10px; height: 6px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--t-fast) var(--ease);
}
.nav-catalog.is-open > .nav-link-btn::after,
.nav-catalog.is-open > a::after { transform: rotate(180deg); }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  width: 920px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 120;
  overflow: hidden;
  grid-template-columns: 240px 1fr;
}
.nav-catalog.is-open .mega-menu {
  display: grid;
  animation: dropIn var(--t-slow) var(--ease);
}
.mega-aside {
  background: var(--bg-soft);
  padding: 10px 0;
  border-right: 1px solid var(--line);
  max-height: 480px;
  overflow-y: auto;
}
.mega-aside-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mega-aside-item:hover, .mega-aside-item.is-active {
  background: #fff;
  color: var(--accent);
}
.mega-aside-item::after {
  content: '›';
  color: var(--text-subtle);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}
.mega-panel {
  padding: 18px 24px 22px;
  display: none;
  max-height: 480px;
  overflow-y: auto;
}
.mega-panel.is-active { display: block; }
.mega-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.mega-panel-header .mega-panel-title {
  font-size: 14px; font-weight: 700; color: var(--text); margin: 0;
}
.mega-panel-header a {
  font-size: 12px; font-weight: 500; color: var(--accent);
}
.mega-panel ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 24px;
  margin: 0; padding: 0;
}
.mega-panel ul a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.mega-panel ul a:hover { color: var(--accent); }
.mega-panel ul a .count {
  color: var(--text-subtle); font-size: 11px; margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

/* Телефон */
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  margin-left: 4px;
}
.nav-phone:hover { color: var(--accent); }
.nav-phone::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(22,163,74,.5);
  animation: pulse 2.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-left: 4px;
}
.burger:hover { background: var(--surface-2); }

/* Кнопки мобильной шапки — поиск и корзина (2026-09-02).
   На десктопе скрыты: там своя строка поиска и .nav-cart в меню. */
.nav-mob-btn {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.nav-mob-btn:hover { background: var(--surface-2); }
.nav-mob-cart .nav-cart-count {
  position: absolute;
  top: 0; right: -2px;
  padding: 1px 5px;
  min-width: 17px;
  font-size: 10px;
}
/* Строка поиска, выезжающая под шапкой по кнопке-лупе */
.mob-search-bar {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  z-index: 98;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  box-shadow: 0 6px 18px rgba(12,20,34,.07);
}
.mob-search-bar[hidden] { display: none; }
.mob-search-bar form { display: flex; gap: 8px; margin: 0; }
.mob-search-bar input {
  flex: 1; min-width: 0;
  height: 42px;
  padding: 0 14px;
  font-size: 16px; /* 16px — иначе iOS зумит страницу при фокусе */
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
}
.mob-search-bar input:focus { outline: none; border-color: var(--accent); background: #fff; }
.mob-search-bar button {
  flex-shrink: 0;
  padding: 0 16px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-fast) var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: #fff;
  padding: 16px 16px 24px;
  z-index: 99;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open {
  display: flex;
  animation: dropIn var(--t-slow) var(--ease);
}
.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.mobile-search input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.mobile-search input:focus { border-color: var(--accent); background: #fff; }
.mobile-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu a:last-child { border-bottom: none; }

/* Разделы каталога в мобильном меню — компактные чипсы (мега-меню на hover
   недоступно с телефона, поэтому топ-категории даём прямо в бургере). */
.mobile-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}
.mobile-cats .mobile-cat {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mobile-cats .mobile-cat:hover { color: var(--accent); border-color: var(--accent-line); }

/* =====================================================
   ХЛЕБНЫЕ КРОШКИ
===================================================== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--text-subtle); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* =====================================================
   СООБЩЕНИЯ
===================================================== */
.message-error,
.message-success {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
}
.message-error   { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.message-success { background: var(--success-soft); border-color: #bbf7d0; color: var(--success); }

/* =====================================================
   ФОРМЫ
===================================================== */
.form-row, .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-row label, .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.form-row label .req, .form-group label .req { color: var(--danger); margin-left: 2px; }
.form-row .hint, .form-group .hint, .form-row small {
  font-size: 12px;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="url"],
input[type="date"],
textarea,
select {
  background: #fff;
  border: 1px solid var(--line-field);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font: 400 14px/1.4 var(--font-sans);
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
textarea { resize: vertical; min-height: 90px; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

/* radio-pills (тип клиента fiz/yur и подобное) */
.radio-pills {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  position: relative;
}
.radio-pills label {
  flex: 1;
  padding: 8px 18px;
  border-radius: calc(var(--radius) - 3px);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  text-align: center;
}
.radio-pills input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pills label:has(input:checked) {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* =====================================================
   ЧИПЫ
===================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
  font-family: inherit;
}
.chip:hover { background: #fff; border-color: var(--line-strong); color: var(--text); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip.is-active:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

/* =====================================================
   ПАГИНАЦИЯ
===================================================== */
.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.pagination a, .pagination span, .pagination strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current, .pagination strong {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* =====================================================
   ФАСЕТЫ (catalog sidebar)
===================================================== */
.facets {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}
.facet { margin-bottom: 18px; }
.facet:last-child { margin-bottom: 0; }
.facet h4 {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px;
}
.facet-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 220px; overflow-y: auto;
}
.facet-list label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  padding: 4px 0;
  user-select: none;
}
.facet-list input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.facet-list .count {
  color: var(--text-subtle); font-size: 11px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.facet-range {
  display: flex; gap: 8px; align-items: center;
}
.facet-range input { padding: 7px 10px; font-size: 13px; }

/* =====================================================
   КАРТОЧКА ТОВАРА
===================================================== */
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card-img {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  overflow: hidden;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform var(--t-slow) var(--ease);
  background: #fff;
}
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-no-img {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle);
  font-size: 12px;
}
.product-card-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.product-card-fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.product-card-fav:hover { background: #fff; border-color: var(--line-strong); }

.product-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card-art {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .02em;
}
.product-card-name {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 52px;
}
.product-card-name:hover { color: var(--accent); }

.product-card-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}
.product-card-price-our {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.01em;
}
.product-card-price-old {
  font-size: 13px;
  color: var(--text-muted);
}
.product-card-price-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
.product-card-price-note {
  font-size: 11px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}
/* «упаковка 60 шт»: та же пилюля, но нейтральная — это условие поставщика,
   а не наше предложение, и спорить за внимание со скидкой она не должна. */
.product-card-price-note.is-lot {
  color: var(--text-2);
  background: var(--bg-soft);
  border-color: var(--border);
  font-weight: 500;
}
.product-card-stock {
  font-size: 12px;
  color: var(--success);
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 2px;
}
.product-card-stock.no { color: var(--warning); }
/* «Обычно в наличии» — наличие из фида, который давно не обновлялся. Намеренно
   нейтральный серый, а не зелёный: зелёная точка читается как подтверждённый факт. */
.product-card-stock.maybe { color: var(--text-muted); }
.product-card-stock::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.product-card-supplier {
  font-size: 11px;
  color: var(--text-muted);
}
.product-card-specs {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-card-specs li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-2);
}
.product-card-specs .pcs-k {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-specs .pcs-v {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-cta {
  margin-top: 4px;
}

/* Плита-заглушка последнего ряда товарной сетки (main.js, fillGridGaps):
   закрывает пустые ячейки, чтобы витрина не выглядела недозаполненной.
   Пунктир = «это не товар»; растянута скриптом ровно на оставшиеся колонки. */
.product-grid-filler {
  display: flex; flex-direction: column; justify-content: center; gap: 7px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  padding: 22px;
  text-decoration: none; color: var(--text);
  transition: border-color var(--t-fast) var(--ease);
}
.product-grid-filler:hover { border-color: var(--accent-line); }
.product-grid-filler b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.product-grid-filler span { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.product-grid-filler .pgf-link { color: var(--accent); font-weight: 600; margin-top: 3px; }

/* =====================================================
   СРАВНЕНИЕ ТОВАРОВ
===================================================== */
.compare-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 12px; color: var(--text-muted); padding: 5px 2px;
  transition: color var(--t-fast) var(--ease);
}
.compare-toggle svg { width: 14px; height: 14px; flex-shrink: 0; }
.compare-toggle:hover { color: var(--accent); }
.compare-toggle.is-active { color: var(--accent); font-weight: 600; }
/* Область нажатия мелких кнопок — не меньше 44 px (с телефона 53 % посетителей); вид не меняется. */
.cc-ok, .compare-toggle, .cart-update-btn, .remove-link { position: relative; }
.home-slider-pause::after, .cc-ok::after { content: ''; position: absolute; inset: -8px; }
.cart-update-btn::after, .remove-link::after { content: ''; position: absolute; inset: -6px; }
/* «Сравнить» растёт только вниз и вбок: вплотную сверху «Купить в 1 клик», его нажатия не перехватываем. */
.compare-toggle::after { content: ''; position: absolute; top: 0; right: -8px; bottom: -14px; left: -8px; }
.product-card-compare { margin-top: 2px; }

.compare-bar {
  position: fixed; left: 16px; bottom: 16px; z-index: 880;
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: #fff;
  border-radius: var(--radius-pill);
  padding: 8px 10px 8px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.compare-bar[hidden] { display: none; }
.compare-bar-text { font-size: 13px; white-space: nowrap; }
.compare-bar-text b { font-weight: 700; }
.compare-bar .btn { white-space: nowrap; }
.compare-bar-clear {
  background: rgba(255, 255, 255, .15); border: 0; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  font-size: 16px; line-height: 1; flex-shrink: 0;
}
.compare-bar-clear:hover { background: rgba(255, 255, 255, .3); }
@media (max-width: 768px) {
  .compare-bar { left: 12px; right: 12px; bottom: 76px; justify-content: space-between; }
}

/* =====================================================
   СЕТКИ
===================================================== */
.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 12px;
}
.grid-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.grid-categories-lg {
  display: grid;
  /* 4 колонки, а не auto-fill: 16 плиток (homeCategorySlugs) на 1440 px давали 5+5+5+1.
     Число плиток держать кратным 4 (на телефоне — 2 колонки, см. ниже). */
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* =====================================================
   КАРТОЧКА КАТЕГОРИИ
===================================================== */
.category-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
  min-height: 100px;
  position: relative;
}
.category-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.category-card-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
  color: var(--accent);
}
.category-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.category-card-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}
.category-card-arrow {
  position: absolute;
  top: 16px; right: 16px;
  color: var(--text-subtle);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.category-card:hover .category-card-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* =====================================================
   HERO (главная)
===================================================== */
/* Секция на главной называется .home-hero (padding — там же, в index.php).
   Селекторы тут были написаны на .hero, которого нет ни на одной странице, —
   первый экран месяцами рендерился без кегля заголовка, акцента и свечения. */
.home-hero {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  top: -180px; right: -180px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
  opacity: .8;
}
.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 20px;
  letter-spacing: .01em;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.home-hero h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  /* 980px, а не 820: на 820 нынешний заголовок ложится в ТРИ строки даже при
     38px, на 980 — в две при полных 44px (замерено). */
  max-width: 980px;
  margin: 0 0 16px;
}
.home-hero h1 .accent { color: var(--accent); }
.hero-lead {
  font-size: 16px;
  color: var(--text-2);
  max-width: 620px;
  margin: 0 0 28px;
  line-height: 1.55;
}
.hero-search {
  width: 100%;
  max-width: 660px;
  display: flex;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: var(--radius-md);
  height: 56px;
  margin-bottom: 18px;
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 20px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}
.hero-search input::placeholder { color: var(--text-subtle); }
/* Фирменный синий, а не почти чёрный: до этого в первом экране не было
   ни одного цветного элемента, кроме бейджа. */
.hero-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0 26px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 calc(var(--radius-md) - 2px) calc(var(--radius-md) - 2px) 0;
  transition: background var(--t-fast) var(--ease);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-search button:hover { background: var(--accent-hover); }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.hero-tag:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 660px;
}
.hero-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-stats .stat strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .hero-search { height: 50px; }
  .hero-search input { padding: 0 16px; font-size: 14px; }
  .hero-search button { padding: 0 18px; font-size: 13px; }
  /* Было flex-direction:column — четыре строки серого текста съедали ~150px
     первого экрана телефона. Держим 2×2. */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    justify-items: center;
  }
}

/* =====================================================
   USP / ПРЕИМУЩЕСТВА (главная)
===================================================== */
.usps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.usp {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.usp:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.usp-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 6px;
}
.usp-title {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.usp-text {
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}

/* =====================================================
   ФУТЕР
===================================================== */
footer.site-footer {
  background: var(--bg-soft);
  color: var(--text-2);
  padding: 56px 0 0;
  margin-top: 80px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 36px;
}
.footer-brand .nav-logo { font-size: 18px; }
.footer-tagline {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 320px;
}
.footer-contacts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.footer-contacts a { color: var(--text-2); }
.footer-contacts a:hover { color: var(--accent); }
.footer-contacts strong { color: var(--text); font-weight: 600; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: .01em;
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.footer-col a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--accent); }
.footer-col p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.footer-col p strong { color: var(--text); font-weight: 600; }

.footer-bottom {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.footer-bottom-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-bottom-left, .footer-bottom-right {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* =====================================================
   FAB Telegram
===================================================== */
.fab-tg {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 99;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--tg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(41,169,235,.32);
  text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t-fast) var(--ease);
}
.fab-tg:hover {
  transform: scale(1.06) translateY(-2px);
  background: var(--tg-dark);
  box-shadow: 0 10px 28px rgba(41,169,235,.4);
}
.fab-tg svg { width: 26px; height: 26px; fill: #fff; }

.fab-max {
  position: fixed;
  bottom: 86px; right: 24px;
  z-index: 99;
  width: 52px; height: 52px;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(0,0,0,.20);
  text-decoration: none;
  display: block;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.fab-max:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.fab-max img { width: 100%; height: 100%; display: block; border-radius: 13px; }

.fab-callback {
  position: fixed;
  bottom: 148px; right: 24px;
  z-index: 99;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t-fast) var(--ease);
}
.fab-callback:hover { transform: scale(1.06) translateY(-2px); background: var(--accent-hover); box-shadow: 0 10px 28px rgba(0,0,0,.30); }
.fab-callback svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Пока виден cookie-баннер — поднимаем FAB-стек над ним (margin не конфликтует с hover-transform, работает поверх любого bottom). */
body.cc-open .fab-tg,
body.cc-open .fab-max,
body.cc-open .fab-callback { margin-bottom: calc(var(--cc-h, 0px) + 12px); transition: margin-bottom var(--t) var(--ease); }

/* =====================================================
   МЕССЕНДЖЕР-БАННЕР (если показывается на странице)
===================================================== */
.messengers-banner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin: 24px 0;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.messengers-banner h3 {
  color: var(--text); font-size: 15px; margin-bottom: 4px; font-weight: 700;
}
.messengers-banner p { font-size: 13px; color: var(--text-muted); margin: 0; }
.messengers-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-tg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--tg);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  box-shadow: 0 2px 8px rgba(41,169,235,.18);
}
.btn-tg:hover { background: var(--tg-dark); color: #fff; transform: translateY(-1px); }
.btn-tg svg { width: 16px; height: 16px; fill: #fff; flex-shrink: 0; }
.btn-tg-group { background: var(--success); box-shadow: 0 2px 8px rgba(22,163,74,.18); }
.btn-tg-group:hover { background: #166534; }

.btn-max {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.btn-max:hover {
  border-color: var(--max);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(109,60,255,.16);
}
.btn-max img { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; }

/* =====================================================
   СЛУЖЕБНЫЕ КЛАССЫ ИЗ СТАРЫХ ИНЛАЙН-СТИЛЕЙ
   (legacy compat: index.php / about.php / cart.php / order.php)
===================================================== */

/* Order form (старые классы) */
.order-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.position-row {
  display: grid;
  grid-template-columns: 1fr 90px 40px;
  gap: 8px;
  margin-bottom: 8px;
}
.add-row-btn {
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  font-family: inherit;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.add-row-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  border-style: solid;
}
.remove-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.remove-btn:hover { color: var(--danger); border-color: var(--danger); }
.send-btn-one {
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.send-btn-one:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(37,99,235,.25);
}

/* Banner home (старый — переход в светлую тему) */
.banner-home {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.banner-home h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; font-weight: 700; }
.banner-home p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Ticker (если используется) */
.ticker {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-inner {
  display: inline-block;
  animation: ticker 38s linear infinite;
}
.ticker-inner span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0 22px;
}
.ticker-inner .dot { color: var(--accent); padding: 0; font-size: 10px; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =====================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
===================================================== */
@media (max-width: 1024px) {
  .nav-inner { gap: 12px; padding: 0 16px; }
  .nav-search { max-width: none; }
  .nav-links { gap: 0; }
  .nav-links > li > a, .nav-links > li > .nav-link-btn {
    padding: 8px 10px; font-size: 13px;
  }
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .mega-menu { width: 720px; }
}
@media (max-width: 768px) {
  body { padding-top: var(--header-h); }
  .nav-inner { gap: 8px; }
  .burger { display: flex; }
  .nav-links, .nav-phone, .nav-search, .nav-catalog { display: none; }
  .nav-mob-btn { display: inline-flex; }
  /* Логотип забирает свободное место, иначе поиск, корзина и бургер сбиваются
     в середину экрана: на десктопе вправо их толкает .nav-search (flex:1 1 auto),
     а на телефоне она display:none — и справа оставалось 95 px пустоты, корзина
     оказывалась ровно по центру 390-пиксельного экрана. */
  .nav-logo { margin-right: auto; }
  .mob-search-bar:not([hidden]) { display: block; }
  /* Крошки — одной строкой с горизонтальной прокруткой: на 390 px шесть уровней
     занимали 122 px и четыре строки первого экрана, из-за чего цена уезжала за
     его границу. */
  .breadcrumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 12px;
  }
  .breadcrumbs::-webkit-scrollbar { display: none; }
  .breadcrumbs > * { flex-shrink: 0; }
  /* Из трёх плавающих кнопок на телефоне остаётся одна: стек шириной 48 px и
     высотой 180 px лежал поверх текста карточки и обрезал ссылки «условия»/
     «подробнее». Обратный звонок и МАКС остались в футере, на карточке — в
     блоке «Спросить про этот товар». */
  .fab-max, .fab-callback { display: none; }
  .nav-logo { font-size: 15px; }
  .nav-logo svg { height: 20px; }
  /* Колонки ссылок — в две колонки, а не в одну: столбиком футер занимал 2 242 px
     (2,7 экрана) и читался как отдельная страница в конце каждой. */
  footer.site-footer { padding-top: 36px; margin-top: 48px; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; padding: 0 16px; margin-bottom: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-direction: column; padding: 0 16px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .grid-categories, .grid-categories-lg { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-img img { padding: 8px; }
  .product-card-body { padding: 10px; }
  .product-card-name { font-size: 13px; min-height: 50px; }
  .product-card-price-our { font-size: 16px; }
  .fab-tg { bottom: 16px; right: 16px; width: 48px; height: 48px; }
  .fab-max { bottom: 74px; right: 16px; width: 48px; height: 48px; }
  .fab-callback { bottom: 132px; right: 16px; width: 48px; height: 48px; }
  .messengers-banner { flex-direction: column; align-items: stretch; }
  .messengers-btns { flex-direction: column; width: 100%; }
  .btn-tg, .btn-max { width: 100%; justify-content: center; }
  .position-row { grid-template-columns: 1fr 70px 40px; }
}
@media (max-width: 460px) {
  .grid-products { grid-template-columns: 1fr 1fr; }
  .nav-logo { font-size: 14px; }
}

/* =====================================================
   COOKIE BAR
===================================================== */
.cc-bar[hidden] { display: none; }
/* Компактная карточка в правом нижнем углу, а не полоса на 880px по центру:
   прежняя накрывала CTA слайда направлений — единственное, что вообще было
   видно из товарной части до прокрутки. Именно СПРАВА: у слайда текст и кнопка
   слева, справа фото — карточку лучше положить на него. FAB-стек уезжает выше
   сам (body.cc-open + --cc-h). */
.cc-bar {
  position: fixed;
  right: 16px; left: auto; bottom: 16px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(12, 20, 34, .96);
  color: #EDE8DF;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  font-size: 12px;
  line-height: 1.45;
  max-width: 420px;
  backdrop-filter: blur(6px);
}
.cc-bar a { color: var(--accent-on-dark); text-decoration: underline; }
.cc-ok {
  flex-shrink: 0;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--t-fast) var(--ease);
}
.cc-ok:hover { background: var(--accent-hover); }
@media (max-width: 540px) {
  /* На телефоне карточку в угол не увести — держим полосу, но кнопку в строку
     (столбиком она занимала ~150px первого экрана). */
  .cc-bar { left: 8px; right: 8px; bottom: 8px; max-width: none; gap: 10px; padding: 10px 12px; }
  .cc-ok { padding: 8px 14px; }
}

/* =====================================================
   ВЫКЛЮЧКА ПО ШИРИНЕ — длинные текстовые блоки (директива 2026-05-18).
   Нав/таблицы/узкие колонки не трогаем (там justify даёт «реки»).
   .short-desc и .catalog-seo-intro выключены в своих page-CSS.
===================================================== */
.article-body p, .article-body li,
.info-wrap p, .info-wrap li,
.legal-wrap p, .legal-wrap li,
.about-wrap p, .about-wrap li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Плавный скролл по якорям (#order и т. п.), без вреда для prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Honeypot — поле-ловушка, скрыто от людей и ассистивных технологий */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Тост подтверждения (AJAX «в корзину») */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast a { color: #fff; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.toast-undo {
  background: transparent; border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 5px 12px; border-radius: var(--radius-sm); cursor: pointer;
  white-space: nowrap;
}
.toast-undo:hover { background: rgba(255,255,255,.16); border-color: #fff; }
@media (max-width: 600px) {
  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    transform: translateY(16px);
    justify-content: space-between;
  }
  .toast.show { transform: translateY(0); }
}

/* Заказ «в 1 клик» — кнопка-триггер (карточка каталога / страница товара) */
.qo-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 6px;
  padding: 9px 14px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.qo-trigger:hover { background: #e0ecfe; border-color: var(--accent); color: var(--accent-hover); }
.qo-trigger svg { flex-shrink: 0; }

/* Заказ «в 1 клик» — модалка */
.qo-modal[hidden] { display: none; }
.qo-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.qo-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px 22px;
}
@media (prefers-reduced-motion: no-preference) {
  .qo-dialog { animation: qo-pop .18s var(--ease); }
}
@keyframes qo-pop {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qo-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 32px; height: 32px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.qo-close:hover { background: var(--surface-2); color: var(--text); }
.qo-dialog h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  padding-right: 28px;
}
.qo-product { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.qo-product strong { color: var(--text); }
.qo-consent {
  display: flex;
  gap: 8px;
  margin: 12px 0 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.qo-consent input { margin-top: 2px; flex-shrink: 0; }
.qo-consent a { color: var(--accent); }
/* Акцепт оферты в формах заказа — фразой под галочкой согласия на ПД (consent_offer_note()):
   с 01.09.2025 согласие на обработку ПД — отдельным документом, одной отметкой с офертой нельзя. */
.consent-offer {
  margin: 4px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.consent-offer a { color: var(--accent); }
.qo-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

/* Поиск-подсказка вне шапки (hero / мобильное меню) — переиспользует .nav-suggest,
   которому нужен позиционированный предок-форма */
.hero-search, .mobile-search { position: relative; }
.mobile-search .nav-suggest { z-index: 1000; }
/* .hero-search — это .fx-in (will-change: transform) → собственный stacking-контекст
   с z-index:auto. Соседние .fx-in (hero-tags/hero-stats) и плитки категорий ниже —
   тоже stacking-контексты, позже в DOM → красятся ПОВЕРХ выпадашки подсказок (.nav-suggest
   z-index:110 заперт внутри контекста hero-search). При фокусе поднимаем весь контекст
   формы — ровно когда выпадашка открыта. */
.hero-search:focus-within { z-index: 200; }

/* Выполненные контракты — соц. доказательство (госзакупки), без звёзд и AggregateRating */
.contracts { max-width: var(--container); margin: 28px auto; padding: 0 24px; }
/* На reviews.php секция уже внутри .reviews-wrap с боковым padding — свой убираем,
   иначе двойной отступ (блок уже остального контента страницы). */
.reviews-wrap .contracts { padding-left: 0; padding-right: 0; }
.contracts-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.contracts-title {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.01em;
  color: var(--text); margin: 0;
}
.contracts-lead {
  color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 6px 0 0;
  flex-basis: 100%;
}
.contracts-all {
  color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none;
}
.contracts-all:hover { text-decoration: underline; }
.contracts-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.contract-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.contract-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.contract-status {
  align-self: flex-start;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-muted);
}
.contract-status.concluded  { background: var(--accent-soft); color: var(--accent-hover); }
.contract-status.executed   { background: var(--success-soft); color: var(--success); }
.contract-status.active     { background: var(--warning-soft); color: var(--warning); }
.contract-status.terminated { background: var(--bg-soft); color: var(--text-muted); }
.contract-customer { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.contract-subject { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.contract-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.contract-meta .dot { color: var(--text-subtle); }
.contract-eis {
  margin-top: auto;
  font-size: 13px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  padding-top: 8px;
}
.contract-eis:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .contracts { margin: 22px auto; }
  .contracts-grid { grid-template-columns: 1fr; }
}

/* Print-стили — снабженец печатает карточку товара для согласования */
@media print {
  nav.site-nav, .mobile-menu, .site-footer, .fab-tg, .cc-bar,
  .toast, .pbar, .cart-pbar, .product-contact, .cart-save-row,
  .product-order-form, .similar-section, .back, .breadcrumbs,
  .burger, .hero-tags, .hero-stats, .hero-badge,
  form.hero-search, form.nav-search, form.mobile-search,
  .product-card-cta, .cat-tile-section, .toolbar, .facet-row,
  .pagination, .home-cta, .messengers-btns {
    display: none !important;
  }
  body { padding-top: 0 !important; background: #fff !important; color: #000 !important; }
  main { padding: 0 !important; }
  .product-wrap, .info-wrap, .cart-wrap, .about-wrap, .contacts-wrap, .legal-wrap {
    padding: 0 !important; max-width: 100% !important; margin: 0 !important;
  }
  a { color: #000 !important; text-decoration: none !important; }
  a[href^="http"]::after,
  a[href^="https"]::after { content: " (" attr(href) ")"; font-size: 80%; color: #555; }
  /* Внутренние ссылки и tel/mailto — без длинного хвоста URL после текста */
  a[href^="/"]::after, a[href^="#"]::after, a[href^="tel:"]::after, a[href^="mailto:"]::after { content: ""; }
  .product-image { padding: 0 !important; border: 0 !important; }
  .price-block { border: 1px solid #000 !important; padding: 12px !important; box-shadow: none !important; }
  img { max-width: 100% !important; height: auto !important; page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; }
}

/* ── Варианты доставки (карточки) — модалка #delivery-modal и блок dostavka.php ── */
.delivery-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.delivery-opts li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.delivery-opts .do-ico { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.delivery-opts li div { display: flex; flex-direction: column; gap: 2px; }
.delivery-opts li b { font-size: 14.5px; color: var(--text); font-weight: 700; }
.delivery-opts li span { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.delivery-opts-note { margin: 12px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

/* ── Полоса прогресса до бесплатной доставки (корзина) ── */
.cart-delivery {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.cart-delivery.is-free { border-color: var(--success); background: var(--success-soft); }
/* Не flex: при flex каждый текстовый узел становится отдельной колонкой, и на 360 px
   удлинившийся <b> ломал блок на две узкие колонки. Отступ после иконки — &nbsp; в разметке. */
.cart-delivery-top { font-size: 14px; line-height: 1.5; color: var(--text); }
.cart-delivery-top b { font-weight: 700; }
.cart-delivery.is-free .cart-delivery-top { color: var(--success); font-weight: 600; }
.cart-delivery-bar { height: 8px; border-radius: 999px; background: #dbeafe; margin: 10px 0 8px; overflow: hidden; }
.cart-delivery-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s var(--ease); }
.cart-delivery-hint { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.cart-delivery-hint a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cart-delivery-hint a:hover { text-decoration: underline; }


/* =====================================================
   ТОВАРНЫЕ ЛЕНТЫ (главная, корзина)
   ===================================================== */
/* Товарные ленты (includes/home_rails.php) и «Вы недавно смотрели».
   Горизонтальная прокрутка, а не сетка: 12 товаров держатся в одной строке
   (+330 px к главной вместо +1 700), на телефоне листается пальцем. */
.rail { position: relative; margin: 0 -4px; }
.rail-track {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 10px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.rail-track::-webkit-scrollbar { height: 6px; }
.rail-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.rail-card {
  flex: 0 0 168px; scroll-snap-align: start; display: flex; flex-direction: column;
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.rail-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,.10); transform: translateY(-2px); }
.rail-card-img { display: flex; align-items: center; justify-content: center; height: 140px; padding: 8px; background: #fff; }
.rail-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rail-card-body { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rail-card-name {
  font-size: 12.5px; line-height: 1.35; color: var(--text); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rail-card-name:hover { color: var(--accent); }
.rail-card-stock { font-size: 11px; color: var(--success, #15803d); }
.rail-card-stock.maybe, .rail-card-stock.low { color: var(--text-muted); }
.rail-card-stock.no { color: var(--text-muted); }
.rail-card-price { margin-top: auto; font-size: 15px; font-weight: 700; color: var(--text); }
.rail-card-lot { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.rail-card-cta { margin-top: 8px; }
.rail-card-cta .btn { font-size: 12px; padding: 7px 8px; }
