/* ===== Токены =====
   Приглушённая серо-голубая палитра (по просьбе пользователя — "менее
   яркие цвета, построже, серые, серо-голубые, с тенями, с границами еле
   различимыми"): вместо бирюзы/золота (v2) — сдержанный serye-синий
   основной цвет и такой же приглушённый вторичный, без насыщенных пятен;
   различие между блоками теперь в основном держится на мягкой тени
   (--shadow/--shadow-hover), а не на контрастной границе — --line
   специально очень близок к --bg. */
:root {
  --brand: #56697c;
  --brand-dark: #1e2530;
  --accent: #97a3b0;
  --accent-dark: #71808f;
  --ink: #2a3542;
  --ink-soft: #74808d;
  --line: #e4e7ea;
  --bg: #f4f5f6;
  --card-bg: #ffffff;
  --success: #5f7a68;
  --error: #a15d56;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(30, 41, 54, 0.05), 0 1px 1px rgba(30, 41, 54, 0.04);
  --shadow-hover: 0 10px 26px rgba(30, 41, 54, 0.12);
  --container-w: 1360px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-main);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border-radius: var(--radius); font-weight: 600; font-size: .95rem;
  padding: 12px 22px; cursor: pointer; border: 1.5px solid transparent;
  transition: all .15s ease; text-align: center;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #465666; }
.btn-outline { background: transparent; border-color: var(--brand-dark); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand-dark); color: #fff; }
.btn-text { background: transparent; color: var(--ink-soft); border: none; }
.btn-text:hover { color: var(--brand); }
.btn-large { padding: 15px 28px; font-size: 1.05rem; }
.btn-small { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-bar {
  background: var(--brand-dark); color: #b9c4d4; font-size: .8rem;
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 20px; gap: 12px; flex-wrap: wrap;
}
.header-bar a { color: #fff; font-weight: 600; }
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--brand-dark); letter-spacing: -.01em; }
.logo-icon { color: var(--brand); display: inline-flex; }
.logo-icon img { display: block; }
.logo-text-accent { color: var(--brand); }
.header-contacts { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-phone { font-weight: 700; color: var(--ink); white-space: nowrap; }
.header-nav-strip { background: var(--bg); border-bottom: 1px solid var(--line); }
.main-nav { display: flex; gap: 6px; max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }
.main-nav a {
  font-weight: 600; font-size: .88rem; color: var(--ink-soft); padding: 11px 16px;
  border-bottom: 2.5px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand-dark); border-color: var(--brand); }
/* "Позвонить"/"Оставить заявку" (templates/header.php, сосед <nav
   class="main-nav"> внутри .header-nav-strip) — по просьбе пользователя
   видны только на мобильном (см. @max-width:640px ниже). У reefer, в
   отличие от containers-1, .main-nav не сворачивается в открывающийся по
   гамбургеру список (см. докблок в header.php) — это отдельная строка
   под всегда-видимой горизонтально-скроллящейся навигацией, а не часть
   выпадающего меню, поэтому гейтится напрямую медиа-запросом, а не
   классом .open. На десктопе не нужен: телефон и кнопка "Каталог" там и
   так есть в .header-contacts — поэтому по умолчанию скрыт. */
.mobile-menu-actions { display: none; }

/* ===== Переключатель города ===== */
.city-switcher { position: relative; }
.city-switcher-btn {
  display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 14px; font-weight: 600; font-size: .85rem; color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.city-switcher-btn:hover { border-color: var(--brand); }
.city-switcher-btn svg:first-child { color: var(--brand); }
.city-switcher-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 280px; max-height: 360px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover);
  padding: 12px; z-index: 60; display: flex; flex-direction: column; gap: 10px;
}
.city-switcher-panel[hidden] { display: none; }
.city-search {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-family: inherit; font-size: .9rem; width: 100%;
}
.city-list { overflow-y: auto; display: flex; flex-direction: column; }
.city-list-item { padding: 8px 10px; border-radius: var(--radius); font-size: .9rem; color: var(--ink); }
.city-list-item:hover { background: var(--bg); }
.city-list-item.is-current { background: #eceff2; color: var(--brand); font-weight: 700; }
.city-list-item[hidden] { display: none; }
.city-list-item-all { font-weight: 700; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px; padding-bottom: 10px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); }

/* ===== Hero (тёмная панель) ===== */
.hero-dark { background: var(--brand-dark); padding: 52px 0 44px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px;
}
.hero-dark h1 { font-size: 2.15rem; color: #fff; letter-spacing: -.01em; }
.hero-lead { color: #aebccd; font-size: 1.02rem; max-width: 50ch; }
.hero-quickfilter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.hero-quickfilter-label { color: #7c8ba0; font-size: .82rem; font-weight: 600; margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  color: #e2e8f0; font-size: .82rem; font-weight: 600; padding: 7px 14px; border-radius: var(--radius);
  transition: all .15s ease;
}
.chip:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.hero-actions { display: flex; gap: 12px; margin: 20px 0 0; flex-wrap: wrap; }
.hero-stats {
  background: #101c30; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 16px;
}
.hero-stat { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 14px; }
.hero-stat:last-of-type { border-bottom: none; padding-bottom: 0; }
.hero-stat-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--accent); line-height: 1; }
.hero-stat-label { color: #aebccd; font-size: .85rem; }
.hero-stats-note { display: flex; flex-direction: column; gap: 6px; color: #8ea0b8; font-size: .82rem; padding-top: 4px; }

/* ===== Sections ===== */
.section { padding: 48px 0; }
.section-title { font-size: 1.5rem; color: var(--ink); }
.section-header-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.section-link { color: var(--brand); font-weight: 600; }
.section-link:hover { color: var(--brand-dark); }

/* ===== Способ питания — горизонтальные табы (вместо сетки карточек) ===== */
.types-section { background: #fff; }
.types-tabs-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.types-tabs-lead { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.types-tabs { display: flex; gap: 12px; flex-wrap: wrap; }
.type-tab {
  display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 18px 10px 10px; flex: 1 1 260px; transition: border-color .15s, background .15s;
}
.type-tab:hover { border-color: var(--brand); background: #eceff2; }
.type-tab img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.type-tab-text { display: flex; flex-direction: column; }
.type-tab-name { font-weight: 700; font-size: .92rem; }
.type-tab-count { font-size: .78rem; color: var(--ink-soft); }

/* ===== Cards grid (catalog) ===== */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 8px; }
.card {
  position: relative; background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--brand); }
.card-image-wrap { position: relative; }
.card-image { position: relative; display: block; aspect-ratio: 4/3; background: #e7ebee; overflow: hidden; }
/* Кнопка "Редактировать" для залогиненного админа (см. adminLoggedIn() в
   app/functions.php) — намеренно ВНЕ .card-image (там <a>, вложенные <a>
   невалидны), но позиционируется поверх того же .card-image-wrap. */
.card-edit-link {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(11, 18, 32, .85); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 4px 9px; border-radius: var(--radius); text-decoration: none; white-space: nowrap;
}
.card-edit-link:hover { background: var(--brand); }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; padding: 4px 9px; border-radius: 3px; font-size: .7rem; font-weight: 700; color: #fff; }
.badge-featured { left: 10px; background: var(--accent); color: var(--ink); }
.badge-sale { right: 10px; background: var(--error); }
.badge-sold { left: 10px; top: 10px; background: var(--ink-soft); }
/* "Нет в наличии"/"Резерв (оплачен)" — см. ContainerRepo::weeklyOutOfStockIds()/
   weeklyReservedIds() — могут быть активны одновременно, .badge-stack
   складывает бейджи столбиком. */
.badge-stack { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge-stack .badge { position: static; }
.badge-outofstock { background: var(--error); }
.badge-reserved { background: var(--success); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: .98rem; font-family: var(--font-main); font-weight: 700; }
.card-title a:hover { color: var(--brand); }
.card-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.price-old { text-decoration: line-through; color: var(--ink-soft); font-size: .82rem; }
.price-current { font-weight: 700; font-size: 1.14rem; color: var(--ink); font-family: var(--font-display); }
.card-price-muted .price-current, .card-price-muted .price-old { color: var(--ink-soft); text-decoration: line-through; }
.card-price-note { color: var(--ink-soft); font-size: .78rem; font-weight: 600; width: 100%; }
.card-specs-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -2px; }
.card-specs-pills .pill {
  background: #eceff2; color: var(--brand); border: 1px solid #dbe0e5; font-size: .72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.card-specs-pills .pill-muted { background: var(--bg); color: var(--ink-soft); border-color: var(--line); font-weight: 600; }
.card-cta { margin-top: auto; text-align: center; }

/* ===== Плавающие боковые панели ===== */
.side-panels {
  position: fixed; top: 50%; right: 0; transform: translateY(-50%); z-index: 46;
  display: flex; flex-direction: column; align-items: stretch;
  transition: right .3s ease;
}
.side-panels.is-shifted { right: var(--panels-shift, 0px); }
.side-panels > button:first-child { border-radius: var(--radius) 0 0 0; }
.side-panels > button:last-child { border-radius: 0 0 0 var(--radius); }

.side-picks-toggle {
  width: 34px; height: 64px; flex-shrink: 0; border: none;
  background: var(--brand-dark); color: var(--accent); font-size: 1.2rem;
  line-height: 1; cursor: pointer; box-shadow: var(--shadow-hover);
  transition: background .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.side-picks-toggle:hover { background: #16233a; }
.side-picks-toggle.is-pending { display: none; }
.side-picks-toggle.is-open { background: #16233a; }
.side-picks-body {
  position: fixed; top: 50%; right: 0; z-index: 45;
  transform: translateY(-50%) translateX(0); transition: transform .3s ease;
  width: 190px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--card-bg); border: 1px solid var(--line); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius); box-shadow: var(--shadow-hover);
  padding: 12px; display: flex; flex-direction: column; gap: 12px;
}
.side-picks-body.is-collapsed { transform: translateY(-50%) translateX(120%); }
.side-pick-card {
  position: relative; display: block; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; transition: box-shadow .15s, border-color .15s;
}
.side-pick-card:hover { box-shadow: var(--shadow-hover); border-color: var(--brand); }
.side-pick-label {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-size: .68rem; font-weight: 800; color: #fff; padding: 3px 8px; border-radius: 3px; white-space: nowrap;
}
.side-pick-day .side-pick-label { background: var(--accent); color: var(--ink); }
.side-pick-month .side-pick-label { background: var(--brand); }
.side-pick-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #e7ebee; }
.side-pick-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 8px 10px 0; font-size: .82rem; font-weight: 600; color: var(--ink);
}
.side-pick-price { display: block; padding: 4px 10px 10px; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.side-picks-cta { font-size: .85rem; padding: 10px 12px; }

.fav-toggle {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink-soft); font-size: 1.05rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow); transition: color .15s ease, transform .15s ease;
}
.fav-toggle:hover { transform: scale(1.08); }
.fav-toggle.is-active { color: var(--error); }
.fav-toggle-detail-icon { margin-right: 2px; }
.fav-toggle-detail.is-active { background: var(--error); border-color: var(--error); color: #fff; }

.side-favorites-toggle {
  /* position: relative — обязательно: .side-favorites-count ниже висит
     на этой кнопке через position:absolute, а без своего positioned
     предка она "улетала" к ближайшему таковому — общему .side-panels
     (см. его position:fixed) — и садилась на угол ПЕРВОЙ кнопки в общем
     стеке (.side-picks-toggle, "Топ дня/месяца"), а не на "Избранное". */
  position: relative;
  width: 34px; height: 64px; flex-shrink: 0; border: none;
  background: var(--accent); color: var(--ink); font-size: 1.3rem;
  line-height: 1; cursor: pointer; box-shadow: var(--shadow-hover);
  transition: background .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.side-favorites-toggle:hover { background: var(--accent-dark); }
.side-favorites-toggle.is-open { background: var(--accent-dark); }
.side-favorites-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--brand-dark); color: #fff; font-size: .68rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1; box-shadow: var(--shadow);
}
/* Баг, найденный при разборе горизонтального скролла на containers-1 на
   350px (см. докблок там же — у reefer-containers своей вёрстки каталога
   такой скролл-баг не воспроизводится, а вот эта конкретная причина
   общая для обоих сайтов, копия одного и того же CSS-файла): `.side-
   favorites-count { display: flex }` выше — селектор по КЛАССУ, та же
   специфичность (0,1,0), что и стандартное браузерное правило `[hidden]
   { display: none }` (селектор по АТРИБУТУ) — и, идя позже в каскаде,
   побеждает. Из-за этого счётчик "0" в кнопке "Избранное" был виден
   ВСЕГДА, даже когда JS явно ставит el.hidden = true, пока ничего не
   добавлено в избранное (см. main.js). Та же причина и то же решение,
   что уже было у .review-item[hidden] в
   templates/home_reviews_section.php. */
.side-favorites-count[hidden] { display: none; }
.side-favorites-body {
  position: fixed; top: 50%; right: 0; z-index: 45;
  transform: translateY(-50%) translateX(0); transition: transform .3s ease;
  width: 280px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--card-bg); border: 1px solid var(--line); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius); box-shadow: var(--shadow-hover); padding: 14px;
}
.side-favorites-body.is-collapsed { transform: translateY(-50%) translateX(120%); }
.side-favorites-head { margin-bottom: 8px; }
.side-favorites-head h4 { margin: 0; font-size: .98rem; }
.side-favorites-empty { color: var(--ink-soft); font-size: .84rem; margin: 0; padding: 6px 0; }
.side-favorites-cta { margin-top: 10px; font-size: .85rem; padding: 10px 12px; }

/* ===== Модалка "Заказать из избранного" (templates/favorites_panel.php) ===== */
.favorites-order-items {
  display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto;
  margin-bottom: 16px; padding-right: 2px;
}
.favorites-order-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.favorites-order-item input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.favorites-order-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; flex-shrink: 0; background: var(--bg); }
.favorites-order-item-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.favorites-order-item-title {
  font-size: .82rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.favorites-order-item-price { font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.favorites-order-item.is-unchecked { opacity: .5; }
.favorites-order-hint { color: var(--ink-soft); font-size: .82rem; margin: 0 0 14px; }
.fav-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.fav-item:last-child { border-bottom: none; }
.fav-item-link { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; text-decoration: none; }
.fav-item-link img { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; background: #e7ebee; flex-shrink: 0; }
.fav-item-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.fav-item-title {
  font-size: .84rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fav-item-price { font-size: .84rem; font-weight: 800; color: var(--ink); }
.fav-item-remove {
  flex-shrink: 0; width: 26px; height: 26px; border: none; background: transparent;
  color: var(--ink-soft); font-size: 1.15rem; line-height: 1; cursor: pointer; border-radius: 50%;
}
.fav-item-remove:hover { background: var(--bg); color: var(--error); }

/* ===== Модальное окно "Получить предложение" ===== */
.site-modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(11, 18, 32, .65);
}
.site-modal-overlay[hidden] { display: none; }
.site-modal {
  position: relative; width: 100%; max-width: 380px; max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); padding: 26px 22px 22px;
}
.site-modal h3 { margin: 0 0 16px; font-size: 1.15rem; padding-right: 26px; }
.site-modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: none; border-radius: 50%;
  background: var(--bg); color: var(--ink-soft); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.site-modal-close:hover { background: var(--line); color: var(--ink); }

/* ===== Как купить (шаги) ===== */
.how-section { background: var(--bg); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 20px; position: relative; }
.step { padding: 0 18px 0 0; position: relative; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 17px; left: 40px; right: 0; height: 2px; background: var(--line);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-dark); color: var(--accent);
  font-family: var(--font-display); font-weight: 600; margin-bottom: 12px;
}
.step h3 { font-size: 1.02rem; }
.step p { color: var(--ink-soft); font-size: .88rem; margin: 0; }

/* ===== Доставка и отгрузка (templates/delivery_terminal.php) ===== */
.delivery-section { background: #fff; }
.delivery-lead { color: var(--ink-soft); font-size: .95rem; margin: 0 0 16px; }
.delivery-terminals { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.delivery-terminal-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg); font-size: .92rem; color: var(--ink);
}
.delivery-terminal-icon { flex-shrink: 0; font-size: 1.05rem; line-height: 1.3; }
.delivery-note { color: var(--ink-soft); font-size: .88rem; margin: 0 0 8px; max-width: 720px; }
.delivery-note:last-child { margin-bottom: 0; }
.delivery-note a { color: var(--brand); font-weight: 600; }

/* ===== Наши преимущества — список строк ===== */
.advantages-section { background: #fff; }
.advantages-list { display: flex; flex-direction: column; margin-top: 16px; border-top: 1px solid var(--line); }
.advantage-row {
  display: grid; grid-template-columns: 40px 220px 1fr; align-items: center; gap: 18px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.advantage-icon { font-size: 1.4rem; line-height: 1; }
.advantage-title { font-size: .98rem; margin: 0; }
.advantage-desc { color: var(--ink-soft); font-size: .88rem; margin: 0; }

/* ===== География городов ===== */
.geo-section { background: var(--bg); }
.geo-lead { color: var(--ink-soft); font-size: .95rem; max-width: 640px; margin: 0 0 24px; }
.city-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.city-tag {
  display: inline-block; padding: 8px 14px; border-radius: var(--radius); font-size: .85rem; font-weight: 600;
  background: #fff; border: 1px solid var(--line); color: var(--ink); transition: all .15s ease;
}
.city-tag:hover { border-color: var(--brand); color: var(--brand); }
.city-tag.is-current { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* ===== Сравнительная таблица характеристик ===== */
.compare-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compare-lead { color: var(--ink-soft); font-size: .95rem; max-width: 680px; margin: 0 0 24px; }
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.compare-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: left; font-size: .86rem; white-space: nowrap; }
.compare-table thead th {
  background: var(--brand-dark); color: #cbd5e1; font-weight: 700; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .04em; white-space: normal;
}
.compare-table tbody tr { border-bottom: 1px solid var(--line); transition: background .12s ease; }
.compare-table tbody tr:last-child { border-bottom: none; }
.compare-table tbody tr:hover { background: var(--bg); }
.compare-table td { color: var(--ink-soft); }
.compare-type-cell a { display: block; color: var(--ink); font-weight: 700; }
.compare-type-cell a:hover { color: var(--brand); }
.compare-size { font-weight: 500; color: var(--ink-soft); font-size: .84rem; }
.compare-stock a { color: var(--brand); font-weight: 700; }
.compare-stock a:hover { color: var(--brand-dark); }

/* ===== FAQ по городу (app/pages/home.php, FAQPage JSON-LD рядом) ===== */
.faq-section { background: var(--bg); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; }
.faq-question {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; font-weight: 600; color: var(--ink);
  position: relative;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 400; color: var(--brand); line-height: 1;
}
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer { color: var(--ink-soft); font-size: .93rem; padding: 0 0 16px; }

/* ===== CTA ===== */
.cta-section { background: var(--brand-dark); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: #aebccd; margin: 0; }

/* ===== Хаб-главная ===== */
.hub-cities-section { background: #fff; scroll-margin-top: 96px; }
.hub-cities-lead { color: var(--ink-soft); font-size: .95rem; max-width: 640px; margin: 0 0 24px; }
.hub-cities-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hub-city-card {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 13px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 600; font-size: .9rem; color: var(--ink); background: var(--bg);
  transition: all .15s ease;
}
.hub-city-card:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.hub-city-card.is-featured { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; }

/* ===== СЕО-текст ===== */
.seo-section { padding-top: 44px; background: var(--bg); }
.seo-text { max-width: 900px; }
.seo-text p { color: var(--ink-soft); font-size: .95rem; }
.seo-text ul { color: var(--ink-soft); font-size: .95rem; padding-left: 22px; margin: 0 0 16px; }
.seo-text li { margin-bottom: 6px; }
.seo-text a { color: var(--brand); font-weight: 600; text-decoration: underline; }
.seo-text a:hover { color: var(--brand-dark); }

/* ===== Каталог: горизонтальная панель фильтров ===== */
.catalog-section { scroll-margin-top: 96px; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.catalog-count { color: var(--ink-soft); }
.catalog-layout { display: flex; flex-direction: column; gap: 16px; }
.filters-bar { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.filters-form { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.filter-group label { font-weight: 600; font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .02em; }
.filter-group input, .filter-group select {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem;
  font-family: inherit; background: #fff;
}
.filter-group-range { min-width: 180px; }
.range-inputs { display: flex; gap: 8px; }
.range-inputs input { width: 90px; }
.filter-group-actions { flex-direction: row; gap: 8px; margin-left: auto; }
.catalog-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.sort-form { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-soft); }
.sort-form select { padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); }

.view-toggle { display: flex; gap: 3px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; }
.view-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 30px; border: none; border-radius: 3px; background: transparent;
  color: var(--ink-soft); font-size: 1rem; line-height: 1; cursor: pointer; transition: all .15s ease;
}
.view-toggle-btn:hover { background: var(--bg); }
.view-toggle-btn.is-active { background: var(--brand-dark); color: #fff; }

.catalog-results.view-list .cards-grid { grid-template-columns: 1fr; gap: 10px; }
.catalog-results.view-list .card { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; }
.catalog-results.view-list .card-image-wrap { flex: 0 0 76px; width: 76px; height: 76px; border-radius: var(--radius); overflow: hidden; }
.catalog-results.view-list .card-image { width: 100%; height: 100%; }
.catalog-results.view-list .card-image-wrap .badge, .catalog-results.view-list .card-edit-link { display: none; }
.catalog-results.view-list .card::before { display: none; }
.catalog-results.view-list .card-body { flex: 1 1 auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 0; }
.catalog-results.view-list .card-title { flex: 1 1 200px; margin: 0; }
.catalog-results.view-list .card-price-row { flex: 0 0 auto; border-bottom: none; padding-bottom: 0; }
.catalog-results.view-list .card-specs-pills { flex-direction: row; flex-wrap: wrap; gap: 4px 8px; flex: 1 1 220px; margin-top: 0; }
.catalog-results.view-list .card-cta { margin-top: 0; flex: 0 0 auto; width: auto; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--ink-soft); background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; }
.page-link { font-weight: 700; color: var(--brand); }
.page-link:hover { color: var(--brand-dark); }
.page-current { color: var(--ink-soft); font-size: .9rem; }

/* ===== Container detail ===== */
.breadcrumbs { color: var(--ink-soft); font-size: .85rem; margin-bottom: 20px; }
.breadcrumbs a:hover { color: var(--brand); }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head-row .breadcrumbs { margin-bottom: 20px; }
.admin-edit-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700;
  color: var(--brand); background: var(--bg); padding: 4px 12px; border-radius: var(--radius);
  text-decoration: none; white-space: nowrap; margin-bottom: 20px;
}
.admin-edit-link:hover { background: var(--brand); color: #fff; }
.container-detail-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; margin-bottom: 40px; align-items: start; }
/* align-items: start (вместо дефолтного stretch) — у detail-info теперь
   бывает заметно больше контента, чем у галереи (сетка detail-meta-grid +
   блок "Похожие в наличии" при "Нет в наличии"/"Резерв", см. app/pages/
   container.php) — при stretch колонка галереи растягивалась под высоту
   detail-info, и после фото/миниатюр оставалась пустая область на всю
   разницу высот, а "Описание" ниже уезжало непропорционально вниз. Со
   start + sticky ниже фото просто "следует" за прокруткой, пока не
   закончится более длинная соседняя колонка — как .order-form-wrap
   (тот же приём, тот же top, см. ниже). */
.detail-gallery { position: sticky; top: 96px; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; background: #e7ebee; aspect-ratio: 4/3; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 70px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--brand); }
.detail-info h1 { font-size: 1.6rem; color: var(--ink); }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-tags li { background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: var(--radius); }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.detail-price .price-current { font-size: 1.8rem; }
.detail-price-muted { margin-bottom: 4px; }
.detail-price-muted .price-current, .detail-price-muted .price-old { color: var(--ink-soft); text-decoration: line-through; }
.detail-price-note { color: var(--ink-soft); font-weight: 700; font-size: .9rem; margin: 0 0 18px; }
.detail-availability-highlight { font-weight: 700; }
.detail-availability-highlight-outofstock { color: var(--error); }
.detail-availability-highlight-reserved { color: var(--success); }
.detail-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.detail-meta-tile { background: var(--bg); padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; }
.detail-meta-tile-wide { grid-column: 1 / -1; }
.detail-meta-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.detail-meta-value { font-size: .92rem; font-weight: 600; color: var(--ink); }
.detail-similar-instock { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px; }
.detail-similar-instock-title { font-weight: 700; font-size: .85rem; margin: 0 0 10px; }
.detail-similar-instock-list { display: flex; flex-direction: column; gap: 8px; }
.detail-similar-instock-list li a { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.detail-similar-instock-list li a:hover { color: var(--brand); }
.detail-similar-instock-list img { width: 44px; height: 34px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.detail-similar-instock-title-text { flex: 1; font-size: .85rem; }
.detail-similar-instock-price { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.container-secondary-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.detail-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
/* Внутренняя ссылка на городскую главную (templates/city_backlink.php) —
   тот же .detail-block, но потоньше и с акцентной полосой слева, чтобы
   читалось как отдельная смысловая врезка, а не ещё один блок характеристик. */
.detail-block-citylink { padding: 14px 22px; border-left: 3px solid var(--brand); }
.detail-block-citylink p { margin: 0; font-size: .95rem; }
.detail-block-citylink a { color: var(--brand); font-weight: 600; }
.detail-block-citylink a:hover { color: var(--brand-dark); }
.specs-def-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.specs-def-item { background: #fff; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.specs-def-item dt { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); margin: 0; }
.specs-def-item dd { font-size: .95rem; font-weight: 700; color: var(--ink); margin: 0; font-family: var(--font-display); }

.related-section { padding-top: 0; }

/* ===== Order form ===== */
.user-class { display: none; }
.order-form-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; box-shadow: var(--shadow); }
.order-form-wrap h3 { font-size: 1.1rem; }
.form-row { margin-bottom: 14px; }
.form-row label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .88rem; }
.form-row input, .form-row textarea {
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); font-family: inherit; font-size: .95rem; resize: vertical;
}
.form-note { font-size: .78rem; color: var(--ink-soft); margin: 10px 0 0; }
.form-row-checkbox label { flex-direction: row; align-items: flex-start; font-weight: 400; gap: 8px; }
.form-row-checkbox input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--brand); }
.form-row-checkbox span { font-size: .82rem; color: var(--ink-soft); line-height: 1.4; }
.form-row-checkbox a { color: var(--brand); }
.alert { padding: 14px 16px; border-radius: var(--radius); font-size: .92rem; }
.alert-success { background: #eaeeec; color: var(--success); }
.alert-error { background: #f2eceb; color: var(--error); margin-bottom: 12px; }

/* ===== Отзывы (карточка товара) =====
   Видимый блок — templates/reviews_section.php, форма — templates/review_form.php,
   форма открывается в модалке (.site-modal-overlay/.site-modal — та же обвязка,
   что и у "Получить предложение" в day_month_picks.php, см. чуть выше) — обёртка
   templates/review_modal.php, кнопка-триггер — .reviews-leave-btn ниже. Тот же
   .order-form-wrap-подобный стиль формы (см. "Order form" выше), плюс список
   отзывов и чистый CSS-рейтинг звёздами на радиокнопках (без JS, см. докблок
   .review-rating-stars ниже). */
.reviews-section { margin-top: 28px; }
.reviews-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.reviews-summary-score { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.reviews-summary-stars, .review-item-stars { color: #d9a441; letter-spacing: 1px; }
.reviews-summary-count { font-size: .88rem; color: var(--ink-soft); }
.reviews-empty { color: var(--ink-soft); font-size: .92rem; }

.reviews-list { display: flex; flex-direction: column; gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; }
.review-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.review-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-item-author { font-weight: 700; color: var(--ink); }
.review-item-date { font-size: .8rem; color: var(--ink-soft); margin-left: auto; }
.review-item-city { font-size: .8rem; color: var(--ink-soft); margin: 0 0 6px; }
.review-item-text { font-size: .92rem; color: var(--ink); line-height: 1.5; margin: 0; }

.reviews-leave-btn { margin-top: 4px; }
.review-form-wrap { margin-top: 0; max-width: 480px; }
.review-form-note { font-size: .78rem; color: var(--ink-soft); margin: 10px 0 0; }
.review-rating-legend { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }

/* Чистый CSS-рейтинг звёздами: радиокнопки идут в разметке в обратном
   порядке (5..1, см. templates/review_form.php), здесь визуально
   переворачиваются (row-reverse) — тогда ":checked ~ label" подсвечивает
   отмеченную звезду и все ей предшествующие в разметке (после переворота —
   визуально все звёзды с БОЛЬШИМ или равным баллом), а ":hover ~ label"
   даёт живой предпросмотр при наведении, без единой строчки JS. */
.review-rating-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; font-size: 1.6rem; }
.review-rating-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.review-rating-stars label { color: var(--line); cursor: pointer; transition: color .1s; }
.review-rating-stars input:checked ~ label,
.review-rating-stars label:hover,
.review-rating-stars label:hover ~ label { color: #d9a441; }

/* ===== Отзывы на главной (templates/home_reviews_section.php) =====
   Витрина последних отзывов со всего сайта (не одного товара, как в блоке
   выше на карточке) — карточки сеткой, а не узкой колонкой. Переиспользует
   .review-item/.review-item-head/.review-item-author/.review-item-stars/
   .review-item-text/.review-item-product-link из блока выше — .reviews-
   list-home только меняет раскладку списка и мелкие детали (объединённая
   строка "дата · город" вместо отдельного абзаца). */
.reviews-home-section { background: var(--bg); }
.reviews-list-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; }
.reviews-list-home .review-item { display: flex; flex-direction: column; gap: 4px; }
.reviews-list-home .review-item-head { justify-content: space-between; }
.review-item-meta { font-size: .8rem; color: var(--ink-soft); }
.reviews-list-home .review-item-text { flex-grow: 1; }
.review-item-product-link { display: inline-block; margin-top: 4px; font-size: .85rem; font-weight: 700; color: var(--brand); }
.review-item-product-link:hover { color: var(--brand-dark); }
/* "Показать ещё" (по просьбе пользователя, см. докблок home_reviews_section.php
   и main.js) — .review-item выше объявлен как display:flex тем же селектором
   по классу, что у него больший вес, чем у стандартного браузерного правила
   [hidden]{display:none}: без явного переопределения ниже скрытые атрибутом
   `hidden` карточки отзывов всё равно показывались бы (flex "перебивает"
   hidden). Кнопка — по центру, с отступом от списка сверху. */
.reviews-list-home .review-item[hidden] { display: none; }
.reviews-show-more-btn { display: block; margin: 0 auto; }

/* ===== Contacts page ===== */
.contacts-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 24px; }
.contacts-info { display: flex; flex-direction: column; gap: 22px; }
.contact-item h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 4px; }
.contact-value { font-size: 1.1rem; font-weight: 600; }
a.contact-value:hover { color: var(--brand); }
/* Терминалы отгрузки на странице Контакты (app/pages/contacts.php) — тот же
   список, что и в templates/delivery_terminal.php, но компактнее под
   сайдбар контактов. */
.contact-terminals { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.contact-terminals li { font-size: 1rem; font-weight: 600; }
.contact-terminal-note { font-size: .85rem; font-weight: 400; color: var(--ink-soft); margin: 0; }

/* ===== Footer — одна широкая полоса вместо 3 колонок ===== */
.site-footer { background: var(--brand-dark); color: #aebccd; margin-top: 40px; }
.footer-top {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 26px 20px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo { color: #fff; margin-right: auto; }
.footer-nav-inline { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav-inline a { font-size: .88rem; font-weight: 600; color: #cbd5e1; }
.footer-nav-inline a:hover { color: #fff; }
.footer-contact-inline { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-contact-inline a { font-size: .88rem; font-weight: 700; color: #fff; }
.footer-mid { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.footer-tagline { color: #8ea0b8; font-size: .85rem; margin: 0; }
.footer-tagline a { color: #cbd5e1; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; color: #7c8ba0; flex-wrap: wrap; }
.footer-disclaimer { max-width: 620px; }

/* ===== Плашка согласия на cookie ===== */
.cookie-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--brand-dark); box-shadow: 0 -4px 16px rgba(11, 18, 32, 0.25); }
.cookie-consent-inner {
  max-width: var(--container-w); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cookie-consent-inner p { margin: 0; color: #aebccd; font-size: .85rem; line-height: 1.4; }
.cookie-consent-inner a { color: #fff; text-decoration: underline; }
.cookie-consent-inner .btn { flex-shrink: 0; }

/* ===== Admin ===== */
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-header { background: var(--brand-dark); color: #fff; padding: 14px 0; }
.admin-header .container { display: flex; align-items: center; justify-content: space-between; }
.admin-header a { color: #aebccd; }
.admin-header a:hover { color: #fff; }
.admin-nav { display: flex; gap: 18px; align-items: center; }
.admin-wrap { max-width: 1100px; margin: 30px auto; padding: 0 20px; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.admin-table th { color: var(--ink-soft); font-weight: 700; font-size: .8rem; text-transform: uppercase; }
.admin-table img { width: 56px; height: 42px; object-fit: cover; border-radius: 3px; }
.admin-actions { display: flex; gap: 8px; }
.status-pill { display: inline-block; padding: 3px 9px; border-radius: 3px; font-size: .75rem; font-weight: 700; }
.status-new { background: #f2eceb; color: var(--error); }
.status-processed { background: #eaeeec; color: var(--success); }
.status-rejected { background: #eceff1; color: var(--ink-soft); }
/* Статусы отзывов (/admin/reviews.php) — 'rejected' переиспользует стиль выше. */
.status-pending { background: #f2eceb; color: var(--error); }
.status-approved { background: #eaeeec; color: var(--success); }
.log-error { background: #f2eceb; color: var(--error); }
.log-warning { background: #eef0f2; color: var(--accent-dark); }
.log-info { background: #eceff2; color: var(--brand); }
.log-debug { background: #eceff1; color: var(--ink-soft); }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form-grid .full { grid-column: 1 / -1; }
.admin-form-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .85rem; }
.admin-form-grid input, .admin-form-grid select, .admin-form-grid textarea {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-family: inherit; font-size: .92rem;
}
.admin-city-checkboxes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px;
  max-height: 260px; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px;
}
.admin-city-checkboxes label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: .88rem; }
.admin-city-checkboxes input { width: auto; }

.admin-login-box { max-width: 380px; margin: 90px auto; background: #fff; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat-box .num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--ink); display: block; }
.stat-box .label { color: var(--ink-soft); font-size: .85rem; }

/* ===== Калькулятор подбора контейнера (промо-баннер) ===== */
.calc-promo {
  background: var(--brand-dark);
  border-radius: var(--radius); color: #fff; padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.calc-promo-text h2 { color: #fff; font-size: 1.25rem; margin-bottom: 6px; }
.calc-promo-text p { color: #aebccd; margin: 0; max-width: 52ch; }
.calc-promo .btn-primary { flex-shrink: 0; }
.calc-promo-block { margin: 40px 0; }
.calc-promo--compact {
  flex-direction: column; align-items: flex-start; text-align: left;
  padding: 18px; gap: 12px; margin-top: 20px;
}
.calc-promo--compact .calc-promo-text h2 { font-size: 1rem; }
.calc-promo--compact .calc-promo-text p { font-size: .82rem; max-width: none; }
.calc-promo--compact .btn { width: 100%; }
.calc-section { padding-top: 40px; }
.calc-head { max-width: 60ch; margin-bottom: 24px; }
.calc-head h1 { color: var(--ink); }
.calc-lead { color: var(--ink-soft); }
.calc-restart { display: inline-block; color: var(--brand); font-weight: 600; margin-bottom: 18px; }
.calc-restart:hover { color: var(--brand-dark); }

/* Квиз — двухколоночный степпер: список шагов слева, вопрос справа */
.calc-quiz { max-width: 860px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.calc-quiz-layout { display: grid; grid-template-columns: 190px 1fr; }
.calc-steps-nav { background: var(--bg); border-right: 1px solid var(--line); padding: 10px 0; }
.calc-steps-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px; color: var(--ink-soft);
  font-size: .88rem; font-weight: 600; border-left: 3px solid transparent;
}
.calc-steps-nav-num {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.calc-steps-nav-item.is-active { color: var(--ink); border-color: var(--brand); background: #fff; }
.calc-steps-nav-item.is-active .calc-steps-nav-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.calc-steps-nav-item.is-done { color: var(--brand); }
.calc-steps-nav-item.is-done .calc-steps-nav-num { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--accent); }
.calc-quiz-main { padding: 28px; }

.calc-step-title { font-size: 1.2rem; color: var(--ink); margin-bottom: 6px; }
.calc-step-hint { color: var(--ink-soft); font-size: .9rem; margin-bottom: 18px; }

.calc-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 6px; }
.calc-option {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.calc-option:hover { border-color: var(--brand); }
.calc-option.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .14); }
.calc-option-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.calc-option-body { display: flex; flex-direction: column; gap: 3px; }
.calc-option-title { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calc-option-desc { font-size: .85rem; color: var(--ink-soft); }
.calc-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--success); background: #eaeeec; padding: 2px 7px; border-radius: 3px; }

.calc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.calc-actions-back-only { justify-content: flex-start; margin-top: 22px; }
.calc-back { padding-left: 0; }
.calc-budget-row { margin-bottom: 6px; }
.calc-budget-input {
  width: 100%; max-width: 280px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-size: 1rem;
}

.calc-result h1 { color: var(--ink); }
.calc-reason { color: var(--ink-soft); max-width: 68ch; margin-bottom: 24px; }
.calc-more { margin-top: 20px; }
.calc-order { max-width: 480px; margin-top: 36px; }

.calc-home-section {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  scroll-margin-top: 96px;
}
.calc-home-section .calc-head { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.calc-home-section .calc-quiz { max-width: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { order: -1; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .step:not(:last-child)::after { display: none; }
  .advantage-row { grid-template-columns: 32px 1fr; }
  .advantage-row .advantage-title { grid-column: 2; }
  .hub-cities-grid { grid-template-columns: repeat(4, 1fr); }
  .container-detail-layout { grid-template-columns: 1fr; }
  .detail-gallery { position: static; }
  .container-secondary-layout { grid-template-columns: 1fr; }
  .specs-def-grid { grid-template-columns: 1fr; }
  .contacts-layout { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .calc-options { grid-template-columns: 1fr; }
  .calc-quiz-layout { grid-template-columns: 1fr; }
  .calc-steps-nav { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .calc-steps-nav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .calc-steps-nav-item.is-active { border-color: var(--brand); }
}

@media (max-width: 640px) {
  .header-bar { display: none; }
  .main-nav { overflow-x: auto; }
  /* Строка "Позвонить"/"Оставить заявку" под навигацией — см. докблок у
     базового .mobile-menu-actions выше. */
  .mobile-menu-actions { display: flex; gap: 10px; max-width: var(--container-w); margin: 0 auto; padding: 10px 20px 14px; border-top: 1px solid var(--line); }
  .mobile-menu-action { flex: 1; white-space: nowrap; }
  .header-contacts .header-phone, .header-contacts > .btn-primary { display: none; }
  .logo { font-size: 1rem; min-width: 0; }
  .logo-icon, .logo-icon img { flex-shrink: 0; width: 26px; height: 26px; }
  .logo-text { white-space: normal; line-height: 1.15; min-width: 0; }
  .header-contacts { gap: 8px; }
  .city-switcher-btn span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .city-switcher-panel { width: 220px; right: -10px; }
  .nav-toggle { display: flex; flex-shrink: 0; }
  .hero-dark h1 { font-size: 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .side-panels { top: auto; bottom: 90px; transform: none; }
  .side-picks-body, .side-favorites-body { top: auto; bottom: 90px; transform: translateX(120%); }
  .side-picks-body:not(.is-collapsed), .side-favorites-body:not(.is-collapsed) { transform: translateX(0); }
  .side-picks-body { width: 130px; max-height: 50vh; gap: 8px; padding: 8px; }
  .side-pick-title { font-size: .76rem; padding-top: 6px; }
  .side-pick-price { font-size: .82rem; padding: 2px 8px 8px; }
  .side-favorites-body { width: 220px; max-height: 50vh; padding: 10px; }
  .steps-grid { grid-template-columns: 1fr; }
  .hub-cities-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-results.view-list .card-image-wrap { flex: 0 0 56px; width: 56px; height: 56px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-logo { margin-right: 0; }
  .footer-bottom { flex-direction: column; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .calc-promo { flex-direction: column; text-align: center; }
  .calc-promo-text p { max-width: none; }
  .calc-promo--compact { text-align: left; }
}

/* Та же причина и то же решение, что у containers-1 (копия того же
   разбора, см. подробный докблок в sites/containers-1/.../style.css перед
   этим же правилом): в блоке @max-width:640px выше .logo/.logo-text
   специально сжимаются (min-width: 0), а .header-contacts (город) — нет,
   поэтому на узких экранах текст лого наезжает на переключатель города
   вместо честного переполнения. У reefer-containers ситуация даже чуть
   жёстче, чем у containers-1: SITE_NAME_PART1+PART2 здесь — "РЕФ"+
   "КОНТЕЙНЕР", БЕЗ дефиса между ними (см. app/config.php) — то есть это
   вообще одно неразрывное слово "РЕФКОНТЕЙНЕР" без единой точки для
   переноса, и его собственный минимум ширины больше, чем "КОНТЕЙНЕР-" у
   containers-1. Поэтому здесь вдобавок к скрытию текста в переключателе
   города чуть уменьшены сам логотип (шрифт/иконка/зазор) — иначе,
   как и там, не хватало бы места даже с иконкой-без-текста. Проверено
   подряд на диапазоне 295-640px (с шагом 5px) — ни оверлапа, ни
   горизонтального скролла (ниже 295px по факту уже не помещается даже
   куцее "РЕФКОНТЕЙНЕР" без переносов — но это уже уже, чем существует у
   реальных устройств: 320px, iPhone SE — самый узкий массовый экран). */
@media (max-width: 400px) {
  .header-inner { gap: 10px; }
  .logo, .logo-text { min-width: auto; }
  .logo { font-size: .92rem; gap: 6px; }
  .logo-icon, .logo-icon img { width: 22px; height: 22px; }
  .city-switcher-btn span { display: none; }
  .city-switcher-btn { padding: 8px 8px; gap: 3px; }
}

@media (min-width: 981px) {
  .calc-home-section .calc-options { grid-template-columns: repeat(3, 1fr); }
}
