/* storefront-coop.css — страницы САЙТА в теме «Для совместных закупок».
 *
 * Подключается вместе с `coop-theme.css` (там цвета, радиусы и тени) и только
 * на своём домене продавца — развилку держит `price_templates.for_site`.
 *
 * Вёрстка по макету заказчицы `01-glavnaya.dc.html`: контейнер 1440px
 * (в макете 1180px, поднят 13.09.2026 по просьбе владельца),
 * секции с отступом 32px, карточки со скруглением 20px, кнопки-пилюли с
 * «объёмной» тенью. Акцент берётся из бренда (`--accent`), поэтому файл
 * подходит любому продавцу, а не только «Коммуне Флоре».
 */

/* Обёртка витрины: шапка макета несёт свои фоны и отступы. */
.sf-head.tpl-coop { background: transparent; border: 0; box-shadow: none; padding: 0; }
/* Подложка ОДНА на все страницы темы — и на сайте, и на прайсе (макет
   `kommuna-flora-price-chistaya-stranica`: `body{background:#f7efe9}`).
   ⚠️ Тёмный фон прайса #efe4dc отменён 07.09.2026: отдельного «листа»,
   который он оттенял, больше нет. Исключение `:not(:has(.coop-price-head))`
   снято 13.09.2026 — прайс той же ширины, что остальные страницы. */
body:has(.tpl-coop) { background: var(--coop-sheet); }
/* ⚠️ Подложка — только там, где есть ШАПКА витрины: мобильная оболочка её не
   рисует вовсе, а на телефоне листа 1440px нет, и потемневший фон был бы
   виден на весь экран. */
body:has(.sf-head.tpl-coop) { background: var(--coop-backdrop); }
/* Полотно ВСЕХ страниц темы — 1440px по центру. Просьба владельца
   13.09.2026: «делай все страницы 1440, в том числе страницы /prices/».
   Ограничиваем и шапку, и содержимое — иначе шапка тянется краем в край, а
   содержимое стоит по центру.

   ⚠️ `width: 100%` обязателен, и без него правило работало НЕ ТАК, как
   выглядело в коде: `body` — флекс-колонка, а `margin: auto` по поперечной оси
   ОТМЕНЯЕТ растягивание, и блок съезжает на ширину своего содержимого. Замер
   боевого 13.09 при окне 1920: `max-width` стоял 1180, а на деле шапка выходила
   1038px, полотно «Условий опта» — 1116px, и центровались они ПОРОЗНЬ (левый
   край 434 против 395) — то есть колонки 1180 не было ни на одной странице.
   Та же грабля описана в `price-coop.css` («шапка выходила 1013px вместо
   1180») — там её закрыли, здесь она оставалась.

   ⚠️ Прайс правило больше НЕ обходит. Исключение `:not(:has(.coop-price-head))`
   стояло с 07.09.2026, когда владелец вернул прайсу резину; 13.09 он свёл все
   страницы к одной ширине. Замер перед правкой: при окне 1920 прайс занимал
   1905px, после — 1440px, таблица 1398px на пять столбцов, своей прокрутки у
   неё не появляется.

   ⚠️ Текстовую колонку (`.sf-page`, 860px) НЕ расширяем: замером на боевом
   растянутая до 1184px строка даёт ~144 знака при типографской норме 45–90.
   Ширину использует рамка страницы, читаемость остаётся. */
body:has(.sf-head.tpl-coop) .sf-head,
body:has(.sf-head.tpl-coop) .sf-foot,
body:has(.sf-head.tpl-coop) .body-wrap {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  /* Цвет листа несут САМИ блоки рамки, а не body: они стоят друг под другом
     вплотную, поэтому шва между шапкой и содержимым не видно, а подложка
     остаётся ровно за краями 1440px. */
  background: var(--coop-sheet);
}

/* Прайс прижат к ЛЕВОМУ краю листа: на странице прайса левого поля нет
   вовсе, и таблица начинается ровно на границе 1440 (решение владельца
   13.09.2026 по макету, вариант «Б»: «оставить размеры всех столбцов
   прежними, но прижать таблицу к левому краю»).

   Ширины столбцов НЕ трогаем: таблица остаётся той же (840px на пять
   столбцов), двигается только её левый край — было 24px отступа, стало 0.

   ⚠️ Сужение `:has(.cat-table-row)` обязательно: поле убираем ТОЛЬКО на
   прайсе. На «Контактах» и «Условиях опта» текст уехал бы влево вместе с
   ним и разошёлся бы с шапкой, у которой своё внутреннее поле 20px.

   ⚠️ Поле снимаем у ВСЕЙ обёртки, а не у одной таблицы: в ней же лежат
   полоса активных фильтров, блок закупки и страничная навигация — сдвинь
   мы таблицу одну, они остались бы на прежнем месте и встали бы уступом.

   Правое поле не трогаем: спрошен был левый край, а справа к нему липнет
   док чата. */
body:has(.sf-head.tpl-coop) .body-wrap:has(.cat-table-row) { padding-left: 0; }

.ch {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 48px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.7;
}

.ch-h1 {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 8px;
}
.ch-h2 {
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0;
}
.ch-lead { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 6px; }
.ch-lead-sm { font-size: 13px; color: var(--mute); margin: 0 0 14px; max-width: 62ch; }

/* ── Шапка ────────────────────────────────────────────────────────────── */
.ch-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 0 8px;
}
.ch-hero-text { flex: 1; min-width: 0; }
.ch-hero-logo {
  flex: none;
  width: 152px;
  height: 152px;
  object-fit: contain;
  border-radius: var(--r-2xl);
  background: var(--bg-card);
  padding: 10px;
}
.ch-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

.ch-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.ch-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.ch-dot--ok { background: var(--secondary); }
.ch-dot--hot { background: var(--bad); }

/* ── Кнопки ───────────────────────────────────────────────────────────── */
.ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--color-on-primary, #fff);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--accent-hover);
}
.ch-btn:hover { background: var(--accent-hover); box-shadow: none; color: var(--color-on-primary, #fff); }
.ch-btn--sm { min-height: 32px; padding: 0 14px; font-size: 12px; }
.ch-btn--ghost {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--border-strong);
}
.ch-btn--ghost:hover { background: var(--bg-alt); color: var(--ink); }
.ch-btn--hot { background: var(--bad); box-shadow: 0 3px 0 #a03830; }
.ch-btn--hot:hover { background: #a03830; }
/* «Сбор закрыт» — не ссылка, а состояние: нажимать нечего. */
.ch-btn--off { background: #f1eae5; color: var(--mute-soft); box-shadow: none; cursor: default; }

/* ── Секции ───────────────────────────────────────────────────────────── */
.ch-sec { padding: 22px 0; }
.ch-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.ch-more { font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; }

/* ── Карточки позиций ─────────────────────────────────────────────────── */
.ch-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.ch-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 14px;
  box-shadow: var(--shadow-card);
}
.ch-card-photo img,
.ch-card-photo .ph-avatar {
  width: 100%;
  height: 132px;
  border-radius: 12px;
  object-fit: cover;
}
.ch-card-name { font-weight: 600; min-height: 36px; }
.ch-card-mod { font-size: 12px; color: var(--mute); }
.ch-card-price { font-size: 18px; font-weight: 800; }
.ch-card .ch-btn { margin-top: auto; }

/* ── Лоты (прайсы) ────────────────────────────────────────────────────── */
.ch-lots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.ch-lot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--r-2xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.ch-lot.is-urgent { border-color: var(--bad); }
/* Закрытый лот гасим, но НЕ прячем: покупательница должна понимать, что
   закупка была и повторится, а не думать, что страница пустая. */
.ch-lot.is-over { opacity: 0.72; }
.ch-lot-clock {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 6px 12px;
}
.ch-lot-clock.is-urgent { background: var(--bad-soft); color: var(--bad); }
.ch-lot-name { font-family: var(--font-head); font-size: 19px; font-weight: 600; margin: 0; }
.ch-lot-meta { font-size: 12px; color: var(--mute); font-family: var(--font-mono); }
.ch-lot-terms { font-size: 12.5px; color: var(--ink-soft); margin: 0; }
.ch-lot .ch-btn { margin-top: auto; align-self: flex-start; }

/* ── Жизнь коммуны ────────────────────────────────────────────────────── */
.ch-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.ch-tile {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.ch-tile--dark { background: var(--ink); color: #fff; }
.ch-tile--green { background: var(--secondary); color: #fff; }
.ch-tile-v { font-family: var(--font-mono); font-size: 34px; font-weight: 800; line-height: 1.1; }
.ch-tile-l { font-size: 12px; line-height: 1.45; }

.ch-life {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.ch-life-card {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.ch-life-t { font-weight: 700; margin-bottom: 6px; }

/* Заглушка раздела: приглушённая и курсивом — видно, что это не содержимое,
   а обещание. Пустая рамка без подписи читалась бы как поломка. */
.ch-soon { color: var(--mute-soft); font-style: italic; font-size: 12.5px; margin: 0; }

/* ── Фотоотзывы ───────────────────────────────────────────────────────── */
.ch-reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.ch-review {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
  min-height: 120px;
}
.ch-review--cta { background: var(--accent-soft); }

/* ── Контакты ─────────────────────────────────────────────────────────── */
.ch-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.ch-contact {
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.ch-contact-l {
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mute-soft);
  margin-bottom: 4px;
}
.ch-contact-v { font-weight: 600; }
.ch-contact-v a { color: var(--accent); text-decoration: none; }
.ch-about { color: var(--ink-soft); max-width: 78ch; }

/* ── Телефон ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .ch { padding: 0 16px 32px; }
  .ch-hero { flex-direction: column-reverse; align-items: flex-start; gap: 14px; padding-top: 16px; }
  .ch-hero-logo { width: 96px; height: 96px; }
  .ch-h1 { font-size: 26px; }
  .ch-h2 { font-size: 20px; }
  /* Кнопки на телефоне — во всю ширину и высотой под палец (44px). */
  .ch-hero-actions { width: 100%; }
  .ch-hero-actions .ch-btn { flex: 1; min-height: 44px; }
}
