/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #B71C1C;
  --red-dark: #8E1414;
  --red-soft: #FBE9E9;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e7e7e7;
  --bg: #f6f7f8;
  --card-bg: #ffffff;
  --verified: #1677ff;
  --price: #B71C1C;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- topbar ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.logo-img {
  height: 56px;
  width: auto;
  display: block;
}
.logo-domain {
  color: var(--text);
  font-weight: 700;
  font-size: 22px;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  margin-left: 2px;
  position: relative;
  top: -2px;
}

.tagline {
  /* basis 520, не растёт сверх него, но сжимается при нехватке места.
     margin-left:auto у .messengers сам прижимает их вправо, поэтому tagline
     не конкурирует за свободное пространство и не сжимается преждевременно. */
  flex: 0 1 520px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0 16px;
  /* сохраняем переносы строк из текста (i18n кладёт \n в textContent) */
  white-space: pre-line;
}
/* JS добавляет этот класс, если текст не помещается в 3 строки
   (любая логическая строка начала переноситься) — тогда прячем целиком */
.tagline.tagline-clipped { display: none; }

/* переключатель языков */
.lang-switch {
  display: inline-flex;
  background: #f1f2f4;
  border-radius: 999px;
  padding: 3px;
  gap: 0;
  flex-shrink: 0;
}
.lang-btn {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border-radius: 999px;
  letter-spacing: 0.5px;
  transition: background .15s, color .15s;
}
.lang-btn.active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.lang-btn:hover:not(.active) { color: var(--text); }

.messengers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;        /* блок мессенджеров не сжимается — иначе hint скачет по строкам */
}
.msg-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  line-height: 1.25;
  width: 150px;          /* фиксированная ширина → стабильно 2 строки, без «прыжков» при ресайзе */
  flex-shrink: 0;
  text-align: right;
  margin-right: 2px;
}
.msg-arrow {
  color: var(--red);
  margin-right: 4px;
  flex-shrink: 0;
}
.msg {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform .15s, box-shadow .15s;
  flex-shrink: 0;
  overflow: hidden;
}
.msg img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.msg:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.msg-tg  { background: #229ED9; }
.msg-wa  { background: #25D366; }
.msg-max { background: transparent; }

/* search */
.search {
  flex: 1;
  max-width: 720px;
  display: flex;
  align-items: center;
  border: 2px solid var(--red);
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  background: #fff;
  min-width: 280px;
}
.search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  height: 36px;
}
.search-cam {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.search-cam:hover { color: var(--red); }
.search-btn {
  background: var(--red);
  color: #fff;
  height: 36px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}
.search-btn:hover { background: var(--red-dark); }

/* ship to */
.ship-to {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}
.ship-to .ship-label { font-size: 11px; }
.ship-to .ship-flag { font-size: 18px; margin-top: 2px; }
.ship-to .ship-code { font-weight: 600; color: var(--text); }

.top-icons { display: flex; gap: 14px; color: var(--text); }
.top-icons button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.top-icons button:hover { background: var(--red-soft); color: var(--red); }

.cta {
  background: var(--red);
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cta:hover { background: var(--red-dark); }
.cta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  margin-left: 2px;
}
.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 11px 22px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-secondary:hover { border-color: var(--red); color: var(--red); }

/* navbar */
.navbar {
  border-top: 1px solid var(--border);
  background: #fff;
}
.navbar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 44px;
}
.navbar-inner a {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.navbar-inner a:hover { color: var(--red); border-bottom-color: var(--red); }
.nav-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.navbar-inner .nav-phone {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 700;
  font-size: 15px;
  background: none;
  border: none;
  padding: 4px 0;
}
.navbar-inner .nav-phone:hover {
  color: var(--red-dark);
}

/* ===== «Всё для договора» — dropdown в navbar ===== */
.nav-docs {
  margin-left: auto;            /* сдвигаем вправо, до .nav-phone */
  position: relative;
}
.nav-docs > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
}
.nav-docs > summary::-webkit-details-marker { display: none; } /* убираем нативный треугольник */
.nav-docs > summary:hover { color: var(--red); border-bottom-color: var(--red); }
.nav-docs > summary svg { flex-shrink: 0; }
.nav-docs-arrow { transition: transform .18s ease; }
.nav-docs[open] .nav-docs-arrow { transform: rotate(180deg); }

.nav-docs-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06);
  padding: 6px 0;
  list-style: none;
  z-index: 70;
}
.nav-docs-menu li { display: block; }
.nav-docs-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.nav-docs-menu a:hover { background: var(--red-soft); color: var(--red); }
.nav-docs-menu .dl-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: .6;
  transition: color .15s, opacity .15s;
}
.nav-docs-menu a:hover .dl-icon { color: var(--red); opacity: 1; }

.navbar-inner .nav-docs + .nav-phone { margin-left: 18px; }

/* ===== Социальные ссылки в navbar (2ГИС, Dreamjob) ===== */
.nav-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s;
}
.nav-social:hover { color: var(--red); }
.nav-social svg { flex-shrink: 0; }
.nav-social-2gis svg { color: #1BA046; }       /* фирменный зелёный 2ГИС */
.nav-social-2gis:hover svg { color: var(--red); }

/* Звёзды рейтинга (используются в navbar и в drawer) */
.social-stars {
  display: inline-flex;
  gap: 1px;
  color: #F5A623;
}

/* Социальные бейджи в drawer (общий стиль) */
.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .15s;
}
.social-badge:hover { color: var(--red); }
.social-badge-label { line-height: 1; }
.social-2gis svg { color: #1BA046; }
.social-2gis:hover svg { color: var(--red); }

/* ===== Mobile drawer: «Всё для договора» как раскрывающийся блок ===== */
.mobile-drawer-docs {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.mobile-drawer-docs > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.mobile-drawer-docs > summary::-webkit-details-marker { display: none; }
.mobile-drawer-docs > summary svg:first-child { color: var(--red); flex-shrink: 0; }
.mobile-drawer-docs > summary .nav-docs-arrow { margin-left: auto; flex-shrink: 0; }
.mobile-drawer-docs[open] .nav-docs-arrow { transform: rotate(180deg); }
.mobile-drawer-docs ul {
  list-style: none;
  padding: 0 0 10px 28px;
  margin: 0;
}
.mobile-drawer-docs li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  font-size: 14px;
  color: var(--text-muted);
}
.mobile-drawer-docs li a:hover,
.mobile-drawer-docs li a:focus { color: var(--red); }
.mobile-drawer-docs .dl-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: .55;
  transition: color .15s, opacity .15s;
}
.mobile-drawer-docs li a:hover .dl-icon,
.mobile-drawer-docs li a:focus .dl-icon { color: var(--red); opacity: 1; }

/* Социальные ссылки в drawer — крупнее */
.mobile-drawer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 4px 0;
  font-size: 13px;
}
.mobile-drawer-social .social-badge { color: var(--text); }
.mobile-drawer-social .social-stars svg { width: 16px; height: 16px; }

/* ---------- content ---------- */
.content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 28px 60px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}
.section-title .count {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 6px;
}

/* ===== Плавающая кнопка «ФИЛЬТР» (FAB) =====
   Появляется, когда верхняя секция категорий ушла за экран.
   Скрывается при открытой любой модалке.
*/
.filter-fab {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,.04);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.08);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .8px;
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.filter-fab.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.filter-fab:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.1);
  transform: translateX(-50%) translateY(-2px);
}
.filter-fab:active {
  transform: translateX(-50%) translateY(0);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
/* убираем дефолтный синий outline браузера (Chrome/iOS),
   при tab-навигации — аккуратное красное focus-кольцо для доступности */
.filter-fab:focus { outline: none; }
.filter-fab:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.filter-fab svg { color: var(--red); flex-shrink: 0; }
.filter-fab-text { line-height: 1; }
.filter-fab-badge {
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-left: 2px;
}
.filter-fab-badge[hidden] { display: none; }

/* ===== Фильтр — боковая панель справа (как WB / Ozon / Lamoda) ===== */
/* overlay прижимает панель к правому краю, без внешних отступов */
#filterModal { justify-content: flex-end; padding: 0; }

#filterModal .filter-window {
  width: 440px;
  max-width: 92vw;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  box-shadow: -8px 0 32px rgba(0,0,0,.22);
  transform: translateX(100%);     /* выезд справа вместо центрального translateY */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#filterModal[aria-hidden="true"] .filter-window { transform: translateX(0); }
#filterModal[aria-hidden="false"] .filter-window { transform: translateX(0); }

/* Шапка панели — закреплена сверху */
.filter-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.filter-title { font-size: 19px; font-weight: 700; color: var(--text); }
/* крестик — в потоке шапки, не absolute */
.filter-head .modal-close {
  position: static;
  width: 36px; height: 36px;
  font-size: 26px; line-height: 1;
  color: var(--text-muted);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.filter-head .modal-close:hover { background: var(--red-soft); color: var(--red); }

/* Тело — скроллится, если секций много */
.filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px 8px;
}

.filter-section-title {
  margin: 4px 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
}
.filter-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.filter-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
}
.filter-chip:hover {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f5c2c2;
}
.filter-chip.active {
  background: var(--red);
  color: #fff;
}
/* убираем дефолтный focus-outline, оставляем accessible focus-visible */
.filter-chip:focus { outline: none; }
.filter-chip:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
/* акцент-точки на чипсах склада (Россия — красная, Китай — оранжевая) */
.filter-chip-wh-ru::before,
.filter-chip-wh-cn::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.filter-chip-wh-ru::before { background: #d12626; }
.filter-chip-wh-cn::before { background: #f0a000; }
.filter-chip-wh-ru.active::before,
.filter-chip-wh-cn.active::before { background: #fff; }

.filter-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.filter-actions .btn-secondary { flex-shrink: 0; }
.filter-actions .cta { flex: 1; justify-content: center; }

/* Чтобы кнопка «Наверх» не наезжала на FAB на узких экранах */
@media (max-width: 520px) {
  .filter-fab { padding: 12px 22px; font-size: 13px; }
  .to-top { right: 16px; }
}

/* Визуально скрытый элемент — остаётся в DOM для поисковиков и скринридеров,
   но не виден глазами (используется для SEO-заголовка H1 на главной). */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ===== SEO: текстовый блок внизу страницы ===== */
.seo-text {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text);
  max-width: 1000px;
}
.seo-text h2 { font-size: 20px; font-weight: 700; margin: 0 0 12px; line-height: 1.3; }
.seo-text h3 { font-size: 16px; font-weight: 600; margin: 22px 0 10px; }
.seo-text p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 12px; }
.seo-text strong { color: var(--text); font-weight: 600; }
.seo-cats { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.seo-cats li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}
.seo-cats li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
}
@media (max-width: 480px) {
  .seo-text { margin-top: 36px; }
  .seo-text h2 { font-size: 18px; }
}

/* categories */
.categories { margin-bottom: 14px; }
.cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cat-chip {
  padding: 9px 18px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  border: 1px solid transparent;
}
.cat-chip:hover {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f5c2c2;
}
.cat-chip.active {
  background: var(--red);
  color: #fff;
}

/* warehouse filter — floating, single pill */
.warehouse-filter {
  position: fixed;
  top: 178px;
  right: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}
.wf-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.wf-seg {
  display: inline-flex;
  gap: 2px;
}
@media (max-width: 720px) {
  .warehouse-filter {
    top: auto;
    bottom: 84px;
    right: 24px;
  }
  .wf-btn { padding: 6px 12px; font-size: 12px; }
}
.wf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.wf-btn:hover { color: var(--text); }
.wf-btn.active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.wf-count {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
}
.wf-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* products head */
.products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 12px;
}
.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.sort select {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

/* grid */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1400px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px)  { .grid { grid-template-columns: repeat(2, 1fr); } }

/* card */
.card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: visible;        /* visible, чтобы подсказка «?» у цены не обрезалась краем карточки */
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;   /* скругление верхних углов (раньше его давал overflow:hidden у .card) */
}
.card-img svg { width: 60%; height: 60%; }
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: #fff;
}
.card-img .img-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255,255,255,0.85);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #555;
  font-weight: 500;
}
.card-img .img-magnify {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.card-body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.card-title:hover { color: var(--red); }
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--red);
  font-weight: 500;
}
.card-tag .dot { color: var(--red); }
.card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--price);
  margin-top: 2px;
}
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.card-supplier {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;        /* бейдж склада слева, кнопка — справа, в одну строку */
}
.card-supplier .warehouse { flex-shrink: 0; }   /* бейдж не сжимается */
.card-supplier .add-list { flex-shrink: 0; }     /* и кнопка тоже */

.add-list {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.add-list:hover {
  background: var(--red-dark);
}
.add-list-plus {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.warehouse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 4px;
}
.warehouse::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.warehouse-ru {
  background: #FBE9E9;
  color: var(--red);
}
.warehouse-ru::before { background: var(--red); }
.warehouse-cn {
  background: #FFF4D6;
  color: #C28200;
}
.warehouse-cn::before { background: #FFB400; }

/* ---------- product modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: opacity .2s, visibility .2s;
}
.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.modal-window {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 1040px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(10px);
  transition: transform .25s;
}
.modal[aria-hidden="false"] .modal-window { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  background: #f3f4f6;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover {
  background: var(--red);
  color: #fff;
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow-y: auto;
  flex: 1;
}
.modal-gallery {
  background: #f8f9fa;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gallery-main {
  position: relative;
  background: #fff;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 20px;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .15s, color .15s;
}
.gallery-arrow:hover {
  background: var(--red);
  color: #fff;
}
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  transition: border-color .15s;
}
.thumb.active { border-color: var(--red); }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-details {
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.modal-cat-badge {
  display: inline-flex;
  align-self: flex-start;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.modal-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--price);
}
/* Оптовая лестница цен в модалке (как getOptPrices на основном сайте) */
.modal-opt {
  margin: 14px 0 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}
.modal-opt .opt-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.modal-opt .opt-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
}
.modal-opt .opt-row:first-of-type { border-top: none; }
.modal-opt .opt-qty { color: var(--text); font-weight: 600; }
.modal-opt .opt-sum { color: var(--price); font-weight: 700; white-space: nowrap; }
.modal-opt .opt-unit-price { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.info-row {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-label {
  color: var(--text-muted);
  font-weight: 500;
}
.modal-description {
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  max-height: 260px;
  overflow-y: auto;
}
.modal-description p { margin-bottom: 10px; }
.modal-description .muted { color: var(--text-muted); font-style: italic; }
.modal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  flex-wrap: wrap;
}
.modal-add { font-size: 14px; padding: 12px 24px; }
.modal-link {
  color: var(--red);
  font-weight: 600;
  font-size: 14px;
}
.modal-link:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .modal { padding: 0; }
  .modal-window { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 18px; }
  .modal-price { font-size: 22px; }
}

/* ---------- order list modal ---------- */
.list-window {
  max-width: 920px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.list-title {
  font-size: 22px;
  font-weight: 700;
}
.list-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 14px;
}
.list-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 50vh;
}
.list-item {
  display: grid;
  grid-template-columns: 64px 1fr 220px 110px 32px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.li-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 6px;
  padding: 4px;
}
.li-info { min-width: 0; }
.li-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.li-sku {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.li-title {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.li-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}
.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .12s;
}
.qty-btn:hover { background: var(--red); color: #fff; }
.qty-input {
  width: 80px;
  height: 30px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-unit {
  font-size: 12px;
  color: var(--text-muted);
  padding-right: 6px;
}
.li-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--price);
  text-align: right;
}
.li-price-muted { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.li-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-muted);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.li-remove:hover { background: #fee; color: var(--red); }

.list-item.just-added {
  animation: liHighlight 1.4s ease;
}
@keyframes liHighlight {
  0%   { background: var(--red-soft); border-color: var(--red); }
  60%  { background: var(--red-soft); border-color: var(--red); }
  100% { background: #fff; border-color: var(--border); }
}

.list-totals {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.totals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
}
.totals-cell {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.totals-cell-sum { background: var(--red-soft); }
.totals-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.totals-val { font-size: 18px; font-weight: 700; }
.totals-rub { color: var(--red); font-size: 20px; }

.list-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.list-send {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.info-tip {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f2f4;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  outline: none;
  transition: background .15s, color .15s;
}
.info-tip:hover, .info-tip:focus {
  background: var(--red);
  color: #fff;
}
.info-tip-content {
  position: absolute;
  bottom: calc(100% + 10px);
  right: -8px;
  width: 280px;
  background: #2a2a2a;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility .15s;
  z-index: 10;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}
.info-tip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 14px;
  border: 6px solid transparent;
  border-top-color: #2a2a2a;
}
.info-tip:hover .info-tip-content,
.info-tip:focus .info-tip-content,
.info-tip.tip-open .info-tip-content {   /* tip-open ставится по клику/тапу (JS) — для тач-устройств */
  opacity: 1;
  visibility: visible;
}

/* ===== Значок «?» рядом с ценой (карточка + модалка) ===== */
.price-tip {
  width: 17px;
  height: 17px;
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}
/* в карточке цена и значок в одну строку */
.card-price { display: inline-flex; align-items: center; }
/* всплывашка у цены — центрирована по значку, чтобы не уезжала за край карточки/экрана */
.price-tip .info-tip-content {
  width: 220px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
.price-tip .info-tip-content::after {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
/* строка цены в модалке: цена + значок в ряд */
.modal-price-row { display: flex; align-items: center; gap: 0; }

/* preorder modal */
.preorder-window {
  max-width: 560px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.po-submit-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.preorder-summary {
  background: var(--red-soft);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.preorder-summary b { color: var(--red); }
.preorder-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.po-field { display: flex; flex-direction: column; gap: 6px; }
.po-field-wide { grid-column: 1 / -1; }
.po-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.po-label .info-tip { width: 18px; height: 18px; font-size: 11px; }
.po-label .info-tip-content { right: -8px; left: auto; }
.po-label .info-tip-content::after { right: 14px; left: auto; }
.po-req { color: var(--red); }
.po-field input,
.po-field select,
.po-field textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.po-field input:focus,
.po-field select:focus,
.po-field textarea:focus { border-color: var(--red); }
.po-field textarea { resize: vertical; min-height: 70px; }
.po-hint { font-size: 11px; color: var(--text-muted); }
/* honeypot: видим для бота, незаметен для пользователя */
.po-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
/* согласие на обработку ПДн — обязательный чекбокс */
.po-consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}
.po-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.po-consent a { color: var(--red); text-decoration: underline; }

.po-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}
.preorder-success {
  text-align: center;
  padding: 30px 10px 10px;
}
.po-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 36px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.po-success-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.po-success-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto 22px;
}
@media (max-width: 560px) {
  .preorder-fields { grid-template-columns: 1fr; }
  .info-tip-content { width: 220px; right: -50px; }
}

@media (max-width: 820px) {
  .list-window { padding: 20px 16px; gap: 14px; }
  .list-item {
    grid-template-columns: 56px 1fr 32px;
    grid-template-rows: auto auto;
    gap: 10px;
  }
  .li-qty { grid-column: 1 / -1; justify-self: start; }
  .li-price { grid-column: 1 / 3; text-align: left; }
  .li-remove { grid-column: 3; grid-row: 1; }
  .totals-grid { grid-template-columns: 1fr; }
  .list-actions { flex-direction: column; }
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s, background .15s;
  z-index: 100;
}
.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--red-dark);
}

.scroll-sentinel { height: 1px; }
.loading-hint {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  display: none;
}
.loading-hint.visible { display: block; }

/* ---------- info pages ---------- */
.info-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 28px 60px;
}

/* ===== Раздел «Статьи»: список ===== */
.articles-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.article-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  background: #fff;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.article-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
  border-color: #f5c2c2;
}
.article-card-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.article-card-excerpt { font-size: 14px; line-height: 1.55; color: var(--text-muted); margin: 0 0 10px; }
.article-card-more { font-size: 14px; font-weight: 600; color: var(--red); }

/* ===== Статья: хлебные крошки, карточки товаров, CTA ===== */
.breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--red); }
.breadcrumbs a:hover { text-decoration: underline; }

.article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0 8px;
}
.article-prod {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.article-prod:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.article-prod-img {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
}
.article-prod-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.article-prod-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.article-prod-title { font-size: 13px; line-height: 1.35; color: var(--text); }
.article-prod-price { font-size: 15px; font-weight: 700; color: var(--price); }

.article-cta-wrap { margin: 22px 0; }
.article-cta { text-decoration: none; }
.article-page .article-cta:hover { background: var(--red-dark); }

/* Блок доверия в статье (с 2013 · Москва · вся РФ · от рулона) */
.article-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 26px 0 8px;
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--red-soft);
  border-radius: 12px;
  text-align: center;
}
.trust-num { font-size: 20px; font-weight: 800; color: var(--red); line-height: 1.1; }
.trust-label { font-size: 13px; color: var(--text-muted); line-height: 1.3; }

/* ===== Страница товара ===== */
.product-top {
  display: grid;
  grid-template-columns: minmax(280px, 440px) 1fr;
  gap: 28px;
  margin: 8px 0 28px;
}
.product-gallery {
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
}
.product-main-img { width: 100%; height: auto; display: block; object-fit: contain; }
.product-h1 { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 0 0 12px; }
.product-price { font-size: 28px; font-weight: 800; color: var(--price); }
.product-price-unit { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.product-meta { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 14px; }
.product-meta .info-label { color: var(--text-muted); }
.product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 10px; }
.product-actions .cta,
.product-actions .btn-secondary { text-decoration: none; }
.product-note { font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 520px; }
.product-desc, .product-about, .product-related { margin-top: 32px; }
.product-desc p, .product-about p { font-size: 15px; line-height: 1.7; color: var(--text); margin: 0 0 12px; }
.product-related .article-cards { margin-top: 14px; }
@media (max-width: 720px) {
  .product-top { grid-template-columns: 1fr; gap: 18px; }
  .product-h1 { font-size: 22px; }
}
.info-page h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.info-page .lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.info-page h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.info-page h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 10px;
}
.info-page p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.info-page ul, .info-page ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.info-page li {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 6px;
}
.info-page a { color: var(--red); }
.info-page a:hover { color: var(--red-dark); text-decoration: underline; }
.info-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 14px;
}
.info-page table th, .info-page table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.info-page table th {
  background: #f8f9fa;
  font-weight: 600;
}
.info-page .info-card {
  background: #fafafa;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 14px 0;
}
.info-page .info-card-red {
  background: var(--red-soft);
  border-left: 4px solid var(--red);
}
.requisites-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 22px;
  padding: 18px 22px;
  background: #fafafa;
  border-radius: 10px;
  margin: 8px 0 22px;
  font-size: 14px;
  line-height: 1.5;
}
.requisites-grid dt { color: var(--text-muted); font-weight: 500; }
.requisites-grid dd { margin: 0; font-weight: 600; }
.info-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.info-cat-card {
  display: block;
  background: #fafafa;
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: background .15s, transform .15s;
}
.info-cat-card:hover {
  background: var(--red-soft);
  transform: translateY(-2px);
}
.info-cat-card .cat-count {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
}

/* active nav item */
.navbar-inner a.active {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 600;
}

/* 404 */
.e404 { text-align: center; padding-top: 60px; }
.e404-code {
  font-size: 140px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 4px;
}
.e404 h1 { text-align: center; }
.e404 .lead { text-align: center; max-width: 540px; margin: 0 auto 28px; }
.e404 ul { display: inline-block; text-align: left; }
.e404-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- footer ---------- */
.footer {
  background: #fafafa;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}
.foot-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.foot-col p { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* =========================================================
   MOBILE — burger, drawer, адаптация topbar / navbar / footer
   ========================================================= */

/* Burger-кнопка показывается только на ≤720px (см. media-queries ниже) */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 8px;
  background: transparent;
}
.mobile-menu-btn:hover { background: var(--red-soft); color: var(--red); }
.mobile-menu-btn:focus { outline: none; }
.mobile-menu-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Drawer (выезжающее меню) */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear .25s;
}
.mobile-drawer[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .22s ease;
}
.mobile-drawer[aria-hidden="false"] .mobile-drawer-backdrop { opacity: 1; }
.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100dvh;
  width: min(86vw, 360px);
  background: #fff;
  box-shadow: -8px 0 24px rgba(0,0,0,.18);
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
}
.mobile-drawer[aria-hidden="true"] .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer[aria-hidden="false"] .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.mobile-drawer-close {
  width: 36px; height: 36px;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-drawer-close:hover { background: var(--red-soft); color: var(--red); }
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
}
.mobile-drawer-nav a {
  padding: 13px 4px;
  font-size: 16px;
  color: var(--text);
  border-bottom: 1px solid #f1f1f1;
}
.mobile-drawer-nav a:hover,
.mobile-drawer-nav a.active { color: var(--red); }
.mobile-drawer-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
}
.mobile-drawer-msg { display: flex; flex-direction: column; gap: 10px; }
.mobile-drawer-msg-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.mobile-drawer-msg-row { display: flex; gap: 10px; }

/* ---------- ≤ 1200px: navbar не помещается → burger-меню ----------
   Полный navbar (5 пунктов + 2 соц-ссылки + «Всё для договора» + телефон)
   с кириллицей требует ~1150px. Ниже этого — телефон вылезал за край,
   поэтому переключаемся на burger + mobile drawer (там вся навигация).
   Topbar остаётся «десктопным», но мессенджеры сжимаются до иконок. */
@media (max-width: 1200px) {
  .navbar { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar-inner { gap: 16px; }
  /* текстовая подсказка и стрелка к мессенджерам занимают много места — убираем,
     оставляя сами иконки Telegram/WhatsApp/Max */
  .msg-hint, .msg-arrow { display: none; }
}

/* ---------- ≤ 720px (tablet / large phone) ---------- */
@media (max-width: 720px) {
  /* Topbar собирается компактнее */
  .topbar-inner {
    padding: 10px 14px;
    gap: 12px;
  }
  .tagline {
    display: none;        /* tagline на мобиле скрыт — место уходит навигации */
  }
  .messengers {
    display: none;        /* мессенджеры — в drawer'е */
  }
  .lang-switch { display: none; }   /* язык — пока скрываем; можно перенести в drawer позже */
  .logo-img { height: 46px; }

  /* CTA «Список для заказа» — компактнее (иконка + бейдж, текст скрыт);
     margin-left:auto отталкивает CTA и burger вправо (мессенджеры скрыты) */
  #openListBtn { padding: 10px 12px; margin-left: auto; }
  #openListBtn > span[data-i18n="cta_list"] { display: none; }

  /* Контент: меньше горизонтальных отступов */
  .content { padding: 12px 14px 80px; }

  /* Footer: 2 колонки */
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    padding: 24px 16px;
    gap: 20px;
  }
}

/* ---------- ≤ 480px (mobile) ---------- */
@media (max-width: 480px) {
  /* Категории — горизонтальный скролл вместо переноса */
  .categories { margin-bottom: 10px; }
  .cat-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
    padding-bottom: 4px;
    margin: 0 -14px;              /* edge-to-edge внутри .content */
    padding-left: 14px;
    padding-right: 14px;
  }
  .cat-grid::-webkit-scrollbar { display: none; } /* WebKit */
  .cat-chip { flex-shrink: 0; }

  /* Сетка товаров: колонки не должны разъезжаться из-за кнопок/бейджей внутри карточек. */
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Карточки чуть компактнее */
  .card { min-width: 0; }
  .card-title { font-size: 13px; }
  .card-price { font-size: 14px; }
  .card-supplier {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }
  .card-supplier .warehouse { align-self: flex-start; }
  .card-supplier .add-list {
    width: 100%;
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
  }
  .price-tip .info-tip-content {
    width: min(220px, calc(100vw - 32px));
    left: auto;
    right: 0;
    transform: none;
  }
  .price-tip .info-tip-content::after {
    left: auto;
    right: 8px;
    transform: none;
  }

  /* CTA «Список для заказа» — только бейдж рядом с иконкой */
  #openListBtn { padding: 9px 11px; }
  #listBadge { margin-left: 4px; }

  /* Footer: одна колонка */
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }

  /* Фильтр-панель на мобиле — почти на весь экран */
  #filterModal .filter-window { width: 100%; max-width: 100%; }

  /* toTop и FAB — поднимем чуть выше, чтобы оба нормально читались */
  .to-top { bottom: 16px; right: 14px; width: 42px; height: 42px; }
  .filter-fab { bottom: 16px; padding: 11px 18px; font-size: 13px; letter-spacing: .5px; }

  /* Drawer items крупнее для тапа */
  .mobile-drawer-nav a { padding: 14px 4px; font-size: 16px; }
}

/* ---------- Touch-targets и доступность ---------- */
@media (hover: none) and (pointer: coarse) {
  /* На тач-устройствах гарантируем минимальный таргет 44×44 */
  .nav-all, .navbar-inner a, .cat-chip, .filter-chip,
  .lang-btn, .msg, .add-list, .qty-btn,
  .modal-close, .mobile-drawer-close { min-height: 36px; }
  .msg { width: 42px; height: 42px; }
  /* Убираем hover-эффекты, которые залипают на тач */
  .filter-fab:hover { transform: translateX(-50%) translateY(0); }
}
