/* rvd174.ru — каркас сайта: шапка, меню, боковая колонка, подвал, окна.
   Пишется с нуля (03.11.2026). Внешний вид — по замерам старого сайта; классы — по БЭМ (блок__элемент--модификатор).
   Порядок слоёв: reset → base → layout → components → utilities (поздний слой важнее раннего). */
@layer reset, base, layout, components, utilities;

@font-face {
  font-family: "Inter";
  src: url("/assets/site/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* цвета */
  --c-red: #b71513;
  --c-red-hover: #d1403e;
  --c-text: #141414;
  --c-black: #000;
  --c-white: #fff;
  --c-bg-soft: #f2f2f2;      /* плашки, боковое меню */
  --c-bg-footer: #f4f4f4;
  --c-line: #ddd;
  --c-frame: #e7e7ea;        /* тонкая обводка галереи и миниатюр */
  --c-input: #fcfcfc;
  --c-muted: #6b6b6b;        /* серый текст: на старом сайте #aaa — нечитаемо (контраст 2:1), здесь ≥ 4.5:1 */
  --c-muted-light: #8a8a8a;  /* второстепенные подписи крупным шрифтом */
  --c-shadow: rgb(109 109 109 / .4);

  /* шрифт */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* размеры */
  --wrap: 1440px;
  --gutter: 20px;
  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 30px;
  --aside: 300px;
  --gap: 22px;
  --top-h: 140px;            /* высота верхней строки шапки (логотип и контакты) */
  --bar-h: 44px;             /* высота строки меню (кнопка «Каталог») */
  --sticky-top: calc(var(--bar-h) + 46px); /* строка меню (кнопка + отступы 12+12 + линия) и зазор 20 */
  --t: .25s ease;
}

@media (max-width: 959px) {
  :root { --gutter: 12px; --top-h: 60px; --bar-h: 40px; }
}

/* ---------- reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
  ul[class], ol[class] { padding: 0; list-style: none; }
  img, svg, video, picture { display: block; max-width: 100%; }
  img { height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  address { font-style: normal; }
  dialog { padding: 0; border: 0; color: inherit; }
}

/* ---------- base ---------- */
@layer base {
  html { scroll-padding-top: var(--sticky-top); }
  body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.4;
    color: var(--c-text);
    background: var(--c-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .15em; }
  a:hover { color: var(--c-red); }
  :focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; }
  h1 { font-size: clamp(28px, 3.6vw, 56px); font-weight: 600; line-height: 1.15; }
  h2 { font-size: clamp(22px, 2vw, 28px); font-weight: 600; line-height: 1.2; }
  h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
  .icon { width: 1em; height: 1em; flex: none; fill: currentColor; }
}

/* ---------- layout ---------- */
@layer layout {
  .wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

  .page {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: var(--aside) minmax(0, 1fr);
    gap: var(--gap);
    align-items: start;
    margin-top: 10px;
  }
  .page__main:focus { outline: none; }
  .panel { border: 2px solid var(--c-bg-soft); border-radius: var(--radius-l); padding: 30px; }
  .panel > h1 { margin: 24px 0 20px; }

  @media (max-width: 959px) {
    .page { grid-template-columns: minmax(0, 1fr); margin-top: 6px; }
    .sidebar { display: none; }
    .panel { border: 0; padding: 0; }
    .panel > h1 { margin: 12px 0 16px; }
  }
}

/* ---------- components ---------- */
@layer components {
  /* кнопки */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: var(--bar-h); padding: 9px 16px;
    border: 0; border-radius: var(--radius-s);
    background: var(--c-red); color: var(--c-white);
    font-size: 18px; font-weight: 500; line-height: 24px; text-align: center; text-decoration: none;
    transition: background-color var(--t);
  }
  .btn:hover { background: var(--c-red-hover); color: var(--c-white); }
  .btn .icon { width: 24px; height: 24px; }
  .icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border: 0; border-radius: var(--radius-s); background: transparent; color: var(--c-text);
  }
  .icon-btn .icon { width: 24px; height: 24px; }
  .icon-btn:hover { color: var(--c-red); }

  /* «перейти к содержимому» — видна только при переходе с клавиатуры */
  .skip-link {
    position: absolute; left: 8px; top: -100px; z-index: 1000;
    padding: 8px 16px; border-radius: var(--radius-s); background: var(--c-black); color: var(--c-white);
  }
  .skip-link:focus { top: 8px; color: var(--c-white); }

  /* ===== шапка ===== */
  /* Шапка прилипает к верху с отрицательным отступом, равным высоте верхней строки:
     при прокрутке строка с контактами уезжает, а строка меню остаётся на экране.
     (Старая шапка прилипала целиком и занимала 210 px экрана.) */
  .site-header { position: sticky; top: calc(-1 * var(--top-h)); z-index: 50; background: var(--c-white); transition: box-shadow var(--t); }
  .site-header.is-stuck { box-shadow: 0 6px 12px rgb(0 0 0 / .08); }
  .site-header__top {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 820px); align-items: center; gap: 20px;
    height: var(--top-h);
  }
  .logo { display: block; max-width: 469px; }
  .logo__img { width: 100%; }

  .contacts { display: flex; justify-content: space-between; }
  .contacts__dept { position: relative; padding-left: 20px; border-left: 1px solid var(--c-line); }
  .contacts__title { margin-bottom: 14px; font-size: 16px; line-height: 1.2; color: var(--c-muted-light); }
  .contacts__link {
    display: flex; align-items: center; gap: 8px; padding-bottom: 7px;
    font-size: 13px; font-weight: 600; line-height: 18px; color: var(--c-black); text-decoration: none;
  }
  .contacts__link .icon { width: 16px; height: 16px; color: #b3b3b3; }
  .contacts__note { font-size: 13px; line-height: 1.4; letter-spacing: .03em; color: var(--c-muted-light); }
  .contacts__dept--main .contacts__title { font-size: 20px; font-weight: 600; color: var(--c-red); }
  .contacts__dept--main .contacts__link { font-size: 15px; }
  .contacts__dept--main .contacts__note { font-weight: 500; color: var(--c-red); }
  .contacts__status { position: absolute; left: 20px; top: 100%; font-size: 13px; color: #1a7f37; }
  .contacts__status:empty { display: none; }

  .site-header__bar { position: relative; border-top: 1px solid var(--c-line); }
  .site-header__row {
    /* меню не уже своих пунктов (иначе «О компании» переносилось на 1280 px) — ужимается поиск */
    display: grid; grid-template-columns: auto minmax(max-content, 1fr) minmax(0, 540px) minmax(0, 242px);
    align-items: center; column-gap: 38px; padding-block: 12px;
  }

  .btn--catalog { width: 144px; justify-content: flex-start; padding-left: 16px; }
  .btn--catalog .icon--close { display: none; }
  .btn--catalog[aria-expanded="true"] .icon--open { display: none; }
  .btn--catalog[aria-expanded="true"] .icon--close { display: block; }
  .btn--catalog[aria-expanded="true"] { border-radius: var(--radius-s) var(--radius-s) 0 0; }
  .btn--burger { display: none; }

  .mainnav__list { display: flex; gap: 46px; }
  .mainnav__item { position: relative; display: flex; align-items: center; gap: 2px; }
  .mainnav__item > a { font-size: 18px; line-height: 24px; color: var(--c-black); text-decoration: none; white-space: nowrap; }
  .mainnav__item > a:hover, .mainnav__item > a[aria-current] { color: var(--c-red); }
  .mainnav__toggle {
    display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
    border: 0; background: none; color: var(--c-muted);
  }
  .mainnav__toggle .icon { width: 16px; height: 16px; transition: transform var(--t); }
  .mainnav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .mainnav__sub {
    position: absolute; left: -16px; top: calc(100% + 8px); z-index: 60; min-width: 190px;
    padding: 8px 0; border-radius: var(--radius-s); background: var(--c-white); box-shadow: 0 8px 24px rgb(0 0 0 / .15);
    display: none;
  }
  .mainnav__sub::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 10px; } /* мостик для мыши */
  .mainnav__item--parent:hover .mainnav__sub,
  .mainnav__toggle[aria-expanded="true"] + .mainnav__sub { display: block; }
  .mainnav__sub a { display: block; padding: 9px 16px; font-size: 16px; color: var(--c-text); text-decoration: none; }
  .mainnav__sub a:hover, .mainnav__sub a[aria-current] { color: var(--c-red); }

  .site-search__form { position: relative; }
  .site-search__input {
    width: 100%; height: var(--bar-h); padding: 10px 52px 10px 10px;
    border: 1px solid var(--c-line); border-radius: var(--radius-s); background: var(--c-input);
    font-size: 18px; color: var(--c-black);
  }
  .site-search__input::placeholder { color: #9a9a9a; }
  .site-search__input::-webkit-search-cancel-button { display: none; }
  .site-search__btn {
    position: absolute; right: 4px; top: 50%; translate: 0 -50%;
    display: grid; place-items: center; width: 40px; height: 36px; border: 0; background: none; color: #b5b5b5;
  }
  .site-search__btn .icon { width: 28px; height: 28px; }
  .site-search__btn:hover { color: var(--c-red); }
  /* подсказки поиска: список под полем (main.js, данные — /ajax/search.json) */
  .suggest {
    position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; max-height: min(70vh, 460px); overflow-y: auto;
    padding: 6px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-white); box-shadow: 0 10px 30px rgb(0 0 0 / .14); text-align: left;
  }
  .suggest__item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; line-height: 1.3; cursor: pointer; }
  .suggest__item:hover, .suggest__item[aria-selected="true"] { background: #f2f2f2; }
  .suggest__title { font-size: 15px; font-weight: 500; color: var(--c-black); }
  .suggest__sub { font-size: 13px; color: #5c5c5c; }
  .suggest__item--all { margin-top: 4px; border-top: 1px solid #ececec; border-radius: 0 0 6px 6px; font-size: 14px; font-weight: 500; color: var(--c-red); }
  .site-header__order { width: 100%; }

  /* прилипшая строка меню (класс is-stuck ставит main.js при прокрутке; 06.11.2026, по просьбе владельца).
     Компьютер: логотип, «Каталог», меню, телефон и почта отдела продаж, кнопка-лупа (поле раскрывается поверх строки),
     «Оставить заявку» — всё 14 px, в одну строку. Телефон: вместо поиска — номер отдела продаж и кнопка «Заказать». */
  .site-header__minilogo, .site-header__sales, .site-search__toggle, .site-header__order-short { display: none; }
  .site-header__sales-link {
    display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--c-black); text-decoration: none; white-space: nowrap;
  }
  .site-header__sales-link:hover { color: var(--c-red); }
  .site-header__sales-link .icon { flex: none; width: 16px; height: 16px; color: #b3b3b3; }
  .site-header__sales-status { position: absolute; left: 0; top: 100%; font-size: 12px; color: #1a7f37; white-space: nowrap; }
  .site-header__sales-status:empty { display: none; }
  @media (min-width: 960px) {
    .site-header.is-stuck .site-header__row { display: flex; justify-content: space-between; align-items: center; column-gap: 16px; }
    .is-stuck .site-header__row .btn { max-width: 155px; font-size: 14px; }
    .is-stuck .btn--catalog { flex: none; }
    .is-stuck .mainnav__list { gap: 10px; }
    .is-stuck .mainnav__item > a { font-size: 14px; }
    .is-stuck .site-header__minilogo { display: block; flex: none; }
    .site-header__minilogo img { width: auto; height: 34px; }
    .is-stuck .site-header__sales { position: relative; display: flex; align-items: center; gap: 16px; }
    .is-stuck .site-search { position: relative; flex: none; }
    .is-stuck .site-search__toggle {
      display: grid; place-items: center; width: var(--bar-h); height: var(--bar-h); padding: 0;
      border: 1px solid var(--c-line); border-radius: var(--radius-s); background: var(--c-input); color: #b5b5b5;
    }
    .is-stuck .site-search__toggle:hover, .is-stuck .site-search__toggle[aria-expanded="true"] { color: var(--c-red); }
    .is-stuck .site-search__toggle .icon { width: 26px; height: 26px; }
    .is-stuck .site-search__form { display: none; }
    .is-stuck .site-search.is-open .site-search__form {
      display: block; position: absolute; right: 0; top: 50%; translate: 0 -50%; z-index: 2;
      width: min(540px, 50vw); border-radius: var(--radius-s); box-shadow: 0 6px 20px rgb(0 0 0 / .15);
    }
    .is-stuck .site-header__order { flex: 0 1 155px; }
  }
  /* узкие компьютеры: почта не влезает (она есть в шапке и подвале) — только телефон */
  @media (min-width: 960px) and (max-width: 1069px) {
    .is-stuck .site-header__sales-link--mail { display: none; }
  }
  /* телефон и планшет: вместо поиска — номер отдела продаж и «Заказать» */
  @media (max-width: 959px) {
    .site-header.is-stuck .site-header__row { display: flex; align-items: center; gap: 10px; }
    .is-stuck .site-search { display: none; }
    .is-stuck .site-header__sales { display: flex; flex: 1; justify-content: center; min-width: 0; }
    .is-stuck .site-header__sales-link--mail { display: none; }
    .is-stuck .site-header__sales-link { font-size: 15px; }
    .is-stuck .site-header__order { display: inline-flex; flex: none; width: auto; padding-inline: 14px; font-size: 14px; }
    .is-stuck .site-header__order-full { display: none; }
    .is-stuck .site-header__order-short { display: inline; }
  }
  @media (max-width: 359px) {
    .is-stuck .site-header__sales-link { gap: 0; font-size: 14px; }
    .is-stuck .site-header__sales-link .icon { display: none; }
  }

  /* выпадающий каталог */
  .catalog-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-white); box-shadow: 0 15px 13px var(--c-shadow);
  }
  .catmenu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 32px 40px; }
  .catmenu__group { padding-inline: 20px 10px; border-left: 1px solid var(--c-line); }
  .catmenu__group:first-child { border-left: 0; padding-left: 0; }
  .catmenu__title { padding-bottom: 16px; font-size: 16px; font-weight: 600; text-transform: uppercase; }
  .catmenu__list a { display: block; padding-bottom: 10px; font-size: 15px; font-weight: 300; line-height: 24px; color: var(--c-black); text-decoration: none; }
  .catmenu__list a:hover, .catmenu__list a[aria-current] { color: var(--c-red); text-decoration: underline; }
  .catmenu__group--wide .catmenu__list { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 50px; }

  /* средние экраны: прячем второстепенные отделы, ужимаем меню */
  @media (max-width: 1279px) {
    .site-header__top { grid-template-columns: minmax(0, 469px) auto; justify-content: space-between; }
    .contacts { justify-content: flex-end; gap: 30px; }
    .contacts__dept:not(.contacts__dept--main) { display: none; }
    .site-header__row { column-gap: 20px; grid-template-columns: auto auto minmax(0, 1fr) auto; }
    .mainnav__list { gap: 24px; }
  }

  /* телефоны и планшеты */
  @media (max-width: 959px) {
    .site-header__top { grid-template-columns: auto 1fr; }
    .site-header__bar { border-top: 0; }
    .logo { width: 70px; }
    .contacts { justify-content: flex-end; }
    .contacts__dept--main { padding: 0; border: 0; }
    .contacts__dept--main .contacts__title,
    .contacts__dept--main .contacts__note,
    .contacts__dept--main .contacts__link[data-copy-email] { display: none; }
    .contacts__dept--main .contacts__link { padding: 0; font-size: 18px; }
    .contacts__dept--main .contacts__link .icon { display: none; }
    .site-header__row { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding-block: 4px 8px; }
    .btn--catalog, .mainnav, .site-header__order, .catalog-panel { display: none; }
    .btn--burger { display: inline-flex; width: 40px; padding: 0; justify-content: center; }
    .site-search__input { font-size: 16px; } /* 16px — иначе iOS увеличивает страницу при вводе */
  }

  /* ===== боковая колонка ===== */
  .sidebar__sticky { position: sticky; top: var(--sticky-top); }
  .sidemenu { padding: 23px 17px; border-radius: var(--radius-l); background: var(--c-bg-soft); }
  .sidemenu__group + .sidemenu__group { margin-top: 2px; }
  .sidemenu__title {
    position: relative; display: block; padding: 15px 28px 15px 11px;
    border-radius: var(--radius-m); background: var(--c-black); color: var(--c-white);
    font-size: 15px; font-weight: 500; line-height: 18px; text-transform: uppercase;
    list-style: none; cursor: pointer;
  }
  .sidemenu__title::-webkit-details-marker { display: none; }
  .sidemenu__title::after { content: "+"; position: absolute; right: 11px; top: 50%; translate: 0 -50%; font-size: 20px; font-weight: 400; }
  .sidemenu__group[open] > .sidemenu__title::after { content: "×"; }
  .sidemenu__title:hover { background: #2a2a2a; }
  .sidemenu__list { padding: 12px 14px 8px; }
  .sidemenu__list a { display: block; padding-block: 5px; font-size: 14px; font-weight: 300; line-height: 20px; color: var(--c-text); text-decoration: none; }
  .sidemenu__list a:hover, .sidemenu__list a[aria-current] { color: var(--c-red); }
  .sidemenu__list a[aria-current] { font-weight: 500; }

  /* ===== хлебные крошки ===== */
  .crumbs__list { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 11px; line-height: 1.3; text-transform: uppercase; }
  .crumbs__item:not(:last-child)::after { content: "/"; margin-inline: 6px; color: var(--c-muted); }
  .crumbs__item a { color: var(--c-text); text-decoration: underline; }
  .crumbs__item a:hover { color: var(--c-red); }
  .crumbs__item[aria-current] { color: var(--c-muted); }
  @media (max-width: 959px) { .crumbs__list { font-size: 12px; } }

  /* ===== подвал ===== */
  .site-footer { margin-top: 60px; padding-top: 40px; background: var(--c-bg-footer); color: var(--c-muted); }
  .site-footer__main {
    display: grid; grid-template-columns: minmax(0, 490px) repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr;
    column-gap: 0; padding-bottom: 20px;
  }
  .site-footer__logo { grid-row: 1 / 3; align-self: center; width: 171px; }
  .site-footer__contacts {
    grid-column: 2 / 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
    padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid #b5b5b5;
  }
  .site-footer__claims { display: flex; align-items: center; gap: 12px; font-size: 14px; }
  .site-footer__claims .icon { width: 26px; height: 26px; color: #b3b3b3; }
  .site-footer__address { display: grid; gap: 10px; font-size: 18px; }
  .site-footer__phone, .site-footer__place { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
  .site-footer__address .icon { width: 22px; height: 22px; color: #b3b3b3; }
  .site-footer__title { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
  .site-footer__list a { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 300; line-height: 18px; color: inherit; text-decoration: none; }
  .site-footer a:hover { color: var(--c-red); }
  .site-footer__bottom { border-top: 1px solid #b5b5b5; padding-block: 20px 30px; }
  .site-footer__legal { position: relative; display: grid; gap: 24px; padding-right: 60px; font-size: 15px; }
  .site-footer__legal p { max-width: 950px; }
  .site-footer__vk { position: absolute; right: var(--gutter); top: 0; }

  @media (max-width: 959px) {
    .site-footer { border-radius: 50px 50px 0 0; }
    .site-footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; column-gap: 20px; }
    .site-footer__logo { display: none; }
    .site-footer__contacts { grid-column: 1 / -1; column-gap: 20px; }
    .site-footer__address { font-size: 13px; }
    .site-footer__address .icon { width: 20px; height: 20px; }
    .site-footer__title { font-size: 17px; }
  }

  /* ===== окна (<dialog>) ===== */
  dialog::backdrop { background: rgb(0 0 0 / .5); }
  .modal {
    width: min(480px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto;
    padding: 32px 28px 28px; border-radius: var(--radius-l); background: var(--c-white);
  }
  .modal__close { position: absolute; right: 12px; top: 12px; }
  .modal__title { margin-bottom: 20px; padding-right: 40px; font-size: 24px; }

  .drawer {
    margin: 0 auto 0 0; width: min(360px, 88vw); height: 100%; max-height: none;
    padding: 0 0 24px; overflow-y: auto; background: var(--c-white);
  }
  .drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); }
  .drawer__logo { width: 70px; }
  .sidemenu--drawer { margin-inline: var(--gutter); }
  .drawernav { padding: 16px calc(var(--gutter) + 6px); }
  .drawernav a { display: block; padding-block: 9px; font-size: 17px; color: var(--c-text); text-decoration: none; }
  .drawernav a[aria-current] { color: var(--c-red); }
  .drawernav__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .drawernav__toggle { width: 36px; height: 36px; padding: 0; border: 0; background: none; color: var(--c-muted); display: grid; place-items: center; }
  .drawernav__toggle .icon { width: 18px; height: 18px; transition: transform var(--t); }
  .drawernav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .drawernav__sub { flex-basis: 100%; padding-left: 14px; display: none; }
  .drawernav__toggle[aria-expanded="true"] + .drawernav__sub { display: block; }
  .drawernav__sub a { font-size: 15px; padding-block: 7px; }
  .drawer__contacts { display: grid; gap: 12px; padding-inline: calc(var(--gutter) + 6px); }
  .drawer__phone { font-size: 20px; font-weight: 600; color: var(--c-black); text-decoration: none; }

  /* ===== форма ===== */
  .form { display: grid; gap: 14px; }
  .form__label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--c-muted); }
  .form__input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--radius-s);
    background: var(--c-input); font-size: 16px;
  }
  .form__input:focus-visible { outline: 2px solid var(--c-red); outline-offset: 0; border-color: transparent; }
  textarea.form__input { resize: vertical; min-height: 90px; }
  .form__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--c-muted); }
  .form__check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--c-red); }
  .form__submit { width: 100%; }
  /* служебное в формах: поле-ловушка для ботов (люди его не видят), место виджета Turnstile, строка статуса отправки */
  .form__captcha:empty { display: none; }
  .form__status:empty { display: none; }
  .form__status { font-size: 14px; line-height: 1.35; color: #1a7f37; }
  .form__status.is-error { color: var(--c-red); }
  /* ошибки полей: класс is-invalid полю и текст в [data-error] ставит скрипт FetchIt (настройка fetchit.frontend.input.invalid.class) */
  .form__input.is-invalid { outline: 2px solid var(--c-red); outline-offset: 0; }
  .form__error { display: block; margin-top: 4px; font-size: 13px; line-height: 1.3; color: var(--c-red); }
  .form__error:empty { display: none; }
  /* форма заявки прямо на странице (чанк form.order): лендинг спирали, «Контакты» */
  .form--order { gap: 12px; }
  .form--order__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .form--order .form__input { padding: 13px; border: 0; border-radius: 8px; background: #fff; font-size: 14px; }
  .form--order .form__input::placeholder { color: #666; }
  .form--order .form__check { font-size: 12px; line-height: 1.3; }
  .form--order .form__submit { justify-self: end; width: 220px; min-height: 55px; margin-top: 10px; font-size: 16px; }
  @media (max-width: 860px) { .form--order__row { grid-template-columns: minmax(0, 1fr); } .form--order .form__submit { justify-self: stretch; width: auto; } }

  /* ===== «Вы смотрели ранее» (боковая колонка; заполняется скриптом из памяти браузера) ===== */
  .viewed { margin-top: 24px; padding: 20px 17px; border-radius: var(--radius-l); background: var(--c-bg-soft); }
  .viewed__title { margin-bottom: 14px; text-align: center; font-size: 16px; font-weight: 600; text-transform: uppercase; }
  .viewed__list { display: grid; gap: 12px; }
  .viewed__link { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius-m);
    background: var(--c-white); font-size: 13px; line-height: 1.3; color: var(--c-text); text-decoration: none; }
  .viewed__link:hover { color: var(--c-red); }
  .viewed__link img { width: 64px; height: 64px; object-fit: contain; }
  .viewed__link:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }

  .form__product { padding: 10px 12px; border-radius: var(--radius-s); background: var(--c-bg-soft); font-size: 14px; }

  /* ===== уведомление о cookies ===== */
  .cookie {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center; gap: 24px;
    padding: 16px var(--gutter); background: rgb(20 20 20 / .92); color: var(--c-white);
  }
  .cookie[hidden] { display: none; }
  .cookie__text { max-width: 1100px; font-size: 16px; }
  .cookie__text a { color: inherit; }
  .cookie__btn { flex: none; }
  @media (max-width: 639px) { .cookie { flex-direction: column; gap: 12px; text-align: center; } .cookie__text { font-size: 14px; } }

  /* ---------- номера страниц (каталог, лента новостей) — перенесено из catalog.css 10.11.2026 ---------- */
  .pager__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
  .pager__link { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 8px; color: #0a0a0a; font-size: 15px; text-decoration: none; }
  .pager__link:hover { border-color: var(--c-red); color: var(--c-red); }
  .pager__link[aria-current="page"] { border-color: var(--c-red); background: var(--c-red); color: var(--c-white); }
  .pager__gap { display: grid; place-items: center; min-width: 20px; color: var(--c-muted); }
}

/* ---------- utilities ---------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  [hidden] { display: none !important; }
  .nowrap { white-space: nowrap; }   /* в текстах: цена «от 1 000 ₽» не разрывается переносом (было style="white-space:nowrap") */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}
