/* Тема BarOn v2 — болотная бирюза и латунь.
   Один файл на весь сайт: правка здесь перекрашивает все страницы сразу.
   Источник палитры: design/BarOn-v2.html, design/BarOn-live.html.
   Отдаётся роутом /theme.css, читается с диска на каждый запрос — правку видно по F5. */

:root {
  /* Сайт пока только светлый. Объявляем явно, иначе у пользователя с тёмной
     системной темой браузер сам перекрасит поля ввода и скроллбары.
     Когда решим делать тёмную версию — тут станет `light dark`, а цвета ниже
     переедут на light-dark(). */
  color-scheme: light;

  /* фон и бумага. --bg и --bg-1 это одно и то же: часть страниц исторически
     зовёт переменную короче, держим оба имени, чтобы не править разметку. */
  --bg: #F5F3EC;
  --bg-1: #F5F3EC;
  --bg-2: #E8EFEA;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-strong: #ffffff;

  /* текст */
  --ink: #1E211F;
  --muted: #68706C;

  /* линии */
  --line: rgba(30, 33, 31, 0.14);
  --line-strong: rgba(30, 33, 31, 0.26);

  /* акценты: кнопка, тёмный текст, вторичный акцент */
  --accent: #1B5A50;
  --accent-deep: #123E38;
  --accent-2: #2A7A6B;

  /* фирменные цвета BarOn */
  --deep: #0C2B27;
  --teal: #123E38;
  --teal2: #1B5A50;
  --teal3: #2A7A6B;
  --mint: #8FC8BC;
  --brass: #C9A24B;
  --brass2: #E0BC66;

  /* галочки, радиокнопки и ползунки в цвете темы вместо браузерного синего.
     Одна строка на весь сайт, свои компоненты вместо штатных не нужны. */
  accent-color: #1B5A50;

  --shadow: 0 16px 40px rgba(12, 43, 39, 0.10);
  --radius: 24px;
  --radius-sm: 16px;
}

/* ================= Общая шапка сайта (site header) =================
   Перенесено из home.html, чтобы внутренние страницы (бренды, city-лендинги)
   несли ту же тёмную шапку BarOn. Разметку вставляет showcase._render_template
   по плейсхолдеру <div class="page">
  <section class="topbar">
    <div class="topbar-row">
      <a class="topbar-link city" href="/">Москва</a>
      <a class="topbar-link" href="tel:+79281756207">+7 (928) 175-62-07</a>
      <a class="topbar-link" href="tel:+79281756207">Заказать звонок</a>
      <a class="topbar-link" href="mailto:sales@example.com">sales@example.com</a>
    </div>
    <div class="topbar-row">
      <a class="topbar-link" href="/cities/msk">О компании</a>
      <a class="topbar-link" href="/buyers/leasing">Покупателю</a>
      <a class="topbar-link" href="/demo/brands">Бренды</a>
      <a class="topbar-link" href="/demo/cart">Контакты</a>
    </div>
  </section>
  <section class="store-header">
    <div class="brand-stack">
      <a class="brand-mark" href="/" style="text-decoration:none">Bar<span class="brand-on">On</span><span class="brand-dot"></span></a>
      <div class="brand-badge"><span>Акция каждый день</span><strong>Подбор, поставка и сопровождение закупки</strong></div>
    </div>
    <div class="header-search-stack">
      <div class="header-search-row">
        <form class="header-search" action="/" method="get">
          <input name="q" type="text" placeholder="Поиск по бренду, модели или типу оборудования" />
          <button type="submit">&#128269;</button>
        </form>
      </div>
      <div class="header-tags">
        <a class="header-tag" href="/demo/catalog-menu" style="text-decoration:none">Каталог под HoReCa</a>
        <a class="header-tag" href="/demo/catalog-menu" style="text-decoration:none">Холодильное оборудование</a>
        <a class="header-tag" href="/demo/catalog-menu" style="text-decoration:none">Линии раздачи</a>
        <a class="header-tag" href="/demo/catalog-menu" style="text-decoration:none">Посудомоечное оборудование</a>
      </div>
    </div>
    <div class="header-actions">
      <a class="header-action icon" href="/" aria-label="Главная">&#128100;</a>
      <a class="header-action icon" href="/demo/brands" aria-label="Бренды">&#128202;</a>
      <a class="header-action icon" href="tel:+79281756207" aria-label="Связаться">&#9825;</a>
      <a class="header-cart" href="/demo/cart"><span>Корзина</span><span class="header-cart-count">Заявка</span></a>
    </div>
  </section>
  <nav class="store-nav">
    <a class="store-nav-item primary" href="/demo/catalog-menu"><span class="store-nav-icon">&#9776;</span><span>Каталог оборудования</span></a>
    <a class="store-nav-item" href="/demo/catalog-menu#all-categories"><span class="store-nav-icon">&#127970;</span><span>По категориям</span></a>
    <a class="store-nav-item" href="/demo/brands"><span class="store-nav-icon">&#9673;</span><span>По брендам</span></a>
    <a class="store-nav-item" href="/buyers/leasing"><span class="store-nav-icon">&#8381;</span><span>Лизинг</span></a>
    <a class="store-nav-item" href="/?discount_only=1&in_stock_only=1"><span class="store-nav-icon">&#10022;</span><span>Товары со скидкой</span></a>
  </nav>
</div>. Все цвета — из переменных выше. */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; min-height: 42px; margin-top: 10px;
  padding: 10px 24px; background: var(--deep);
  border-radius: 26px 26px 0 0; color: var(--mint); font-size: 14px;
}
.topbar-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar-link { color: var(--mint); text-decoration: none; font-weight: 600; }
.topbar-link.city { color: var(--brass2); font-weight: 800; }
.store-header {
  display: grid; grid-template-columns: 330px minmax(0, 1fr) 320px;
  gap: 18px; align-items: center; padding: 18px 24px 24px;
  background: var(--deep); border-radius: 0 0 26px 26px;
  box-shadow: 0 18px 40px rgba(12, 43, 39, 0.28);
}
.brand-stack { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.brand-mark {
  margin: 0; font-family: "Unbounded", "Manrope", sans-serif;
  font-size: clamp(26px, 2.6vw, 40px); white-space: nowrap; display: flex;
  align-items: baseline; line-height: 0.9; letter-spacing: -0.04em;
  font-weight: 600; color: #EDF3F0;
}
.brand-on { color: var(--brass2); text-shadow: 0 0 14px rgba(224, 188, 102, 0.55); }
.brand-dot {
  width: 0.14em; height: 0.14em; border-radius: 50%; background: var(--brass2);
  box-shadow: 0 0 8px rgba(224, 188, 102, 0.9); margin-left: 0.16em; align-self: center;
}
.brand-badge {
  display: grid; flex: 1 1 190px; min-width: 190px; gap: 2px; padding: 14px 16px;
  border-radius: 18px; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(143, 200, 188, 0.3); color: var(--mint);
  font-size: 13px; font-weight: 700;
}
.brand-badge strong { color: #EDF3F0; font-size: 15px; letter-spacing: -0.02em; }
.header-search-stack { display: grid; gap: 12px; }
.header-search-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: center; }
.header-search {
  display: grid; grid-template-columns: minmax(0, 1fr) 78px; min-height: 58px;
  overflow: hidden; border: 2px solid #C9A24B; border-radius: 20px; background: #fff; margin: 0;
}
.header-search input { border: 0; outline: none; padding: 0 18px; font-size: 18px; background: transparent; color: var(--ink); }
.header-search button {
  border: 0; background: linear-gradient(180deg, #E0BC66, #C9A24B);
  color: #0C2B27; font-size: 28px; font-weight: 900; cursor: pointer;
}
.header-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.header-tag {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.82);
  color: #5f6b72; font-size: 13px; font-weight: 700;
}
.header-actions { display: grid; grid-template-columns: repeat(3, 56px) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.header-action, .header-cart {
  display: flex; align-items: center; justify-content: center; min-height: 56px;
  border-radius: 18px; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 800;
}
.header-action.icon { min-width: 56px; padding: 0; font-size: 20px; }
.header-cart { justify-content: center; align-items: flex-start; flex-direction: column; gap: 2px; padding: 0 18px; }
.header-cart-count { color: var(--muted); font-size: 14px; font-weight: 700; }
.store-nav {
  margin-top: 14px; display: grid; grid-template-columns: 320px repeat(4, minmax(0, 1fr));
  gap: 14px; padding: 14px; border-radius: 24px;
  background: linear-gradient(180deg, #123E38, #0C2B27); box-shadow: 0 16px 36px rgba(12, 43, 39, 0.28);
}
.store-nav-item {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px;
  border-radius: 18px; background: transparent; border: 0; color: #8FC8BC;
  text-decoration: none; font-size: 16px; font-weight: 700;
}
.store-nav-item.primary {
  justify-content: flex-start; padding: 0 18px; font-size: 18px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.96); border: 1px solid rgba(53, 66, 73, 0.08); color: var(--ink);
}
.store-nav-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(53, 66, 73, 0.08); font-size: 18px;
}
@media (max-width: 1100px) {
  .store-header { grid-template-columns: 1fr; }
  .header-actions { grid-template-columns: repeat(3, 56px) minmax(140px, 1fr); }
  .store-nav { grid-template-columns: 1fr 1fr; }
  .store-nav-item.primary { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .topbar { padding: 6px 12px; }
  .header-actions { grid-template-columns: 1fr 1fr; }
  .header-cart { grid-column: 1 / -1; }
  .store-nav { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar-row { gap: 10px; }
  .header-search { grid-template-columns: minmax(0, 1fr) 68px; }
  .header-search input { font-size: 16px; }
}
