/* Шрифты локально (не с Google): 152-ФЗ — без передачи IP посетителей за рубеж, и быстрее без VPN.
   Скачано 2026-09-25 с fonts.googleapis.com (лицензия SIL OFL). */
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/oswald-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/oswald-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/oswald-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/oswald-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/oswald-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/oswald-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =====================================================================
   ФАЙЛ 1. ЦВЕТА И ШРИФТЫ
   Здесь меняются цвета и шрифты всего сайта. Хотите другой жёлтый или
   другой оттенок фона? Поменяйте значение вида #f0d77e и сохраните файл.
   Код цвета можно подобрать на сайте htmlcolorcodes.com
   ===================================================================== */

:root {

  /* ---------- Фирменные цвета (одинаковые всегда) ---------- */
  --black:  #000000;   /* основной чёрный: шапка, подвал, главный экран */
  --yellow: #f0d77e;   /* мягкий жёлтый: кнопки и акценты */
  --gold:   #c99a3a;   /* золотой из логотипа: мелкие детали */

  /* ---------- Светлые разделы сайта (обычный режим) ---------- */
  --bg:          #e5e1d8;   /* фон страницы (цвет бетона) */
  --surface:     #f1eee7;   /* фон карточек и полей ввода */
  --ink:         #141414;   /* цвет основного текста */
  --muted:       #57544c;   /* цвет второстепенного текста */
  --line:        #b9b4a6;   /* тонкие линии */
  --line-strong: #141414;   /* тёмные линии и рамки */
  --focus:       #141414;   /* обводка при выборе клавишей Tab */
  --err:         #a3261d;   /* цвет ошибок */
  --ok:          #2f7a3f;   /* зелёный квадратик «в наличии» */

  /* ---------- Текст на чёрном фоне ---------- */
  --on-dark:       #eceae3;   /* основной светлый текст */
  --on-dark-muted: #a8a69c;   /* второстепенный светлый текст */
  --dark-line:     #2c2c2a;   /* линии на чёрном */

  /* ---------- Шрифты ---------- */
  /* Oswald (узкий, плакатный) — только крупные заголовки h1/h2, первый экран,
     большие цифры (css/22-polish.css). Всё остальное — Onest: названия
     товаров, плиток, кнопки, мелкие подзаголовки и текст. */
  --f-display: 'Oswald', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;   /* крупные заголовки */
  --f-head: 'Onest', 'Segoe UI', Roboto, Arial, sans-serif;                        /* подзаголовки, названия */
  --f-body: 'Onest', 'Segoe UI', Roboto, Arial, sans-serif;                        /* обычный текст */
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;                    /* артикулы */
}

/* ---------------------------------------------------------------------
   Тёмная тема. Включается сама, если у посетителя тёмный режим в системе.
   Не нужна — удалите два блока ниже, сайт всегда будет светлым.
   --------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0d;
    --surface: #171716;
    --ink: #ece9e0;
    --muted: #a3a094;
    --line: #34332f;
    --line-strong: #ece9e0;
    --focus: #f0d77e;
    --err: #ff8b7f;
    --ok: #6fcf86;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e0d;
  --surface: #171716;
  --ink: #ece9e0;
  --muted: #a3a094;
  --line: #34332f;
  --line-strong: #ece9e0;
  --focus: #f0d77e;
  --err: #ff8b7f;
  --ok: #6fcf86;
}

/* =====================================================================
   ФАЙЛ 2. ОБЩЕЕ ДЛЯ ВСЕХ СТРАНИЦ
   Сброс, шрифт, контейнер, кнопки, поля ввода. Тут живут «кирпичики», которые повторяются по всему сайту.
   ===================================================================== */

/* Сброс: размеры блоков считаются вместе с рамками */
*,*::before,*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Общий вид страницы: фон, цвет и шрифт текста.
   overflow-x: hidden — подстраховка от горизонтальной прокрутки всей
   страницы, если где-то узкий экран не влезет ряд шапки или другой блок. */
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--f-body);
  transition: background .2s;
}

/* Страница в цвете бренда — два фирменных цвета, а не один на всю
   страницу: шапка (css/3-header.css) красится в основной цвет бренда
   (var(--yellow)), а фон страницы — во ВТОРОЙ фирменный цвет именно
   этого производителя (var(--brand-bg), поле bg в MAKER_BRANDS,
   js/data.js): у Ростсельмаша это белый, у John Deere — жёлтый и т.д.,
   у каждого бренда свой, а не один общий цвет на все страницы.

   ВАЖНО: если у посетителя в системе включена тёмная тема, ниже в этом
   же файле есть блок @media(prefers-color-scheme:dark), который на
   обычных страницах красиво красит весь сайт в тёмное (это сделано
   специально). Но брендовые цвета выше — светлые (белый/жёлтый/т.п.),
   и рассчитаны на обычный тёмный текст (var(--ink)) — а не на светлый
   var(--ink), который подставляет тёмная тема. Поэтому на брендовой
   странице принудительно фиксируем «светлую» палитру текста/карточек
   отдельно от системной темы — иначе на тёмной теме получится светлый
   текст на светлом фоне (именно это и было в присланных скриншотах). */
body.themed {
  background: var(--brand-bg, var(--bg));
  --ink: #141414;
  --surface: #f1eee7;
  --muted: #57544c;
  --line: #b9b4a6;
  --line-strong: #141414;
  --err: #a3261d;
  --ok: #2f7a3f;
}

img,svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,h2,h3 {
  font-family: var(--f-head);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: .005em;
}

p {
  margin: 0;
}

main:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Класс «тёмный блок»: чёрный фон и светлый текст (шапка, подвал, главный экран) */
.dark {
  background: var(--black);
  color: var(--on-dark);
  --focus: var(--yellow);
}

/* Контейнер: держит содержимое по центру и ограничивает ширину */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(1rem,3vw,2rem);
  padding-right: clamp(1rem,3vw,2rem);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ic {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  flex: none;
}

.hidden,[hidden] {
  display: none!important;
}

/* ---------- Поля ввода, списки, подписи ---------- */
/* Все поля ввода и выпадающие списки */
:where(input,select,textarea) {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: .62rem .7rem;
  width: 100%;
  border-radius: 0;
}

:where(input[type=checkbox],input[type=radio]) {
  width: auto;
  accent-color: var(--ink);
}

:where(label) {
  display: block;
  font-size: .86rem;
  margin-bottom: .3rem;
}

.dark :where(input,select,textarea) {
  background: #0a0a09;
  color: var(--on-dark);
  border-color: #454542;
}

.dark ::placeholder {
  color: #7f7d75;
}

/* Жёлтая кнопка — на странице каталога, перекрашенной под бренд
   (см. js/view-catalog.js), --yellow и --btn-ink переопределены
   цветами производителя, поэтому кнопка меняет цвет автоматически */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--yellow);
  color: var(--btn-ink,#141414);
  border: 1px solid var(--btn-ink,#141414);
  padding: .68rem 1.15rem;
  font: 600 .95rem var(--f-body);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}

.btn:hover {
  background: #f7e49f;
}

.dark .btn {
  border-color: var(--yellow);
}

.btn.wide {
  width: 100%;
}

/* Кнопка-контур (второстепенная) */
.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn-ghost:hover {
  background: rgba(127,127,127,.15);
}

/* Кнопка, которая выглядит как ссылка (например, «Удалить») */
.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
}


/* =====================================================================
   ФАЙЛ 3. ШАПКА САЙТА
   Жёлтая полоска, логотип, поиск, кнопка «Корзина», меню.
   ===================================================================== */

/* ---------- Жёлтая полоска сверху ---------- */
/* Жёлтая полоска сверху (текст меняется в js/config.js) */
.proto {
  background: var(--yellow);
  color: var(--btn-ink,#141414);
  font-size: .8rem;
  text-align: center;
  padding: .3rem 1rem;
}

/* ---------- Шапка сайта: минималистичная ---------- */
/* Шапка держится наверху при прокрутке; когда она "minimal" (новый дизайн
   главной), у неё вовсе нет своего фона — видно фото главного экрана,
   которое «заходит» под шапку (см. .hero-photo в css/4-home.css).        */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--dark-line);
}

.site-head.minimal {
  background: transparent;
  border-bottom-color: transparent;
  transition: background .25s, border-color .25s;
}

/* Фото главного экрана уехало вверх — шапка снова сплошная (js/router.js) */
.site-head.minimal.scrolled {
  background: var(--black);
  border-bottom-color: var(--dark-line);
}

/* Единственная строка шапки: логотип — меню — поиск/аккаунт/корзина */
.head-row {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
}

/* Логотип в шапке (картинки лежат в папке images) */
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  flex: none;
}

.brand .m {
  height: 40px;
  width: auto;
}

.brand .w {
  height: 16px;
  width: auto;
}

/* Вертикальная разделительная линия между логотипом и слоганом */
.brand-div {
  width: 1px;
  align-self: stretch;
  min-height: 2rem;
  margin: 0 .15rem;
  background: rgba(255,255,255,.28);
}

/* Слоган справа от разделителя — двумя строками, капсом */
.brand-tag {
  display: block;
  max-width: 9.2rem;
  font: 500 .64rem/1.4 var(--f-body);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

/* Меню по центру шапки: Каталог, Доставка и оплата, Контакты */
.nav-mid {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  font-size: .93rem;
  margin: 0 auto;
}

.nav-mid a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  text-decoration: none;
  color: var(--on-dark);
  font-weight: 500;
  padding: .2rem 0;
  white-space: nowrap;
  transition: color .15s, opacity .15s;
  opacity: .92;
}

.nav-mid a:hover,.nav-mid a[aria-current=page] {
  color: var(--yellow);
  opacity: 1;
}

.nav-mid .chev {
  font-size: .7em;
  line-height: 1;
  opacity: .75;
  transform: translateY(1px);
}

/* ---------- Выпадающее меню «Каталог» ----------
   Кнопка со стрелкой открывает окошко с 4 плитками. На компьютере —
   по наведению и по клику, на телефоне — по нажатию (js/events.js). */
.nav-dd {
  position: relative;
}

.nav-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 500;
  color: var(--on-dark);
  opacity: .92;
  cursor: pointer;
  transition: color .15s, opacity .15s;
}

.nav-dd-btn:hover,
.nav-dd-btn[aria-current=page],
.nav-dd.open .nav-dd-btn {
  color: var(--yellow);
  opacity: 1;
}

.nav-dd-btn .chev {
  transition: transform .15s;
}

.nav-dd.open .nav-dd-btn .chev {
  transform: translateY(1px) rotate(180deg);
}

.nav-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + .7rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .5rem;
  width: 22rem;
  padding: .6rem;
  background: #0c0c0c;
  border: 1px solid rgba(240,215,126,.35);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

/* невидимый «мостик» между кнопкой и окошком, чтобы меню не закрывалось,
   пока мышь едет от слова «Каталог» к плиткам */
.nav-dd-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -.8rem;
  height: .8rem;
}

.nav-dd.open .nav-dd-menu {
  display: grid;
}

@media (hover:hover) {
  .nav-dd:hover .nav-dd-menu {
    display: grid;
  }
}

.nav-dd-menu a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: .8rem .85rem;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--on-dark);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
  transition: border-color .15s, background .15s, color .15s;
}

.nav-dd-menu a:hover {
  border-color: var(--yellow);
  background: rgba(240,215,126,.08);
  color: var(--yellow);
}

.nav-dd-menu .ic {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--yellow);
}

/* картинки комбайна/трактора — чёрный контур, на тёмном окошке
   перекрашиваем в светлый */
.nav-dd-menu img {
  width: 2.2rem;
  height: 1.6rem;
  object-fit: contain;
  object-position: left center;
  filter: invert(1);
}

.nav-dd-menu small {
  font-size: .68rem;
  font-weight: 400;
  color: var(--on-dark-muted);
}

/* Правая группа: поиск (сворачиваемый), аккаунт, корзина. margin-left:auto
   держит её у правого края, даже когда nav-mid переносится на отдельную
   строку на телефоне и больше не расталкивает соседей своими отступами. */
.head-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex: none;
  margin-left: auto;
}

/* Раскрывающийся блок поиска: по умолчанию скрыт (width:0), кнопка
   search-toggle раскрывает его вправо от иконки-лупы */
.hsearch {
  display: flex;
  width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width .22s ease, max-width .22s ease, opacity .18s ease;
}

.hsearch.open {
  width: 20rem;
  max-width: 46vw;
  opacity: 1;
}

.hsearch input {
  flex: 1;
  min-width: 0;
}

.hsearch .btn {
  flex: none;
}

/* Кнопка-лупа: простой круглый контур вокруг иконки, как на референсе */
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1.5px solid rgba(236,234,227,.55);
  border-radius: 50%;
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
  flex: none;
  transition: color .15s, border-color .15s;
}

.search-toggle:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.search-toggle .ic {
  width: 1.1rem;
  height: 1.1rem;
}

.search-toggle .ic-close {
  display: none;
}

.search-toggle[aria-expanded=true] .ic-search {
  display: none;
}

.search-toggle[aria-expanded=true] .ic-close {
  display: block;
}

/* Кнопка «Корзина» (со счётчиком) и кнопка «Админка» — срезанные углы
   (сверху слева и снизу справа), золотая рамка, как на референсном фото.
   Приём с двумя слоями: внешний <a> — сплошная жёлтая «рамка»-подложка
   того же среза, внутренний <span> — тёмная заливка того же среза,
   отступ в 1.5px между ними даёт вид тонкой золотой обводки по всем
   сторонам, включая срезанные углы. Обе кнопки используют один приём —
   .adminlink(-in) просто без иконки и счётчика. */
.cartlink,.adminlink {
  --cut: 10px;
  display: inline-flex;
  padding: 1.5px;
  background: var(--yellow);
  clip-path: polygon(var(--cut) 0,100% 0,100% calc(100% - var(--cut)),calc(100% - var(--cut)) 100%,0 100%,0 var(--cut));
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}

.cartlink-in,.adminlink-in {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1.1rem;
  background: rgba(10,10,10,.55);
  clip-path: polygon(var(--cut) 0,100% 0,100% calc(100% - var(--cut)),calc(100% - var(--cut)) 100%,0 100%,0 var(--cut));
  color: var(--on-dark);
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}

.cartlink:hover .cartlink-in,
.adminlink:hover .adminlink-in {
  background: var(--yellow);
  color: var(--btn-ink,#141414);
}

.cartlink:hover b {
  background: var(--btn-ink,#141414);
  color: var(--yellow);
}

.cartlink .ic {
  font-size: 1.2rem;
}

.cartlink b {
  background: var(--yellow);
  color: var(--btn-ink,#141414);
  min-width: 1.4rem;
  padding: 0 .35rem;
  border-radius: 999px;
  text-align: center;
  font: 600 .78rem/1.4rem var(--f-body);
  transition: background .15s, color .15s;
}

/* ---------- Шапка в цвете бренда ---------- */
/* Когда на странице каталога выбран производитель техники, js/view-catalog.js
   ставит класс .themed и переменные --yellow/--btn-ink на document.body —
   ниже шапка целиком перекрашивается в те же цвета вместо обычной чёрной.
   Кнопка «Найти» и цифра на «Корзине» красим «наоборот» (--btn-ink фоном),
   иначе они сольются с одноцветной шапкой.                                */
body.themed .site-head {
  background: var(--yellow);
  color: var(--btn-ink);
  border-bottom-color: rgba(0,0,0,.18);
  transition: background .2s, color .2s;
}

body.themed .site-head .nav-mid > a,
body.themed .site-head .nav-dd-btn {
  color: var(--btn-ink);
  opacity: .7;
}

body.themed .site-head .nav-dd-btn:hover,
body.themed .site-head .nav-dd-btn[aria-current=page],
body.themed .site-head .nav-dd.open .nav-dd-btn,
body.themed .site-head .nav-mid > a:hover,
body.themed .site-head .nav-mid > a[aria-current=page] {
  opacity: 1;
  color: var(--btn-ink);
}

body.themed .site-head .search-toggle,
body.themed .site-head .acc-btn {
  color: var(--btn-ink);
  border-color: rgba(0,0,0,.35);
}

body.themed .site-head .search-toggle:hover,
body.themed .site-head .acc-btn:hover {
  color: var(--btn-ink);
  border-color: var(--btn-ink);
}

body.themed .site-head .cartlink:hover .cartlink-in,
body.themed .site-head .adminlink:hover .adminlink-in {
  background: var(--btn-ink);
}

body.themed .site-head .cartlink:hover .cartlink-in,
body.themed .site-head .cartlink:hover b,
body.themed .site-head .adminlink:hover .adminlink-in {
  color: var(--yellow);
}

body.themed .site-head .btn {
  background: var(--btn-ink);
  color: var(--yellow);
}


/* =====================================================================
   ФАЙЛ 4. ГЛАВНАЯ СТРАНИЦА
   Чёрный главный экран, поиск запчастей, полоска производителей, плитки категорий.
   ===================================================================== */

/* ---------- Главный экран: фото техники в поле ----------
   Фото — images/hero-banner.jpg (промт для генерации в README.md). Пока
   файла нет, вместо него просто виден тёмный градиент — ничего не ломается,
   <img> здесь не используется специально, чтобы не было «битой» картинки. */
.hero-photo {
  position: relative;
  overflow: hidden;
  min-height: clamp(420px,62vw,720px);
  /* поднимаем фон на высоту шапки вверх (margin) и тут же возвращаем
     отступ содержимому (padding) — фото оказывается на всю высоту под
     прозрачной шапкой, а текст остаётся на прежнем месте */
  margin-top: calc(var(--head-h,84px) * -1);
  padding-top: var(--head-h,84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg,rgba(0,0,0,.86) 0%,rgba(0,0,0,.55) 46%,rgba(0,0,0,.25) 100%),
    linear-gradient(0deg,rgba(0,0,0,.75) 0%,rgba(0,0,0,0) 34%),
    url('../images/hero-banner.jpg') center/cover no-repeat,
    var(--black);
}

.hero-in2 {
  /* явно на всю ширину — без этого в колоночном flex-контейнере (.hero-photo)
     блок иногда сжимался по содержимому и «уезжал» в центр экрана вместо
     того, чтобы начинаться от того же левого края, что и шапка */
  width: 100%;
  padding-top: clamp(2.5rem,6vw,4.5rem);
  padding-bottom: clamp(6rem,10vw,8rem);
}

/* вторая строка-надпись «Эксклюзивный импортёр ремней Turboflex» —
   тем же шрифтом и цветом, что «Запчасти и комплектующие…» */
.hero-in2 .eyebrow-ex {
  margin-top: -.3rem;
}
.hero-in2 .eyebrow-ex b {
  color: var(--yellow);
  font-weight: 600;
}

.hero-in2 .eyebrow {
  color: var(--on-dark-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .82rem;
  margin-bottom: .9rem;
}

/* Большой заголовок на главной */
.hero h1 {
  font-size: clamp(2.6rem,6.6vw,5.2rem);
  font-weight: 700;
  line-height: 1.02;
  text-transform: uppercase;
  max-width: 12ch;
}

.hero h1 .accent {
  color: var(--yellow);
}

.hero .lead {
  color: var(--on-dark-muted);
  max-width: 40ch;
  margin: 1.2rem 0 1.8rem;
  font-size: 1.08rem;
}

.btn-lg {
  padding: .9rem 1.6rem;
  font-size: 1rem;
}

/* Плашки преимуществ внизу фото — полупрозрачная тёмная полоса */
.hero-badges {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1.2rem;
  /* только сверху/снизу: боковые отступы — от .wrap, как у текста выше */
  padding-top: 1.1rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: auto;
}

.hb {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .2rem 0;
}

.hb .ic {
  font-size: 1.7rem;
  color: var(--yellow);
  flex: none;
}

.hb strong {
  display: block;
  font: 600 .92rem var(--f-body);
  color: var(--on-dark);
}

.hb small {
  display: block;
  color: var(--on-dark-muted);
  font-size: .78rem;
}

/* Панель поиска запчастей: «наплывает» на стык главного экрана и
   следующего блока — тот же .finder, что был в героe, только приподнят */
.finder-float {
  margin-top: clamp(1.6rem,3vw,2.4rem);
  margin-bottom: clamp(2rem,4vw,3rem);
  position: relative;
  z-index: 2;
}

/* Панель поиска запчастей со срезанным углом */
.finder {
  position: relative;
  background: #111;
  padding: 1.2rem 1.3rem 1.4rem;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  clip-path: polygon(0 0,calc(100% - 22px) 0,100% 22px,100% 100%,0 100%);
}

.finder::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--yellow);
}

/* Вкладки «По артикулу» и «По технике» */
.tabs {
  display: flex;
  gap: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #2c2c2a;
}

.tabs button {
  background: none;
  border: 0;
  color: var(--on-dark-muted);
  font: 500 1rem var(--f-body);
  padding: .5rem 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs button[aria-selected=true] {
  color: var(--on-dark);
  border-bottom-color: var(--yellow);
}

.row {
  display: flex;
}

.row input {
  flex: 1;
  min-width: 0;
}

.row .btn {
  flex: none;
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}

.hint {
  margin-top: .8rem;
  font-size: .85rem;
  color: var(--on-dark-muted);
}

.hint a {
  color: var(--on-dark);
}

/* Полоска «Эксклюзивный импортёр» — внизу главного экрана, прямо на фото
   (без своего фона), отделена от плашек преимуществ тонкой линией */
.hero-ex {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.6rem;
  padding-top: 1rem;
  padding-bottom: 1.3rem;
  border-top: 1px solid rgba(255,255,255,.14);
}
.hero-ex .ex-label {
  color: var(--on-dark-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .74rem;
  line-height: 1.35;
}
.hero-ex .ex-logo {
  height: 34px;
  width: auto;
  display: block;
}
.hero-ex .ex-div {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,.18);
}
/* кнопки у логотипа: прозрачная «Каталог» и круглая стрелка (история бренда) */
.hero-ex .ex-btns { display: inline-flex; align-items: center; gap: .6rem; }
.hero-ex .ex-cat {
  padding: .45rem 1rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 3px;
  background: transparent;
  color: var(--on-dark);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.hero-ex .ex-go {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--yellow);
  border-radius: 50%;
  color: var(--yellow);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.hero-ex .ex-cat:hover { border-color: var(--yellow); color: var(--yellow); }
.hero-ex .ex-go:hover { background: var(--yellow); color: #000; }

/* плашки преимуществ теперь не последние — убираем лишний нижний отступ */
.hero-badges + .hero-ex {
  margin-top: 0;
}

/* Полоска со списком производителей техники (сейчас на главной не выводится) */
.makers {
  border-top: 1px solid var(--dark-line);
}

.makers .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.makers span {
  color: var(--on-dark-muted);
  font-size: .9rem;
}

.makers a {
  font-family: var(--f-head);
  font-size: 1.15rem;
  text-decoration: none;
}

.makers a:hover {
  color: var(--yellow);
}

/* Плитки производителей техники — каждая в цветах своего бренда:
   цвет задаётся переменными --mk (фон) и --mk-ink (цвет текста/кружка)
   прямо в html через style="" в js/view-home.js */
.mkbrands {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 1rem;
}

.mkb {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: var(--mk);
  color: var(--mk-ink);
  text-decoration: none;
  overflow: hidden;
}

/* Логотип бренда: белая карточка-подложка — у части логотипов (CLAAS,
   Ростсельмаш, Case IH) свой непрозрачный белый фон в самом файле, а у
   John Deere/New Holland фон прозрачный — единая светлая подложка делает
   все пять карточек одинаковыми по виду независимо от исходного файла. */
.mkb-logo {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  padding: .35rem;
  flex: none;
}

.mkb-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mkb strong {
  font: 600 1.02rem var(--f-head);
  line-height: 1.15;
}

.mkb .soon {
  position: absolute;
  top: .55rem;
  right: .65rem;
  font-size: .66rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  color: #fff;
}

/* Производитель «скоро» (soon: true в js/data.js): приглушённая плитка,
   без наведения и без перехода */
.mkb.is-soon {
  cursor: default;
  filter: grayscale(.85);
  opacity: .45;
}

.mkb.is-soon:hover {
  transform: none;
  box-shadow: none;
}

.mkb.is-soon .soon {
  background: rgba(0,0,0,.6);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* То же в полоске «Подбираем запчасти для …» */
.makers .mk-soon {
  font-family: var(--f-head);
  font-size: 1.15rem;
  color: var(--on-dark-muted);
  opacity: .55;
  cursor: default;
}

.makers .mk-soon small {
  font-family: var(--f-body);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Общие секции и плитки категорий ---------- */
/* Общий вертикальный отступ секций */
.sec {
  padding: clamp(2.5rem,6vw,4.5rem) 0;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.sec h2 {
  font-size: clamp(1.7rem,3vw,2.3rem);
}

.sec-head a {
  font-size: .95rem;
}

/* Сетка плиток категорий */
.cats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

/* Одна плитка категории (при наведении становится чёрной) */
.cat {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.3rem 1.2rem 1.2rem;
  text-decoration: none;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transition: background .15s,color .15s;
}

.cat .ic {
  font-size: 2rem;
}

.cat strong {
  font: 600 1.25rem var(--f-head);
}

.cat small {
  color: var(--muted);
  font-size: .85rem;
}

.cat:hover {
  background: #000;
  color: var(--on-dark);
}

.cat:hover .ic {
  color: var(--yellow);
}

.cat:hover small {
  color: var(--on-dark-muted);
}


/* Узел без товаров («скоро»): серая плитка без наведения и перехода.
   Как только в узел загрузят товары, плитка станет обычной ссылкой. */
.cat.is-soon,
.cat.is-soon.reveal.in {
  cursor: default;
  opacity: .45;
}
.cat.is-soon:hover {
  background: none;
  color: inherit;
}
.cat.is-soon:hover .ic { color: inherit; }
.cat.is-soon small {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .72rem;
}

/* =====================================================================
   ФАЙЛ 5. КАРТОЧКИ ЗАПЧАСТЕЙ
   Как выглядит одна запчасть в списке (на главной и в каталоге).
   ===================================================================== */

/* ---------- Карточки запчастей ---------- */
/* Сетка карточек: тонкие линии между карточками */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.empty {
  grid-column: 1/-1;
  background: var(--surface);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty p {
  margin-bottom: 1rem;
  color: var(--muted);
}

/* Одна карточка запчасти */
.part {
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

/* Тёмная плашка «Фото скоро» (пока нет реальных фото) */
.plate {
  position: relative;
  aspect-ratio: 4/3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .5rem;
  background-color: #0d0d0c;
  color: var(--yellow);
  text-decoration: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
  background-size: 24px 24px;
}

.plate .ic {
  font-size: 3.2rem;
}

.plate small {
  color: var(--on-dark-muted);
  font-size: .78rem;
}

/* Текстовая часть карточки под плашкой */
.part-body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex: 1;
}

/* Артикул (моноширинным шрифтом) */
.art {
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--muted);
}

.part h3 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0;
}

.part h3 a {
  text-decoration: none;
}

.part h3 a:hover {
  text-decoration: underline;
}

.fits {
  font-size: .85rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Нижняя часть карточки: цена, кнопка, наличие */
.buy {
  margin-top: auto;
  padding-top: .7rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem .8rem;
  align-items: end;
}

/* Цена */
.price {
  font: 600 1.35rem var(--f-head);
}

.price small {
  font: 400 .8rem var(--f-body);
  color: var(--muted);
}

/* Строка «В наличии / Под заказ» */
.stock {
  font-size: .82rem;
  grid-column: 1/-1;
  color: var(--muted);
}

.stock::before {
  content: "";
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-right: .4rem;
  background: var(--ok);
}

.stock.no::before {
  background: var(--gold);
}


/* Когда у товара появится фото (поле photo в js/data.js), оно заполнит плашку */
.plate.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================================
   ФАЙЛ 6. БАННЕР И «КАК ЗАКАЗАТЬ»
   Чёрный баннер «Не нашли деталь?» и четыре шага заказа на главной.
   ===================================================================== */

/* ---------- Баннер «Не нашли деталь?» ---------- */
/* Чёрный баннер «Не нашли деталь?» со срезанным углом */
.banner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background: #000;
  color: var(--on-dark);
  --focus: var(--yellow);
  clip-path: polygon(0 0,calc(100% - 36px) 0,100% 36px,100% 100%,0 100%);
}

.banner .txt {
  padding: clamp(1.6rem,4vw,3rem);
}

.banner h2 {
  font-size: clamp(1.6rem,3vw,2.4rem);
  margin-bottom: .8rem;
}

.banner p {
  color: var(--on-dark-muted);
  max-width: 44ch;
  margin-bottom: 1.4rem;
}

/* Картинка баннера (техника в поле) */
.banner .img {
  min-height: 240px;
  border-left: 3px solid var(--yellow);
  overflow: hidden;
}

.banner .img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Блок «Как заказать» (4 шага) ---------- */
/* Четыре шага «Как заказать» */
.steps {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1.5rem;
}

.step {
  border-top: 1px solid var(--dark-line);
  padding-top: 1.2rem;
}

/* Большая жёлтая цифра шага */
.step b {
  font: 700 3rem/1 var(--f-head);
  color: var(--yellow);
  display: block;
  margin-bottom: .7rem;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: .4rem;
}

.step p {
  color: var(--on-dark-muted);
  font-size: .95rem;
}


/* =====================================================================
   ФАЙЛ 7. ПОДВАЛ САЙТА
   Нижняя чёрная часть страницы с контактами.
   ===================================================================== */

/* ---------- Подвал сайта ---------- */
/* Подвал сайта */
.site-foot {
  padding: 2.5rem 0 2rem;
  border-top: 3px solid var(--yellow);
}

/* Три колонки подвала */
.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.site-foot h3 {
  font-size: 1.05rem;
  margin-bottom: .7rem;
  color: var(--yellow);
}

.site-foot p,.site-foot a {
  color: var(--on-dark-muted);
  font-size: .92rem;
  text-decoration: none;
  display: block;
  margin: .25rem 0;
}

.site-foot a:hover {
  color: var(--on-dark);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .8rem;
}

.foot-brand .m {
  height: 52px;
  width: auto;
}

.foot-brand .w {
  height: 19px;
  width: auto;
}

/* Нижняя строка с реквизитами */
.legal {
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dark-line);
  font-size: .82rem;
  color: var(--on-dark-muted);
}

.legal:first-of-type {
  margin-top: 2rem;
}

.legal + .legal {
  margin-top: 0;
  padding-top: .3rem;
  border-top: 0;
}

.legal a {
  color: var(--on-dark-muted);
  text-decoration: underline;
  margin-left: .6rem;
  white-space: nowrap;
}

.legal a:hover {
  color: var(--on-dark);
}


/* =====================================================================
   ФАЙЛ 8. КАТАЛОГ
   Страница каталога: фильтры слева, товары справа.
   ===================================================================== */

/* ---------- Внутренние страницы: каталог с фильтрами ---------- */
/* Общий отступ внутренних страниц. Только сверху и снизу — боковые
   отступы задаёт .wrap (css/2-base.css); раньше здесь было
   padding: 1.6rem 0 4rem, и этот «0» обнулял боковые поля — на телефоне
   текст всех внутренних страниц прилипал к краям экрана. */
.page {
  padding-top: 1.6rem;
  padding-bottom: 4rem;
}

/* Хлебные крошки («Главная / Каталог») */
.crumbs {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.crumbs a {
  color: var(--muted);
  transition: color .15s;
}

.crumbs a:hover {
  color: var(--ink);
}

body.themed .crumbs a:hover {
  color: var(--yellow);
}

.page h1 {
  font-size: clamp(1.9rem,3.4vw,2.6rem);
  margin-bottom: 1.4rem;
  transition: border-color .2s;
}

/* ---------- Страница «Категории» (js/view-categories.js) ---------- */
.sec-lead {
  color: var(--muted);
  margin: -.8rem 0 1.8rem;
  max-width: 60ch;
}

.cat-group-h {
  font-size: 1.15rem;
  margin: 0 0 .9rem;
}

.cat-group-h:not(:first-of-type) {
  margin-top: 2rem;
}

/* ---------- Плашка активного фильтра на странице каталога (когда
   категория/тип пришли по ссылке со страницы «Категории») ---------- */
.active-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
  padding: .8rem 1.1rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: .7rem;
  background: var(--surface);
}

.active-filter span {
  font-weight: 600;
}

.active-filter a {
  color: var(--muted);
  text-decoration: underline;
  font-size: .92rem;
}

.active-filter a:hover {
  color: var(--ink);
}

/* Страница каталога в цвете бренда — когда выбран производитель техники
   (js/view-catalog.js подставляет цвета из MAKER_BRANDS в js/data.js
   через переменные --yellow/--btn-ink на document.body — так же красится
   и шапка сайта, см. css/3-header.css). Ниже — где именно эти цвета
   проявляются в самом каталоге, помимо кнопок (.btn берёт var(--yellow)
   сам, см. css/2-base.css). */
body.themed .page h1 {
  padding-left: 1rem;
  border-left: .35rem solid var(--yellow);
}

body.themed .filters {
  border-color: var(--yellow);
}

body.themed .f-toggle::after {
  border-color: var(--yellow);
}

body.themed :where(input[type=checkbox]) {
  accent-color: var(--yellow);
}

body.themed .page :where(input,select) {
  border-color: var(--yellow);
}

/* Кольцо фокуса (Tab по клавиатуре) — тоже в цвет бренда на этой странице */
body.themed .page {
  --focus: var(--yellow);
}

/* Карточка товара: тень и заголовок при наведении — в цвет бренда */
body.themed .part:hover {
  box-shadow: 0 14px 28px color-mix(in srgb, var(--yellow) 35%, transparent);
}

body.themed .part h3 a:hover {
  color: var(--yellow);
}

body.themed .fbody::-webkit-scrollbar-thumb {
  background: var(--yellow);
}

body.themed .fbody {
  scrollbar-color: var(--yellow) transparent;
}

/* Две колонки: слева фильтры, справа товары */
.catalog {
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  gap: 2rem;
  align-items: start;
}

/* Панель фильтров слева: «прилипает» под шапкой и сама прокручивается,
   если списком узлов не помещается на экран — чтобы не листать всю
   страницу ради кнопки «Сбросить фильтры» внизу списка */
/* Раньше это был <details>/<summary> — убрали: в новых версиях Chrome у
   <details> появился свой внутренний блок содержимого, который отказывается
   сжиматься внутри flex-колонки, из-за чего список вылезал за рамку.
   Теперь раскрытие/закрытие — обычная кнопка (.f-toggle) под полным
   контролем нашего CSS/JS. */
.filters {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: sticky;
  top: 9rem;
  max-height: calc(100vh - 10.5rem);
  overflow: hidden;   /* подстраховка: ничего не может вылезти за рамку блока */
  display: flex;
  flex-direction: column;
}

.filters .f-toggle {
  padding: .8rem 1rem;
  font: 600 1.1rem var(--f-head);
  color: var(--ink);
  background: none;
  border: 0;
  width: 100%;
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  user-select: none;
}

/* Своя стрелка справа от «Фильтры»: смотрит вниз закрытой, вверх открытой */
.filters .f-toggle::after {
  content: '';
  flex: none;
  width: .6rem;
  height: .6rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-top: -.25rem;
}

.filters.open .f-toggle::after {
  transform: rotate(-135deg);
  margin-top: .25rem;
}

/* Тело фильтров показываем только когда панель раскрыта */
.filters .fbody {
  display: none;
}

.filters.open .fbody {
  padding: 0 1rem 1rem;
  display: grid;
  align-content: start;
  gap: 1rem;
  overflow-y: auto;
  min-height: 0;   /* без этого flex-блок отказывается сжиматься и вылезает за пределы .filters */
  /* видимый тонкий скроллбар — чтобы было понятно, что список можно прокрутить,
     а не что он обрезан */
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.fbody::-webkit-scrollbar {
  width: 8px;
}

.fbody::-webkit-scrollbar-track {
  background: transparent;
}

.fbody::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.fbody fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .4rem;
}

.fbody legend {
  padding: 0;
  font-size: .86rem;
  margin-bottom: .3rem;
}

.chk {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .92rem;
  margin: 0;
}

/* ---------- Категория (узел) в фильтрах: кнопка «как выпадающий
   список» + раскрывающийся под ней список галочек (js/view-catalog.js) ---------- */
.cat-dd > label {
  display: block;
  font-size: .86rem;
  margin-bottom: .35rem;
}

/* Кнопка выглядит так же, как соседние <select> (рамка, отступы, стрелка) */
.cat-dd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  padding: .62rem .7rem;
  font: inherit;
  text-align: left;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  cursor: pointer;
}

.cat-dd-btn.has-value {
  color: var(--ink);
}

.cat-dd-btn::after {
  content: '';
  flex: none;
  width: .45rem;
  height: .45rem;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  margin-top: -.2rem;
  transition: transform .15s;
}

.cat-dd.open .cat-dd-btn::after {
  transform: rotate(-135deg);
  margin-top: .2rem;
}

body.themed .cat-dd-btn {
  border-color: var(--yellow);
}

/* Раскрытый список галочек — прямо под кнопкой */
.cat-filter-list {
  margin-top: .5rem !important;
  padding: .7rem .7rem .8rem !important;
  border: 1px solid var(--line) !important;
  /* цвет карточки, а не фона страницы: на странице бренда при тёмной теме
     телефона фон страницы тёмный, а текст — тёмный (брендовая палитра),
     и список становился «чёрным по чёрному» */
  background: var(--surface);
  max-height: 260px;
  overflow-y: auto;
  padding-right: .3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.cat-filter-list::-webkit-scrollbar {
  width: 8px;
}

.cat-filter-list::-webkit-scrollbar-track {
  background: transparent;
}

.cat-filter-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.cat-chk {
  align-items: flex-start;
  line-height: 1.3;
}

.cat-chk input {
  margin-top: .2rem;
  flex: none;
}

.cat-chk small {
  color: var(--muted);
  white-space: nowrap;
}

.cat-filter-list[hidden] {
  display: none !important;
}

.cat-dd-done {
  width: 100%;
  margin-top: .4rem;
}

/* ---------- Плитки «Тип техники» — те же .cat-tile, но пошире и их
   всего 3 (Все / Комбайны / Тракторы), поэтому колонки покрупнее ---------- */
.type-tiles {
  grid-template-columns: repeat(auto-fit, minmax(140px, 220px));
  margin-bottom: 1rem;
}

.type-tiles .cat-tile {
  flex-direction: row;
  align-items: center;
  gap: .7rem;
}

.type-tiles .cat-tile .ic {
  font-size: 1.4rem;
}

/* Картинка вместо svg-иконки (Комбайны/Тракторы) — тот же размер,
   что и у обычной иконки рядом («Все»), чтобы ряд смотрелся ровно */
.type-tiles .cat-tile .cat-tile-photo {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  flex: none;
}

.type-tiles .cat-tile small {
  font-weight: 500;
  opacity: .75;
  margin-left: .2rem;
}

/* ---------- Плитки категорий (как на главной, только с закруглёнными
   углами и кнопкой вместо ссылки — клик фильтрует весь каталог) ---------- */
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .8rem;
  margin-bottom: 1.6rem;
}

.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  padding: 1.1rem 1rem 1rem;
  text-align: left;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.cat-tile .ic {
  font-size: 1.7rem;
}

.cat-tile strong {
  font: 600 1rem var(--f-head);
  line-height: 1.25;
}

.cat-tile small {
  color: var(--muted);
  font-size: .82rem;
}

.cat-tile:hover {
  border-color: var(--yellow);
}

.cat-tile.active {
  background: #000;
  border-color: #000;
  color: var(--on-dark);
}

.cat-tile.active .ic {
  color: var(--yellow);
}

.cat-tile.active small {
  color: var(--on-dark-muted);
}

/* Строка над товарами: количество и сортировка */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.toolbar select {
  width: auto;
}

.toolbar .cnt {
  color: var(--muted);
}


/* ---------- Картинки комбайна/трактора (images/icons/) ----------
   Сами файлы — чёрный контур на прозрачном фоне. На тёмной теме и на
   выбранной (чёрной) плитке перекрашиваем контур в светлый — иначе
   чёрный рисунок на тёмном фоне не видно. */
.cat-tile.active .tech-photo {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tech-photo {
    filter: invert(.92);
  }
}

:root[data-theme="dark"] .tech-photo {
  filter: invert(.92);
}

/* ---------- Страница типа техники (#/tech/combine, js/view-tech.js) ---------- */
.tech-page .sec-lead {
  margin-bottom: 1.6rem;
}

/* Большая плитка «Все запчасти: комбайны» */
.tech-all {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  margin-bottom: 2.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.tech-all:hover {
  border-color: var(--yellow);
}

.tech-all .tech-photo {
  width: 3rem;
  height: 2.4rem;
  object-fit: contain;
  flex: none;
}

.tech-all strong {
  display: block;
  font: 600 1.2rem var(--f-head);
}

.tech-all small {
  color: var(--muted);
  font-size: .85rem;
}

.tech-all-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--yellow);
}

/* Блок одного бренда: цветная полоска слева в фирменном цвете (--mk) */
.tech-brand {
  margin-bottom: 2.2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--mk);
}

.tech-brand-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}

.tech-brand-head h2 {
  font-size: clamp(1.4rem,2.4vw,1.8rem);
  margin: 0;
}

.tech-brand-logo {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: .3rem;
  border-radius: 8px;
  background: #fff;
  flex: none;
}

.tech-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tech-brand-all {
  margin-left: auto;
  font-size: .9rem;
  color: var(--ink);
}

.tech-brand-all:hover {
  color: var(--mk);
}

/* Плитки моделей — те же .cat-tile, картинка техники сверху */
.tech-models {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  margin-bottom: 0;
}

.tech-model .tech-photo {
  width: 2.8rem;
  height: 2rem;
  object-fit: contain;
  object-position: left center;
}

.tech-model:hover {
  border-color: var(--mk);
}

.tech-model.is-soon {
  cursor: default;
  opacity: .45;
}

.tech-model.is-soon:hover {
  border-color: var(--line-strong);
}

/* Бренды «скоро» внизу страницы */
.tech-soon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.4rem;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  color: var(--muted);
}

.tech-soon-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tech-soon-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 600 1rem var(--f-head);
  opacity: .7;
}

.tech-soon-item img {
  width: 1.8rem;
  height: 1.8rem;
  padding: .15rem;
  border-radius: 5px;
  background: #fff;
  object-fit: contain;
  filter: grayscale(1);
}

/* Пустой раздел (тракторы — пока нет прайса) */
.tech-empty {
  max-width: 560px;
  padding: 2rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.tech-empty .tech-photo {
  width: 4rem;
  height: 3rem;
  object-fit: contain;
  object-position: left center;
  margin-bottom: .8rem;
}

.tech-empty h2 {
  font-size: 1.4rem;
  margin: 0 0 .5rem;
}

.tech-empty p {
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.tech-empty .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

@media (max-width:820px) {
  .tech-brand {
    padding-left: .7rem;
  }
  .tech-brand-all {
    margin-left: 0;
    flex-basis: 100%;
  }
  .tech-models {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* Кнопка «Показать ещё» под карточками каталога (js/view-catalog.js) */
.catalog-more { display: block; margin: 1.4rem auto 0; min-width: 240px; }

/* Узел без товаров на странице «Категории» — «скоро» */
.cat-tile.is-soon,
.cat-tile.is-soon.reveal.in {
  cursor: default;
  opacity: .45;
}
.cat-tile.is-soon:hover {
  border-color: var(--line-strong);
  background: none;
}
.cat-tile.is-soon small {
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* =====================================================================
   ФАЙЛ 9. СТРАНИЦА ТОВАРА
   Подробная карточка запчасти: цена, количество, таблицы.
   ===================================================================== */

/* Страница товара: слева фото, справа информация */
.pdp {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 2.5rem;
  align-items: start;
}

.pdp h1 {
  margin: .3rem 0 1rem;
}

.badges {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

/* Метки «Оригинал / Аналог» */
.badge {
  border: 1px solid var(--line-strong);
  padding: .15rem .6rem;
  font-size: .82rem;
}

.pdp .price {
  font-size: 2.2rem;
}

/* Ряд «количество + кнопка В корзину» */
.buyrow {
  display: flex;
  gap: .8rem;
  align-items: stretch;
  margin: 1.2rem 0;
  flex-wrap: wrap;
}

/* Переключатель количества − 1 + */
.qty {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.qty button {
  width: 2.4rem;
  background: none;
  border: 0;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
}

.qty input {
  width: 3.4rem;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: transparent;
  padding: .5rem 0;
}

/* Таблицы характеристик */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.tbl th,.tbl td {
  text-align: left;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tbl th {
  font-weight: 500;
  color: var(--muted);
  width: 40%;
}

/* Две колонки внизу: «Подходит к технике» и «Номера и аналоги» */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

.two h2 {
  font-size: 1.4rem;
  margin-bottom: .8rem;
}

.plist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plist li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}


/* Описание товара (заполняется в админке) */
.pdesc { margin: 1rem 0 0; line-height: 1.55; color: var(--ink); max-width: 60ch; }

/* =====================================================================
   ФАЙЛ 10. КОРЗИНА, ОФОРМЛЕНИЕ, СЧЁТ
   Корзина, форма оформления, бланк счёта и статусы заказа.
   ===================================================================== */

/* Корзина и оформление: слева список, справа итог */
.cart,.co {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 2rem;
  align-items: start;
}

/* Одна строка товара в корзине */
.crow {
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) auto 110px auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.crow:first-child {
  border-top: 1px solid var(--line-strong);
}

.cthumb {
  aspect-ratio: 1;
  background: #0d0d0c;
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: 1.6rem;
}

.cinfo {
  display: grid;
  gap: .15rem;
}

.cinfo a {
  font-weight: 500;
  text-decoration: none;
}

.cinfo a:hover {
  text-decoration: underline;
}

.csum {
  text-align: right;
  font: 600 1.15rem var(--f-head);
}

/* Панель «Ваш заказ» с итогом */
.sum {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 1.3rem;
  position: sticky;
  top: 9rem;
}

.sum h2 {
  font-size: 1.3rem;
  margin-bottom: .8rem;
}

.sum .tot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: .9rem 0 1.1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}

.sum .tot b {
  font: 600 1.7rem var(--f-head);
}

.sum p.small,.small {
  font-size: .85rem;
  color: var(--muted);
}

.sum .btn+.btn {
  margin-top: .6rem;
}

/* Пояснительная плашка с золотой полоской слева */
.note {
  border-left: 3px solid var(--gold);
  padding: .6rem .9rem;
  background: var(--surface);
  font-size: .92rem;
  margin: 1rem 0;
}

/* Поля формы оформления заказа */
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.fields .full {
  grid-column: 1/-1;
}

.field.bad :where(input,select,textarea) {
  border-color: var(--err);
}

/* Текст ошибки под полем */
.err {
  color: var(--err);
  font-size: .85rem;
  margin-top: .25rem;
}

.sumlist {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .9rem;
}

.sumlist li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--line);
}

/* Полоса статусов заказа (Счёт выставлен → Доставка) */
.track {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  margin: 1.2rem 0 2rem;
  padding: 0;
  list-style: none;
}

.track li {
  position: relative;
  padding-top: 1.5rem;
  font-size: .88rem;
  color: var(--muted);
}

.track li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: .9rem;
  height: .9rem;
  background: var(--line);
}

.track li::after {
  content: "";
  position: absolute;
  top: .4rem;
  left: 1.2rem;
  right: .3rem;
  height: 2px;
  background: var(--line);
}

.track li:last-child::after {
  display: none;
}

.track li.on {
  color: var(--ink);
  font-weight: 600;
}

.track li.on::before {
  background: var(--yellow);
  outline: 2px solid #141414;
  outline-offset: 0;
}

/* Шаги до текущего — уже пройдены: закрашенная точка, но без обводки
   и жирного текста (это только у самого актуального шага, .on выше) */
.track li.done::before {
  background: var(--yellow);
}

/* Бланк счёта (белый лист) */
.invoice {
  background: #fff;
  color: #111;
  padding: clamp(1rem,3vw,2rem);
  border: 1px solid #cfcabd;
  font-size: .92rem;
}

.invoice h2 {
  font: 600 1.5rem var(--f-head);
  margin-bottom: .3rem;
}

.invoice .ph {
  color: #777;
  font-style: italic;
}

.parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.parties h3 {
  font: 600 .95rem var(--f-body);
  margin-bottom: .25rem;
}

.overflow {
  overflow-x: auto;
}

.invoice table {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0 1rem;
  min-width: 520px;
}

.invoice th,.invoice td {
  border: 1px solid #999;
  padding: .4rem .5rem;
  text-align: left;
}

.invoice .n {
  text-align: right;
  white-space: nowrap;
}

.invoice .tot {
  text-align: right;
  font-weight: 600;
  font-size: 1.1rem;
}

.actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}


/* ---------- Цена «по запросу» и подсказка «кто пришлёт счёт» ---------- */
.price.on-request {
  font-size: 1.05rem;
  color: var(--muted);
}

.sum .tot b {
  text-align: right;
  line-height: 1.15;
}

.inv-note {
  font-size: .85rem;
  line-height: 1.4;
  margin: -.3rem 0 1rem;
  padding: .6rem .75rem;
  border-left: 3px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.inv-note.ok {
  border-left-color: var(--ok);
}

.tot small.req {
  display: block;
  font: 400 .8rem var(--f-body);
  color: var(--muted);
}

/* Фото товара в строке корзины (если загружено) */
.cthumb {
  overflow: hidden;
}

.cthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Счёт на оплату в стиле AGRON (js/view-invoice.js) —
   как PDF-счёт: тёмный фон, золото. print-color-adjust — чтобы при
   печати браузер не выкинул тёмный фон и золотые цвета. ---------- */
.inv2 {
  --ig: #d6b25e; --ip: #141414; --il: #2a2a28; --iw: #f2efe8; --im: #a29e93;
  background: #0b0b0b;
  color: var(--iw);
  border-left: 2px solid var(--ig);
  border-right: 2px solid var(--ig);
  padding: 1.2rem;
  font-size: .9rem;
  line-height: 1.45;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.inv2 p { margin: 0 0 .25rem; }
.inv2 .gold { color: var(--ig); }
.inv2 .dim { color: var(--im); }
.inv2 .b { font-weight: 700; }
.inv2 .r { text-align: right; }
.inv2 .c { text-align: center; }
.inv2 h3 { color: var(--ig); font: 700 .78rem var(--f-body); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .5rem; }
.inv2-panel { background: var(--ip); border: 1px solid var(--il); border-radius: .7rem; padding: .9rem 1rem; margin-bottom: .8rem; }
.inv2-head { display: flex; gap: 1rem; align-items: center; }
.inv2-logo { flex: none; width: 5.5rem; height: 5.5rem; background: #050505; border-radius: .3rem; display: grid; place-items: center; align-content: center; gap: .2rem; }
.inv2-logo img { width: 3.2rem; }
.inv2-logo span { font: 700 .72rem var(--f-body); letter-spacing: .08em; }
.inv2-title { flex: 1; min-width: 0; }
.inv2-row { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.inv2-title h2 { font: 700 clamp(1.3rem, 3.4vw, 1.9rem) var(--f-body); text-transform: uppercase; color: var(--iw); margin: 0; }
.inv2-tag { border-top: 1px solid var(--ig); margin-top: .4rem !important; padding-top: .35rem; font-size: .78rem; }
.inv2-cols, .inv2-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.inv2-parties > div + div { border-left: 1px solid var(--il); padding-left: 1rem; }
.inv2 .big { font-size: 1rem; }
.inv2-parties .dim { font-size: .8rem; }
.inv2-table { overflow-x: auto; margin: .2rem 0 1rem; }
.inv2-table table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 560px; }
.inv2-table th { background: #1d1d1b; padding: .5rem .45rem; font-weight: 700; text-align: center; }
.inv2-table td { padding: .45rem; border-bottom: 1px solid #1f1f1d; vertical-align: top; }
.inv2-table tbody tr:nth-child(even) td { background: #111110; }
.inv2-table td.art { color: var(--ig); font-weight: 700; white-space: nowrap; }
.inv2-totals { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.inv2-totals > div:first-child { flex: 1 1 18rem; font-size: .82rem; }
.inv2-sum { border: 1.5px solid var(--ig); border-radius: .7rem; padding: .7rem 1rem; text-align: right; min-width: 14rem; }
.inv2-sum span { display: block; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.inv2-sum strong { font: 700 1.6rem var(--f-body); }
.inv2-terms { font-size: .7rem; margin: .9rem 0 .6rem !important; padding-bottom: .7rem; border-bottom: 1px solid var(--il); }
.inv2-signs { position: relative; padding-right: 4.5rem; }
.inv2-sign { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; font-size: .82rem; margin-bottom: .45rem; }
.inv2-sign b { min-width: 11rem; }
.inv2-sign i { display: inline-block; width: 5.5rem; border-bottom: 1px solid #6f6c64; }
.inv2-mp { position: absolute; right: 0; top: -.2rem; width: 3.6rem; height: 3.6rem; border: 1.5px solid var(--ig); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.inv2-lead { margin-bottom: 1rem; }
.inv2-accepted .inv2-panel { background: var(--surface); border-color: var(--line); }
.inv2-accepted h2 { margin: 0 0 .5rem; }
.inv2-accepted .dim { color: var(--muted); }
.inv2-accepted .inv2-table th { background: var(--surface); color: var(--ink); }
.inv2-accepted .inv2-table td { border-bottom-color: var(--line); }
.inv2-accepted .inv2-table tbody tr:nth-child(even) td { background: transparent; }
.inv2-accepted .inv2-table td.art { color: var(--ink); }
.inv2-acc-total { font-size: 1.05rem; }
.inv2-accepted .r { text-align: right; } .inv2-accepted .c { text-align: center; } .inv2-accepted .b { font-weight: 700; }

@media (max-width: 640px) {
  .inv2 { padding: .7rem; border-width: 1px; }
  .inv2-head { flex-direction: column; align-items: flex-start; }
  .inv2-cols, .inv2-parties { grid-template-columns: 1fr; }
  .inv2-parties > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--il); padding-top: .8rem; }
  .inv2-cols .r { text-align: left; }
  .inv2-sum { width: 100%; }
  .inv2-signs { padding-right: 0; padding-bottom: 4rem; }
  .inv2-mp { top: auto; bottom: 0; }
}

@media print {
  .inv2 { border: 0; padding: 0; }
  @page { margin: 10mm; }
}

/* Заказ отменён — вместо полосы статусов (js/view-invoice.js) */
.track-cancelled { margin: 0 0 1.2rem; padding: .8rem 1rem; border-left: 4px solid var(--err); background: var(--surface); border-radius: .4rem; }

/* =====================================================================
   ФАЙЛ 11. ТЕКСТОВЫЕ СТРАНИЦЫ
   Доставка и оплата, Контакты.
   ===================================================================== */

/* Страницы с обычным текстом (Доставка и оплата, Контакты) */
.prose {
  max-width: 70ch;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 1.8rem 0 .6rem;
}

.prose p {
  margin-bottom: .8rem;
}


/* Страница «Бренды»: карточка эксклюзивного бренда (логотип на тёмной плашке —
   логотипы рассчитаны на тёмный фон) */
.brand-ex {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.brand-ex-logo {
  background: var(--black);
  padding: .9rem 1.2rem;
  display: inline-flex;
}
.brand-ex-logo img {
  height: 34px;
  width: auto;
}
.brand-ex p {
  margin: 0;
  flex: 1 1 16rem;
}

/* =====================================================================
   ФАЙЛ 12. ТЕЛЕФОНЫ И ПЛАНШЕТЫ
   Правила, которые перестраивают сайт на узких экранах.
   ===================================================================== */

/* ---------- Адаптация под планшеты и телефоны ---------- */
/* Планшеты и узкие окна */
@media (max-width:1000px) {
  .hero-badges {
    grid-template-columns: repeat(2,minmax(0,1fr));
    row-gap: 1rem;
  }
  .catalog {
    grid-template-columns: 1fr;
  }
  /* На телефоне и планшете — никакой прокрутки внутри панели фильтров:
     она раскрывается во всю высоту, листается вся страница. Вложенная
     прокрутка на телефоне «залипала» и список узлов не пролистывался. */
  .filters {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .filters.open .fbody {
    overflow: visible;
  }
  .cat-filter-list {
    max-height: none;
    overflow: visible;
  }
  .cats,.mkbrands {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .steps {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .cart,.co {
    grid-template-columns: 1fr;
  }
  .sum {
    position: static;
  }
}

/* Телефоны */
@media (max-width:820px) {
  /* На телефоне — отдельное фото под вертикальный экран (портретное,
     images/hero-banner-mobile.jpg, промт в DESIGN-README.md). Пока файла
     нет, виден тёмный градиент — ничего не ломается. */
  .hero-photo {
    background:
      linear-gradient(180deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.5) 40%,rgba(0,0,0,.35) 68%,rgba(0,0,0,.78) 100%),
      url('../images/hero-banner-mobile.jpg') center/cover no-repeat,
      var(--black);
  }
  /* Шапка компактнее: меньше отступы, логотип и кнопки помельче */
  .head-row {
    flex-wrap: wrap;
    gap: .5rem .6rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }
  .brand .m {
    height: 30px;
  }
  .brand .w {
    height: 13px;
  }
  .nav-mid {
    order: 3;
    flex-basis: 100%;
    gap: 1rem;
    margin: 0;
    font-size: .84rem;
    padding-top: .1rem;
  }
  /* меню «Каталог» на телефоне — от левого края, почти во всю ширину */
  .nav-dd-menu {
    left: 0;
    transform: none;
    width: min(22rem, calc(100vw - 2rem));
    top: calc(100% + .5rem);
  }
  .nav-dd-menu a {
    padding: .7rem;
    font-size: .84rem;
  }
  .hsearch.open {
    width: 12rem;
    max-width: 50vw;
  }
  .hsearch input,.hsearch .btn {
    padding-top: .4rem;
    padding-bottom: .4rem;
  }
  .brand-div,.brand-tag {
    display: none;
  }
  .search-toggle,.acc-btn {
    width: 1.9rem;
    height: 1.9rem;
  }
  .search-toggle .ic,.acc-btn .ic {
    width: .95rem;
    height: .95rem;
  }
  .cartlink-in,.adminlink-in {
    padding: .4rem .65rem;
    gap: .4rem;
    font-size: .82rem;
  }
  .cartlink .ic {
    font-size: 1.05rem;
  }
  .cartlink b {
    min-width: 1.2rem;
    font-size: .7rem;
  }
  .head-actions {
    gap: .5rem;
  }
  .pdp,.two,.banner,.foot-grid,.parties {
    grid-template-columns: 1fr;
  }
  .hero-badges {
    grid-template-columns: 1fr;
    row-gap: .8rem;
  }
  .finder-float {
    margin-top: -2.2rem;
  }
  .banner .img {
    border-left: 0;
    border-top: 3px solid var(--yellow);
  }
  .fgrid {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .crow {
    grid-template-columns: 56px minmax(0,1fr) auto;
    grid-template-areas: "t i r" "q q s";
  }
  .crow .cthumb {
    grid-area: t;
  }
  .crow .cinfo {
    grid-area: i;
  }
  .crow .rm {
    grid-area: r;
  }
  .crow .qty {
    grid-area: q;
    justify-self: start;
  }
  .crow .csum {
    grid-area: s;
  }
  .track {
    grid-template-columns: 1fr;
    gap: .6rem;
  }
  .track li {
    padding: 0 0 0 1.5rem;
  }
  .track li::after {
    display: none;
  }
}

/* Очень узкие телефоны */
@media (max-width:520px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .mkbrands {
    grid-template-columns: 1fr;
  }
  /* Плитки категорий на главной — в 2 колонки и компактнее: в одну
     колонку 20 плиток растягивались почти на 3 экрана */
  .cats {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .cat {
    gap: .5rem;
    padding: .9rem .8rem .85rem;
  }
  .cat .ic {
    font-size: 1.5rem;
  }
  .cat strong {
    font-size: .98rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .cat small {
    font-size: .76rem;
  }
}

/* Шапка на узком телефоне: пункт «Доставка и оплата» сокращаем до
   «Доставка», чтобы влез новый пункт «Бренды» */
@media (max-width:480px) {
  .nav-long { display: none; }
  .nav-mid { gap: .85rem; }
  .hero-ex { gap: .6rem 1rem; }
  .hero-ex .ex-logo { height: 24px; }
}

/* Телефон: открыт поиск в шапке — остальные кнопки прячем, поле на всю ширину
   (раньше поле, «Админка», кабинет и корзина не влезали и шапка вылезала за экран) */
@media (max-width: 760px) {
  .site-head.search-on .head-actions { flex: 1 1 auto; min-width: 0; }
  .site-head.search-on .head-actions > *:not(.hsearch):not(.search-toggle) { display: none !important; }
  .site-head.search-on .hsearch.open { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; }
  .site-head.search-on .brand .w { display: none; }
}

/* =====================================================================
   ФАЙЛ 13. ПРОЧЕЕ
   Отключение анимации и вид при печати.
   ===================================================================== */

/* Если в системе отключена анимация, шестерёнки не вращаются, а блоки
   при прокрутке появляются сразу, без плавного проявления */
@media (prefers-reduced-motion:reduce) {
  .g1,.g2 {
    animation: none;
  }
  * {
    transition: none!important;
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
  }
}

/* Что скрыть при печати счёта */
@media print {
  .proto,.site-head,.site-foot,.no-print {
    display: none!important;
  }
  body {
    background: #fff;
  }
  .page {
    padding: 0;
  }
}


/* =====================================================================
   ФАЙЛ 14. АНИМАЦИИ
   Плавное появление блоков при прокрутке, лёгкий отклик карточек и кнопок
   при наведении, «пульс» цифры на кнопке «Корзина» при добавлении товара.
   Чертёж комбайна на главной — в css/4-home.css.
   Если анимации в системе отключены, все эти эффекты пропадают —
   см. правило @media (prefers-reduced-motion) в css/13-misc.css.
   ===================================================================== */

/* ---------- Плавное появление блоков при прокрутке (js/animate.js) ---------- */
/* Пока не подключился js/animate.js, всё видно сразу — так безопаснее */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s ease, transform .4s ease;
  transition-delay: var(--reveal-delay,0ms);
}

.js-anim .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Отклик плиток категорий и карточек товара ---------- */
.cat,.part,.mkb {
  transition: transform .18s ease, box-shadow .18s ease, background .15s, color .15s;
}

.cat:hover,.cat:focus-within {
  transform: translateY(-4px);
}

.mkb:hover,.mkb:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
}

.part:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

/* Фото товара слегка увеличивается при наведении на карточку */
.plate.photo img {
  transition: transform .35s ease;
}

.part:hover .plate.photo img {
  transform: scale(1.05);
}

/* ---------- Кнопки чуть приподнимаются при наведении ---------- */
.btn {
  transition: background .15s, transform .15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* ---------- Пункты меню и ссылки-производители ---------- */
.makers a {
  transition: color .15s, transform .15s;
  display: inline-block;
}

.makers a:hover {
  transform: translateY(-1px);
}

/* ---------- Пульс цифры на кнопке «Корзина» при добавлении товара ---------- */
@keyframes cart-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.4); }
  60%  { transform: scale(.9); }
  100% { transform: scale(1); }
}

#cartN.bump {
  animation: cart-bump .45s ease;
}

/* =====================================================================
   ФАЙЛ 15. АККАУНТ: ВХОД, РЕГИСТРАЦИЯ, АДМИН-ПАНЕЛЬ
   ===================================================================== */

/* ---------- Блок аккаунта в шапке (js/auth-ui.js) ---------- */
.acc {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.acc-name {
  color: var(--on-dark);
  font-size: .9rem;
  white-space: nowrap;
  text-decoration: none;
}

.acc-name:hover {
  text-decoration: underline;
}

/* Кнопка-аккаунт (гость): иконка человечка в круглом контуре — тот же
   стиль, что и у кнопки поиска в шапке */
.acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1.5px solid rgba(236,234,227,.55);
  border-radius: 50%;
  color: var(--on-dark);
  text-decoration: none;
  flex: none;
  transition: color .15s, border-color .15s;
}

.acc-btn:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.acc-btn .ic {
  width: 1.15rem;
  height: 1.15rem;
}

.acc .btn-ghost {
  border-color: var(--dark-line);
  color: var(--on-dark);
  padding: .5rem .8rem;
  font-size: .88rem;
}

.acc .btn-ghost:hover {
  border-color: var(--yellow);
}

/* ---------- Страницы входа и регистрации ---------- */
.auth-page .fields {
  grid-template-columns: 1fr;
  max-width: 420px;
}

.auth-box {
  max-width: 420px;
}

.auth-box .actions {
  flex-direction: column;
  align-items: flex-start;
}

.auth-box .actions .btn {
  width: 100%;
}

.ok-msg {
  color: var(--ok);
  font-size: .9rem;
  margin: .6rem 0;
}

/* ---------- Поле пароля с кнопкой-«глазком» ---------- */
.pwd-wrap {
  position: relative;
}

.pwd-wrap input {
  width: 100%;
  padding-right: 2.6rem;
}

.pwd-toggle {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: .3rem;
  line-height: 0;
  cursor: pointer;
  color: var(--muted);
}

.pwd-toggle:hover,
.pwd-toggle:focus-visible {
  color: var(--ink);
}

.pwd-toggle .ic-eye {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Выбор типа аккаунта при регистрации ---------- */
.acct-type {
  display: flex;
  gap: .6rem;
  margin-bottom: 1rem;
}

.acct-type label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: .6rem .8rem;
  font-size: .92rem;
  cursor: pointer;
  text-align: center;
}

.acct-type input {
  margin: 0;
}

.acct-type label:has(input:checked) {
  border-color: var(--yellow);
  background: var(--surface);
  font-weight: 600;
}

.org-fields,
.person-fields {
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
  margin-top: .4rem;
}

/* ---------- Шкала надёжности пароля (js/helpers.js: passwordMeterHtml) ---------- */
.pw-meter {
  margin: -.4rem 0 .9rem;
}

.pw-segs {
  display: flex;
  gap: .3rem;
  margin-bottom: .3rem;
}

.pw-segs span {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--line);
}

.pw-segs span.bad  { background: var(--err); }
.pw-segs span.mid  { background: var(--gold); }
.pw-segs span.good { background: var(--ok); }

.pw-meter-label {
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
}

.pw-meter-label.bad  { color: var(--err); }
.pw-meter-label.mid  { color: var(--gold); }
.pw-meter-label.good { color: var(--ok); }

/* ---------- Способ получения кода при регистрации ---------- */
.verify-method {
  display: flex;
  gap: .6rem;
  margin: .2rem 0 1rem;
}

.verify-method__disabled {
  color: #999;
  cursor: not-allowed;
}

.verify-method__disabled input {
  cursor: not-allowed;
}

.verify-method__soon {
  font-size: 11px;
  color: #999;
}

.verify-method label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: .55rem .7rem;
  font-size: .88rem;
  cursor: pointer;
  text-align: center;
}

.verify-method input {
  margin: 0;
}

.verify-method label:has(input:checked) {
  border-color: var(--yellow);
  background: var(--surface);
  font-weight: 600;
}

.pending-msg {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: .9rem 1rem;
  font-size: .93rem;
  line-height: 1.5;
}

/* ---------- Админ-панель ---------- */
.admin-tabs {
  display: flex;
  gap: .5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.4rem;
}

.admin-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .7rem 1rem;
  font: 500 .95rem var(--f-body);
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}

.admin-tab[aria-selected=true] {
  color: var(--ink);
  border-bottom-color: var(--yellow);
  font-weight: 600;
}

.admin-card {
  max-width: 760px;
}

.admin-card h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.admin-card .fields {
  margin-bottom: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .5rem;
  font-size: .92rem;
}

.admin-table th,.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: .55rem .6rem;
  text-align: left;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: .85rem;
}

.admin-table td {
  white-space: normal;
}

.status-pill {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 1rem;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.st-active {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
}

.status-pill.st-pending {
  background: color-mix(in srgb, var(--yellow) 35%, transparent);
  color: var(--ink);
}

.status-pill.st-rejected {
  background: color-mix(in srgb, var(--err) 18%, transparent);
  color: var(--err);
}

/* Галочка согласия со ссылками внутри (регистрация, оформление заказа):
   обычным текстом, а не flex — иначе ссылки не переносятся на новую
   строку и на телефоне вылезают за край экрана */
.field .chk { display: block; line-height: 1.5; }
.field .chk input { margin: 0 .5rem 0 0; vertical-align: -2px; }

/* =====================================================================
   ФАЙЛ 16. АДМИН-ПАНЕЛЬ
   Отдельная страница #/admin с меню слева (js/view-admin.js).
   ===================================================================== */

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

/* ---------- Меню слева ---------- */
.admin-side {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: .8rem;
  padding: .6rem;
  position: sticky;
  top: 9rem;
}

.admin-side-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .8rem;
  border-radius: .5rem;
  color: var(--ink);
  text-decoration: none;
  font: 500 .95rem var(--f-body);
  transition: background .15s, color .15s;
}

.admin-side-link .ic {
  font-size: 1.15rem;
  flex: none;
}

.admin-side-link:hover {
  background: var(--bg);
}

.admin-side-link.active {
  background: #000;
  color: var(--on-dark);
}

.admin-side-link.active .ic {
  color: var(--yellow);
}

/* ---------- Содержимое справа ---------- */
.admin-main {
  min-width: 0;
  display: grid;
  /* minmax(0,1fr): широкая таблица внутри не растягивает всю колонку —
     она прокручивается сама (.overflow), а страница не шире экрана */
  grid-template-columns: minmax(0,1fr);
  gap: 1.4rem;
}

.admin-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: .8rem;
  padding: 1.2rem 1.3rem;
  max-width: none;
}

.admin-card h2 {
  font-size: 1.2rem;
  margin-bottom: .6rem;
}

.admin-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  margin-bottom: .4rem;
}

.admin-card-head h2 {
  margin-bottom: 0;
}

.admin-card-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.admin-sub-h {
  font-size: 1rem;
  margin-bottom: .6rem;
}

/* ---------- Плитки со сводкой на «Главной» ---------- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .8rem;
}

.admin-stat {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: .8rem;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.admin-stat strong {
  font: 600 1.7rem var(--f-head);
}

.admin-stat span {
  color: var(--muted);
  font-size: .85rem;
}

.admin-stat-alert strong {
  color: var(--err);
}

.admin-quick {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* ---------- Вкладка «Дизайн»: редактор кода ---------- */
.design-toolbar {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: .8rem;
}

.design-toolbar select {
  width: auto;
  min-width: 220px;
}

.design-editor {
  display: block;
  width: 100%;
  min-height: 60vh;
  font: 13px/1.5 var(--f-mono);
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: .5rem;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

.design-editor:disabled {
  color: var(--muted);
}

/* ---------- Мобильный экран: меню сверху горизонтальной лентой ---------- */
@media (max-width: 760px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: .4rem;
  }

  .admin-side-link {
    flex: none;
    white-space: nowrap;
  }

  .admin-side-link span {
    display: inline;
  }
}


/* ---------- Личный кабинет (js/view-account.js) ---------- */
.acc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem 1.2rem;
  margin-bottom: 1.4rem;
}

.acc-head h1 {
  margin-bottom: .2rem;
}

.acc-head-who p {
  color: var(--muted);
  font-size: .92rem;
  overflow-wrap: anywhere;
  margin: 0;
}

.acc-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

@media (max-width:640px) {
  .admin-card {
    padding: 1rem .9rem;
  }
  .acc-head {
    align-items: stretch;
  }
  .acc-head-actions {
    width: 100%;
  }
  .acc-head-actions .btn {
    flex: 1;
  }
  /* «Мои заказы» на телефоне — карточками вместо широкой таблицы */
  .acc-orders thead {
    display: none;
  }
  .acc-orders,
  .acc-orders tbody,
  .acc-orders tr,
  .acc-orders td {
    display: block;
    width: 100%;
  }
  .acc-orders tr {
    border: 1px solid var(--line);
    border-radius: .6rem;
    padding: .5rem .8rem .7rem;
    margin-bottom: .7rem;
  }
  .acc-orders td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    padding: .3rem 0;
    text-align: right;
  }
  .acc-orders td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .85rem;
    text-align: left;
  }
  .acc-orders td[colspan] {
    display: block;
    text-align: left;
  }
  .acc-orders td[colspan]::before,
  .acc-orders .acc-order-btn::before {
    content: none;
  }
  .acc-orders .acc-order-btn .btn {
    width: 100%;
    margin-top: .3rem;
  }
}

/* ---------- Товар с фото (админка → «Добавить товар вручную») ---------- */
.photo-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
}

.photo-pick img {
  width: 7rem;
  height: 5.25rem;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: .4rem;
}

.adm-thumb {
  display: block;
  width: 3.4rem;
  height: 2.6rem;
  object-fit: cover;
  border-radius: .3rem;
  border: 1px solid var(--line);
}

.adm-thumb.none {
  display: grid;
  place-items: center;
  font-size: .62rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
}


/* =====================================================================
   НОВЫЕ ЭЛЕМЕНТЫ АДМИНКИ (фильтры, таблица товаров, окна, уведомления)
   ===================================================================== */

/* Строка фильтров над таблицей */
.adm-filters {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: .6rem;
  margin: .6rem 0 .4rem;
}
.adm-hint { margin: .2rem 0 0; }

/* Быстрые фильтры-«таблетки» по статусу заказа */
.adm-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.adm-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 1rem;
  padding: .3rem .75rem;
  font: 500 .85rem var(--f-body);
  cursor: pointer;
}
.adm-chip b { margin-left: .25rem; }
.adm-chip.on { background: #000; color: var(--on-dark); border-color: #000; }

/* Цена и остаток прямо в таблице */
.adm-inline {
  width: 6.5rem;
  padding: .35rem .5rem;
  font: 500 .92rem var(--f-mono);
  transition: background .3s, border-color .3s;
}
.adm-inline.saved { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.adm-inline.bad { border-color: var(--err); }
.adm-products .art { font-size: .8rem; color: var(--muted); }
.adm-name { color: var(--ink); font-weight: 500; }
.adm-products tr.is-hidden td { opacity: .55; }
.adm-actions { white-space: nowrap; }
.adm-actions .btn { padding: .35rem .7rem; font-size: .85rem; }
.link.danger { color: var(--err); }

/* Статусы заказов и пользователей */
.status-pill { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--ink); }
.status-pill.st-new { background: color-mix(in srgb, var(--yellow) 45%, transparent); }
.status-pill.st-paid, .status-pill.st-packing, .status-pill.st-shipped { background: color-mix(in srgb, #3a6fd8 18%, transparent); }
.status-pill.st-delivered { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.status-pill.st-cancelled, .status-pill.st-blocked { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.status-pill.st-unverified { background: color-mix(in srgb, var(--yellow) 35%, transparent); }
.st-warn { color: var(--err); font-weight: 600; }
.err-inline { color: var(--err); }

/* Блок Excel */
.adm-excel {
  border: 1px dashed var(--line);
  border-radius: .6rem;
  padding: .9rem 1rem;
  margin: .6rem 0 1rem;
}
.adm-excel ol { margin: .4rem 0 .8rem 1.2rem; }
.adm-excel ol li { margin-bottom: .25rem; }
.adm-import-ok {
  margin-top: .8rem;
  padding: .7rem .9rem;
  border-left: 4px solid var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, transparent);
  border-radius: .3rem;
}
.adm-import-ok ul { margin: .4rem 0 0 1.1rem; max-height: 12rem; overflow: auto; }

/* Всплывающие окна (товар, заказ) */
.adm-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line-strong);
  border-radius: .8rem;
  background: var(--surface);
  color: var(--ink);
  padding: 1.2rem 1.3rem;
  overflow: auto;
}
.adm-dialog-wide { width: min(980px, calc(100vw - 24px)); }
.adm-dialog::backdrop { background: rgba(0,0,0,.55); }
.adm-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.adm-dialog-head h2 { margin: 0; font-size: 1.25rem; }
.adm-x { border: 0; background: transparent; color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.adm-dialog textarea { width: 100%; }
.adm-order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; margin: .6rem 0 1rem; }
.adm-order-grid p { margin: 0 0 .5rem; }
.adm-list { margin: 0 0 1rem 1rem; }

/* Уведомление внизу экрана */
.adm-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: #000;
  color: var(--on-dark);
  padding: .7rem 1.1rem;
  border-radius: .6rem;
  font-size: .92rem;
  max-width: calc(100vw - 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 1000;
}
.adm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.adm-toast.err { background: var(--err); color: #fff; }

@media (max-width: 760px) {
  .adm-filters { grid-template-columns: 1fr; }
  .adm-order-grid { grid-template-columns: 1fr; }
  .adm-dialog { padding: 1rem .9rem; }
}

/* ===== Мастер загрузки прайса: большое окно, шаги, таблица колонок «как в Excel» ===== */
#wiz.adm-dialog-wide { width: min(1600px, calc(100vw - 32px)); height: calc(100vh - 32px); max-height: none; padding: 1.4rem 1.6rem; }
.wiz-steps { list-style: none; display: flex; gap: .4rem; margin: 0 0 1.1rem; padding: 0; flex-wrap: wrap; }
.wiz-steps li { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .5rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.wiz-steps li b { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: .8rem; }
.wiz-steps li.on { border-color: var(--yellow); color: var(--ink); }
.wiz-steps li.on b { background: var(--yellow); color: #171102; }
.wiz-steps li.done { color: var(--ink); }
.wiz-steps li.done b { background: rgba(120,200,120,.25); }
.wiz-grid-wrap { max-height: calc(100vh - 360px); overflow: auto; border: 1px solid var(--line); border-radius: .6rem; }
.wiz-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.wiz-grid th, .wiz-grid td { min-width: 170px; max-width: 280px; padding: .45rem .6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.wiz-grid td { font-size: .85rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-grid thead tr.wiz-sel th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.wiz-grid thead tr:nth-child(2) th { position: sticky; top: 3.1rem; z-index: 2; background: var(--surface); }
.wiz-grid select { width: 100%; }
.wiz-grid th.wiz-on { box-shadow: inset 0 3px 0 var(--yellow); }
.wiz-grid th.wiz-on select { border-color: var(--yellow); }
.wiz-colname { font-weight: 600; text-align: left; }
.wiz-letter { display: inline-block; min-width: 1.6rem; margin-right: .4rem; padding: 0 .3rem; border-radius: .3rem; background: rgba(255,255,255,.08); color: var(--muted); font: 600 .75rem var(--f-mono); text-align: center; }
#wiz .admin-table { width: 100%; }
#wiz .adm-import-ok .overflow { max-height: none; }
#wiz .actions { position: sticky; bottom: -1.4rem; z-index: 3; margin: 1rem -1.6rem -1.4rem; padding: .9rem 1.6rem; background: var(--surface); border-top: 1px solid var(--line); }
#wiz .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem 1.2rem; }
#wiz .fields .field.full { grid-column: 1 / -1; }
.wiz-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin: .8rem 0 1rem; }
.wiz-stats div { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .7rem; background: rgba(255,255,255,.03); }
.wiz-stats b { display: block; font: 700 1.7rem var(--f-head, inherit); }
.wiz-stats span { color: var(--muted); font-size: .85rem; }
.wiz-stats .is-new b { color: #7ad08a; } .wiz-stats .is-upd b { color: var(--yellow); } .wiz-stats .is-err b { color: #ff7a7a; }

/* ===== Поставщики (Товары → Поставщики): шапка с цифрами + поля в 4 колонки ===== */
.sup-card { padding: 1.1rem 1.3rem; margin-top: 1rem; }
.sup-card .admin-card-head h3 { font-size: 1.35rem; margin: 0; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sup-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; margin: .8rem 0 1rem; }
.sup-stats div { padding: .6rem .8rem; border: 1px solid var(--line); border-radius: .6rem; background: rgba(255,255,255,.03); min-width: 0; }
.sup-stats b { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-stats span { color: var(--muted); font-size: .8rem; }
.sup-grid { display: grid; grid-template-columns: 1.3fr 1.2fr .8fr 1fr; gap: 1rem; align-items: start; }
.sup-grid fieldset { margin: 0; padding: .8rem .9rem 1rem; border: 1px solid var(--line); border-radius: .7rem; display: grid; gap: .6rem; min-width: 0; }
.sup-grid legend { padding: 0 .4rem; color: var(--yellow); font-weight: 600; font-size: .9rem; }
.sup-grid label { display: grid; gap: .25rem; font-size: .82rem; color: var(--muted); }
.sup-grid label input, .sup-grid label select, .sup-grid label textarea { width: 100%; color: var(--ink); }
.sup-grid label.chk { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-size: .9rem; }
.sup-grid label.chk input { width: auto; }
.sup-grid .sup-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sup-grid label[title] { cursor: help; }
@media (max-width: 1300px) { .sup-grid { grid-template-columns: 1fr 1fr; } .sup-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .sup-grid { grid-template-columns: 1fr; } .sup-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Админка (новая, .a2-body): формы шире и понятнее — в несколько колонок, узкие числовые поля ===== */
.a2-body .admin-card .fields { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.a2-body input[type="number"], .a2-body input[inputmode="numeric"]:not(.wiz-grid *), .a2-body input[inputmode="decimal"] { max-width: 14rem; }
.a2-body .admin-table input[type="number"], .a2-body .admin-table input[inputmode] { max-width: 9rem; }
@media (min-width: 761px) { .a2-body .adm-filters { display: grid !important; flex-direction: initial; grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(170px, 1fr)); gap: .6rem; align-items: center; }
.a2-body .adm-filters > * { width: 100%; min-width: 0; margin: 0; } }
@media (max-width: 1100px) { .a2-body .adm-filters { grid-template-columns: 1fr 1fr; } .a2-body .adm-filters > input[type="search"] { grid-column: 1 / -1; } }
.a2-body .admin-card { padding: 1.3rem 1.5rem; }
.a2-body .admin-card-head h2 { font-size: 1.5rem; }
.a2-body .admin-card > p.small, .a2-body .admin-card-head + p.small { max-width: 110ch; line-height: 1.5; }
.a2-body button[title], .a2-body label[title] { cursor: help; }
.a2-body button.btn[title] { cursor: pointer; }
/* Товары: шире название, узкие поля цены/наценки/остатка */
@media (min-width: 761px) {
  .a2-body .adm-products { table-layout: auto; }
  .a2-body .adm-products th:nth-child(3), .a2-body .adm-products td:nth-child(3) { width: 40%; min-width: 320px; }
  .a2-body .adm-products td:nth-child(4) input, .a2-body .adm-products td:nth-child(5) input, .a2-body .adm-products td:nth-child(6) input { width: 6.5rem; }
}
@media (max-width: 760px) {
  .sup-card .admin-card-head { flex-direction: column; align-items: stretch; gap: .6rem; }
  .sup-card .admin-card-actions { display: grid; grid-template-columns: 1fr; gap: .5rem; }
  .sup-card .admin-card-actions > * { width: 100%; white-space: normal; text-align: center; }
  .sup-stats div { padding: .5rem .6rem; }
  #wiz.adm-dialog-wide { width: 100vw; max-width: 100vw; height: 100dvh; margin: 0; border-radius: 0; padding: 1rem; }
  #wiz .actions { margin: 1rem -1rem -1rem; padding: .8rem 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
  .wiz-steps li { font-size: .75rem; padding: .3rem .6rem .3rem .3rem; }
  .wiz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wiz-grid-wrap { max-height: 55vh; }
}
@media (max-width: 760px) {
  /* мастер: таблица колонок остаётся таблицей (листается вбок), не «карточками» */
  .wiz-grid { display: table !important; width: max-content !important; }
  .wiz-grid thead { display: table-header-group !important; }
  .wiz-grid tbody { display: table-row-group !important; }
  .wiz-grid tr { display: table-row !important; }
  .wiz-grid th, .wiz-grid td { display: table-cell !important; min-width: 150px; }
  .wiz-grid td::before, .wiz-grid th::before { content: none !important; }
  .a2-body .sup-card .admin-card-actions { display: grid !important; grid-template-columns: 1fr !important; width: 100%; }
  .a2-body .sup-card .admin-card-actions > * { width: 100% !important; max-width: none !important; }
}
@media (max-width: 760px) {
  .wiz-grid th, .wiz-grid td { width: 170px !important; min-width: 170px !important; max-width: 220px !important; padding: .4rem .5rem !important; border-bottom: 1px solid var(--line) !important; }
  .wiz-grid tr { border: 0 !important; margin: 0 !important; padding: 0 !important; background: none !important; }
}
@media (max-width: 760px) { .wiz-grid td, .wiz-grid th { height: auto !important; min-height: 0 !important; white-space: nowrap; } .wiz-grid td::after { content: none !important; } }
@media (max-width: 760px) { #wiz .wiz-grid td { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; } }
@media (max-width: 760px) { .a2-body .admin-quick { display: grid !important; grid-template-columns: 1fr; gap: .5rem; overflow: visible !important; } .a2-body .admin-quick > * { width: 100%; white-space: normal; } }
.a2-body .admin-card.mh-hidden { opacity: .55; }
.a2-body .admin-card.mh-hidden:hover { opacity: .85; }

/* =====================================================================
   ФАЙЛ 17. СТРАНИЦЫ «БРЕНДЫ» (#/brands и #/brands/turboflex)
   Тёмное оформление, как на главной. Разметка — js/view-brands.js.
   ===================================================================== */

.brands-page {
  --bp-line: rgba(255,255,255,.12);
  --bp-card: rgba(255,255,255,.035);
  padding-bottom: 1px;
}
.brands-page .crumbs,
.brands-page .crumbs a { color: var(--on-dark-muted); }
.brands-page .crumbs a:hover { color: var(--yellow); }

/* ---------- Верхний экран с фото ----------
   Два слоя фото: сверху — своё фото страницы, под ним — фото с главной.
   Пока своего файла нет, просто видно фото с главной. */
.bp-hero {
  position: relative;
  /* фото уходит под прозрачную шапку (как на главной): поднимаем блок на
     высоту шапки и возвращаем этот отступ содержимому */
  margin-top: calc(var(--head-h,84px) * -1);
  /* большой нижний отступ + отрицательный margin: фото уходит далеко вниз
     ПОД следующий блок и очень плавно растворяется в чёрном */
  padding: calc(var(--head-h,84px) + 1.2rem) 0 16rem;
  margin-bottom: -13rem;
  /* затемнение только снизу: фото мягко растворяется в чёрном фоне
     страницы (слева и сверху фото без затемнения) */
  background:
    linear-gradient(0deg,#000 0%,rgba(0,0,0,.92) 10%,rgba(0,0,0,.7) 22%,rgba(0,0,0,.42) 36%,rgba(0,0,0,.18) 50%,rgba(0,0,0,.05) 62%,rgba(0,0,0,0) 72%),
    var(--bp-img-m, none) var(--bp-img-pos, center) / cover no-repeat,
    var(--bp-img, none) var(--bp-img-pos, center) / cover no-repeat,
    url('../images/hero-banner.jpg') center/cover no-repeat,
    var(--black);
}
.bp-hero-list { --bp-img-pos: center top; --bp-img: url('../images/brands/page/brands-hero.jpg'); min-height: 420px; }
.bp-hero-brand { isolation: isolate; }
/* фото бренда (images/brands/cards/<slug>.jpg) отдельным слоем, сверху —
   то же плавное затемнение книзу */
.bp-bgimg { position: absolute; inset: 0; z-index: -2; background: center 40% / cover no-repeat; }
.bp-hero-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg,#000 0%,rgba(0,0,0,.92) 10%,rgba(0,0,0,.7) 22%,rgba(0,0,0,.42) 36%,rgba(0,0,0,.18) 50%,rgba(0,0,0,.05) 62%,rgba(0,0,0,0) 72%),
    linear-gradient(90deg,rgba(0,0,0,.55) 0%,rgba(0,0,0,0) 55%);
}
.tf-hero      { --bp-img: url('../images/brands/page/turboflex-hero.jpg'); }

.bp-hero .wrap { text-shadow: 0 1px 12px rgba(0,0,0,.75); }
.bp-hero h1 {
  font-size: clamp(2.4rem,6vw,4.2rem);
  line-height: 1.02;
  margin: .4rem 0 .8rem;
}
.bp-lead {
  color: var(--on-dark);
  opacity: .9;
  max-width: 44ch;
  font-size: 1.02rem;
  line-height: 1.5;
}

/* счётчик «6 брендов» */
.bp-count {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-left: 1rem;
  border-left: 2px solid var(--yellow);
}
.bp-count .ic { font-size: 2rem; color: var(--yellow); }
.bp-count b { font: 700 3.2rem/1 var(--f-head); color: var(--on-dark); }
.bp-count span { font-size: .8rem; color: var(--on-dark-muted); max-width: 30ch; }
.bp-count em {
  display: block;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .3em;
  color: var(--yellow);
  font-size: .9rem;
  margin-bottom: .2rem;
}

/* ---------- Разделы ---------- */
.bp-sec { padding-top: 2.2rem; }
.bp-hero + .bp-sec { padding-top: .6rem; }
/* блоки после фото лежат поверх его растворяющегося низа */
.bp-hero ~ * { position: relative; z-index: 1; }
.bp-last { padding-bottom: 3rem; }
.bp-h {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: clamp(1.4rem,3vw,1.9rem);
  margin-bottom: 1.1rem;
}
.bp-h::after {
  content: "";
  width: 7rem;
  max-width: 25%;
  height: 1px;
  background: var(--gold);
}

/* ---------- Карточки брендов ---------- */
.bcards {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: .9rem;
}
.bcard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1.05;
  padding: 1rem;
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--on-dark);
  background: linear-gradient(160deg,var(--bc) 0%,#0d0d0c 85%);
  transition: transform .2s, border-color .2s;
}
/* фото карточки (images/brands/cards/<slug>.jpg) поверх цветного фона,
   снизу затемнение, чтобы читалась подпись */
.bc-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: center/cover no-repeat;
}
.bcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,0) 50%);
}
a.bcard:hover { transform: translateY(-3px); border-color: var(--yellow); }
.bcard.is-soon { cursor: default; }
.bc-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 58px;
  padding: 0 .2rem;
  /* логотип без подложки — прямо на фото (прозрачные PNG в images/brands/tight/) */
}
.bc-logo img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.bc-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem;
  font-size: .85rem;
  line-height: 1.3;
}
.bc-go {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.bc-soon {
  flex: none;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25rem .5rem;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 3px;
}

/* ---------- Баннер Turboflex ---------- */
.tf-banner {
  /* как на макете: логотип | надпись | стрелка | фото ремней справа */
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 1rem 2.2rem;
  margin-bottom: 1rem;   /* баннер стоит над карточками брендов */
  padding: 1.1rem 2rem;
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
  background: #0b0b0a;
  transition: border-color .2s;
}
/* фото ремней справа (images/brands/page/turboflex-banner.jpg) — отдельным
   слоем; его левый край маской плавно растворяется в чёрном, поэтому
   стыка не видно при любом размере картинки */
.tf-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 66%;
  background: url('../images/brands/page/turboflex-banner.jpg') right center/cover no-repeat;
  /* очень длинный плавный переход из чёрного в фото */
  -webkit-mask-image: linear-gradient(90deg,transparent 0%,rgba(0,0,0,.08) 18%,rgba(0,0,0,.25) 32%,rgba(0,0,0,.5) 46%,rgba(0,0,0,.78) 60%,#000 74%);
          mask-image: linear-gradient(90deg,transparent 0%,rgba(0,0,0,.08) 18%,rgba(0,0,0,.25) 32%,rgba(0,0,0,.5) 46%,rgba(0,0,0,.78) 60%,#000 74%);
  pointer-events: none;
}
.tf-banner > * { position: relative; z-index: 1; }
.tf-banner:hover { border-color: #ff7a00; }
.tf-banner-logo { height: 58px; width: auto; margin-right: 1rem; }
.tf-banner-txt small { display: block; color: var(--yellow); font-size: .85rem; margin-bottom: .2rem; }
.tf-banner-txt strong { display: block; font: 600 1.4rem/1.25 var(--f-head); }
.tf-banner-go,.tf-go {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  border-radius: 50%;
}

/* ---------- «Почему выбирают AGRON» ---------- */
.bwhys {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .9rem;
}
.bwhy,.tf-why {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.1rem;
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  background: var(--bp-card);
}
.bwhy .ic,.tf-why .ic { flex: none; font-size: 1.9rem; color: var(--yellow); }
.bwhy strong,.tf-why strong { display: block; font: 600 1.02rem var(--f-head); margin-bottom: .25rem; }
.bwhy small,.tf-why small { display: block; color: var(--on-dark-muted); font-size: .8rem; line-height: 1.4; }

.bp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 1.6rem 2rem;
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  background:
    linear-gradient(90deg,rgba(0,0,0,.92) 30%,rgba(0,0,0,.5) 100%),
    url('../images/hero-banner.jpg') center 70%/cover no-repeat;
}
.bp-cta strong { display: block; font: 600 1.5rem var(--f-head); }
.bp-cta small { color: var(--on-dark-muted); }

/* =====================================================================
   TURBOFLEX
   ===================================================================== */
.tf-logo { height: clamp(44px,7vw,74px); width: auto; margin: .6rem 0 .4rem; }
.tf-eyebrow {
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
}
.tf-sub {
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .04em;
  font: 500 clamp(1rem,2.2vw,1.35rem) var(--f-head);
  margin: -.2rem 0 1rem;
}
.tf-cat { color: var(--yellow); font-weight: 600; margin-top: 1rem; }
.tf-motto { color: var(--on-dark-muted); font-size: .88rem; }

/* «Почему TURBOFLEX» — в строку с разделителями */
.tf-whys {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border-top: 1px solid var(--bp-line);
  border-bottom: 1px solid var(--bp-line);
}
.tf-why {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 1.2rem 1rem;
}
.tf-why + .tf-why { border-left: 1px solid var(--bp-line); }
.tf-why .ic {
  font-size: 1.6rem;
  width: 3rem;
  height: 3rem;
  padding: .7rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-sizing: border-box;
}

/* Линейка продукции — карточки с рисунком сечения */
.tf-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(118px,1fr));
  gap: .7rem;
}
.tf-line {
  display: flex;
  flex-direction: column;
  padding: .9rem;
  border: 1px solid rgba(240,215,126,.55);
  border-radius: 4px;
  background: var(--bp-card);
}
.tf-line strong { font: 600 .98rem var(--f-head); text-transform: uppercase; }
.tf-prof { color: var(--on-dark-muted); font-size: .72rem; line-height: 1.35; min-height: 2em; }
.tf-desc { color: var(--on-dark-muted); font-size: .76rem; line-height: 1.35; margin-top: auto; }
/* фото ремня (images/brands/belts/…) — если файл есть, схема прячется */
.tf-pic { display: block; margin: .5rem 0; }
.tf-pic img { display: none; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.tf-pic.has-img img { display: block; }
.tf-pic.has-img .belt-svg { display: none; }
.belt-svg { width: 100%; height: auto; max-height: 70px; margin: .5rem 0; }
.belt-svg .b { fill: #2a2a28; stroke: #6f6c63; stroke-width: 1.2; stroke-linejoin: round; }
.belt-svg .edge { fill: none; stroke: #8b877c; stroke-width: 1; stroke-dasharray: 2 2; }
.belt-svg .cord { fill: var(--yellow); }
.tf-note { margin-top: .9rem; color: var(--on-dark-muted); font-size: .85rem; }

/* Полоса «Для сельхозтехники» */
.tf-field {
  margin-top: 2.4rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--bp-line);
  border-bottom: 1px solid var(--bp-line);
  background:
    linear-gradient(90deg,rgba(0,0,0,.9) 0%,rgba(0,0,0,.55) 50%,rgba(0,0,0,.1) 100%),
    url('../images/brands/page/turboflex-field.jpg') center/cover no-repeat,
    url('../images/hero-banner.jpg') center 60%/cover no-repeat;
}
.tf-field p { max-width: 60ch; color: var(--on-dark); opacity: .9; }

/* История — лента годов */
.tf-hist {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: .8rem;
  padding: 0;
}
.tf-hist li {
  padding: 1rem;
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  background: var(--bp-card);
}
.tf-hist b { display: block; font: 600 1.35rem var(--f-head); color: var(--yellow); margin-bottom: .3rem; }
.tf-hist span { font-size: .85rem; color: var(--on-dark-muted); line-height: 1.45; }
.tf-quote {
  margin: .9rem 0 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(201,154,58,.5);
  border-radius: 6px;
  background: rgba(201,154,58,.08);
  font-size: 1.02rem;
}
.tf-quote small {
  display: block;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  margin-bottom: .3rem;
}

/* Подбор — 5 шагов */
.tf-steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: .8rem;
}
.tf-steps li {
  padding: 1rem;
  border-top: 2px solid var(--yellow);
  background: var(--bp-card);
}
.tf-steps em { font: 700 1.6rem var(--f-head); color: var(--yellow); font-style: normal; display: block; }
.tf-steps strong { display: block; font: 600 1rem var(--f-head); margin: .2rem 0; }
.tf-steps small { color: var(--on-dark-muted); font-size: .8rem; }

/* Каталог — страницы PDF картинками, листаются вбок */
.tf-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  flex-wrap: wrap;
}
.tf-cat-head .bp-h { margin-bottom: 0; }
.tf-cat-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.tf-cat-hint { color: var(--on-dark-muted); font-size: .82rem; margin: .7rem 0; }
.tf-pages {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .8rem;
  -webkit-overflow-scrolling: touch;
}
.tf-page {
  position: relative;
  flex: 0 0 min(420px,82vw);
  scroll-snap-align: start;
  border: 1px solid var(--bp-line);
  border-radius: 4px;
  overflow: hidden;
  background: #111;
}
.tf-page img { display: block; width: 100%; height: auto; }
.tf-page span {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  font-size: .72rem;
  padding: .15rem .45rem;
  background: rgba(0,0,0,.7);
  color: var(--on-dark);
  border-radius: 3px;
}
.tf-pages::-webkit-scrollbar { height: 6px; }
.tf-pages::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* Нижняя полоса «Что получает клиент» */
.tf-client {
  display: flex;
  align-items: center;
  gap: 1rem 1.6rem;
  flex-wrap: wrap;
  padding: 1.2rem 0;
  border-top: 1px solid var(--bp-line);
}
.tf-client-h { font: 600 1.35rem var(--f-head); }
.tf-cls { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; flex: 1 1 auto; }
.tf-cl { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--on-dark-muted); }
.tf-cl .ic { font-size: 1.3rem; color: var(--yellow); }
.tf-cta { display: flex; gap: .6rem; flex-wrap: wrap; }

/* =====================================================================
   ПЛАНШЕТЫ И ТЕЛЕФОНЫ
   ===================================================================== */
@media (max-width:1000px) {
  .bcards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .bwhys,.tf-whys { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tf-why:nth-child(3) { border-left: 0; }
  .tf-why:nth-child(n+3) { border-top: 1px solid var(--bp-line); }
  .tf-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:640px) {
  .bp-hero { padding-bottom: 10rem; margin-bottom: -8rem; }
  .bp-hero-list { min-height: 0; }
  .bp-count b { font-size: 2.6rem; }
  .bcards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
  .bcard { padding: .7rem; }
  .bc-logo { height: 40px; }
  .bc-foot { font-size: .75rem; }
  .bc-go { width: 1.8rem; height: 1.8rem; }
  .bc-foot { flex-wrap: wrap; }
  .bc-soon { font-size: .6rem; }
  .tf-banner {
    grid-template-columns: 1fr auto;
    padding: 1.1rem;
    gap: .8rem 1rem;
  }
  .tf-banner::before { width: 80%; opacity: .45; }

  .tf-banner-logo { grid-column: 1 / -1; height: 40px; margin-right: 0; }
  .tf-banner-txt strong { font-size: 1.15rem; }
  .bwhys,.tf-whys { grid-template-columns: 1fr; }
  .tf-why + .tf-why { border-left: 0; border-top: 1px solid var(--bp-line); }
  .tf-lines { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
  .tf-steps { grid-template-columns: 1fr 1fr; }
  .bp-cta { padding: 1.2rem; }
  .bp-cta .btn,.tf-cta .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
  .tf-cta { width: 100%; }
}


/* =====================================================================
   СТРАНИЦЫ БРЕНДОВ КОМБАЙНОВ (#/brands/<slug>)
   ===================================================================== */
.bp-sub { color: var(--on-dark-muted); max-width: 70ch; margin: -.4rem 0 1.1rem; font-size: .95rem; }
.bp-sub b { color: var(--on-dark); font-weight: 600; }
.bp-logo {
  display: block;
  height: clamp(40px,6vw,64px);
  width: auto;
  max-width: min(420px,80vw);
  object-fit: contain;
  object-position: left center;
  margin: .6rem 0 .8rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.bfacts { display: flex; flex-wrap: wrap; gap: .8rem 2.2rem; margin-top: 1.4rem; }
.bf { padding-left: .9rem; border-left: 2px solid var(--yellow); }
.bf b { display: block; font: 700 1.6rem/1.1 var(--f-head); color: var(--on-dark); }
.bf small { color: var(--on-dark-muted); font-size: .8rem; }
.bp-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(201,154,58,.5);
  border-radius: 6px;
  background: rgba(201,154,58,.08);
  font-size: .9rem;
  color: var(--on-dark-muted);
  line-height: 1.5;
}
.bp-note .ic { flex: none; font-size: 1.8rem; color: var(--yellow); }
.bp-note strong { display: block; color: var(--on-dark); font: 600 1.05rem var(--f-head); margin-bottom: .2rem; }
.bl-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.bl-chip {
  padding: .55rem 1rem;
  border: 1px solid rgba(240,215,126,.5);
  border-radius: 4px;
  background: var(--bp-card);
  font: 600 .95rem var(--f-head);
  letter-spacing: .02em;
}
.bp-src { margin-top: .8rem; font-size: .75rem; color: var(--on-dark-muted); opacity: .8; }
@media (max-width:640px) {
  .bf b { font-size: 1.3rem; }
  .bfacts { gap: .7rem 1.4rem; }
}
@media (max-width:640px) {
  /* на узком экране текст лежит поверх самой техники — затемняем сильнее */
  .bp-hero-brand::after {
    background:
      linear-gradient(0deg,#000 0%,rgba(0,0,0,.85) 15%,rgba(0,0,0,.55) 40%,rgba(0,0,0,.45) 100%);
  }
}

/* ---------- Фото для телефона ----------
   На узком экране берём вертикальные версии фото, если они есть:
     images/brands/page/brands-hero-mobile.jpg, turboflex-hero-mobile.jpg
   Пока файлов нет — остаётся обычное фото, сдвинутое так, чтобы в кадре
   была главная часть (ремни, здание с флагами). */
@media (max-width:640px) {
  .bp-hero-list {
    --bp-img-pos: 70% top;
    --bp-img-m: url('../images/brands/page/brands-hero-mobile.jpg');
  }
  .tf-hero {
    --bp-img-pos: 72% center;
    --bp-img-m: url('../images/brands/page/turboflex-hero-mobile.jpg');
  }
}

/* =====================================================================
   ФАЙЛ 18. КАТАЛОГ РЕМНЕЙ TURBOFLEX (#/brands/turboflex/catalog)
   Разметка — js/view-tf-catalog.js. Фон и заголовки — из css/17-brands.css.
   ===================================================================== */

/* верхний экран пониже, чем на странице бренда — сразу к товарам */
.tfc-hero { padding-bottom: 12rem; margin-bottom: -10rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Поиск ---------- */
.tfc-search { display: flex; gap: .6rem; max-width: 640px; }
.tfc-search input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--bp-line);
  color: var(--on-dark);
}
.tfc-search input::placeholder { color: var(--on-dark-muted); }
.tfc-search input:focus { border-color: var(--yellow); }

/* ---------- Фильтр по линейкам ---------- */
.tfc-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.tfc-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border: 1px solid var(--bp-line);
  border-radius: 4px;
  color: var(--on-dark);
  font-size: .9rem;
  text-decoration: none;
  transition: border-color .2s, background .2s, color .2s;
}
.tfc-chip em {
  font-style: normal;
  font-size: .75rem;
  color: var(--on-dark-muted);
}
.tfc-chip:hover { border-color: var(--yellow); color: var(--yellow); }
.tfc-chip[aria-current] { background: var(--yellow); border-color: var(--yellow); color: var(--btn-ink, #111); }
.tfc-chip[aria-current] em { color: inherit; opacity: .7; }

/* ---------- Заглушка «Товары скоро появятся» ---------- */
.tfc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.2rem;
  border: 1px dashed rgba(240,215,126,.35);
  border-radius: 6px;
  background: var(--bp-card);
}
.tfc-empty-pic { width: 140px; margin-bottom: 1rem; opacity: .9; }
.tfc-empty strong { font: 600 1.6rem var(--f-head); color: var(--on-dark); }
.tfc-empty p { max-width: 56ch; margin: .6rem 0 1.4rem; color: var(--on-dark-muted); line-height: 1.5; }
.tfc-empty p b { color: var(--on-dark); font-weight: 600; }
.tfc-empty-btns { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* ---------- Сетка товаров (когда появятся) ---------- */
.tfc-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; }
.tfc-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  background: var(--bp-card);
  color: var(--on-dark);
}
.tfc-card-pic { display: block; padding: .6rem 1rem; }
.tfc-card-prof { color: var(--yellow); font-size: .8rem; letter-spacing: .04em; }
.tfc-card-oem { color: var(--on-dark-muted); font-size: .8rem; }
.tfc-card-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: .6rem; }
.tfc-card-foot small { color: var(--on-dark-muted); font-size: .8rem; }

.brands-page .tf-note a { color: var(--on-dark-muted); }
.brands-page .tf-note a:hover { color: var(--yellow); }

@media (max-width:1000px) { .tfc-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width:640px) {
  .tfc-hero { padding-bottom: 8rem; margin-bottom: -6rem; }
  .tfc-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tfc-empty { padding: 2rem 1rem; }
  /* фильтры — одной строкой с прокруткой вбок */
  .tfc-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .tfc-chips::-webkit-scrollbar { display: none; }
  .tfc-chip { flex: none; }
}

/* Карточка ремня: ссылки, фото, кнопка «В корзину» */
.tfc-card a { color: inherit; text-decoration: none; }
.tfc-card strong a:hover { color: var(--yellow); }
.tfc-card-pic img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.tfc-card .btn { margin-top: .6rem; width: 100%; }

/* =====================================================================
   ФАЙЛ 19. НОВЫЕ ЭЛЕМЕНТЫ САЙТА
   Поиск на главной и подсказки, окно заявки, избранное, cookie,
   мессенджеры, заказ списком, контакты, 404, подвал, товар на телефоне.
   Разметка — js/ui-extras.js, js/search.js, js/view-*.js.
   ===================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.is-soon { opacity: .6; }
.is-soon small { font-size: .72rem; opacity: .85; }

/* ---------- Большой поиск на главном экране ---------- */
.hero-search {
  position: relative;
  display: flex;
  max-width: 640px;
  margin-top: .4rem;
  background: rgba(10,10,9,.72);
  border: 1px solid rgba(240,215,126,.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240,215,126,.18);
}
.hero-search-ic {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  color: var(--yellow);
  pointer-events: none;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--on-dark);
  font-size: 1.05rem;
  padding: 1rem 1rem 1rem 2.9rem;
}
.hero-search input::placeholder { color: var(--on-dark-muted); }
.hero-search input:focus { outline: none; }
.hero-search .btn { border: 0; padding: 0 1.7rem; font-size: 1rem; }
.hero-hints {
  margin: .7rem 0 0;
  font-size: .85rem;
  color: var(--on-dark-muted);
}
.hero-hints a {
  color: var(--on-dark);
  margin-left: .5rem;
  text-decoration: none;
  border-bottom: 1px dashed rgba(240,215,126,.6);
  font-family: var(--f-mono);
  font-size: .82rem;
}
.hero-hints a:hover { color: var(--yellow); }
.hero-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1rem; }
.hero-links a, .hero-links .link {
  color: var(--yellow);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
}
.hero-links a:hover, .hero-links .link:hover { text-decoration: underline; }

/* ---------- Подсказки под строкой поиска ---------- */
.suggest {
  position: fixed;
  z-index: 60;
  background: #111110;
  color: var(--on-dark);
  border: 1px solid var(--yellow);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  max-height: 70vh;
  overflow: auto;
}
.sg-item {
  display: grid;
  grid-template-columns: minmax(6rem,auto) 1fr auto;
  gap: .3rem .9rem;
  align-items: baseline;
  padding: .65rem .9rem;
  color: var(--on-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--dark-line);
}
.sg-item:hover, .sg-item.on { background: rgba(240,215,126,.12); }
.sg-art { font: 500 .8rem var(--f-mono); color: var(--yellow); }
.sg-name { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-price { font-size: .88rem; color: var(--on-dark-muted); white-space: nowrap; }
.sg-all {
  display: block; width: 100%;
  background: transparent; border: 0;
  color: var(--yellow); font: 600 .9rem var(--f-body);
  padding: .7rem .9rem; text-align: left; cursor: pointer;
}
.sg-all:hover { background: rgba(240,215,126,.12); }
.sg-empty { margin: 0; padding: .9rem; font-size: .9rem; color: var(--on-dark-muted); }
.sg-empty .link { color: var(--yellow); font-size: .9rem; }
@media (max-width:560px) {
  .sg-item { grid-template-columns: 1fr auto; }
  .sg-name { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
}

/* ---------- Окно заявки (подбор, запрос цены, вопрос) ---------- */
.site-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--yellow);
  background: var(--surface);
  color: var(--ink);
  padding: 1.2rem 1.3rem;
  overflow: auto;
}
.site-dialog::backdrop { background: rgba(0,0,0,.6); }
.site-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.site-dialog-head h2 { margin: 0; font-size: 1.4rem; }
.site-x { border: 0; background: transparent; color: var(--ink); font-size: 1.9rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.site-dialog textarea { width: 100%; }
.req-product {
  margin: .6rem 0;
  padding: .6rem .8rem;
  border-left: 3px solid var(--yellow);
  background: var(--bg);
  font-size: .92rem;
}
.req-product .art { margin-right: .4rem; }
.photo-pick img { max-width: 7rem; }

/* ---------- Избранное (сердечко) ---------- */
.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  padding: .45rem;
  font: 500 .88rem var(--f-body);
  transition: color .15s, border-color .15s, background .15s;
}
.fav-btn .ic { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fav-btn:hover { color: var(--err); border-color: var(--err); }
.fav-btn.on { color: var(--err); border-color: var(--err); }
.fav-btn.on .ic { fill: currentColor; }
.buyrow .fav-btn { padding: .55rem .8rem; }
/* на карточке — кружок в углу фото */
.part { position: relative; }
.part > .fav-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 2;
  border-radius: 50%;
  background: rgba(10,10,9,.65);
  border-color: transparent;
  color: var(--on-dark);
}
.part > .fav-btn.on { color: #ff6b5e; }
.acc-fav { margin: .2rem 0 .8rem 1.1rem; }
.acc-fav li { margin: .3rem 0; }

/* ---------- Плашка cookie ---------- */
.cookie-bar {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 70;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  background: #111110;
  color: var(--on-dark);
  border: 1px solid var(--dark-line);
  border-left: 3px solid var(--yellow);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.cookie-bar p { margin: 0; font-size: .84rem; line-height: 1.45; color: var(--on-dark-muted); }
.cookie-bar a { color: var(--yellow); }
.cookie-bar .btn { flex: none; }
/* не заезжаем на кнопки мессенджеров справа */
.cookie-bar { max-width: min(560px, calc(100vw - 96px)); }
@media (max-width:560px) {
  .cookie-bar { left: 8px; right: 8px; bottom: 8px; max-width: none; flex-direction: column; align-items: stretch; }
  /* пока видна плашка cookie, мессенджеры поднимаются над ней */
  body.has-cookie .msgr { bottom: 190px; }
}

/* ---------- Кнопки мессенджеров справа внизу ---------- */
.msgr {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.msgr-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: #111110;
  color: var(--on-dark);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .15s, background .15s;
}
.msgr-btn .ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.msgr-btn:hover { transform: translateY(-2px); }
.msgr-whatsapp:hover { background: #1f8f4e; }
.msgr-telegram:hover { background: #2a86c9; }
.msgr-max:hover { background: #5b3bd6; }
.msgr-btn.is-soon { opacity: .75; }
@media (max-width:560px) {
  .msgr { right: 10px; bottom: 10px; gap: .4rem; }
  .msgr-btn { width: 42px; height: 42px; }
}

/* ---------- Подвал: 4 колонки, ссылки-кнопки ---------- */
.foot-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
.foot-link {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  margin: .25rem 0;
  color: var(--on-dark-muted);
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  text-align: left;
}
.foot-link:hover { color: var(--on-dark); }
.site-foot .foot-phone { font-size: 1.15rem; color: var(--on-dark); font-weight: 600; }
.foot-vat { border-top: 1px solid var(--dark-line); }
@media (max-width:820px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width:480px) {
  .foot-grid { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ---------- Страница товара ---------- */
.pdp-media.no-photo { aspect-ratio: 4/3; }
.pdp-vat { margin: .2rem 0 0; font-size: .82rem; color: var(--muted); }
.pdp-help { margin: -.2rem 0 1rem; }
.pdp-help .link { font-size: inherit; }
.pdp-help a { color: var(--ink); font-weight: 600; }
.pdp-similar { padding-top: 3rem; padding-bottom: 0; }
@media (max-width:820px) {
  /* на телефоне сначала название, цена и кнопка, фото — ниже и компактнее */
  .pdp { display: flex; flex-direction: column; gap: 1.2rem; }
  /* фото — сверху, во всю ширину (раньше блок сжимался до нуля и фото не было видно) */
  .pdp { align-items: stretch; }
  .pdp-media { width: 100%; max-height: 62vw; }
  .pdp-media.photo img { object-fit: contain; background: #0d0d0c; }
  .pdp-media.no-photo { aspect-ratio: auto; height: 120px; }
  .pdp-media.no-photo .ic { font-size: 2.2rem; }
  .crumb-last { display: none; }
  .pdp .price { font-size: 1.9rem; }
  .buyrow .btn { flex: 1; }
}

/* ---------- Оформление: организация / частное лицо, оплата ---------- */
.co-type { max-width: 520px; }
.pay-opts { display: grid; gap: .5rem; }
.pay-opt {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .3rem .5rem;
  border: 1px solid var(--line);
  padding: .6rem .8rem;
  cursor: pointer;
}
.pay-opt small { flex-basis: 100%; color: var(--muted); font-size: .8rem; margin-left: 1.4rem; }
.pay-opt:has(input:checked) { border-color: var(--yellow); background: var(--surface); }
.pay-soon { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }
.pay-soon .btn[disabled] { opacity: .5; cursor: not-allowed; }
.cart-more { margin-top: 1rem; }

/* ---------- Заказ списком ---------- */
.qo-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 1.6rem; align-items: start; }
.qo-grid label[for="qo-text"] { display: block; font-weight: 500; margin-bottom: .4rem; }
.qo-grid textarea { width: 100%; font: .95rem/1.5 var(--f-mono); }
.qo-help { border-left: 3px solid var(--yellow); background: var(--surface); padding: 1rem 1.2rem; }
.qo-help h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.qo-help ul { margin: 0 0 0 1rem; font-size: .9rem; color: var(--muted); }
.qo-help li { margin: .35rem 0; }
.qo-h { font-size: 1.25rem; margin: 2rem 0 .4rem; }
.qo-table .qo-qty { width: 5rem; padding: .35rem .5rem; }
.qo-table .art { font-family: var(--f-mono); font-size: .85rem; }
.qo-total {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 1rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line);
}
.qo-total b { font-size: 1.3rem; }
.qo-missing { margin-top: 1.4rem; padding: 1rem 1.2rem; border: 1px dashed var(--err); }
.qo-missing ul { margin: .4rem 0 1rem 1rem; font-family: var(--f-mono); font-size: .88rem; }
@media (max-width:820px) { .qo-grid { grid-template-columns: 1fr; } }

/* ---------- Контакты ---------- */
.ct-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 2rem; align-items: start; }
.ct-item { display: flex; flex-direction: column; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ct-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ct-item a { color: var(--ink); font-weight: 500; }
.ct-big { font: 600 1.5rem var(--f-head); text-decoration: none; }
.ct-msgr { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.ct-info .actions { margin-top: 1rem; }
.ct-map iframe { display: block; width: 100%; height: 380px; border: 1px solid var(--line); margin-bottom: .7rem; }
.ct-more { margin-top: 2rem; }
@media (max-width:820px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-map iframe { height: 300px; }
}

/* ---------- 404 ---------- */
.nf-page { text-align: center; padding-top: 3rem; padding-bottom: 4rem; }
.nf-code { font: 700 clamp(5rem,16vw,9rem)/1 var(--f-head); color: var(--yellow); margin: 0; -webkit-text-stroke: 1px var(--ink); }
.nf-page p { max-width: 46ch; margin-left: auto; margin-right: auto; }
.nf-search { display: flex; max-width: 460px; margin: 1.4rem auto; }
.nf-search input { flex: 1; min-width: 0; }
.nf-page .actions { justify-content: center; }

/* ---------- Админка: заявки ---------- */
.adm-req { border: 1px solid var(--line); border-left: 4px solid var(--yellow); padding: .8rem 1rem; margin-top: .8rem; }
.adm-req.is-done { border-left-color: var(--ok); opacity: .7; }
.adm-req p { margin: .25rem 0; }
.adm-req-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .3rem; }
.adm-req-done { margin-left: auto; }
.adm-req-msg { white-space: normal; background: var(--bg); padding: .5rem .7rem; }
.admin-stat a { color: inherit; text-decoration: none; }
.acc-order-btn { white-space: nowrap; }
.acc-order-btn .btn { padding: .35rem .7rem; font-size: .85rem; margin: .1rem 0; }

/* ---------- Главная: большая кнопка «Весь каталог» под поиском ---------- */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; margin-top: 1.2rem; }
.hero-cat-btn { gap: .6rem; font-size: 1.05rem; padding: .95rem 1.6rem; }
.hero-cat-btn .ic { width: 1.2rem; height: 1.2rem; }
.hero-cat-btn small { font-weight: 500; opacity: .7; font-size: .82rem; }
.hero-actions .hero-links { margin-top: 0; flex-direction: column; gap: .35rem; }
@media (max-width:560px) {
  .hero-cat-btn { width: 100%; }
}

/* ---------- Страница «Категории»: кнопки ---------- */
.cat-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 2rem; }
.cat-actions .btn { gap: .55rem; }
.cat-actions .btn .ic { width: 1.15rem; height: 1.15rem; }
.cat-actions .btn small { font-weight: 500; opacity: .7; font-size: .8rem; }
.cat-tile-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font: 600 .82rem var(--f-body);
  transition: background .15s, color .15s;
}
.cat-tile:hover .cat-tile-go { background: var(--yellow); color: #111; }
.type-tiles .cat-tile { flex-wrap: wrap; }
.type-tiles .cat-tile-go { margin-top: 0; margin-left: auto; }
@media (max-width:560px) {
  .cat-actions .btn { width: 100%; }
}

/* Окно cookie: две кнопки (js/ui-extras.js) и страницы документов (js/view-info.js) */
.cookie-bar .cookie-btns { display: flex; flex-wrap: wrap; gap: .5rem; flex: none; }
.doc-page .prose { max-width: 820px; }
.doc-page .prose ul { padding-left: 1.2rem; }
.doc-page .prose li { margin: .25rem 0; }
.doc-others { margin-top: 2rem; line-height: 1.8; }
.consent-note { font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }
.consent-note a { color: inherit; }
@media (max-width: 760px) { .cookie-bar { flex-wrap: wrap; } .cookie-bar p { flex: 1 1 100%; } .cookie-bar .cookie-btns { width: 100%; } .cookie-bar .cookie-btns .btn { flex: 1; } }

/* ---------- Оригинал / аналог: пометка и группа на странице товара (js/part-card.js, js/view-product.js) ---------- */
.kind-badge { display: inline-block; padding: .05rem .5rem; border-radius: 2rem; font-size: .7rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: var(--surface); vertical-align: middle; }
.kind-badge.is-orig { border-color: var(--gold); color: var(--ink); background: var(--yellow); }
.pdp-group { margin-top: 2rem; }
.pdp-group[hidden] { display: none; }
.pdp-group h2 { margin-bottom: .6rem; }
.pdp-group h2:not(:first-child) { margin-top: 1.5rem; }
.grp-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.grp-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.grp-main { flex: 1 1 16rem; min-width: 0; }
.grp-main a { color: var(--ink); font-weight: 600; text-decoration: none; }
.grp-main a:hover { text-decoration: underline; }
.grp-main small { display: block; color: var(--muted); font-family: var(--f-mono); margin-top: .15rem; }
.grp-price { font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) { .grp-row .btn { flex: 1 1 auto; } }

/* Оригинал / аналоги — под фото товара (js/view-product.js → blockGroup), карточками */
.pdp-media-wrap .pdp-group { margin-top: 1.4rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(255,255,255,.025); }
.pdp-media-wrap .pdp-group h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.pdp-media-wrap .pdp-group h2:not(:first-child) { margin-top: 1.1rem; }
.pdp-media-wrap .grp-list { border-top: 0; display: grid; gap: .6rem; }
.pdp-media-wrap .grp-row { display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: "ph main price" "ph stock stock" "btns btns btns";
  gap: .35rem .8rem; padding: .7rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--card, rgba(255,255,255,.03)); }
.grp-ph { grid-area: ph; width: 64px; height: 64px; border-radius: .6rem; overflow: hidden; display: block; background: rgba(255,255,255,.05); }
.grp-ph img, .grp-ph svg { width: 100%; height: 100%; object-fit: cover; }
.pdp-media-wrap .grp-main { grid-area: main; }
.pdp-media-wrap .grp-price { grid-area: price; font-size: 1.1rem; }
.pdp-media-wrap .grp-row .pdp-stock { grid-area: stock; justify-self: start; }
.pdp-media-wrap .grp-row .btn { grid-row: 3; }
.pdp-media-wrap .grp-row .btn-ghost { grid-column: 1 / 3; }
.pdp-media-wrap .grp-row .btn:not(.btn-ghost) { grid-column: 3; }
.pdp-media-wrap .grp-row > :only-of-type.btn-ghost { grid-column: 1 / -1; }
.pdp-similar[hidden] { display: none; }

/* Поиск списком артикулов: вход из окна поиска и с главной, строка «Есть также» */
.ss-list { display: flex; gap: .8rem; align-items: center; margin: .2rem 0 1rem; padding: .8rem 1rem; border: 1px solid var(--yellow); border-radius: .9rem; color: var(--ink); text-decoration: none; background: rgba(231,196,95,.08); }
.ss-list .ic { width: 26px; height: 26px; color: var(--yellow); flex: none; }
.ss-list b { display: block; } .ss-list small { color: var(--muted); }
.hero-links .hero-list-btn { display: inline-flex; align-items: center; gap: .5rem; }
.hero-links .hero-list-btn .ic { width: 20px; height: 20px; }
.qo-alts td { border-top: 0 !important; padding-top: 0 !important; }
.qo-alt { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .2rem 1.2rem .2rem 0; padding: .3rem .6rem; border: 1px dashed var(--line); border-radius: .6rem; }
.pdp-info .pdp-group { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(255,255,255,.025); }
.pdp-info .pdp-group h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.pdp-info .grp-list { border-top: 0; display: grid; gap: .6rem; }
.pdp-info .grp-row { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "ph main price" "ph stock stock" "btns btns btns"; gap: .35rem .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: .8rem; }
.pdp-info .grp-ph { width: 56px; height: 56px; }
.pdp-info .grp-main { grid-area: main; } .pdp-info .grp-price { grid-area: price; }
.pdp-info .grp-row .pdp-stock { grid-area: stock; justify-self: start; }
.pdp-info .grp-row .btn { grid-row: 3; } .pdp-info .grp-row .btn-ghost { grid-column: 1 / 3; } .pdp-info .grp-row .btn:not(.btn-ghost) { grid-column: 3; }
.grp-ph { position: relative; }
.grp-ph .sample-dot { position: absolute; left: 2px; right: 2px; bottom: 2px; font-size: .55rem; text-align: center; }

/* =====================================================================
   ФАЙЛ 20. КАТАЛОГ: НОВЫЕ ФИЛЬТРЫ, ВИД СПИСКОМ, ФОТО УЗЛОВ
   Разметка — js/view-catalog.js, js/part-card.js.
   ===================================================================== */

/* ---------- Раскладка: фильтры слева, товары справа ---------- */
.cf-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

/* Панель фильтров (на компьютере — «прилипает» и листается сама) */
.cf-panel {
  position: sticky;
  top: calc(var(--head-h, 84px) + 12px);
  max-height: calc(100vh - var(--head-h, 84px) - 24px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.cf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem .4rem;
  font: 600 1.15rem var(--f-head);
}
.cf-close { display: none; border: 0; background: none; color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.cf-body {
  overflow-y: auto;
  padding: .2rem 1rem 1rem;
  display: grid;
  gap: 1.1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.cf-foot { display: none; }
.cf-group { display: grid; gap: .45rem; }
.cf-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cf-search input, .cf-cat-search { width: 100%; }
.cf-cat-search { padding: .45rem .6rem; font-size: .88rem; }

/* Варианты — кнопками с цифрой */
.cf-opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.cf-opt {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .65rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 500 .86rem var(--f-body);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cf-opt:hover { border-color: var(--yellow); }
.cf-opt.on { background: var(--yellow); border-color: var(--yellow); color: var(--btn-ink, #141414); font-weight: 600; }
.cf-n { font-style: normal; font-size: .75rem; color: var(--muted); font-weight: 500; }
.cf-opt.on .cf-n { color: inherit; opacity: .7; }
.cf-cats.collapsed .cf-more-item,
.cf-opt[hidden], .cf-more[hidden] { display: none; }
.cf-more { justify-self: start; font-size: .85rem; }

.cf-price { display: flex; align-items: center; gap: .4rem; }
.cf-price input { width: 100%; min-width: 0; padding: .45rem .6rem; }
.cf-price span { color: var(--muted); }

.cf-toggles { gap: .55rem; }
.cf-toggle { display: flex; align-items: center; gap: .55rem; font-size: .92rem; cursor: pointer; }
.cf-toggle input { flex: none; accent-color: var(--yellow); width: 1.05rem; height: 1.05rem; }
.cf-toggle input:disabled + span { color: var(--muted); }
.cf-toggle .cf-n { margin-left: auto; }

/* ---------- Над товарами: марки, строка управления, выбранное ---------- */
.cq-makers { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.cq-maker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .8rem .45rem .6rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mk, var(--yellow));
  background: var(--surface);
  color: var(--ink);
  font: 600 .9rem var(--f-body);
  cursor: pointer;
}
.cq-maker img { height: 20px; width: auto; max-width: 70px; object-fit: contain; }
.cq-maker em { font-style: normal; font-weight: 500; font-size: .78rem; color: var(--muted); }
.cq-maker.on { border-color: var(--mk, var(--yellow)); box-shadow: inset 0 0 0 1px var(--mk, var(--yellow)); }
.cq-maker:hover { border-color: var(--mk, var(--yellow)); }

.cf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .6rem; }
.cf-open { display: none; gap: .5rem; }
.cf-open .ic { width: 1.1rem; height: 1.1rem; }
.cf-open b {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .3rem;
  border-radius: 1rem;
  background: var(--yellow);
  color: #141414;
  font-size: .78rem;
}
.cf-count { color: var(--muted); font-size: .92rem; margin-right: auto; }
.cf-bar select { width: auto; min-width: 190px; }
.cf-view { display: inline-flex; border: 1px solid var(--line-strong); }
.cf-view button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.cf-view button + button { border-left: 1px solid var(--line-strong); }
.cf-view button.on { background: #000; color: var(--yellow); }
.cf-view .ic { width: 1.15rem; height: 1.15rem; }

.cf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin-bottom: 1rem; }
.cf-chips:empty { display: none; }
.cf-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .5rem .3rem .7rem;
  border: 1px solid var(--yellow);
  background: color-mix(in srgb, var(--yellow) 18%, transparent);
  color: var(--ink);
  font: 500 .84rem var(--f-body);
  cursor: pointer;
}
.cf-chip span { font-size: .75rem; opacity: .7; }
.cf-chip:hover span { opacity: 1; color: var(--err); }
.cf-reset-all { font-size: .85rem; margin-left: .3rem; }

/* ---------- Вид списком (для оптовиков) ---------- */
.cl-list { border-top: 1px solid var(--line); }
.cl-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 150px 110px auto;
  align-items: center;
  gap: .9rem;
  padding: .6rem .3rem;
  border-bottom: 1px solid var(--line);
}
.cl-row:hover { background: var(--surface); }
.cl-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 44px;
  background: #0f0f0e;
  color: var(--yellow);
  overflow: hidden;
}
.cl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cl-thumb .ic { font-size: 1.3rem; }
.cl-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.cl-main .art { font-size: .78rem; }
.cl-name { color: var(--ink); font-weight: 500; text-decoration: none; }
.cl-name:hover { text-decoration: underline; }
.cl-meta { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-stock .stock { font-size: .8rem; }
.cl-price { font: 600 1.05rem var(--f-head); white-space: nowrap; text-align: right; }
.cl-price.on-request { font: 500 .85rem var(--f-body); color: var(--muted); }
.cl-buy { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; }
.cl-qty { width: 3.2rem; text-align: center; padding: .45rem .3rem; }
.cl-buy .btn { padding: .5rem .7rem; }
.cl-buy .btn .ic { width: 1.1rem; height: 1.1rem; }
.cl-buy .fav-btn { padding: .45rem; }

/* ---------- Фото узла «для примера» ---------- */
.plate.is-sample img { filter: saturate(.85); }
.sample-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: .35rem .6rem;
  background: rgba(10,10,9,.82);
  color: var(--yellow);
  font: 500 .72rem/1.3 var(--f-body);
  text-align: center;
  letter-spacing: .01em;
}
.pdp-media .sample-note { font-size: .82rem; padding: .55rem .8rem; }
.sample-dot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,10,9,.8);
  color: var(--yellow);
  font: 600 .55rem/1.4 var(--f-body);
  text-transform: uppercase;
  text-align: center;
}
.cthumb { position: relative; overflow: hidden; }

/* ---------- Админка: фото узлов ---------- */
.adm-catphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-top: .6rem; }
.adm-catphoto { display: flex; flex-direction: column; gap: .35rem; border: 1px solid var(--line); padding: .6rem; }
.adm-catphoto.busy { opacity: .5; pointer-events: none; }
.adm-catphoto-img { aspect-ratio: 4/3; display: grid; place-items: center; background: #0f0f0e; color: var(--yellow); overflow: hidden; }
.adm-catphoto-img img { width: 100%; height: 100%; object-fit: cover; }
.adm-catphoto-img .ic { font-size: 2.2rem; }
.adm-catphoto strong { font-size: .9rem; line-height: 1.25; }
.adm-catphoto-btns { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; margin-top: auto; }
.adm-catphoto-btns .btn { padding: .45rem .6rem; font-size: .85rem; justify-content: center; text-align: center; }
.adm-catphoto-btns .link { align-self: center; }
.photo-pick { flex-wrap: wrap; }
/* Описание раздела для поисковиков и покупателей (server/lib/seo.js) — под страницей, спокойным текстом */
.seo-text { padding-top: 1.4rem; padding-bottom: 2rem; color: var(--muted, #8a877c); font-size: .9rem; line-height: 1.55; }
.seo-text p { max-width: 900px; }
.seo-text p { margin-top: 0; margin-bottom: 0; }
.seo-list { columns: 2 260px; padding-left: 1.1rem; line-height: 1.7; }
.design-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.design-toolbar .d-filter { width: 180px; }
.design-toolbar select { flex: 1 1 260px; width: auto; }
.design-toolbar input[type=text] { flex: 1 1 240px; width: auto; }
.d-history { display: flex; flex-direction: column; gap: .4rem; max-height: 420px; overflow: auto; }
.d-hist-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; border-bottom: 1px solid var(--line); padding: .35rem 0; }
.d-log { white-space: pre-wrap; font-size: .75rem; max-height: 220px; overflow: auto; background: #0e0e0d; padding: .5rem; }
.mk-list { display: flex; flex-direction: column; gap: .6rem; margin: .6rem 0; }
.mk-row { display: flex; gap: .8rem; align-items: flex-start; border: 1px solid var(--line); padding: .6rem; flex-wrap: wrap; }
.mk-logo { width: 90px; display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .8rem; }
.mk-logo img { width: 80px; height: 80px; object-fit: contain; background: #fff; border-radius: 4px; }
.mk-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: .4rem; }
.mk-top { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .85rem; }
.mk-top input[type=text] { flex: 1 1 180px; }
.mk-top select, .mk-top input[type=checkbox] { width: auto; flex: none; }
.mk-top label { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.mk-top input[type=color] { width: 36px; height: 28px; padding: 0; border: 0; background: none; vertical-align: middle; }
.mk-main textarea { width: 100%; }
.mk-btns { display: flex; flex-direction: column; gap: .3rem; }
.adm-prompts { margin: .6rem 0; border: 1px solid var(--line); padding: .5rem .8rem; }
.adm-prompts summary { cursor: pointer; font-weight: 600; }
.adm-prompts .field { margin-top: .5rem; }
.adm-prompts textarea { width: 100%; }
.adm-ai-form { display: flex; flex-wrap: wrap; gap: .8rem; margin: .6rem 0; }
.adm-ai-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; min-width: 200px; flex: 1 1 200px; }
.adm-ai-log { max-height: 260px; overflow: auto; font-size: .85rem; margin-top: .6rem; display: flex; flex-direction: column; gap: .2rem; }
#pd-desc-ai { margin-top: .4rem; }
.pd-ai-hint { flex: 1 1 100%; }
.pd-ai-ref { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; flex: 1 1 100%; font-size: .85rem; }
.pd-ai-ref img { width: 64px; height: 48px; object-fit: contain; background: #fff; }
.adm-ai-pick { display: flex; gap: 1rem; margin: .2rem 0 .4rem; }
.adm-ai-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); padding: .3rem .5rem; display: flex; flex-direction: column; }
.adm-ai-item { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .85rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.adm-ai-item:last-child { border-bottom: 0; }
.adm-ai-item input { flex: none; width: 1rem; height: 1rem; }
.adm-ai-item img { width: 40px; height: 30px; object-fit: cover; flex: none; }
.photo-pick .ai-busy { font-size: .85rem; color: var(--yellow); }

/* ---------- Телефон и планшет: фильтры выезжают снизу ---------- */
@media (max-width: 1000px) {
  .cf-layout { display: block; }
  .cf-open { display: inline-flex; }
  .cf-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 90;
    max-height: 88vh;
    border: 0;
    border-top: 3px solid var(--yellow);
    box-shadow: 0 -12px 40px rgba(0,0,0,.45);
    transform: translateY(105%);
    transition: transform .25s ease;
    visibility: hidden;
  }
  .cf-panel.open { transform: translateY(0); visibility: visible; }
  .cf-close { display: block; }
  .cf-foot {
    display: flex;
    gap: .6rem;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .cf-foot .btn:last-child { flex: 1; }
  .cf-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,.55); }
  .cf-backdrop[hidden] { display: none; }
  body.cf-lock { overflow: hidden; }
  body.cf-lock .msgr { display: none; }
  .cf-opt { padding: .5rem .75rem; }
  .cq-makers { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .cq-makers::-webkit-scrollbar { display: none; }
  .cq-maker { flex: none; }
}
@media (max-width: 640px) {
  .cf-bar { gap: .5rem; }
  .cf-bar select { min-width: 0; flex: 1 1 130px; }
  .cf-count { order: 5; flex-basis: 100%; }
  /* строка списка: название во всю ширину, ниже — наличие, цена и кнопки */
  .cl-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb main main"
      "thumb stock price"
      "buy buy buy";
    gap: .25rem .7rem;
    padding: .7rem .2rem;
  }
  .cl-thumb { grid-area: thumb; width: 48px; height: 48px; align-self: start; }
  .cl-main { grid-area: main; }
  .cl-stock { grid-area: stock; align-self: center; }
  .cl-price { grid-area: price; align-self: center; }
  .cl-buy { grid-area: buy; justify-content: flex-start; margin-left: 58px; padding-right: 56px; }
  .cl-buy .btn { flex: 1; max-width: 12rem; }
  .cl-meta { white-space: normal; }
}

/* =====================================================================
   МАРКА ТЕХНИКИ В КАТАЛОГЕ: баннер в цветах бренда (js/view-catalog.js)
   Шапка и фон сайта остаются фирменными AGRON; цвет марки — только в
   баннере, у кнопок и выбранных фильтров внутри страницы каталога.
   ===================================================================== */
#page.brand-on { transition: none; }
#page .btn, #page .cf-opt, #page .cf-chip, #page .cq-maker, #page .cf-view button {
  transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s;
}
.brand-banner[hidden] { display: none; }
.brand-banner {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.4rem;
  padding: 1.3rem 1.4rem 1rem;
  color: #fff;
  border-left: 5px solid var(--brand-2, #fff);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand-2, #fff) 28%, transparent) 0%, transparent 55%),
    linear-gradient(115deg, color-mix(in srgb, var(--brand) 92%, #000) 0%, var(--brand) 55%, color-mix(in srgb, var(--brand) 70%, #000) 100%);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--brand) 30%, transparent);
}
/* тонкие диагональные линии — как на технике */
.brand-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.brand-banner.show { animation: bbIn .45s ease both; }
@keyframes bbIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .brand-banner.show { animation: none; } }
.bb-in { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.bb-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 88px;
  height: 64px;
  padding: .5rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.bb-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bb-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.bb-eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.bb-title { margin: 0 !important; font-size: clamp(1.8rem, 3.4vw, 2.6rem) !important; line-height: 1.05; color: #fff; }
.bb-sub { font-size: .92rem; opacity: .9; }
.bb-about {
  margin-left: auto;
  padding: .5rem .9rem;
  border: 1px solid rgba(255,255,255,.7);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
}
.bb-about:hover { background: #fff; color: var(--brand); }
.bb-models { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.bb-model {
  padding: .35rem .75rem;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(0,0,0,.18);
  color: #fff;
  font: 500 .86rem var(--f-body);
  cursor: pointer;
}
.bb-model:hover { background: rgba(255,255,255,.18); }
.bb-model.on { background: #fff; color: var(--brand); border-color: #fff; font-weight: 600; }
.bb-note { position: relative; z-index: 1; margin: .8rem 0 0; font-size: .72rem; opacity: .7; }
/* логотипы марок на быстрых кнопках — на белой плашке, чтобы читались */
.cq-maker img { background: #fff; padding: 2px 4px; height: 22px; }
@media (max-width: 640px) {
  .brand-banner { padding: 1rem 1rem .9rem; margin-left: -4px; margin-right: -4px; }
  .bb-logo { width: 64px; height: 48px; }
  .bb-about { margin-left: 0; }
  .bb-models { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -1rem; padding-right: 1rem; }
  .bb-models::-webkit-scrollbar { display: none; }
  .bb-model { flex: none; }
}

/* Админка → Товары → «Поставщики и наценка» */
.sup-table input, .sup-table select { width: 100%; min-width: 7rem; padding: .35rem .45rem; font: inherit; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg, #fff); color: inherit; }
.sup-table input[type="checkbox"] { width: auto; min-width: 0; }
.sup-table .sup-num { min-width: 4.5rem; max-width: 7rem; }
.sup-h { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.sup-log { margin: 0; padding-left: 1.1rem; }
.sup-log li { margin: .25rem 0; }
#p-sup .admin-card-actions { flex-wrap: wrap; align-items: center; }
#sup-pick { padding: .45rem .6rem; font: inherit; border: 1px solid var(--line-strong); border-radius: 6px; }
.adm-cost { display: block; font-size: .72rem; color: var(--muted); margin-top: .2rem; white-space: nowrap; }
.adm-products input[data-field="markup"] { max-width: 5rem; }

/* Админка → Документы */
.adm-doc { border: 1px solid var(--line-strong); border-radius: 6px; padding: .7rem 1rem; margin: .6rem 0; }
.adm-doc summary { cursor: pointer; }
.adm-doc textarea { width: 100%; font: .9rem/1.5 var(--f-mono, monospace); }
.adm-doc input { width: 100%; }
.tg-events { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .8rem; }

/* ---------- Телефон: карточки каталога и кнопки мессенджеров (правка 25.09) ---------- */
.msgr-toggle { display: none; }
@media (max-width: 760px) {
  .msgr-toggle { display: grid; background: var(--yellow); color: #111; border-color: var(--yellow); }
  .msgr:not(.open) .msgr-btn:not(.msgr-toggle) { display: none; }
  /* строка списка: фото крупнее, «пример» — под фото, кнопки во всю ширину */
  .cl-row { grid-template-columns: 76px minmax(0, 1fr) auto; }
  .cl-thumb { width: 76px; height: 76px; }
  .cl-thumb .sample-dot { font-size: .5rem; line-height: 1.5; }
  .cl-buy { margin-left: 0; padding-right: 0; }
  .cl-name { overflow-wrap: anywhere; }
}

/* Страница товара: ссылка «Найти фото в Яндекс Картинках» под фото */
.pdp-media-wrap { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.pdp-find { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; font-size: .88rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.pdp-find:hover { color: var(--ink); }
.pdp-find .ic { width: 1rem; height: 1rem; }
@media (max-width: 820px) { .pdp-media-wrap { width: 100%; } }

/* «Марка → модель → узел»: плитки узлов над списком товаров (js/view-catalog.js → catNodesHtml) */
.cat-nodes { margin: 0 0 1.6rem; }
.cat-nodes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-bottom: .8rem; }
.cat-nodes-head h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.cat-nodes-head span { color: var(--muted); font-size: .92rem; }
.cat-nodes-all { margin-left: auto; font-size: .92rem; color: var(--ink); }
.cat-nodes-all:hover { color: var(--brand, var(--yellow)); }
.cat-nodes-grid.cats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); border: 0; gap: .7rem; }
.cat-nodes-grid .cat { border: 0; border-radius: .8rem; min-height: 150px; background: var(--surface, transparent); box-shadow: inset 0 0 0 1px var(--line, rgba(128,128,128,.25)); }
.cat-nodes-grid .cat.has-photo { box-shadow: none; }
.cat-nodes-grid .cat:hover { box-shadow: inset 0 0 0 2px var(--brand, var(--yellow)); }
.cat-nodes-grid .cat strong { font-size: 1.02rem; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .cat-nodes-grid.cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .cat-nodes-grid .cat, .cat-nodes-grid .cat.has-photo { min-height: 120px; padding: .8rem .7rem .75rem; gap: .4rem; }
  .cat-nodes-grid .cat strong { font-size: .92rem; }
  .cat-nodes-all { margin-left: 0; flex-basis: 100%; }
}

/* Страница марки: заголовки групп «Комбайны / Тракторы / Прочая техника» */
.tech-kind-h { display: flex; align-items: baseline; gap: .6rem; margin: 1.4rem 0 .7rem; font-size: 1.15rem; }
.tech-kind-h small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.tech-models .tech-model strong { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tech-brand-head h2 a { color: inherit; text-decoration: none; }
.tech-brand-head h2 a:hover { color: var(--mk); }
.tech-brand > .tech-models + .tech-models, .tech-brand > .tech-models + .tech-kind-h { margin-top: 1rem; }

/* Возврат «назад» в каталог: карточка, которую открывали, на пару секунд подсвечивается (js/router.js → applyPos) */
.part.pos-flash, .cl-row.pos-flash, .tfc-card.pos-flash { animation: pos-flash 2s ease-out; }
@keyframes pos-flash {
  0%, 35% { box-shadow: 0 0 0 3px var(--yellow, #f5b800); background-color: rgba(245, 184, 0, .14); }
  100% { box-shadow: 0 0 0 3px transparent; }
}

/* =====================================================================
   ФАЙЛ: css/21-conveyors.css — ТРАНСПОРТЁРЫ AGRON (js/view-conveyors.js)
   Общие стили тёмных страниц (герой, «почему», шаги, каталог) — в
   17-brands.css и 18-tf-catalog.css; здесь только своё.
   Фото героя: images/brands/page/conveyors-hero.jpg (можно заменить).
   Фото видов: images/conveyors/<вид>.jpg (feeder.jpg, elevator.jpg …) —
   пока файла нет, показывается схема.
   ===================================================================== */

.conv-hero { --bp-img: url('../images/brands/page/conveyors-hero.jpg'); --bp-img-pos: 70% center; }

/* Логотип AGRON: значок + надпись */
.conv-logo { display: inline-flex; align-items: center; gap: .6rem; margin: .6rem 0 .4rem; }
.conv-logo img:first-child { height: 44px; width: auto; }
.conv-logo img:last-child { height: 20px; width: auto; }
.conv-logo-lg img:first-child { height: clamp(48px,7vw,72px); }
.conv-logo-lg img:last-child { height: clamp(20px,3vw,30px); }
.conv-hero-btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }

/* Схема транспортёра */
.conv-svg { display: block; width: 100%; height: auto; }
.conv-svg .fr { fill: none; stroke: rgba(240,215,126,.45); stroke-width: 1.5; }
.conv-svg .lk { fill: none; stroke: var(--yellow,#f0d77e); stroke-width: 1.6; }
.conv-svg .sl { fill: #c8102e; stroke: rgba(0,0,0,.4); stroke-width: .6; }
.conv-svg .wh { fill: #1a1a18; stroke: var(--yellow,#f0d77e); stroke-width: 1.6; }

/* Плитки видов */
.conv-tiles { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.conv-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1rem 1rem 1.2rem;
  border: 1px solid var(--bp-line, rgba(255,255,255,.12));
  border-radius: 6px;
  background: var(--bp-card, #0e0e0d);
  color: var(--on-dark);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
a.conv-tile:hover { border-color: var(--yellow); transform: translateY(-2px); }
.conv-tile strong { font: 600 1.1rem/1.25 var(--f-head); }
.conv-tile small { color: var(--on-dark-muted); font-size: .82rem; line-height: 1.4; }
.conv-pic { display: block; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; background: #070707; padding: .6rem; }
.conv-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.conv-pic.has-img { padding: 0; }
.conv-pic.has-img .conv-svg { display: none; }
.conv-badge {
  align-self: flex-start;
  margin-top: auto;
  padding: .2rem .55rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 3px;
  font-style: normal;
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.conv-badge.on { border-color: var(--yellow); color: var(--yellow); }
.conv-tile.is-soon { cursor: default; }
.conv-tile.is-soon .conv-pic, .conv-tile.is-soon strong { opacity: .55; }
.tfc-chip.is-empty { opacity: .6; }
.conv-empty + .conv-tiles { margin-top: 1.4rem; }

/* Баннер на главной и на странице «Бренды» */
.conv-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr minmax(160px,260px) auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.4rem 2rem;
  border-radius: 6px;
  overflow: hidden;
  background: #0b0b0a;
  color: var(--on-dark, #fff);
  text-decoration: none;
  isolation: isolate;
}
.conv-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 0 35%;
  z-index: -1;
  background: url('../images/brands/page/conveyors-hero.jpg') right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg,transparent 0%,rgba(0,0,0,.3) 30%,rgba(0,0,0,.7) 60%,#000 85%);
          mask-image: linear-gradient(90deg,transparent 0%,rgba(0,0,0,.3) 30%,rgba(0,0,0,.7) 60%,#000 85%);
  opacity: .75;
}
.conv-banner:hover .conv-banner-go { background: var(--yellow); color: #000; }
.conv-banner-logo { display: inline-flex; align-items: center; gap: .6rem; }
.conv-banner-logo img:first-child { height: 52px; width: auto; }
.conv-banner-logo img:last-child { height: 22px; width: auto; }
.conv-banner-txt small { display: block; color: var(--yellow); font-size: .85rem; margin-bottom: .2rem; letter-spacing: .03em; }
.conv-banner-txt strong { display: block; font: 600 1.5rem/1.2 var(--f-head); }
.conv-banner-txt em { display: block; font-style: normal; color: var(--on-dark-muted, #bbb); font-size: .88rem; margin-top: .35rem; max-width: 52ch; }
.conv-banner .conv-svg { opacity: .95; }
.conv-banner-go {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--yellow);
  border-radius: 50%;
  color: var(--yellow);
  transition: background .15s, color .15s;
}
.conv-brand-banner { grid-template-columns: auto auto auto 1fr; margin-top: .2rem; }
.conv-brand-banner::before { background-image: url('../images/brands/page/conveyors-hero.jpg'); }

/* Логотип AGRON в полоске под фото на главной */
.hero-ex .ex-own { display: inline-flex; align-items: center; gap: .4rem; }
.hero-ex .ex-own-m { height: 34px; width: auto; }
.hero-ex .ex-own-w { height: 16px; width: auto; }

@media (max-width: 900px) {
  .conv-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .conv-banner { grid-template-columns: 1fr auto; padding: 1.2rem; }
  .conv-banner-logo { grid-column: 1 / -1; }
  .conv-banner .conv-svg { display: none; }
  .conv-banner::before { inset: 0; opacity: .35; }
}
@media (max-width: 560px) {
  .conv-tiles { grid-template-columns: 1fr; }
  .conv-banner-txt strong { font-size: 1.2rem; }
  .hero-ex .ex-own-m { height: 24px; }
  .hero-ex .ex-own-w { height: 12px; }
}

/* ---------- Полоска «Эксклюзивный импортёр» на главной: группируем подпись +
   лого + кнопки каждого бренда в один блок, чтобы кнопки не отрывались от
   лого на отдельную строку (см. js/view-home.js blockExclusive()) ---------- */
.hero-ex { gap: .8rem 1.2rem; }
.hero-ex .ex-group { display: inline-flex; align-items: center; gap: .8rem 1.1rem; flex-wrap: nowrap; }

@media (max-width: 1180px) {
  .hero-ex .ex-div { display: none; }
  .hero-ex .ex-group { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .hero-ex .ex-group { align-items: flex-start; row-gap: .5rem; }
}

/* =====================================================================
   ФАЙЛ 21. КАТАЛОГ ТЕХНИКИ ПО СЕМЕЙСТВАМ (/tech/<марка>/<семейство>)
   Разметка — js/view-machines.js, данные — js/machines.js.
   Цвет марки приходит в переменную --mk (строка style у .mach-page).
   ===================================================================== */

.mach-page { --mk: #57544c; }

/* Шапка страницы марки: логотип + заголовок */
.mach-head { display: flex; align-items: flex-start; gap: 1.4rem; margin-bottom: 1rem; }
.mach-head .tech-brand-logo { flex: none; }
.mach-head h1 { margin: 0 0 .4rem; }
.mach-head .sec-lead { margin: 0 0 .4rem; max-width: 60ch; }
.mach-meta { margin: 0; color: var(--muted); font-size: .9rem; }

/* Кнопки действий под заголовком */
.mach-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin: 1.2rem 0 1.6rem; }
.mach-actions .btn { max-width: 100%; text-align: center; }
.mach-hint { color: var(--muted); font-size: .92rem; max-width: 52ch; }

.mach-h2 { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .9rem; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.mach-h2 small { color: var(--muted); font: 400 .9rem var(--f-body); }

/* Сетка карточек: на компьютере сколько влезет, на телефоне 2 колонки, на узком — 1 */
.mach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  margin-bottom: 1.6rem;
}

/* Карточка семейства или модели */
.mach-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .8rem .8rem 1rem;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  transition: background .15s, color .15s;
}
.mach-card strong { font: 600 1.15rem/1.2 var(--f-head); overflow-wrap: anywhere; }
.mach-card small { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.mach-years { color: var(--muted); font-size: .8rem; font-family: var(--f-mono); }
.mach-go { position: absolute; right: .8rem; bottom: .8rem; font-size: 1.1rem; opacity: .5; transition: transform .15s, opacity .15s; }
a.mach-card:hover { background: #000; color: var(--on-dark); }
a.mach-card:hover small, a.mach-card:hover .mach-years { color: var(--on-dark-muted); }
a.mach-card:hover .mach-go { transform: translateX(3px); opacity: 1; color: var(--mk); }
a.mach-card:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* «Под заказ»: чуть приглушённая карточка с кнопкой заявки */
.mach-card.is-order strong { opacity: .85; }
div.mach-card.is-order small { text-transform: uppercase; letter-spacing: .03em; font-size: .72rem; color: var(--gold); }
.mach-ask { margin-top: auto; padding: .5rem .7rem; font-size: .85rem; align-self: flex-start; }
.mach-card.is-order .mach-ask { margin-top: .5rem; }

/* Фото модели или заглушка-силуэт (фото: images/machines/<id>.webp) */
.mach-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: .5rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--mk) 10%, var(--bg));
  border-bottom: 3px solid var(--mk);
}
.mach-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mach-sil { width: 78%; height: auto; color: var(--mk); }
.mach-sil .fill { fill: currentColor; fill-opacity: .22; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.mach-sil path:not(.fill) { stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
a.mach-card:hover .mach-media { background: color-mix(in srgb, var(--mk) 22%, #000); }
.mach-card.is-order .mach-media { opacity: .8; }

/* Ссылки на «Общие запчасти», другие марки, другие семейства */
.mach-gens, .mach-others { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.4rem; }
.mach-gens > span, .mach-others > span { color: var(--muted); font-size: .9rem; margin-right: .3rem; }
.mach-gen, .mach-others a, .mach-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .8rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 500 .9rem var(--f-body);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.mach-gen em, .mach-pill em { font-style: normal; color: var(--muted); font-size: .8rem; }
.mach-gen:hover, .mach-others a:hover, .mach-pill:hover { background: #000; color: var(--on-dark); }
.mach-gen:hover em, .mach-pill:hover em { color: var(--on-dark-muted); }
.mach-others { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* Блок «другие марки — под заказ» на странице «Комбайны» */
.mach-order { margin-top: 2.4rem; }
.mach-order h2 { margin: 0 0 .4rem; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.mach-others-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Кнопки-семейства в баннере марки каталога (ссылки, не кнопки) */
a.bb-model { text-decoration: none; display: inline-block; }

/* ---------- Телефон ---------- */
@media (max-width: 700px) {
  .mach-head { gap: .9rem; }
  .mach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mach-card { padding: .55rem .55rem .9rem; }
  .mach-card strong { font-size: 1rem; }
  .mach-go { right: .55rem; bottom: .55rem; }
  .mach-actions .btn { width: 100%; }
  .mach-ask { width: 100%; text-align: center; }
}
@media (max-width: 340px) {
  .mach-grid { grid-template-columns: minmax(0, 1fr); }
  .mach-head { flex-direction: column; }
}

.mach-gen-note { white-space: nowrap; }

.mach-card small { padding-right: 1.3rem; }

/* =====================================================================
   ФАЙЛ 22. «ЖИВОЙ» ДИЗАЙН — поверх остальных стилей
   Плитки узлов с фото, отблески, «заготовки» карточек, код клеточками,
   полёт товара в корзину, смена страниц, пустая корзина, «Доставка»,
   страницы входа. Скрипты — js/polish.js.
   ===================================================================== */

:root {
  --ease-out: cubic-bezier(.16,1,.3,1);
  --gold-glow: rgba(240,215,126,.16);
}

/* ---------- Шрифт Onest (локально, fonts/, лицензия SIL OFL) ---------- */
@font-face { font-family: 'Onest'; font-weight: 400; font-display: swap; src: url('/fonts/onest-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 400; font-display: swap; src: url('/fonts/onest-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 500; font-display: swap; src: url('/fonts/onest-500-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 500; font-display: swap; src: url('/fonts/onest-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 600; font-display: swap; src: url('/fonts/onest-600-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 600; font-display: swap; src: url('/fonts/onest-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 700; font-display: swap; src: url('/fonts/onest-700-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 700; font-display: swap; src: url('/fonts/onest-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Oswald — только крупные заголовки и большие цифры */
h1, h2, .nf-code, .step b, .bp-count b, .tf-hist b, .tf-steps em, .bf b,
.admin-stat strong, .ct-big, .tfc-empty strong, .foot-cta-phone, .type-banner strong {
  font-family: var(--f-display);
}
.admin-card h2, .sum h2, .pdp h2, .two h2, .info-cta strong, .prose h2 { font-family: var(--f-head); font-weight: 700; letter-spacing: -.01em; }
h3 { letter-spacing: -.01em; }
body { letter-spacing: -.003em; }
.part h3, .cat strong, .cat-tile strong { font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.cat.has-photo strong { font-size: 1.12rem; }
.btn { font-family: var(--f-body); font-weight: 600; letter-spacing: -.005em; }

/* ---------- Полоска прокрутки сверху ---------- */
.scroll-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 100;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--yellow));
  box-shadow: 0 0 10px rgba(240,215,126,.6);
  pointer-events: none;
}

/* ---------- Смена страниц ---------- */
@keyframes pg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
#main.pg-in { animation: pg-in .45s var(--ease-out); }

/* ---------- Появление при прокрутке: мягче и с лёгким размытием ---------- */
.js-anim .reveal {
  transform: translateY(22px);
  filter: blur(4px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
  transition-delay: var(--reveal-delay,0ms);
}
.js-anim .reveal.in { filter: none; }

/* ---------- Главный экран: строки заголовка выезжают по очереди ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
/* backwards, а не both: после появления на строках не остаётся filter/transform (лишние слои) */
.hero-in2 > * { animation: rise .9s var(--ease-out) backwards; }
.hero-in2 > :nth-child(1) { animation-delay: .05s; }
.hero-in2 > :nth-child(2) { animation-delay: .12s; }
.hero-in2 > :nth-child(3) { animation-delay: .2s; }
.hero-in2 > :nth-child(4) { animation-delay: .32s; }
.hero-in2 > :nth-child(5) { animation-delay: .42s; }
.hero-in2 > :nth-child(6) { animation-delay: .5s; }
.hero-in2 > :nth-child(n+7) { animation-delay: .58s; }

/* слово «работает» — медленный золотой перелив */
@keyframes shine-text { to { background-position: 200% 0; } }
.hero-in2 h1 .accent {
  background: linear-gradient(100deg, var(--yellow) 0%, var(--yellow) 40%, #fff6d2 50%, var(--yellow) 60%, var(--yellow) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine-text 5s linear infinite;
}

/* строка поиска на главном экране — золотое свечение при вводе */
.hero-search { transition: box-shadow .3s; }
.hero-search:focus-within { box-shadow: 0 0 0 1px var(--yellow), 0 12px 40px rgba(240,215,126,.22); }

/* ---------- Кнопки: пробегающий блик ---------- */
.btn { position: relative; overflow: hidden; }
.btn:not(.btn-ghost)::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: none;
}
.btn:not(.btn-ghost):hover::after { left: 130%; transition: left .6s ease; }
.btn.added { background: var(--ok); color: #fff; }

/* ---------- Отблеск за курсором (js/polish.js задаёт --mx/--my) ---------- */
.part, .cat, .info-card, .step { position: relative; }
.part::before, .cat::before, .info-card::before, .step::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx,50%) var(--my,50%), var(--gold-glow), transparent 60%);
  z-index: 1;
}
.part:hover::before, .cat:hover::before, .info-card:hover::before, .step:hover::before { opacity: 1; }

/* карточка товара: тонкая золотая рамка при наведении */
.part { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s; }
.part:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(0,0,0,.35), 0 0 0 1px rgba(240,215,126,.35);
}
.part:hover .plate.photo img { transform: scale(1.07); }
.plate.photo img { transition: transform .8s var(--ease-out); }

/* ---------- Плитки узлов с фото (главная) ---------- */
.cat.has-photo {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  justify-content: flex-end;
  color: #fff;
  isolation: isolate;
}
.cat-ph {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.cat-ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter .5s;
  filter: saturate(.85) brightness(.8);
}
.cat-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.92) 100%);
}
.cat.has-photo .ic { display: none; }
.cat.has-photo strong { text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.cat.has-photo small { color: rgba(255,255,255,.72); }
.cat.has-photo:hover { background: none; }
.cat.has-photo:hover .cat-ph img { transform: scale(1.1); filter: saturate(1.05) brightness(.95); }
.cat.has-photo:hover small { color: var(--yellow); }
.cat small { display: flex; align-items: center; gap: .4rem; }
.cat-go {
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .3s, transform .3s var(--ease-out);
  color: var(--yellow);
}
.cat:hover .cat-go { opacity: 1; transform: none; }
.cat:hover, .cat:focus-within { transform: none; }
@media (max-width: 640px) {
  .cat.has-photo { min-height: 150px; }
}

/* ---------- Шаги «Как заказать»: линия зажигается при наведении ---------- */
.step {
  border-top-color: var(--dark-line);
  transition: border-color .4s;
  padding: 1.2rem 1rem 1rem;
  margin: 0 -1rem;
}
.step:hover { border-top-color: var(--yellow); }
.step b { transition: transform .5s var(--ease-out), text-shadow .5s; display: inline-block; }
.step:hover b { transform: translateY(-4px); text-shadow: 0 0 24px rgba(240,215,126,.5); }

/* ---------- «Заготовки» карточек, пока грузятся ---------- */
@keyframes skel { to { background-position: -200% 0; } }
.part.skel { pointer-events: none; min-height: 380px; }
.part.skel::before { display: none; }
.skel-img, .skel-body i, .skel-body b {
  background: linear-gradient(90deg, rgba(128,128,128,.12) 25%, rgba(128,128,128,.24) 50%, rgba(128,128,128,.12) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
  display: block;
  border-radius: 4px;
}
.skel-img { aspect-ratio: 4/3; border-radius: 0; }
.skel-body { padding: 1rem; display: grid; gap: .6rem; }
.skel-body i { height: .8rem; }
.skel-body i.short { width: 55%; }
.skel-body b { height: 2.4rem; width: 45%; margin-top: 1rem; }

/* ---------- Полёт товара в корзину ---------- */
.fly-to-cart {
  position: fixed;
  width: 64px; height: 64px;
  border-radius: 50%;
  z-index: 200;
  pointer-events: none;
  background: var(--yellow) center/cover no-repeat;
  box-shadow: 0 0 0 3px var(--yellow), 0 10px 30px rgba(0,0,0,.5);
}
@keyframes cart-hit {
  0% { box-shadow: 0 0 0 0 rgba(240,215,126,.7); }
  100% { box-shadow: 0 0 0 16px rgba(240,215,126,0); }
}
.cart-hit { animation: cart-hit .6s ease-out; }

/* ---------- Код клеточками ---------- */
.otp {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
  max-width: 360px;
  margin-top: .3rem;
}
.otp-cell {
  aspect-ratio: 1 / 1.2;
  display: grid;
  place-items: center;
  font: 600 1.7rem var(--f-mono);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: .6rem;
  transition: border-color .2s, box-shadow .2s, transform .2s, background .3s, color .3s;
}
.otp-cell.filled { border-color: var(--muted); }
.otp-cell.active {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(240,215,126,.18);
}
.otp-cell.active:empty::after {
  content: "";
  width: 2px; height: 1.6rem;
  background: var(--yellow);
  animation: otp-caret 1s steps(1) infinite;
}
@keyframes otp-caret { 50% { opacity: 0; } }
@keyframes otp-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.otp-cell.pop { animation: otp-pop .28s var(--ease-out); }

/* настоящее поле — прозрачное поверх клеточек */
.otp .otp-input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  font-size: 16px;   /* иначе iPhone увеличивает страницу */
  cursor: text;
  caret-color: transparent;
}

/* ошибка — «тряска» и красные клеточки */
@keyframes otp-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}
.otp.is-err { animation: otp-shake .5s; }
.otp.is-err .otp-cell { border-color: var(--err); color: var(--err); }

/* успех — клеточки по очереди зеленеют, затем галочка */
.otp.is-ok .otp-cell {
  box-shadow: none;
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  animation: otp-pop .35s var(--ease-out) both;
}
.otp.is-ok .otp-cell:nth-child(2) { transition-delay: .05s; animation-delay: .05s; }
.otp.is-ok .otp-cell:nth-child(3) { transition-delay: .1s;  animation-delay: .1s; }
.otp.is-ok .otp-cell:nth-child(4) { transition-delay: .15s; animation-delay: .15s; }
.otp.is-ok .otp-cell:nth-child(5) { transition-delay: .2s;  animation-delay: .2s; }
.otp.is-ok .otp-cell:nth-child(6) { transition-delay: .25s; animation-delay: .25s; }
.otp-check {
  position: absolute;
  right: -3.4rem; top: 50%;
  width: 2.6rem; height: 2.6rem;
  transform: translateY(-50%) scale(.5);
  opacity: 0;
  fill: none;
  stroke: var(--ok);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.otp-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; }
.otp-check path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.otp.is-ok .otp-check { opacity: 1; transform: translateY(-50%) scale(1); transition: all .4s var(--ease-out) .3s; }
.otp.is-ok .otp-check circle { stroke-dashoffset: 0; transition: stroke-dashoffset .5s ease .35s; }
.otp.is-ok .otp-check path { stroke-dashoffset: 0; transition: stroke-dashoffset .35s ease .75s; }
@media (max-width: 480px) {
  .otp { max-width: none; gap: .35rem; }
  .otp-check { right: 50%; top: auto; bottom: -3rem; transform: translateX(50%) scale(.5); }
  .otp.is-ok .otp-check { transform: translateX(50%) scale(1); }
}

/* ---------- Страницы входа, регистрации, восстановления (authShell, js/polish.js) ----------
   Фото комбайна ночью на весь экран (images/ui/auth-wide.jpg, на телефоне
   auth.jpg), слева — выгоды аккаунта, справа — «стеклянная» карточка. */
.auth-scene {
  position: relative;
  isolation: isolate;
  margin-top: calc(var(--head-h, 84px) * -1);
  padding: calc(var(--head-h, 84px) + clamp(1.5rem, 5vw, 4rem)) 0 clamp(2rem, 6vw, 5rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.auth-scene::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: url('/images/ui/auth-wide.jpg') 70% center/cover no-repeat, #050505;
  animation: auth-zoom 18s ease-out both;
}
@keyframes auth-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.auth-scene::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 600px at 80% 40%, rgba(240,215,126,.10), transparent 60%),
    linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.35) 100%),
    linear-gradient(180deg, rgba(0,0,0,0) 70%, var(--bg) 100%);
}
.auth-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.auth-perks { color: #fff; animation: rise .9s var(--ease-out) both .1s; }
.auth-eyebrow { color: var(--yellow); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: .8rem; }
.auth-perks h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.02; color: #fff; margin-bottom: 2rem; text-transform: uppercase; }
.auth-perks h2 span { color: var(--yellow); }
.auth-perks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; max-width: 460px; }
.auth-perks li { display: flex; gap: .9rem; align-items: flex-start; }
.auth-perks li .ic {
  flex: none;
  width: 2.5rem; height: 2.5rem;
  padding: .6rem;
  border-radius: .75rem;
  color: var(--yellow);
  background: rgba(240,215,126,.1);
  border: 1px solid rgba(240,215,126,.25);
}
.auth-perks li b { display: block; font-weight: 600; margin-bottom: .1rem; }
.auth-perks li small { color: rgba(255,255,255,.65); font-size: .88rem; }

.auth-card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: 1.4rem;
  background: rgba(18,18,17,.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 40px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  color: var(--on-dark);
  animation: rise .8s var(--ease-out) both .2s;
  --ink: #ece9e0; --muted: #a3a094; --line: #3a3934; --surface: rgba(255,255,255,.04); --bg: rgba(255,255,255,.03);
}
.auth-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(240,215,126,.55), transparent 35%, transparent 70%, rgba(240,215,126,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.auth-card h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); color: #fff; margin: 1.2rem 0 .3rem; }
.auth-lead { color: var(--muted); font-size: .95rem; margin-bottom: 1.3rem; }
.auth-card .auth-box, .auth-card .fields { max-width: none; }
.auth-card .fields { gap: .9rem; }
.auth-card .field label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.auth-card input:not([type=checkbox]):not([type=radio]) {
  height: 3.1rem;
  border-radius: .8rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  padding-left: 1rem;
  font-size: 1rem;
}
.auth-card input::placeholder { color: rgba(255,255,255,.3); }
.auth-card .actions { margin-top: 1.2rem; }
.auth-card .actions .btn:not(.btn-ghost) {
  width: 100%;
  height: 3.2rem;
  border-radius: .9rem;
  font-size: 1.02rem;
  box-shadow: 0 12px 30px rgba(240,215,126,.25);
}
.auth-card .btn-ghost { border-radius: .9rem; width: 100%; color: #fff; border-color: rgba(255,255,255,.2); }
.auth-forgot { text-align: right; margin: .5rem 0 0; font-size: .85rem; }
.auth-forgot a, .auth-alt a { color: var(--yellow); text-decoration: none; }
.auth-forgot a:hover, .auth-alt a:hover { text-decoration: underline; }
.auth-alt { margin-top: 1.2rem; text-align: center; color: var(--muted); font-size: .9rem; }
.auth-card .acct-type, .auth-card .verify-method { gap: .4rem; padding: .3rem; border-radius: .9rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.auth-card .acct-type label, .auth-card .verify-method label {
  border: 0; border-radius: .7rem; padding: .6rem .5rem; color: var(--muted); transition: background .25s, color .25s;
}
.auth-card .acct-type input, .auth-card .verify-method input { position: absolute; opacity: 0; pointer-events: none; }
.auth-card .acct-type label:has(input:checked), .auth-card .verify-method label:has(input:checked) {
  background: rgba(240,215,126,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(240,215,126,.45);
}
.auth-card .org-fields, .auth-card .person-fields { border-top-color: rgba(255,255,255,.1); }
.auth-card .small, .auth-card .chk { color: var(--muted); }
.auth-card .ok-msg { background: rgba(111,207,134,.1); border: 1px solid rgba(111,207,134,.3); padding: .7rem .9rem; border-radius: .7rem; }
.auth-card .otp-cell { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); color: #fff; }

/* переключатель «Вход / Регистрация»: подложка переезжает */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: .3rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.auth-tabs a {
  position: relative; z-index: 1;
  text-align: center;
  padding: .7rem;
  border-radius: .75rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  transition: color .3s;
}
.auth-tabs a[aria-current] { color: #000; }
.auth-tabs-pill {
  position: absolute;
  top: .3rem; bottom: .3rem; left: .3rem;
  width: calc(50% - .3rem);
  border-radius: .75rem;
  background: var(--yellow);
  box-shadow: 0 6px 20px rgba(240,215,126,.35);
  animation: pill-in .5s var(--ease-out) both;
}
.auth-tabs[data-mode=register] .auth-tabs-pill { left: 50%; --from: -100%; }
.auth-tabs[data-mode=login] .auth-tabs-pill { --from: 100%; }
@keyframes pill-in { from { transform: translateX(var(--from, 0)); } to { transform: none; } }

@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .auth-scene { min-height: 0; align-items: flex-start; }
  .auth-scene::before { background-image: url('/images/ui/auth.jpg'); background-position: center 30%; }
  .auth-scene::after { background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.75) 45%, var(--bg) 100%); }
  .auth-perks h2 { font-size: 2rem; margin-bottom: 0; }
  .auth-perks ul { display: none; }
  .auth-card { order: 2; }
}

/* ---------- Пустая корзина ---------- */
.empty-hero {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 1.5rem 0 1rem;
}
.empty-hero img {
  width: 100%; height: auto;
  border-radius: 1rem;
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
  animation: float-y 6s ease-in-out infinite;
}
@keyframes float-y { 50% { transform: translateY(-10px); } }
.empty-hero h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .6rem; }
.empty-hero p { color: var(--muted); max-width: 46ch; }
.empty-hero .actions { margin: 1.2rem 0 .8rem; }
@media (max-width: 700px) {
  .empty-hero { grid-template-columns: 1fr; gap: 1.2rem; text-align: left; }
  .empty-hero img { max-width: 220px; }
}

/* ---------- «Доставка и оплата» ---------- */
.info-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.2rem, 4vw, 3rem);
  margin: .6rem 0 2.2rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.1) 100%),
    var(--img) center/cover no-repeat,
    var(--black);
}
.info-hero h1 { color: #fff; margin: 0 0 .5rem; animation: rise .8s var(--ease-out) both; }
.info-hero p { max-width: 48ch; color: rgba(255,255,255,.82); margin: 0; animation: rise .8s var(--ease-out) both .12s; }
.info-h { margin: 2rem 0 1rem; }
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: 1.4rem 1.3rem;
  overflow: hidden;
  transition: transform .35s var(--ease-out), border-color .3s, box-shadow .35s;
}
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240,215,126,.5);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.info-card .ic {
  width: 2.6rem; height: 2.6rem;
  padding: .55rem;
  border-radius: .7rem;
  color: var(--black);
  background: var(--yellow);
  margin-bottom: 1rem;
  display: block;
}
.info-card h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.info-card p { color: var(--muted); margin: 0; font-size: .95rem; line-height: 1.55; }
.info-cta {
  margin: 2.4rem 0 1rem;
  display: flex;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1.4rem 1.6rem;
  border-radius: .9rem;
  border: 1px solid rgba(240,215,126,.35);
  background: linear-gradient(120deg, rgba(240,215,126,.12), transparent 60%);
}
.info-cta strong { display: block; font: 600 1.3rem var(--f-head); }
.info-cta span { color: var(--muted); }

/* ---------- Шапка: на ноутбуке прячем подпись у логотипа, чтобы влезли
   «Админка» и «Корзина» ---------- */
@media (max-width: 1240px) {
  .brand-div, .brand-tag { display: none; }
}
@media (max-width: 1100px) {
  .head-row { gap: 1rem; }
  .nav-mid { gap: 1.1rem; }
  .nav-long { display: none; }
}

/* ---------- Подвал ---------- */
.site-foot { position: relative; overflow: hidden; padding-top: 0; }
.site-foot::before {
  content: "";
  position: absolute;
  left: 50%; top: -200px;
  width: 900px; height: 400px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(240,215,126,.10), transparent);
  pointer-events: none;
}
.foot-cta {
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--dark-line);
}
.foot-cta-txt { flex: 1 1 260px; }
.foot-cta-txt small { display: block; color: var(--yellow); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin-bottom: .2rem; }
.foot-cta-txt strong { font: 600 clamp(1.2rem, 2.2vw, 1.6rem)/1.2 var(--f-head); color: var(--on-dark); }
.site-foot .foot-cta-phone {
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--on-dark);
  letter-spacing: .01em;
  margin: 0;
  transition: color .2s;
}
.site-foot .foot-cta-phone:hover { color: var(--yellow); }
.foot-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot .foot-grid a, .site-foot .foot-link { transition: color .2s, transform .25s var(--ease-out); }
.site-foot .foot-grid a:hover, .site-foot .foot-link:hover { color: var(--yellow); transform: translateX(3px); }
.foot-bottom {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--dark-line);
  display: grid;
  gap: .5rem;
}
.foot-bottom .legal { margin: 0; padding: 0; border: 0; }
.foot-docs { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.site-foot .foot-docs a {
  display: inline;
  margin: 0;
  font-size: .82rem;
  text-decoration: underline;
  text-decoration-color: rgba(168,166,156,.4);
  text-underline-offset: 3px;
}
.site-foot .foot-docs a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.foot-mark {
  font: 700 clamp(5rem, 20vw, 15rem)/.8 var(--f-display);
  letter-spacing: .02em;
  text-align: center;
  margin: 2rem 0 -1.2rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240,215,126,.12);
  user-select: none;
  pointer-events: none;
}

/* ---------- Полоска шагов заказа ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; }
.osteps { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.osteps li {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem .4rem .45rem;
  border-radius: 2rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.osteps b {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .8rem;
  background: var(--line);
  color: var(--ink);
}
.osteps .done { color: var(--ink); }
.osteps .done b { background: var(--ok); color: #fff; }
.osteps .now { border-color: var(--yellow); color: var(--ink); background: rgba(240,215,126,.08); }
.osteps .now b { background: var(--yellow); color: #000; box-shadow: 0 0 0 4px rgba(240,215,126,.2); }
@media (max-width: 600px) { .osteps li:not(.now) span { display: none; } }

/* поля ввода: мягкое золотое свечение при вводе */
input:not([type=checkbox]):not([type=radio]), textarea, select { transition: border-color .2s, box-shadow .2s; }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240,215,126,.15);
  outline: none;
}
.otp .otp-input:focus { box-shadow: none; }

/* ---------- Страница «Категории» ---------- */
.type-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 700px) { .type-banners { grid-template-columns: 1fr; } }
.type-banner {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 1rem;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.type-banner::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: var(--img) center/cover no-repeat, #111;
  transition: transform 1.2s var(--ease-out);
}
.type-banner::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.85) 100%);
}
.type-banner:hover::before { transform: scale(1.06); }
.type-banner.is-soon::before { filter: grayscale(.7) brightness(.6); }
.type-banner small { display: block; color: var(--yellow); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.type-banner strong { display: block; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; margin: .2rem 0 .5rem; }
.type-banner em { font-style: normal; color: rgba(255,255,255,.8); transition: color .2s; }
.type-banner:hover em { color: var(--yellow); }
.cats-page { margin-bottom: 1rem; }

/* ---------- Страница «Комбайны»: плашка «Все запчасти» с фото, плитки моделей ---------- */
.tech-all.has-bg {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  color: #fff;
  isolation: isolate;
  border-radius: 1rem;
  align-items: flex-end;
}
.tech-all.has-bg::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: var(--img) center 60%/cover no-repeat;
  transition: transform 1.2s var(--ease-out);
}
.tech-all.has-bg::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.2));
}
.tech-all.has-bg:hover::before { transform: scale(1.05); }
.tech-all.has-bg strong { font-size: 1.6rem; }
.tech-all.has-bg small { color: rgba(255,255,255,.75); }
.tech-models.cats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border: 0; gap: .7rem; }
.tech-models .cat { border: 0; border-radius: .8rem; min-height: 170px; }
.tech-models .cat.is-soon .cat-ph img { filter: grayscale(1) brightness(.5); }
.tech-model.cat.is-soon { opacity: .6; }
/* значок комбайна/трактора в меню «Каталог» — был чёрным на тёмном */
.nav-dd-menu .tech-photo { filter: invert(1) brightness(1.4); }
@media (prefers-color-scheme: light) { :root:not([data-theme=dark]) .nav-dd-menu .tech-photo { filter: none; } }

/* ---------- Каталог ремней: фото типа ремня + схема сечения в углу ---------- */
.tfc-card-pic { position: relative; overflow: hidden; }
.tfc-kind-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.tfc-card:hover .tfc-kind-ph { transform: scale(1.07); }
.tfc-kind-prof {
  position: absolute; right: .5rem; bottom: .5rem;
  width: 3.2rem; height: 2.2rem;
  padding: .25rem;
  border-radius: .4rem;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
}
.tfc-kind-prof svg { width: 100%; height: 100%; }
.tfc-card { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.tfc-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(240,215,126,.3); }

/* ---------- 404: комбайн в пустом поле ---------- */
.nf-page {
  position: relative;
  isolation: isolate;
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.nf-page::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 50%, var(--bg) 100%),
    url('/images/ui/404.jpg') center 70%/cover no-repeat;
}
.nf-page .nf-code { -webkit-text-stroke: 0; text-shadow: 0 10px 40px rgba(240,215,126,.35); animation: rise .9s var(--ease-out) both; }
.nf-page h1, .nf-page p { color: #fff; }

/* ---------- Админка: на всю ширину, карточки-показатели, график ---------- */
.admin-page.wrap { max-width: min(1680px, 100%); }
@media (min-width: 761px) { .admin-shell { grid-template-columns: 230px minmax(0, 1fr); } }
.admin-side { border-color: var(--line); }
.admin-side-link { transition: background .2s, color .2s; }
@media (max-width: 900px) {
  .admin-side { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .admin-side::-webkit-scrollbar { display: none; }
}
.admin-stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.admin-stat {
  position: relative;
  overflow: hidden;
  padding: 1.2rem 1.3rem;
  border-radius: 1rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 100%, #fff 3%), var(--surface));
  transition: transform .3s var(--ease-out), border-color .3s;
}
.admin-stat:hover { transform: translateY(-3px); border-color: rgba(240,215,126,.4); }
.admin-stat strong { font-size: 2.1rem; line-height: 1.05; margin-top: .6rem; }
.admin-stat-ic {
  position: absolute; right: 1rem; top: 1rem;
  width: 2.2rem; height: 2.2rem;
  border-radius: .6rem;
  display: grid; place-items: center;
  background: rgba(240,215,126,.1);
  color: var(--yellow);
}
.admin-stat-ic .ic { width: 1.1rem; height: 1.1rem; }
.admin-stat-main { border-color: rgba(240,215,126,.45); background: linear-gradient(150deg, rgba(240,215,126,.14), var(--surface) 60%); }
.admin-stat .tr { font-style: normal; font-size: .8rem; font-weight: 600; margin-top: .3rem; }
.admin-stat .tr small { font-weight: 400; color: var(--muted); }
.admin-stat .tr.up { color: var(--ok); }
.admin-stat .tr.down { color: var(--err); }
.admin-card { border-radius: 1rem; }
.admin-table th { text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: rgba(240,215,126,.05); }

.adm-chart-legend { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
.adm-chart-legend i { width: .7rem; height: .7rem; border-radius: 3px; background: var(--yellow); display: inline-block; }
.adm-chart { position: relative; }
.adm-chart svg { width: 100%; height: 240px; display: block; overflow: visible; }
.adm-chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.adm-chart text { fill: var(--muted); font: 11px var(--f-body); text-anchor: middle; }
.adm-chart text.gy { text-anchor: start; }
.adm-chart .hit { fill: transparent; }
.adm-chart .col {
  fill: var(--yellow);
  opacity: .85;
  transform-box: fill-box;
  transform-origin: bottom;
  animation: bar-up .8s var(--ease-out) both;
  animation-delay: var(--d);
  transition: opacity .2s, fill .2s;
}
.adm-chart .empty .col { fill: var(--line); opacity: .6; }
.adm-chart .bar:hover .col { opacity: 1; fill: #fff3c4; }
.adm-chart .bar:hover .hit { fill: rgba(240,215,126,.06); }
@keyframes bar-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.adm-tip {
  position: absolute;
  min-width: 140px;
  padding: .55rem .75rem;
  border-radius: .6rem;
  background: #fff;
  color: #111;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  pointer-events: none;
  display: grid;
  gap: .1rem;
  font-size: .82rem;
}
.adm-tip b { font-weight: 600; color: #666; font-size: .75rem; }
.adm-tip span { font-weight: 700; font-size: 1rem; }
.adm-tip small { color: #666; }
.adm-chart-skel { height: 240px; border-radius: .6rem; background: linear-gradient(90deg, rgba(128,128,128,.1) 25%, rgba(128,128,128,.2) 50%, rgba(128,128,128,.1) 75%); background-size: 200% 100%; animation: skel 1.4s linear infinite; }

/* ---------- Карточка товара (js/view-product.js) ---------- */
.pdp { gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.pdp-media-wrap { position: sticky; top: calc(var(--head-h, 84px) + 1rem); }
.pdp-media {
  border-radius: 1.2rem;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #232220, #0d0d0c 70%);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.pdp-media.photo img { cursor: zoom-in; transition: transform .8s var(--ease-out); }
.pdp-media.photo:hover img { transform: scale(1.04); }
.pdp-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.pdp-art {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .7rem;
  border-radius: 2rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 .85rem var(--f-mono);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.pdp-art svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: .6; }
.pdp-art:hover { border-color: var(--yellow); }
.pdp-art.copied { border-color: var(--ok); background: rgba(111,207,134,.12); }
.pdp-art.copied span::after { content: " — скопирован"; font-family: var(--f-body); color: var(--ok); }
.pdp-pill { padding: .35rem .75rem; border-radius: 2rem; font-size: .8rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.pdp-pill.is-orig { color: var(--yellow); border-color: rgba(240,215,126,.4); background: rgba(240,215,126,.08); }
.pdp h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.05; margin: 0 0 .5rem; }
.pdp-cat { display: inline-block; color: var(--muted); font-size: .9rem; text-decoration: none; margin-bottom: 1.3rem; }
.pdp-cat:hover { color: var(--yellow); }

.pdp-buy {
  padding: 1.3rem;
  border-radius: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  margin-bottom: 1rem;
}
.pdp-price-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.pdp .pdp-buy .price { font: 700 clamp(2rem, 4vw, 2.6rem)/1 var(--f-display); margin: 0; }
.pdp-stock { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem; border-radius: 2rem; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.pdp-stock i { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pdp-stock.in { color: var(--ok); background: rgba(111,207,134,.1); }
.pdp-stock.in i { animation: stock-pulse 2s ease-out infinite; }
.pdp-stock.out { color: var(--gold); background: rgba(201,154,58,.12); }
@keyframes stock-pulse { 0% { box-shadow: 0 0 0 0 rgba(111,207,134,.6); } 100% { box-shadow: 0 0 0 8px rgba(111,207,134,0); } }
.pdp-buy .buyrow { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: stretch; margin: 0; }
.pdp-buy .buyrow > .btn { white-space: nowrap; padding-left: .8rem; padding-right: .8rem; }
.pdp-buy .buyrow > .btn:not(.btn-ghost) { height: 3.2rem; border-radius: .9rem; font-size: 1.02rem; box-shadow: 0 10px 26px rgba(240,215,126,.22); }
.pdp-buy .buyrow > .btn-ghost { grid-column: 1 / -1; order: 5; border-radius: .9rem; }
.pdp-buy .qty { height: 3.2rem; border-radius: .9rem; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.pdp-buy .qty button { width: 2.6rem; font-size: 1.2rem; }
.pdp-buy .qty input { width: 2.8rem; text-align: center; border: 0; background: transparent; font-weight: 600; box-shadow: none !important; }
.pdp-buy .fav-btn { width: 3.2rem; height: 3.2rem; padding: 0; border-radius: .9rem; justify-content: center; }
.pdp-buy .fav-btn span { display: none; }
.pdp-trust { list-style: none; margin: 1rem 0 0; padding: 1rem 0 0; border-top: 1px dashed var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.pdp-trust li { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.pdp-trust .ic { flex: none; width: 1.8rem; height: 1.8rem; padding: .4rem; border-radius: .5rem; color: var(--yellow); background: rgba(240,215,126,.08); }
.pdp-help {
  display: flex; gap: .8rem; align-items: flex-start;
  margin: 0 0 1.2rem;
  padding: .9rem 1rem;
  border-radius: .9rem;
  border: 1px solid rgba(240,215,126,.25);
  background: linear-gradient(120deg, rgba(240,215,126,.08), transparent 70%);
  font-size: .9rem;
}
.pdp-help > .ic { flex: none; width: 1.3rem; height: 1.3rem; color: var(--yellow); margin-top: .1rem; }
.pdp-help p { margin: 0; color: var(--muted); }
.pdesc { color: var(--ink); opacity: .9; margin: 0 0 1.2rem; }
.pdp-specs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; }
.pdp-specs div { padding: .7rem .9rem; border-radius: .8rem; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.pdp-specs dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .15rem; }
.pdp-specs dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* «Подходит к технике» и «Номера и аналоги» — карточками */
.page > .two { gap: 1rem; margin-top: 2rem; }
.page > .two > section { padding: 1.2rem 1.3rem; border-radius: 1.2rem; background: var(--surface); border: 1px solid var(--line); }
.page > .two h2 { font-size: 1.15rem; margin-bottom: .8rem; }

/* фото на весь экран */
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(0,0,0,.9); animation: fade-in .25s ease both; cursor: zoom-out; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: .8rem; animation: rise .4s var(--ease-out) both; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lightbox.out { opacity: 0; transition: opacity .25s; }

/* липкая панель «цена + В корзину» — только телефон */
.pdp-sticky { display: none; }
@media (max-width: 820px) {
  .pdp-media-wrap { position: static; }
  .pdp-trust { grid-template-columns: 1fr; }
  .pdp-specs { grid-template-columns: 1fr 1fr; }
  .pdp-sticky {
    display: flex; align-items: center; gap: .7rem;
    position: fixed; left: 10px; right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 79;
    padding: .5rem .5rem .5rem .6rem;
    border-radius: 18px;
    background: rgba(24,24,22,.9);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(240,215,126,.25);
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
    transform: translateY(140%);
    opacity: 0;
    transition: transform .45s var(--ease-out), opacity .3s;
    pointer-events: none;
  }
  body:not(.has-bnav) .pdp-sticky { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .pdp-sticky.show { transform: none; opacity: 1; pointer-events: auto; }
  .pdp-sticky-ph { width: 2.6rem; height: 2.6rem; border-radius: .6rem; overflow: hidden; flex: none; background: #111; display: grid; place-items: center; }
  .pdp-sticky-ph img { width: 100%; height: 100%; object-fit: cover; }
  .pdp-sticky-t { flex: 1; min-width: 0; display: grid; }
  .pdp-sticky-t b { font: 700 1.2rem var(--f-display); color: #fff; }
  .pdp-sticky-t small { color: #a3a094; font: .72rem var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pdp-sticky .btn { height: 2.8rem; border-radius: .8rem; padding: 0 1.2rem; }
  body.has-bnav .msgr { transition: bottom .3s; }
}

/* ---------- Каталог: заготовки строк, таблетки, плавающая «Фильтры» ---------- */
.skel-row { display: grid !important; grid-template-columns: 56px 1fr 90px; gap: 1rem; align-items: center; padding: .8rem 0; pointer-events: none; }
.skel-row i { display: block; height: .9rem; border-radius: 4px; background: linear-gradient(90deg, rgba(128,128,128,.12) 25%, rgba(128,128,128,.24) 50%, rgba(128,128,128,.12) 75%); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
.skel-row i:first-child { height: 56px; border-radius: .6rem; }
.cf-chip {
  border-radius: 2rem !important;
  border-color: rgba(240,215,126,.45) !important;
  background: rgba(240,215,126,.1) !important;
  color: var(--ink) !important;
  padding: .35rem .7rem .35rem .85rem !important;
  animation: otp-pop .3s var(--ease-out);
}
.cf-chip span { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: rgba(255,255,255,.1); }
.cf-chip:hover { border-color: var(--err) !important; }
@media (max-width: 760px) {
  body.has-bnav .cf-open {
    position: fixed;
    left: 50%;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 78;
    height: 2.9rem;
    padding: 0 1.3rem;
    border-radius: 2rem;
    background: var(--yellow);
    color: #000;
    border: 0;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 4px rgba(240,215,126,.15);
    animation: sheet-up .5s var(--ease-out) both;
  }
  body.has-bnav .cf-open b { background: #000; color: var(--yellow); }
  body.has-bnav .cf-open:hover { transform: translateX(-50%) translateY(-2px); }
}

/* ---------- Подсказки поиска с фото ---------- */
.sg-item { grid-template-columns: 44px minmax(6rem, auto) 1fr auto; align-items: center; }
.sg-ph { grid-row: span 1; width: 44px; height: 44px; border-radius: .5rem; overflow: hidden; background: #111; display: grid; place-items: center; }
.sg-ph img { width: 100%; height: 100%; object-fit: cover; }
.sg-ph .ic { width: 1.2rem; height: 1.2rem; opacity: .5; }
.sg-ph .sample-dot { display: none; }
@media (max-width: 600px) {
  .sg-item { grid-template-columns: 44px 1fr auto; }
  .sg-ph { grid-row: span 2; }
  .sg-name { grid-column: 2 / -1; }
}

/* ---------- Поиск на весь экран (телефон) ---------- */
html.ss-open { overflow: hidden; }
.ss {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column;
  background: rgba(10,10,9,.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: fade-in .2s ease both;
}
.ss.out { opacity: 0; transition: opacity .25s; }
.ss-bar {
  display: flex; align-items: center; gap: .6rem;
  padding: calc(.8rem + env(safe-area-inset-top, 0px)) 1rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  animation: rise .4s var(--ease-out) both;
}
.ss-bar .ic { width: 1.2rem; height: 1.2rem; color: var(--yellow); flex: none; }
.ss-bar input {
  flex: 1; min-width: 0;
  height: 2.9rem;
  border-radius: .9rem !important;
  border: 1px solid rgba(240,215,126,.4) !important;
  background: rgba(255,255,255,.06) !important;
  color: #fff;
  padding: 0 .9rem;
  font-size: 16px;
}
.ss-close { background: none; border: 0; color: var(--yellow); font: 500 .95rem var(--f-body); padding: .4rem; cursor: pointer; }
.ss-body, .ss-res { flex: 1; overflow-y: auto; padding: 1rem 1rem 2rem; }
.ss-sec { margin-bottom: 1.6rem; animation: rise .5s var(--ease-out) both .08s; }
.ss-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; color: var(--on-dark-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.ss-h .link { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.ss-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.ss-chips button {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .9rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--on-dark);
  font: 500 .9rem var(--f-body);
  cursor: pointer;
}
.ss-chips button .ic { width: .9rem; height: .9rem; opacity: .5; }
.ss-chips button:active { background: rgba(240,215,126,.15); border-color: var(--yellow); }
.ss-help button {
  width: 100%;
  display: flex; align-items: center; gap: .9rem; text-align: left;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(240,215,126,.3);
  background: linear-gradient(120deg, rgba(240,215,126,.12), transparent);
  color: var(--on-dark); cursor: pointer;
}
.ss-help .ic { width: 1.6rem; height: 1.6rem; color: var(--yellow); flex: none; }
.ss-help b { display: block; }
.ss-help small { color: var(--on-dark-muted); }
.ss-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; align-items: center;
  padding: .6rem;
  border-radius: .9rem;
  color: var(--on-dark); text-decoration: none;
  animation: rise .35s var(--ease-out) both;
}
.ss-item:nth-child(2) { animation-delay: .03s; } .ss-item:nth-child(3) { animation-delay: .06s; } .ss-item:nth-child(4) { animation-delay: .09s; }
.ss-item:active { background: rgba(255,255,255,.06); }
.ss-ph { width: 56px; height: 56px; border-radius: .7rem; overflow: hidden; background: #151514; display: grid; place-items: center; }
.ss-ph img { width: 100%; height: 100%; object-fit: cover; }
.ss-ph .sample-dot { display: none; }
.ss-t { min-width: 0; }
.ss-t small { display: block; color: var(--yellow); font: .75rem var(--f-mono); }
.ss-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: .92rem; }
.ss-p { font-weight: 600; white-space: nowrap; font-size: .9rem; }
.ss-all { width: 100%; margin-top: 1rem; border-radius: .9rem; }
.ss-empty { text-align: center; padding: 3rem 1rem; color: var(--on-dark-muted); }
.ss-empty .btn { margin-top: 1rem; }
.ss-load i { display: block; height: 68px; margin-bottom: .5rem; border-radius: .9rem; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }

/* ---------- «Вы недавно смотрели» ---------- */
.recent-sec:empty { display: none; }
.recent-sec { padding-bottom: 0; }
.recent-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 200px);
  gap: .8rem; overflow-x: auto; padding-bottom: .6rem;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.recent-card {
  scroll-snap-align: start;
  display: grid; gap: .2rem;
  padding: .6rem .6rem .8rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .3s var(--ease-out), border-color .3s;
}
.recent-card:hover { transform: translateY(-4px); border-color: rgba(240,215,126,.4); }
.recent-ph { aspect-ratio: 4/3; border-radius: .7rem; overflow: hidden; background: #111; display: grid; place-items: center; margin-bottom: .4rem; }
.recent-ph img { width: 100%; height: 100%; object-fit: cover; }
.recent-ph .sample-dot { display: none; }
.recent-card small { color: var(--muted); font: .72rem var(--f-mono); }
.recent-card b { font-weight: 500; font-size: .85rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-card em { font-style: normal; font-weight: 700; margin-top: .2rem; }

/* ---------- Всплывашки: «Добавлено в корзину» и общие сообщения ---------- */
.cart-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  width: min(460px, calc(100% - 20px));
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .6rem .6rem .7rem;
  border-radius: 18px;
  background: rgba(22,22,20,.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(240,215,126,.3);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  color: var(--on-dark);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .5s cubic-bezier(.34,1.4,.64,1), opacity .3s;
  pointer-events: none;
}
.cart-toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body.has-bnav .cart-toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
.ct-ph { position: relative; width: 48px; height: 48px; flex: none; border-radius: .7rem; overflow: hidden; background: #111; display: grid; place-items: center; }
.ct-ph img { width: 100%; height: 100%; object-fit: cover; }
.ct-ph .sample-dot { display: none; }
.ct-ph i { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font: 700 11px/18px var(--f-body); text-align: center; font-style: normal; }
.ct-t { flex: 1; min-width: 0; }
.ct-t small { display: block; color: var(--ok); font-size: .75rem; font-weight: 600; }
.ct-t b { display: block; font-weight: 500; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-toast .btn { flex: none; height: 2.5rem; border-radius: .8rem; padding: 0 1rem; }
.ct-x { background: none; border: 0; color: var(--on-dark-muted); font-size: 1.3rem; cursor: pointer; padding: 0 .3rem; }
.adm-toast {
  border-radius: 14px !important;
  background: rgba(22,22,20,.94) !important;
  color: var(--on-dark) !important;
  border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  padding: .8rem 1.1rem .8rem 2.6rem !important;
}
.adm-toast::before { content: "✓"; position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--ok); color: #fff; font: 700 .7rem/1.2rem var(--f-body); text-align: center; }
.adm-toast.err { background: rgba(60,18,15,.95) !important; border-color: rgba(255,139,127,.4); }
.adm-toast.err::before { content: "!"; background: var(--err); }

/* ---------- Кнопка скачивания: стрелка → кружок → галочка ---------- */
.dl-ic { display: inline-grid; width: 1.15rem; height: 1.15rem; margin-right: .45rem; vertical-align: -3px; }
.dl-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.dl-ring { stroke-dasharray: 63; stroke-dashoffset: 63; opacity: 0; transform-origin: center; }
.dl-check { stroke-dasharray: 16; stroke-dashoffset: 16; }
.dl-busy .dl-arrow { animation: dl-drop .5s ease-in forwards; }
.dl-busy .dl-ring { opacity: 1; stroke-dashoffset: 45; animation: dl-spin .7s linear infinite; }
.dl-done { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }
.dl-done .dl-arrow { opacity: 0; }
.dl-done .dl-ring { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .35s ease; }
.dl-done .dl-check { stroke-dashoffset: 0; transition: stroke-dashoffset .3s ease .25s; }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@keyframes dl-drop { 60% { transform: translateY(4px); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

/* ---------- Галерея товара и увеличение фото ---------- */
.pg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 100%; }
.pg-track::-webkit-scrollbar { display: none; }
.pg-track img { flex: 0 0 100%; scroll-snap-align: center; object-fit: contain; }
.pdp-gallery { position: relative; }
.pg-dots { position: absolute; left: 0; right: 0; bottom: .7rem; display: flex; justify-content: center; gap: .4rem; }
.pg-dots button { width: .5rem; height: .5rem; padding: 0; border: 0; border-radius: 1rem; background: rgba(255,255,255,.35); cursor: pointer; transition: width .3s var(--ease-out), background .3s; }
.pg-dots button.on { width: 1.4rem; background: var(--yellow); }
.lightbox img { transition: transform .35s var(--ease-out); cursor: zoom-in; touch-action: none; user-select: none; }
/* увеличение — инлайн-трансформом из openLightbox (js/polish.js) */
.lightbox small { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.55); font-size: .8rem; }

/* ---------- Главный экран: золотая пыль ---------- */
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero-photo > :not(.hero-dust) { position: relative; z-index: 2; }
.hero-in2 { will-change: transform, opacity; }

/* Скорость первого экрана (2026-10-08): фото — отдельный слой ::before, параллакс двигает его
   через transform (видеокарта, без перерисовки огромной картинки на каждый шаг колеса);
   затемнение — статичный слой ::after над фото и под пылью/текстом. */
@property --hero-py { syntax: '<length>'; inherits: false; initial-value: 0px; }
.hero-photo { background: var(--black); isolation: isolate; }
.hero-photo::before, .hero-photo::after { content: ""; position: absolute; left: 0; right: 0; top: 0; pointer-events: none; z-index: 0; }
.hero-photo::before {
  height: 125%;
  background: url('../images/hero-banner.jpg') center/cover no-repeat;
  transform: translate3d(0, var(--hero-py), 0);
  will-change: transform;
}
.hero-photo::after {
  bottom: 0;
  background:
    linear-gradient(90deg,rgba(0,0,0,.86) 0%,rgba(0,0,0,.55) 46%,rgba(0,0,0,.25) 100%),
    linear-gradient(0deg,rgba(0,0,0,.75) 0%,rgba(0,0,0,0) 34%);
}
@media (max-width:820px) {
  .hero-photo { background: var(--black); }
  .hero-photo::before { height: 100%; transform: none; will-change: auto; background: url('../images/hero-banner-mobile.jpg') center/cover no-repeat; }
  .hero-photo::after { background: linear-gradient(180deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.5) 40%,rgba(0,0,0,.35) 68%,rgba(0,0,0,.78) 100%); }
}
/* поиск над анимированной пылью: размытие фона (backdrop-filter) пересчитывалось каждый кадр — убираем */
.hero-search { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10,10,9,.84); }

/* ---------- Личный кабинет ---------- */
.acc-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.3rem;
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 1.4rem;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(240,215,126,.16), transparent 60%),
    linear-gradient(160deg, #1b1a18, #121211);
  border: 1px solid rgba(240,215,126,.2);
  margin-bottom: 1rem;
  animation: rise .6s var(--ease-out) both;
}
.acc-ava {
  width: 4rem; height: 4rem; border-radius: 1.2rem;
  display: grid; place-items: center;
  font: 700 1.4rem var(--f-display);
  color: #000;
  background: linear-gradient(135deg, #fff1bf, var(--yellow) 50%, var(--gold));
  box-shadow: 0 10px 30px rgba(240,215,126,.3);
}
.acc-hi small { color: var(--yellow); font-size: .8rem; letter-spacing: .04em; }
.acc-hi h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .1rem 0; color: #fff; }
.acc-hi p { color: var(--on-dark-muted); margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.acc-tiles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: .6rem; }
.acc-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .1rem .6rem; align-items: center;
  padding: .8rem .9rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--on-dark); text-decoration: none; text-align: left;
  font: inherit; cursor: pointer;
  transition: transform .3s var(--ease-out), border-color .3s, background .3s;
}
.acc-tile:hover { transform: translateY(-3px); border-color: rgba(240,215,126,.45); background: rgba(240,215,126,.07); }
.acc-tile .ic { grid-row: span 2; width: 2.2rem; height: 2.2rem; padding: .5rem; border-radius: .7rem; color: var(--yellow); background: rgba(240,215,126,.1); }
.acc-tile span { font-size: .8rem; color: var(--on-dark-muted); }
.acc-tile b { font: 700 1.25rem var(--f-display); color: #fff; }
.acc-head { justify-content: flex-end; }
@media (max-width: 700px) { .acc-tiles { grid-template-columns: 1fr 1fr; } }
.acc-olist { display: grid; gap: .8rem; }
.acc-order {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  animation: rise .5s var(--ease-out) both;
}
.acc-order.skel-row { grid-template-columns: 1fr 1fr 1fr; height: 110px; }
.acc-order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .9rem; }
.acc-order-top b { display: block; font-size: 1.05rem; }
.acc-order-top small { color: var(--muted); font-size: .82rem; }
.acc-order-top strong { font: 700 1.35rem var(--f-display); white-space: nowrap; }
.acc-order-cancel { color: var(--err); font-weight: 600; margin: 0 0 .8rem; }
.acc-order.is-cancelled { opacity: .65; }
/* шкала «Счёт → Оплата → Сборка → Отгрузка → Доставлен» */
.acc-steps { position: relative; list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.acc-steps::before, .acc-steps::after {
  content: ""; position: absolute; top: 7px; left: 10%; height: 2px; border-radius: 2px;
}
.acc-steps::before { right: 10%; background: var(--line); }
.acc-steps::after { width: calc(80% * var(--at) / 4); background: linear-gradient(90deg, var(--ok), var(--yellow)); animation: grow-x 1s var(--ease-out) both .2s; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }
.acc-steps li { position: relative; z-index: 1; display: grid; justify-items: center; gap: .35rem; font-size: .72rem; color: var(--muted); text-align: center; }
.acc-steps i { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.acc-steps li.done { color: var(--ink); }
.acc-steps li.done i { background: var(--ok); border-color: var(--ok); }
.acc-steps li.now { color: var(--yellow); font-weight: 600; }
.acc-steps li.now i { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 5px rgba(240,215,126,.2); animation: stock-pulse 2s ease-out infinite; }
.acc-order-btn { display: flex; flex-wrap: wrap; gap: .5rem; }
.acc-order-btn .btn { flex: 1 1 auto; border-radius: .8rem; }
.acc-empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.acc-empty .ic { width: 3rem; height: 3rem; color: var(--yellow); opacity: .7; margin: 0 auto .8rem; display: block; }
.acc-empty .btn { margin-top: 1rem; }

/* ---------- Заказ оформлен ---------- */
.done-hero {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 1.4rem;
  background: radial-gradient(500px 250px at 10% 50%, rgba(111,207,134,.14), transparent 70%), var(--surface);
  border: 1px solid rgba(111,207,134,.3);
  margin-bottom: 1rem;
}
.done-check { width: clamp(64px, 12vw, 96px); flex: none; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.done-check circle { stroke: var(--ok); stroke-width: 4; stroke-dasharray: 227; stroke-dashoffset: 227; animation: draw .8s var(--ease-out) forwards .15s; }
.done-check path { stroke: var(--ok); stroke-width: 6; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .45s ease forwards .8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-hero small { color: var(--ok); font-weight: 600; letter-spacing: .04em; }
.done-hero h1 { margin: .2rem 0 .3rem; }
.done-hero p { color: var(--muted); margin: 0; }
.done-next { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; counter-reset: dn; }
.done-next li {
  position: relative; display: grid; gap: .2rem;
  padding: 1rem 1.1rem 1rem 3.6rem;
  border-radius: 1rem; border: 1px solid var(--line); background: var(--surface);
  animation: rise .6s var(--ease-out) both;
}
.done-next li:nth-child(2) { animation-delay: .1s; } .done-next li:nth-child(3) { animation-delay: .2s; }
.done-next .ic { position: absolute; left: 1rem; top: 1rem; width: 1.9rem; height: 1.9rem; padding: .4rem; border-radius: .6rem; color: var(--yellow); background: rgba(240,215,126,.1); }
.done-next span { color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) { .done-next { grid-template-columns: 1fr; } .done-hero { flex-direction: column; text-align: center; } }

/* ---------- Нижнее меню на телефоне (js/polish.js, bnavSync) ---------- */
.bnav, .bnav-sheet { display: none; }
@media (max-width: 760px) {
  .bnav {
    --h: 64px;
    position: fixed;
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    height: var(--h);
    display: grid;
    grid-template-columns: repeat(var(--n, 5), 1fr);
    padding: 6px;
    border-radius: 22px;
    background: rgba(14,14,13,.82);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  }
  /* золотая подложка под выбранным пунктом — плавно переезжает */
  .bnav-pill {
    position: absolute;
    top: 6px; bottom: 6px; left: 6px;
    width: calc((100% - 12px) / var(--n, 5));
    transform: translateX(calc(100% * var(--i, 0)));
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(240,215,126,.22), rgba(240,215,126,.1));
    box-shadow: inset 0 0 0 1px rgba(240,215,126,.4), 0 0 24px rgba(240,215,126,.15);
    transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  }
  .bnav.no-pill .bnav-pill { opacity: 0; }
  .bnav-i {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px;
    color: rgba(236,234,227,.55);
    text-decoration: none;
    font-size: .68rem;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    transition: color .3s;
  }
  .bnav-ic { position: relative; display: grid; place-items: center; transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
  .bnav-ic .ic { width: 22px; height: 22px; }
  .bnav-i.on { color: var(--yellow); }
  .bnav-i.on .bnav-ic { transform: translateY(-2px) scale(1.08); }
  .bnav-i:active .bnav-ic { transform: scale(.88); }
  .bnav-badge {
    position: absolute; top: -6px; right: -10px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    background: var(--yellow); color: #000;
    font: 700 .66rem/18px var(--f-body);
    text-align: center;
    box-shadow: 0 0 0 2px rgba(14,14,13,.9);
  }
  .bnav-badge.pop { animation: cart-bump .45s ease; }

  /* место под меню внизу страницы; кнопки мессенджеров и cookie — выше меню */
  body.has-bnav { padding-bottom: 90px; }
  body.has-bnav .msgr { bottom: 92px; }
  body.has-bnav .cookie-bar { bottom: 86px; }
  body.has-bnav .adm-toast { bottom: 92px; }
  /* в шапке на телефоне остаются логотип и поиск — остальное в нижнем меню */
  body.has-bnav .acc, body.has-bnav .cartlink { display: none; }
  body.has-bnav .site-head .nav-mid { display: none; }
  body.has-bnav .head-row { flex-wrap: nowrap; }

  /* «Ещё» в админке — шторка снизу */
  .bnav-sheet { display: block; position: fixed; inset: 0; z-index: 95; }
  .bnav-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: fade-in .25s ease both; }
  .bnav-sheet-in {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: .6rem 1rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    background: #151514;
    border-top: 1px solid rgba(255,255,255,.08);
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
    animation: sheet-up .4s var(--ease-out) both;
  }
  .bnav-sheet-grip { grid-column: 1 / -1; justify-self: center; width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); margin-bottom: .6rem; }
  .bnav-sheet-in a {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    padding: .9rem .4rem;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    color: var(--on-dark);
    text-decoration: none;
    font-size: .8rem;
    text-align: center;
  }
  .bnav-sheet-in a .ic { width: 22px; height: 22px; color: var(--yellow); }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }

/* ---------- Админка: период, прибыль, заказы, панель инструментов ---------- */
.adm-home-head { display: flex; justify-content: flex-end; }
.adm-period {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem;
  padding: .3rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.adm-period [data-per] {
  border: 0; background: none; color: var(--muted);
  padding: .5rem .85rem; border-radius: .75rem;
  font: 500 .88rem var(--f-body); cursor: pointer;
  transition: background .25s, color .25s;
}
.adm-period [data-per]:hover { color: var(--ink); }
.adm-period [data-per].on { background: var(--yellow); color: #000; font-weight: 600; box-shadow: 0 6px 18px rgba(240,215,126,.25); }
.adm-period-custom { display: inline-flex; align-items: center; gap: .4rem; padding: 0 .3rem; }
.adm-period-custom[hidden] { display: none; }
.adm-period-custom input { width: auto; height: 2.3rem; padding: 0 .5rem; border-radius: .6rem; color-scheme: dark; }
.admin-stat.adm-skel strong { opacity: .3; }
.adm-profit {
  grid-column: span 2;
  border-color: rgba(111,207,134,.45) !important;
  background: radial-gradient(400px 200px at 0% 0%, rgba(111,207,134,.18), transparent 70%), var(--surface) !important;
}
.adm-profit .admin-stat-ic { color: var(--ok); background: rgba(111,207,134,.12); }
.adm-profit-l { color: var(--muted); font-size: .85rem; }
.adm-profit strong { font-size: 2.6rem !important; color: #fff; margin-top: .2rem !important; }
.adm-profit-f { font-size: .82rem; color: var(--muted); }
.adm-profit-f .link { font-size: inherit; color: var(--yellow); }
.adm-profit-form { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.adm-profit-form[hidden] { display: none; }
.adm-profit-form input { width: 7rem; height: 2.5rem; border-radius: .7rem; }
.adm-profit-form .btn { height: 2.5rem; border-radius: .7rem; }
.adm-test-note { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--muted); }
.status-pill.st-test { background: rgba(163,160,148,.15); color: var(--muted); border: 1px dashed var(--line); margin-left: .4rem; font-size: .7rem; }
.adm-danger { color: var(--err) !important; border-color: rgba(255,139,127,.35) !important; }
.adm-danger:hover { background: rgba(255,139,127,.1) !important; }
.adm-od-extra { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

/* статусные «таблетки» цветами */
.adm-chip { border-radius: 2rem !important; padding: .4rem .8rem !important; transition: all .2s; }
.adm-chip.on { background: var(--yellow) !important; color: #000 !important; border-color: var(--yellow) !important; }
.adm-chip.st-test { border-style: dashed !important; }

/* список заказов карточками */
.adm-o-search { position: relative; margin-bottom: .6rem; }
.adm-o-search .ic { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: var(--muted); }
.adm-o-search input { padding-left: 2.6rem; height: 2.9rem; border-radius: .9rem; }
.adm-o-bulk {
  position: sticky; top: calc(var(--head-h, 70px) + .5rem); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .6rem .8rem; margin: .6rem 0;
  border-radius: 1rem;
  background: rgba(30,29,26,.95);
  border: 1px solid rgba(240,215,126,.4);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  animation: rise .3s var(--ease-out) both;
}
.adm-o-bulk[hidden] { display: none; }
.adm-o-bulk span { font-weight: 600; margin-right: .4rem; }
.adm-o-bulk .btn { height: 2.3rem; padding: 0 .9rem; border-radius: .7rem; font-size: .85rem; }
.adm-o-list { display: grid; gap: .6rem; margin-top: .6rem; }
.adm-o {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .9rem;
  padding: .8rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  transition: border-color .2s, background .2s, transform .25s var(--ease-out);
}
.adm-o:hover { border-color: rgba(240,215,126,.35); background: rgba(240,215,126,.03); }
.adm-o.sel { border-color: var(--yellow); background: rgba(240,215,126,.07); }
.adm-o.is-test { opacity: .7; border-style: dashed; }
.adm-o-chk { position: relative; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; cursor: pointer; }
.adm-o-chk input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.adm-o-chk i { width: 1.25rem; height: 1.25rem; border-radius: .4rem; border: 2px solid var(--line); transition: all .2s; }
.adm-o-chk input:checked + i { background: var(--yellow); border-color: var(--yellow); box-shadow: inset 0 0 0 3px #1a1a18; }
.adm-o-main {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.6fr) minmax(110px, .8fr) auto;
  align-items: center; gap: 1rem;
  cursor: pointer; min-width: 0;
}
.adm-o-no b { font-size: 1rem; }
.adm-o-no small, .adm-o-buyer small { display: block; color: var(--muted); font-size: .8rem; margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-o-buyer { min-width: 0; }
.adm-o-buyer b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-o-sum { font: 700 1.2rem var(--f-display); white-space: nowrap; text-align: right; }
.adm-o-side { display: flex; align-items: center; gap: .5rem; }
.adm-o-side .btn { height: 2.4rem; padding: 0 .9rem; border-radius: .7rem; }
.adm-o-st {
  width: auto; height: 2.4rem; padding: 0 2rem 0 .8rem;
  border-radius: 2rem; font-weight: 600; font-size: .85rem;
  border: 1px solid var(--line);
}
.adm-o-st.st-new { color: var(--yellow); border-color: rgba(240,215,126,.5); }
.adm-o-st.st-paid, .adm-o-st.st-packing { color: #7fb7ff; border-color: rgba(127,183,255,.45); }
.adm-o-st.st-shipped { color: #c9a0ff; border-color: rgba(201,160,255,.45); }
.adm-o-st.st-delivered { color: var(--ok); border-color: rgba(111,207,134,.45); }
.adm-o-st.st-cancelled { color: var(--err); border-color: rgba(255,139,127,.45); }
@media (max-width: 1100px) {
  .adm-o-main { grid-template-columns: 1fr auto; gap: .3rem .8rem; }
  .adm-o-inv { display: none; }
  .adm-o-buyer { grid-column: 1; }
  .adm-o-sum { grid-row: 1; grid-column: 2; }
}

/* «Товары»: кнопки инструментов переносятся, а не уезжают за край */
.admin-card-head > .admin-card-actions { flex-wrap: wrap; }

/* ---------- Админка на телефоне ---------- */
@media (max-width: 760px) {
  .admin-page .crumbs { display: none; }
  .admin-page h1 { font-size: 1.6rem; margin-bottom: .8rem; }
  body.has-bnav .admin-side { display: none; }     /* разделы — в нижнем меню */
  .admin-shell { gap: 1rem; }
  .admin-main { gap: 1rem; }
  .admin-card { padding: 1rem; border-radius: 1rem; }
  .admin-stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .admin-stat { padding: .9rem; }
  .admin-stat strong { font-size: 1.5rem; margin-top: .9rem; }
  .admin-stat-ic { width: 1.9rem; height: 1.9rem; right: .7rem; top: .7rem; }
  .admin-stat .tr small { display: none; }
  .adm-chart svg { height: 180px; }

  /* инструменты «Товаров» — сеткой по 2, «Добавить товар» во всю ширину */
  .admin-card-head > .admin-card-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%;
    margin: .4rem 0 0; padding: 0; overflow: visible;
  }
  .admin-card-head > .admin-card-actions .btn { width: 100%; height: 2.7rem; padding: 0 .4rem; font-size: .8rem; letter-spacing: -.01em; border-radius: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-card-head > .admin-card-actions .btn:first-child { grid-column: 1 / -1; }
  .admin-card-head > .admin-card-actions .btn[aria-expanded=true] { border-color: var(--yellow); color: var(--yellow); }
  /* фильтры: поиск во всю ширину, списки по два в ряд */
  .adm-filters { grid-template-columns: 1fr 1fr !important; }
  .adm-filters > input { grid-column: 1 / -1; }
  .adm-filters > select:last-child:nth-child(even) { grid-column: 1 / -1; }
  .adm-filters input, .adm-filters select { height: 2.8rem; border-radius: .8rem; font-size: .9rem; }
  /* период — лентой, листается пальцем */
  .adm-period { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .adm-period::-webkit-scrollbar { display: none; }
  .adm-period [data-per] { flex: none; }
  .adm-profit { grid-column: 1 / -1; }
  .adm-profit strong { font-size: 2.1rem !important; }
  /* заказ на телефоне */
  .adm-o { grid-template-columns: auto 1fr; gap: .6rem .7rem; padding: .8rem; }
  .adm-o-side { grid-column: 1 / -1; }
  .adm-o-side select { flex: 1; }
  .adm-o-bulk { top: .5rem; }

  /* ряды кнопок — горизонтальной лентой, без переноса «столбиком» */
  .admin-quick, .design-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-left: -1rem; margin-right: -1rem;
    padding: 0 1rem .2rem;
  }
  .admin-quick::-webkit-scrollbar, .design-toolbar::-webkit-scrollbar { display: none; }
  .admin-quick .btn, .design-toolbar .btn { flex: none; white-space: nowrap; }
  .admin-card-actions { flex-wrap: wrap; }
  .admin-card input, .admin-card select { width: 100%; min-width: 0; }

  /* таблицы — карточками: подпись колонки слева, значение справа */
  .admin-card .overflow { overflow: visible; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  /* карточка: ячейки в две колонки, подпись сверху мелко, значение под ней */
  .admin-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem 1rem;
    margin: 0 0 .7rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: rgba(255,255,255,.02);
  }
  .admin-table td {
    padding: 0;
    border: 0;
    min-width: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .admin-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .2rem;
  }
  .admin-table td[data-label=""]::before { display: none; }
  /* первая ячейка с текстом (№ / артикул и название) и ячейки с кнопками — на всю ширину */
  .admin-table td:has(> .btn), .admin-table td:has(> a.btn), .admin-table td:has(textarea) { grid-column: 1 / -1; }
  .admin-table td:empty { display: none; }
  .admin-table td input:not([type=checkbox]) { width: 100%; }
  .admin-table td .btn { width: 100%; justify-content: center; }
}

/* ---------- Системная настройка «уменьшить движение» ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-in2 > *, .auth-box, .auth-page::after, .info-hero h1, .info-hero p,
  .empty-hero img, .hero-in2 h1 .accent, #main.pg-in, .skel-img, .skel-body i, .skel-body b { animation: none !important; }
  .js-anim .reveal { filter: none; }
}

/* Просмотр фото (js/polish.js → openLightbox): зум кнопкой/пальцами, анимация появления не мешает увеличению */
.lightbox .lb-stage { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; animation: rise .4s var(--ease-out) both; }
.lightbox .lb-stage img { animation: none; transition: transform .3s; cursor: zoom-in; touch-action: none; user-select: none; -webkit-user-drag: none; will-change: transform; }
.lightbox .lb-stage img.zoomed { cursor: grab; }
.lightbox small { pointer-events: none; text-align: center; width: max-content; max-width: 90vw; }
/* счётчик раздела админки на кнопке нижнего меню (телефон) */
.bnav-ic { position: relative; }
.bnav-a2b { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e5484d; color: #fff; font: 700 .65rem/18px var(--f-body); text-align: center; }

/* Меню «Каталог»: картинки комбайна/трактора — жёлтым силуэтом (маска по
   обрезанной картинке), чтобы были в цвет соседних иконок, а не серыми */
.nav-dd-menu img.tech-photo { display: none; }
.nav-dd-menu a[href^="/tech/combine"]::before,
.nav-dd-menu a[href^="/tech/tractor"]::before {
  content: "";
  width: 2.6rem;
  height: 1.6rem;
  background: var(--yellow);
  -webkit-mask: var(--tech-ico) no-repeat left center / contain;
  mask: var(--tech-ico) no-repeat left center / contain;
}
.nav-dd-menu a[href^="/tech/combine"] { --tech-ico: url(/images/icons/combine-menu.png); }
.nav-dd-menu a[href^="/tech/tractor"] { --tech-ico: url(/images/icons/tractor-menu.png); }

/* =====================================================================
   ФАЙЛ 23. КОЛОКОЛЬЧИК УВЕДОМЛЕНИЙ (js/notify.js)
   Кнопка — как соседняя .search-toggle в шапке. Панель — тёмная,
   «стеклянная» (backdrop-filter): свои значения --surface/--line/--ink/
   --muted заданы прямо на .notif-panel, поэтому она выглядит одинаково
   тёмной и в светлой, и в тёмной теме сайта.
   На телефоне (уже открыт .search-toggle/.acc-btn слева) панель — шторка
   снизу на всю ширину экрана.
   ===================================================================== */

.notif-wrap {
  position: relative;
  flex: none;
}

.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1.5px solid rgba(236,234,227,.55);
  border-radius: 50%;
  background: transparent;
  color: var(--on-dark, #eceae3);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.notif-btn:hover,
.notif-btn[aria-expanded="true"] {
  color: var(--yellow);
  border-color: var(--yellow);
}

.notif-btn .ic {
  width: 1.15rem;
  height: 1.15rem;
}

.notif-badge {
  position: absolute;
  top: -.3rem;
  right: -.3rem;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--yellow);
  color: #141414;
  font: 700 .68rem/1.2rem var(--f-body);
  text-align: center;
  box-shadow: 0 0 0 2px var(--black, #000);
}

/* ---------- Панель ---------- */
.notif-panel {
  --surface: rgba(23,23,22,.86);
  --line: rgba(236,234,227,.14);
  --ink: var(--on-dark, #ece9e0);
  --muted: var(--on-dark-muted, #a8a69c);

  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  z-index: 520;
  width: 24rem;
  max-width: min(92vw, 24rem);
  max-height: min(75vh, 32rem);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: .9rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  color: var(--ink);
  font-family: var(--f-body);
  overflow: hidden;
  animation: notifyIn .18s cubic-bezier(.2,.8,.3,1);
}

@keyframes notifyIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.notif-head b {
  font: 600 .95rem/1.2 var(--f-body);
  color: var(--ink);
}

.notif-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notif-close:hover { color: var(--ink); background: rgba(255,255,255,.08); }
.notif-close .ic { width: .95rem; height: .95rem; }

.notif-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--yellow) transparent;
}

.notif-body { display: flex; flex-direction: column; }
.notif-body > p { padding: 1.2rem 1rem; color: var(--muted); font-size: .88rem; margin: 0; }

.notif-row {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  width: 100%;
  padding: .8rem 1rem;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: var(--f-body);
  transition: background .12s;
}

.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: rgba(255,255,255,.06); }

.notif-ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: rgba(240,215,126,.14);
  color: var(--yellow);
}
.notif-ic .ic { width: 1.1rem; height: 1.1rem; }

.notif-ic-payment { background: color-mix(in srgb, var(--err) 20%, transparent); color: var(--err); }
.notif-ic-status,
.notif-ic-invoice,
.notif-ic-order { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }

.notif-body-txt {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.notif-body-txt b {
  font: 600 .88rem/1.3 var(--f-body);
  color: var(--ink);
}

.notif-text {
  font-size: .82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notif-time {
  font-size: .74rem;
  color: var(--muted);
  opacity: .8;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 2.4rem 1rem;
  color: var(--muted);
  text-align: center;
}
.notif-empty svg { width: 2.2rem; height: 2.2rem; opacity: .5; }
.notif-empty p { margin: 0; font-size: .9rem; }

.notif-backdrop { display: none; }

/* ---------- Телефон: шторка снизу на всю ширину ---------- */
@media (max-width: 760px) {
  .notif-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 510;
  }
  .notif-backdrop[hidden] { display: none; }

  .notif-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 521;
    width: 100%;
    max-width: 100%;
    max-height: 78vh;
    border-radius: 1rem 1rem 0 0;
    border-bottom: none;
    animation: notifySheetIn .22s ease-out;
  }

  @keyframes notifySheetIn {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
}

/* =====================================================================
   ФАЙЛ: css/24-assistant.css — ПОМОЩНИК-НЕЙРОСЕТЬ (плавающая кнопка и чат)
   Разметка и логика — js/assistant.js. Кнопка стоит НАД кнопками
   мессенджеров (.msgr, см. css/19-extras.css и css/20-catalog.css —
   там же жёлтая круглая кнопка-«чат» .msgr-toggle, по которой мы
   равняем размеры и отступы на телефоне).

   Панель всегда «тёмная стеклянная» — как всплывающие подсказки сайта
   (.cart-toast, .msgr-btn — тоже всегда тёмные, вне зависимости от
   светлой/тёмной темы сайта), поэтому цвета здесь — свои переменные
   --a-*, а не общие --surface/--ink (те меняются местами со сменой
   темы и на всегда-тёмной панели были бы нечитаемы).
   ===================================================================== */

.assist-fab, .assist-panel {
  --a-surface: rgba(23, 23, 22, .78);
  --a-surface-2: rgba(255, 255, 255, .06);
  --a-line: rgba(255, 255, 255, .14);
  --a-ink: #ece9e0;
  --a-muted: #a3a094;
  --a-ok: #6fcf86;
  --a-err: #ff8b7f;
}

/* ---------- Кнопка «Помощник» ---------- */
.assist-fab {
  position: fixed;
  right: 16px;
  bottom: 190px;   /* выше стопки из 3 кнопок мессенджеров (46px × 3 + отступы) */
  z-index: 51;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #171102;
  background: radial-gradient(circle at 30% 25%, #fff6d8, var(--yellow) 45%, var(--gold) 100%);
  box-shadow: 0 6px 20px rgba(201, 154, 58, .45), 0 0 0 1px rgba(255,255,255,.25) inset;
  animation: assist-glow 3.2s ease-in-out infinite;
  transition: transform .15s ease;
}
.assist-fab:hover { transform: translateY(-2px) scale(1.03); }
.assist-fab .ic { width: 26px; height: 26px; }
.assist-fab[hidden] { display: none; }
@keyframes assist-glow {
  0%, 100% { box-shadow: 0 6px 20px rgba(201, 154, 58, .4), 0 0 0 1px rgba(255,255,255,.25) inset; }
  50% { box-shadow: 0 6px 28px rgba(240, 215, 126, .75), 0 0 0 1px rgba(255,255,255,.35) inset; }
}
@media (prefers-reduced-motion: reduce) {
  .assist-fab { animation: none; }
}
@media (max-width: 760px) {
  .assist-fab { right: 10px; bottom: 78px; width: 50px; height: 50px; }
  body.has-bnav .assist-fab { bottom: 154px; }
}

/* ---------- Панель чата ---------- */
.assist-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 380px;
  height: 560px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid var(--a-line);
  background: var(--a-surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  color: var(--a-ink);
  font: 400 .92rem/1.5 var(--f-body);
  animation: assist-in .22s ease both;
}
.assist-panel.is-closing { animation: assist-out .22s ease both; }
.assist-panel[hidden] { display: none; }
@keyframes assist-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes assist-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .assist-panel, .assist-panel.is-closing { animation: none; }
}
@media (max-width: 760px) {
  .assist-panel { right: 0; bottom: 0; left: 0; top: 0; width: auto; height: auto; max-height: none; border-radius: 0; }
}

.assist-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--a-line);
  background: var(--a-surface-2);
}
.assist-head-ic {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #fff6d8, var(--yellow) 45%, var(--gold) 100%);
  color: #171102;
}
.assist-head-ic .ic { width: 18px; height: 18px; }
.assist-head-t { flex: 1; min-width: 0; }
.assist-head-t b { display: block; font: 600 .96rem var(--f-head, var(--f-body)); color: var(--a-ink); }
.assist-head-t small { display: block; color: var(--a-muted); font-size: .78rem; }
.assist-close {
  flex: none;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--a-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.assist-close:hover { background: var(--a-surface-2); color: var(--a-ink); }

.assist-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  scroll-behavior: smooth;
}

.assist-msg { display: flex; }
.assist-msg.user { justify-content: flex-end; }
.assist-bubble {
  max-width: 86%;
  padding: .6rem .85rem;
  border-radius: 1.1rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .9rem;
}
.assist-msg.bot .assist-bubble {
  background: var(--a-surface-2);
  border: 1px solid var(--a-line);
  border-bottom-left-radius: .35rem;
  color: var(--a-ink);
}
.assist-msg.user .assist-bubble {
  background: var(--yellow);
  color: #171102;
  border-bottom-right-radius: .35rem;
  font-weight: 500;
}
.assist-msg.err .assist-bubble { border-color: rgba(255,139,127,.5); color: var(--a-err); }

/* «печатает…» */
.assist-typing .assist-bubble { display: flex; align-items: center; gap: .25rem; padding: .75rem 1rem; }
.assist-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--a-muted);
  animation: assist-bounce 1.1s ease-in-out infinite;
}
.assist-dot:nth-child(2) { animation-delay: .15s; }
.assist-dot:nth-child(3) { animation-delay: .3s; }
.assist-typing-b small { margin-left: .4rem; color: var(--a-muted); font-size: .78rem; }
@keyframes assist-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .assist-dot { animation: none; opacity: .8; }
}

/* Быстрые кнопки под приветствием */
.assist-quick { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.assist-qbtn {
  border: 1px solid var(--a-line);
  background: var(--a-surface-2);
  color: var(--a-ink);
  border-radius: .8rem;
  padding: .4rem .7rem;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.assist-qbtn:hover { background: rgba(240,215,126,.16); border-color: rgba(240,215,126,.4); }

/* Карточки товаров в чате */
.assist-products { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; max-width: 92%; }
.assist-pcard {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border: 1px solid var(--a-line);
  border-radius: .9rem;
  background: var(--a-surface-2);
}
.assist-pthumb {
  width: 44px; height: 44px;
  border-radius: .6rem;
  overflow: hidden;
  display: grid; place-items: center;
  background: rgba(255,255,255,.05);
  color: var(--a-muted);
  flex: none;
}
.assist-pthumb img { width: 100%; height: 100%; object-fit: contain; }
.assist-pthumb .ic { width: 20px; height: 20px; }
.assist-pinfo { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.assist-pname {
  color: var(--a-ink);
  font-size: .84rem;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.assist-pname:hover { text-decoration: underline; }
.assist-pprice { color: var(--yellow); font-size: .82rem; font-weight: 600; }
.assist-padd {
  flex: none;
  font-size: .78rem;
  padding: .4rem .6rem;
  border-radius: .6rem;
  background: var(--yellow);
  color: #171102;
  border: none;
  cursor: pointer;
}

/* Кнопка «Передать менеджеру» и форма имя+телефон */
.assist-handoff-btn {
  margin-top: .6rem;
  border: 1px solid rgba(111, 207, 134, .45);
  background: rgba(111, 207, 134, .12);
  color: var(--a-ok);
  border-radius: .8rem;
  padding: .45rem .8rem;
  font: inherit;
  font-size: .84rem;
  cursor: pointer;
}
.assist-hform { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; max-width: 92%; }
.assist-hform input {
  font-size: 16px;   /* без зума на iPhone */
  padding: .55rem .7rem;
  border-radius: .7rem;
  border: 1px solid var(--a-line);
  background: rgba(255,255,255,.05);
  color: var(--a-ink);
}
.assist-hform input::placeholder { color: var(--a-muted); }
.assist-hform button {
  border: none;
  border-radius: .7rem;
  padding: .55rem .8rem;
  background: var(--yellow);
  color: #171102;
  font: 600 .88rem inherit;
  cursor: pointer;
}
.assist-hform .err { color: var(--a-err); font-size: .8rem; margin: 0; }

.assist-foot {
  flex: none;
  border-top: 1px solid var(--a-line);
  padding: .7rem .9rem;
  background: var(--a-surface-2);
}
.assist-form { display: flex; gap: .5rem; }
.assist-input {
  flex: 1;
  font-size: 16px;   /* без зума на iPhone при фокусе */
  padding: .65rem .9rem;
  border-radius: 1rem;
  border: 1px solid var(--a-line);
  background: rgba(255,255,255,.05);
  color: var(--a-ink);
}
.assist-input::placeholder { color: var(--a-muted); }
.assist-send {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--yellow);
  color: #171102;
  display: grid; place-items: center;
  cursor: pointer;
}
.assist-send:disabled { opacity: .5; cursor: default; }
.assist-disclaimer { margin: .55rem 0 0; font-size: .7rem; line-height: 1.4; color: var(--a-muted); text-align: center; }

/* ---------- Фото детали: кнопка, превью, фото в переписке ---------- */
.assist-attach {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--a-line);
  background: var(--a-surface-2);
  color: var(--a-ink);
  display: grid; place-items: center;
  cursor: pointer;
}
.assist-attach:hover { background: rgba(240,215,126,.16); border-color: rgba(240,215,126,.4); }
.assist-attach .ic { width: 20px; height: 20px; }
.assist-preview {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .55rem; padding: .35rem .5rem;
  border: 1px solid var(--a-line); border-radius: .8rem; background: var(--a-surface-2);
  font-size: .78rem; color: var(--a-muted);
}
.assist-preview[hidden] { display: none; }
.assist-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: .5rem; flex: none; }
.assist-preview span { flex: 1; min-width: 0; }
.assist-preview button { flex: none; border: none; background: transparent; color: var(--a-muted); font-size: 1.2rem; cursor: pointer; }
.assist-photo { display: block; max-width: 100%; max-height: 180px; border-radius: .7rem; margin-bottom: .35rem; }
/* =====================================================================
   ФАЙЛ: css/25-admin-money.css — АДМИНКА: ОПЛАТЫ И ДОСТАВКА (js/admin-money.js)
   Карточки собраны из обычных классов админки (.admin-card, .admin-table,
   .status-pill, .ok-msg, .err, .small) — здесь только то немногое, чего
   в общих стилях не было (пример JSON, код адреса вебхука, список ключей СДЭК).
   Тёмная тема — переменные из css/16-admin.css.
   ===================================================================== */

#card-1c pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .8rem 1rem;
  overflow: auto;
  color: var(--ink);
  font-size: .82rem;
  line-height: 1.5;
}

#yk-webhook, #onec-endpoint {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: .2rem .5rem;
  color: var(--yellow);
  word-break: break-all;
}

#cdek-keys ul {
  margin: .4rem 0 .8rem;
  padding-left: 1.1rem;
}
#cdek-keys li { margin: .15rem 0; }

/* =====================================================================
   ФАЙЛ: css/26-admin2.css — НОВАЯ АДМИНКА (каркас js/admin2/shell.js)
   Во всю ширину экрана: слева разделы, справа вкладки и содержимое.
   ===================================================================== */

.a2-page { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 80px); width: 100%; }
.a2-side { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; background: var(--surface, #f4f4f2);
  border-right: 1px solid var(--line, #ddd); }
.a2-side-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px;
  color: inherit; text-decoration: none; font-size: 16px; font-weight: 500; }
.a2-side-link svg { width: 20px; height: 20px; flex: none; }
.a2-side-link:hover { background: rgba(0, 0, 0, .06); }
.a2-side-link.active { background: var(--accent, #c8a24a); color: var(--accent-ink, #111); }
.a2-side-old { margin-top: auto; opacity: .6; font-size: 14px; }

.a2-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: #d33; color: #fff;
  font-size: 12px; font-weight: 600; text-align: center; line-height: 20px; }
.a2-tab .a2-badge { margin-left: 6px; }

.a2-main { min-width: 0; padding: 18px 28px 60px; }
.a2-head h1 { margin: 0 0 12px; font-size: 28px; }
.a2-head h1 span { opacity: .55; font-weight: 500; }
.a2-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line, #ddd); margin-bottom: 18px; }
.a2-tab { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 8px 8px 0 0; color: inherit;
  text-decoration: none; font-weight: 500; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.a2-tab:hover { background: rgba(0, 0, 0, .05); }
.a2-tab.active { border-bottom-color: var(--accent, #c8a24a); font-weight: 600; }
.a2-body { min-width: 0; }
.a2-error { padding: 16px; border: 1px solid #d33; border-radius: 8px; background: rgba(221, 51, 51, .06); }

/* старые разделы внутри новой админки — растягиваем на всю ширину */
.a2-body .admin-main, .a2-body .wrap { max-width: none; width: 100%; padding-left: 0; padding-right: 0; }
.a2-body table { width: 100%; }

@media (max-width: 900px) {
  .a2-page { grid-template-columns: 1fr; }
  .a2-side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0;
    border-bottom: 1px solid var(--line, #ddd); }
  .a2-side-link { white-space: nowrap; padding: 8px 10px; font-size: 14px; }
  .a2-side-old { margin-top: 0; }
  .a2-main { padding: 12px; }
  .a2-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .a2-tab { white-space: nowrap; }
}


/* ===== Настройки (js/admin2/settings.js) ===== */
.st-wrap { max-width: 980px; }
.st-card { margin-bottom: 16px; }
.st-hint { margin: 4px 0 0; opacity: .75; }
.st-chk { display: block; margin: 8px 0; }
.st-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.st-row input { flex: 1 1 220px; min-width: 0; }
.st-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 0;
  background: var(--bg, #fff); border-top: 1px solid var(--line, #ddd); margin-top: 8px; }
.st-auto { opacity: .7; background: rgba(0, 0, 0, .04); }
.st-links { list-style: none; padding: 0; margin: 0 0 12px; }
.st-links li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line, #eee); }
.st-links li span { flex: 1 1 100%; }
.st-links a { word-break: break-all; }
.st-feed-row .btn { text-decoration: none; }
.st-bot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-wrap .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.st-wrap .fields .field.full { grid-column: 1 / -1; }
@media (max-width: 700px) { .st-wrap .fields { grid-template-columns: 1fr; } }

/* ===== Сводка (js/admin2/home.js) ===== */
.hm-att { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.hm-att-head, .hm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hm-att-head h2 { margin: 0; font-size: 19px; }
.hm-att-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hm-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.hm-card h3 { margin: 0; font-size: 16px; }
.hm-count { flex: none; min-width: 28px; padding: 2px 8px; border-radius: 14px; background: var(--yellow); color: var(--ink); text-align: center; }
.hm-text { margin: 8px 0; color: var(--muted); }
.hm-rows { list-style: none; padding: 0; margin: 8px 0; }
.hm-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.hm-row-t { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.hm-row-t small { display: block; color: var(--muted); }
.hm-row-btn { white-space: nowrap; }
.hm-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hm-btn { min-height: 36px; }
.hm-more { color: var(--muted); }
.hm-calm { grid-column: 1 / -1; margin: 0; padding: 12px; color: var(--ok); font-weight: 600; }
.hm-calm small { display: block; color: var(--muted); font-weight: 400; }
.hm-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
.hm-cols > *, .hm-att-list > * { min-width: 0; }
@media (max-width: 760px) {
  .hm-att-list, .hm-cols, .hm-stats { grid-template-columns: 1fr; }
  .hm-att { padding: 12px; }
  .hm-rows li { align-items: flex-start; }
}

/* ===== Загрузка прайса (js/admin2/prices.js) ===== */
.pr-wrap { display: flex; flex-direction: column; gap: 16px; max-width: 1100px; }
.pr-card { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 16px 18px; background: var(--surface, #fff); }
.pr-card h2 { margin: 0 0 10px; font-size: 20px; }
.pr-card h3 { margin: 0 0 8px; font-size: 16px; }
.pr-warn { border-color: #d9a400; background: rgba(217, 164, 0, .07); }
.pr-okcard { border-color: #2a9d4b; background: rgba(42, 157, 75, .07); }
.pr-ok { color: #2a7d3b; }
.pr-err { color: #c22; }
.pr-busy { opacity: .7; }
.pr-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; margin-bottom: 12px; }
.pr-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-width: 260px; }
.pr-check { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; }
.pr-drop { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 28px 16px;
  border: 2px dashed var(--line, #bbb); border-radius: 10px; text-align: center; }
.pr-drop.over { border-color: var(--accent, #c8a24a); background: rgba(200, 162, 74, .1); }
.pr-drop small { flex-basis: 100%; opacity: .6; }
.pr-bigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.pr-big { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.pr-big b { font-size: 30px; line-height: 1.1; }
.pr-big span { font-size: 13px; opacity: .75; }
.pr-big.new b { color: #2a7d3b; }
.pr-big.bad { border-color: #c22; } .pr-big.bad b { color: #c22; }
.pr-box { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.pr-box.bad { border-color: #c22; background: rgba(204, 34, 34, .05); }
.pr-scroll { overflow-x: auto; }
.pr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pr-table th, .pr-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #eee); vertical-align: top; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.pr-pend { border-top: 1px solid var(--line, #ddd); padding: 10px 0; }
.pr-pend-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
@media (max-width: 700px) { .pr-card { padding: 12px; } .pr-field { min-width: 0; width: 100%; } }
/* ===== Товары / Каталог техники (js/admin2/goods.js) ===== */
.a2-goods .adm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.a2-goods .adm-filters input[type=search] { flex: 1 1 260px; min-width: 0; }
.a2-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin: 8px 0;
  border: 1px solid var(--accent, #c8a24a); border-radius: 8px; background: rgba(200, 162, 74, .12); position: sticky; top: 0; z-index: 3; }
.a2-selbar[hidden] { display: none; }
.adm-products .adm-sel { width: 34px; text-align: center; }
.a2-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.a2-subtab { padding: 8px 14px; border: 1px solid var(--line, #ddd); border-radius: 20px; background: transparent;
  color: inherit; font: inherit; cursor: pointer; }
.a2-subtab:hover { background: rgba(0, 0, 0, .05); }
.a2-subtab.active { background: var(--accent, #c8a24a); color: var(--accent-ink, #111); border-color: transparent; font-weight: 600; }
.a2-subpane[hidden] { display: none; }
.a2-goods .overflow { overflow-x: auto; }
@media (max-width: 700px) { .a2-subtabs { flex-wrap: nowrap; overflow-x: auto; } .a2-subtab { white-space: nowrap; } }
.cookie-short { display: none; }
body:not(.pay-online-ready) #c-pay-card-opt { display: none !important; }
/* Мобильная раскладка нижних элементов и доступ к связи */
.msgr { z-index: 110; }
.msgr-btn.msgr-toggle { display: flex; align-items: center; justify-content: center; gap: .5rem; width: auto; min-width: 96px; height: 44px; padding: 0 7px; font-size: .72rem; border-radius: 24px; background: var(--yellow); color: #171102; border: 0; box-shadow: 0 8px 24px #0008; font: 600 .92rem var(--f-body); }
.msgr-btn.msgr-toggle .ic { width: 21px; height: 21px; }
.contact-link { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 44px; padding: .65rem .8rem; color: #eee9dc; text-decoration: none; text-align: left; border: 0; border-radius: .7rem; background: transparent; font: 500 .9rem var(--f-body); cursor: pointer; }
.contact-link:hover { background: rgba(255,255,255,.08); }
.contact-link .ic { width: 20px; height: 20px; flex: none; color: var(--yellow); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.msgr .contact-link { display: none; }
.msgr.open { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 4px; width: min(310px, calc(100vw - 24px)); padding: 8px; border: 1px solid #ffffff26; border-radius: 16px; background: #171716f2; box-shadow: 0 14px 36px #0009; }
.msgr.open .contact-link { display: flex; }
.msgr.open .msgr-toggle { align-self: flex-end; min-width: 0; height: 42px; }
.msgr[hidden], .contact-link[hidden] { display: none !important; }
body.admin-route .cookie-bar { display: none !important; }

@media (max-width: 760px) {
  body.has-bnav { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.has-bnav .bnav { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  body.has-bnav .msgr { right: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  body.has-bnav .msgr.open { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  body.has-bnav .cookie-bar { left: 8px; right: 8px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; max-height: 90px; overflow: auto; display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; }
  .cookie-bar p { flex: 1 1 auto; min-width: 0; font-size: .68rem; line-height: 1.25; }
  .cookie-full { display: none; }
  .cookie-short { display: inline; }
  /* «Связаться» не прячем: поднимаем над полосой cookie и над полосой покупки товара */
  body.has-bnav.has-cookie .msgr, body.has-bnav.has-cookie .msgr.open { bottom: calc(178px + env(safe-area-inset-bottom, 0px)); }
  body.has-bnav.product-route:has(.pdp-sticky.show) .msgr, body.has-bnav.product-route:has(.pdp-sticky.show) .msgr.open { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
  /* открыты уведомления или меню «Ещё» — нижнее меню и «Связаться» убираем, чтобы не перекрывали */
  body.notif-open .bnav, body.notif-open .msgr, body:has(#bnav-sheet) .msgr { display: none !important; }
  body.product-route.has-cookie .cookie-bar { bottom: calc(162px + env(safe-area-inset-bottom, 0px)); }
  .assist-fab { display: none !important; }
  .cf-count { display: none; }
  .cookie-bar p a:nth-of-type(2) { display: none; }
  .cookie-bar .cookie-btns { width: auto; display: flex; flex: none; gap: 4px; }
  .cookie-bar .cookie-btns .btn { flex: none; padding: .38rem .48rem; font-size: .65rem; white-space: nowrap; }
  body.has-bnav .pdp-sticky { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 81; }
  body.has-bnav .cf-open { position: static; left: auto; bottom: auto; z-index: auto; transform: none; animation: none; height: 40px; padding: 0 .65rem; border-radius: .65rem; box-shadow: none; flex: none; }
  .cf-bar { display: flex; flex-wrap: nowrap; gap: .4rem; align-items: center; }
  .cf-bar select { flex: 1 1 auto; width: 1%; min-width: 0; }
  .cf-count { order: initial; flex: 0 1 auto; font-size: .75rem; }
  .cf-view { flex: none; }
  .cf-view button { width: 38px; height: 40px; }
  body.assistant-open { overflow: hidden; }
  body.assistant-open .bnav, body.assistant-open .msgr, body.assistant-open .assist-fab { display: none !important; }
  body.assistant-open .assist-panel { position: fixed; top: var(--assist-top, 0px); left: 0; right: 0; bottom: auto; width: 100%; height: var(--assist-vh, 100dvh); max-height: var(--assist-vh, 100dvh); border-radius: 0; z-index: 300; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .assist-head { padding-top: max(.65rem, env(safe-area-inset-top, 0px)); }
  .assist-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; color: var(--a-ink); font-size: 1.7rem; }
  .assist-foot { padding-bottom: max(.55rem, env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 761px) {
  .msgr { right: 20px; bottom: 20px; }
  .msgr.open { position: fixed; }
}

/* Админка на телефоне: разделы — только в нижнем меню (Сводка/Товары/Заказы/Заявки/Ещё), верхнюю полосу разделов убираем */
@media (max-width: 760px) {
  body.has-bnav .a2-side { display: none; }
}
@media (max-width: 760px) {
  body.notif-open .cookie-bar, body:has(#bnav-sheet) .cookie-bar { display: none !important; }
}

/* Кнопка связи: компактная прозрачная иконка, наводится до золотой кнопки. */
#msgr .msgr-toggle {
  align-self: flex-end;
  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(18,18,16,.32);
  color: #f0d984;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: width .32s ease, max-width .32s ease, padding .32s ease, gap .32s ease,
    border-radius .32s ease, border-color .32s ease, background-color .32s ease,
    color .32s ease, box-shadow .32s ease;
}
#msgr .msgr-toggle .ic { flex: none; color: currentColor; }
#msgr .msgr-toggle span {
  display: block;
  width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transform: translateX(-4px);
  transition: width .32s ease, opacity .2s ease, transform .32s ease;
}
@media (hover: hover) and (pointer: fine) {
  #msgr:not(.open):hover .msgr-toggle,
  #msgr:not(.open) .msgr-toggle:focus-visible {
    width: 140px;
    max-width: 140px;
    padding: 0 14px;
    gap: .5rem;
    border-color: transparent;
    border-radius: 24px;
    background: var(--yellow);
    color: #171102;
    box-shadow: 0 8px 24px #0008;
  }
  #msgr:not(.open):hover .msgr-toggle span,
  #msgr:not(.open) .msgr-toggle:focus-visible span {
    width: 82px;
    opacity: 1;
    transform: translateX(0);
  }
}
#msgr.open .msgr-toggle {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  padding: 0 14px;
  gap: .5rem;
  border-color: transparent;
  border-radius: 24px;
  background: var(--yellow);
  color: #171102;
}
#msgr.open .msgr-toggle span { width: 82px; opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  #msgr .msgr-toggle, #msgr .msgr-toggle span { transition: none; }
}

/* Не показываем плавающую связь поверх открытого помощника на любом экране. */
body.assistant-open #msgr { display: none !important; pointer-events: none !important; }

/* Плавное раскрытие меню вариантов связи по нажатию. */
#msgr {
  box-sizing: border-box;
  width: 44px;
  padding: 0;
  gap: 0;
  border: 1px solid transparent;
  border-radius: 24px;
  background: transparent;
  transition: width .3s ease, padding .3s ease, gap .3s ease,
    border-color .3s ease, border-radius .3s ease, background-color .3s ease,
    box-shadow .3s ease;
}
#msgr.open {
  width: min(310px, calc(100vw - 24px));
  padding: 8px;
  gap: 4px;
  border-color: #ffffff26;
  border-radius: 16px;
  background: #171716f2;
  box-shadow: 0 14px 36px #0009;
}
#msgr .contact-link {
  display: flex;
  box-sizing: border-box;
  height: 0;
  min-height: 0;
  max-height: 0;
  padding: 0 .8rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: height .28s ease, min-height .28s ease, max-height .28s ease,
    padding .28s ease, opacity .2s ease, transform .28s ease,
    visibility 0s linear .28s;
}
#msgr.open .contact-link {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: .55rem .8rem;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  #msgr, #msgr .contact-link { transition: none; }
}