/* [2026-05-19][CLX][CATALOG-SHOWROOM] Стили раздела «Каталог-витрина».
   ADR-002: НОВЫЙ файл, НЕ патч существующих css. Подбор (catalog.js +
   components.css) не затрагивается.

   Принцип изоляции: ВСЁ под корнем .cat-sr (страница рендерится в
   #page-content внутри существующего .content). Глобальные классы
   проекта (.sidebar, .btn, table, .pagination в components.css) НЕ
   переопределяются — у витрины собственные префиксные классы.

   Токены: цвета/тени/радиусы/sidebar берём из глобальной темы проекта
   (client/css/themes.css, переключается data-theme). НЕ дублируем :root —
   theme-switch продолжает работать. Локально объявляем только шкалы,
   которых нет в глобальной теме (spacing, типошкала, шрифты, тайминги,
   размеры панелей), scoped под .cat-sr чтобы не протекало в проект.
   Эталон 1:1: prototypes/v2/catalog-showroom.html. */

/* ════════════════════════════════════════════════════════════════
   SIDEBAR ACCORDION «Каталог» (ГЛОБАЛЬНО — sidebar вне #page-content,
   нельзя скоупить под .cat-sr). Минимальный набор: переиспользуем
   .sidebar__link (база/hover/active/collapsed из layout.css не дублируем).
   Только то, чего нет: reset button, шеврон, sub-список, подпункты.
   ════════════════════════════════════════════════════════════════ */
.sidebar__catalog-toggle {
  /* reset button → визуально = .sidebar__link */
  width: 100%; border: none; background: transparent;
  font-family: inherit; text-align: left;
}
.sidebar__catalog-toggle-text { flex: 1; }
.sidebar__catalog-chevron {
  width: 14px !important; height: 14px !important;
  flex-shrink: 0; opacity: .65;
  transition: transform var(--tr, 250ms) var(--ease, ease);
}
.sidebar__catalog-toggle.is-open .sidebar__catalog-chevron {
  transform: rotate(90deg);
}
/* Плавное раскрытие через max-height (height:auto не анимируется) */
.sidebar__catalog-sub {
  overflow: hidden; max-height: 0;
  transition: max-height var(--tr, 250ms) var(--ease, ease);
}
.sidebar__catalog-sub.is-open { max-height: 340px; } /* 5 подпунктов */
.sidebar__sublink {
  display: flex; align-items: center; gap: var(--space-2, 8px);
  padding: 7px 20px 7px 50px; color: var(--sidebar-text);
  text-decoration: none; font-size: var(--text-xs, 0.75rem);
  transition: background var(--tr-fast, 150ms) var(--ease, ease),
              color var(--tr-fast, 150ms) var(--ease, ease);
  cursor: pointer; position: relative; white-space: nowrap;
}
.sidebar__sublink::before {
  content: ""; position: absolute; left: 30px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--sidebar-text); opacity: .4;
  transform: translateY(-50%);
}
.sidebar__sublink:hover {
  background: var(--sidebar-hover); color: var(--sidebar-text-hover);
}
.sidebar__sublink.active {
  color: var(--sidebar-text-hover); font-weight: 600;
  background: rgba(184,115,51,.14);
}
.sidebar__sublink.active::before { background: var(--accent); opacity: 1; }
/* Свёрнутый сайдбар: прятать подпункты и шеврон (как .sidebar__label) */
.sidebar.collapsed .sidebar__catalog-sub { display: none; }
.sidebar.collapsed .sidebar__catalog-chevron { display: none; }

/* Зонный разделитель вокруг блока «Каталог» (соотв. эталону v2).
   Две тонкие черты + лёгкая подсветка зоны акцентом меди. Visible-only
   в развёрнутом сайдбаре. */
.sidebar__divider { display: none; }
.sidebar:not(.collapsed) .sidebar__divider--zone {
  display: block;
  height: 1px;
  margin: 10px 14px;
  background: linear-gradient(to right,
    transparent 0%,
    var(--sidebar-divider, rgba(255,255,255,.08)) 20%,
    rgba(184,115,51,.35) 50%,
    var(--sidebar-divider, rgba(255,255,255,.08)) 80%,
    transparent 100%);
}
.sidebar:not(.collapsed) .sidebar__divider--zone + .sidebar__catalog-toggle,
.sidebar:not(.collapsed) .sidebar__catalog-sub {
  background: linear-gradient(180deg,
    rgba(184,115,51,.05) 0%,
    rgba(184,115,51,.02) 100%);
}
.sidebar:not(.collapsed) .sidebar__catalog-toggle { position: relative; }
.sidebar:not(.collapsed) .sidebar__catalog-toggle::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent, #b87333);
  opacity: .55;
  border-radius: 0 2px 2px 0;
}


.cat-sr {
  /* [2026-05-19][CLX][CATALOG-SHOWROOM] локальные шкалы (нет в глобал-теме) */
  --sr-font-ui: 'DM Sans', -apple-system, sans-serif;
  --sr-font-data: 'JetBrains Mono', 'DM Sans', monospace;

  --sr-space-1: 4px;  --sr-space-2: 8px;  --sr-space-3: 12px;
  --sr-space-4: 16px; --sr-space-5: 20px; --sr-space-6: 24px;
  --sr-space-8: 32px;

  --sr-text-xs: 0.75rem;  --sr-text-sm: 0.8125rem; --sr-text-base: 0.875rem;
  --sr-text-lg: 1rem;     --sr-text-xl: 1.125rem;  --sr-text-2xl: 1.25rem;
  --sr-text-3xl: 1.5rem;  --sr-text-4xl: 1.875rem;

  --sr-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --sr-tr-fast: 150ms; --sr-tr: 250ms;

  --sr-radius: 10px;

  --sr-filter-w: 260px;
  --sr-drawer-w: 420px;

  /* Витрина занимает всё #page-content (которое уже flex: 1) */
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  font-family: var(--sr-font-ui);
  font-size: var(--sr-text-base);
  color: var(--text);
}

/* [2026-05-23][CLX][SETTINGS-CSS-FIX] Settings вне scope .cat-sr → токены --sr-* не
   разрешались (padding/radius/font схлопывались в 0, «обрезанные края» модалки).
   Дублируем нужные токены на .settings-page (каскадом покрывает #settingsModal внутри). */
.settings-page {
  --sr-font-ui: 'DM Sans', -apple-system, sans-serif;
  --sr-space-1: 4px;  --sr-space-2: 8px;  --sr-space-3: 12px;
  --sr-space-4: 16px; --sr-space-5: 20px; --sr-space-6: 24px;
  --sr-text-xs: 0.75rem;  --sr-text-sm: 0.8125rem; --sr-text-base: 0.875rem;
  --sr-text-md: 1rem;     --sr-text-lg: 1rem;      --sr-text-xl: 1.125rem;
  --sr-text-2xl: 1.25rem;
  --sr-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --sr-tr-fast: 150ms; --sr-tr: 250ms;
  --sr-radius: 10px;
  font-family: var(--sr-font-ui);
}

/* ── Toolbar (count + compare-bar) ──────────────────── */
.cat-sr__toolbar {
  display: flex; align-items: center;
  gap: var(--sr-space-3);
  padding: var(--sr-space-2) var(--sr-space-4);
  min-height: 52px;            /* фикс высоты: чипы серий не меняют высоту строки (нет скачка сайдбара) */
  background: var(--surface); border-bottom: 1px solid var(--border-subtle);
  flex-wrap: nowrap;            /* серии — продолжение строки, не переносить вниз */
}
.cat-sr__count { font-size: var(--sr-text-sm); color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }
.cat-sr__count strong { color: var(--text); font-weight: 600; }

/* compare-панель НАД таблицей (эталон: перенесена снизу) */
.cat-sr__compare-bar {
  display: flex; align-items: center; gap: var(--sr-space-3);
  padding: var(--sr-space-1) var(--sr-space-3);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-light); border-radius: var(--radius);
  font-size: var(--sr-text-sm); color: var(--text-secondary);
}
.cat-sr__compare-bar.is-hidden { display: none; }
.cat-sr__compare-count { font-weight: 600; color: var(--text); }
.cat-sr__compare-count strong { color: var(--accent); }

/* ── Series presets bar — [2026-05-24][CLX][SERIES-PRESETS] ── */
/* Бар серий — продолжение строки тулбара (не отдельная полоса, иначе сайдбар прыгает). */
.cat-sr__series-bar {
  display: flex; align-items: center; gap: var(--sr-space-2);
  flex: 1 1 auto; min-width: 0;
  margin-left: var(--sr-space-4);
}
.cat-sr__series-bar.is-hidden { display: none; }
.cat-sr__series-label {
  font-size: var(--sr-text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
  padding-top: 6px; white-space: nowrap; flex-shrink: 0;
}
.cat-sr__series-chips {
  display: flex; gap: 6px; flex: 1;
  flex-wrap: nowrap; overflow: hidden;           /* свёрнуто = строго 1 ряд, лишнее клипуется по горизонтали */
}
.cat-sr__series-chips.is-expanded {
  flex-wrap: wrap; overflow-y: auto;
  max-height: 320px;
}
.cat-sr__series-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: var(--sr-text-xs); color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  font-family: var(--sr-font-ui);
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__series-chip:hover { border-color: var(--accent); color: var(--text); }
.cat-sr__series-chip.active {
  background: var(--accent); border-color: var(--accent); color: var(--text-on-accent);
}
.cat-sr__series-count { opacity: .65; font-size: 11px; }
.cat-sr__series-chip.active .cat-sr__series-count { opacity: .85; }
.cat-sr__series-toggle, .cat-sr__series-clear {
  flex-shrink: 0; align-self: flex-start;
  padding: 5px 10px; border: none; background: transparent;
  font-size: var(--sr-text-xs); font-weight: 600; color: var(--accent);
  cursor: pointer; white-space: nowrap; font-family: var(--sr-font-ui);
}
.cat-sr__series-clear { color: var(--text-muted); }
.cat-sr__series-toggle:hover, .cat-sr__series-clear:hover { text-decoration: underline; }

/* ── Остатки у поставщика — [2026-05-24][CLX][STOCK] ── */
.cat-sr__stock { display: inline-block; font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--sr-text-xs); padding: 2px 6px; border-radius: 6px; }
.cat-sr__stock--none { color: var(--text-muted); font-weight: 400; }
.cat-sr__stock--out { color: #a8431f; background: #fbece5; }
.cat-sr__stock--untracked { color: var(--text-muted); font-weight: 400; font-style: italic; opacity: .7; }
.cat-sr__stock--in { color: #1f7a45; background: #e6f4ec; }
/* свежесть: точка-индикатор слева */
.cat-sr__stock--in.cat-sr__stock--fresh::before { content: '● '; color: #2a8050; }
.cat-sr__stock--in.cat-sr__stock--stale::before { content: '● '; color: #b8860b; }
.cat-sr__stock--in.cat-sr__stock--old::before { content: '● '; color: #999; }

.cat-sr__instock-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--sr-text-sm); color: var(--text); }
.cat-sr__instock-toggle input { cursor: pointer; }

/* drawer-блок остатков */
.cat-sr__stock-block { margin-top: 8px; padding: 10px 12px; background: var(--bg-secondary); border-radius: var(--sr-radius); font-size: var(--sr-text-sm); }
.cat-sr__stock-total { margin-bottom: 6px; }
.cat-sr__stock-row { display: flex; justify-content: space-between; padding: 2px 0; color: var(--text-secondary); }
.cat-sr__stock-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.cat-sr__stock-synced { margin-top: 6px; font-size: var(--sr-text-xs); }
.cat-sr__stock-synced.cat-sr__stock--fresh { color: #2a8050; }
.cat-sr__stock-synced.cat-sr__stock--stale { color: #b8860b; }
.cat-sr__stock-synced.cat-sr__stock--old { color: #a8431f; }
.cat-sr__stock-meta { margin-top: 8px; font-size: var(--sr-text-xs); color: var(--text-muted); }

/* ── Layout: filters + catalog ──────────────────────── */
.cat-sr__content { flex: 1; display: flex; overflow: hidden; min-height: 0; }

/* ── Filter panel ───────────────────────────────────── */
.cat-sr__filters {
  width: var(--sr-filter-w); min-width: var(--sr-filter-w);
  background: var(--surface); border-right: 1px solid var(--border-subtle);
  overflow-y: auto; padding: var(--sr-space-4);
}
.cat-sr__fsection { margin-bottom: var(--sr-space-5); }
.cat-sr__ftitle {
  font-size: var(--sr-text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: var(--sr-space-2);
  display: flex; align-items: baseline; gap: 6px;
}
.cat-sr__ftitle-text { flex-shrink: 0; }
/* [2026-05-27][CLX] Счётчик «N без значения» — для контроля полноты данных */
.cat-sr__fcount {
  font-weight: 400; text-transform: none; letter-spacing: 0;
  font-size: 10px; color: var(--warning, #d98b1f); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.cat-sr__fcount.is-empty { display: none; }
/* [2026-05-27][CLX] Маленький серый крестик сброса отдельного фильтра */
.cat-sr__freset {
  margin-left: auto; flex-shrink: 0;
  width: 16px; height: 16px; padding: 0; border: none; background: none;
  color: var(--text-muted); opacity: .5; cursor: pointer; font-size: 14px;
  line-height: 1; border-radius: 3px;
  transition: opacity var(--sr-tr-fast) var(--sr-ease), color var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__freset:hover { opacity: 1; color: var(--accent); background: var(--bg-secondary); }
.cat-sr__fsearch-wrap { position: relative; }
.cat-sr__fsearch {
  width: 100%; padding: 8px 32px 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: var(--sr-text-sm);
  background: var(--bg); outline: none; color: var(--text);
  font-family: var(--sr-font-ui);
  transition: border-color var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__fsearch:focus { border-color: var(--accent); }
.cat-sr__fsearch-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: none; width: 22px; height: 22px; align-items: center; justify-content: center;
  border: none; background: var(--surface); color: var(--text-secondary);
  border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1;
  transition: background var(--sr-tr-fast), color var(--sr-tr-fast);
}
.cat-sr__fsearch-clear:hover {
  background: var(--accent); color: var(--text-on-accent);
}

.cat-sr__checkbox {
  display: flex; align-items: center; gap: var(--sr-space-2);
  padding: 3px 0; cursor: pointer; font-size: var(--sr-text-sm);
}
.cat-sr__checkbox input { accent-color: var(--accent); }

.cat-sr__toggles {
  display: flex; gap: 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.cat-sr__toggle {
  flex: 1; padding: 6px 0; text-align: center;
  font-size: var(--sr-text-xs); font-weight: 500;
  cursor: pointer; border-right: 1px solid var(--border);
  transition: all var(--sr-tr-fast) var(--sr-ease);
  background: var(--surface); color: var(--text-secondary);
}
.cat-sr__toggle:last-child { border-right: none; }
.cat-sr__toggle.active { background: var(--accent); color: var(--text-on-accent); }

/* профиль трубки 1:1 из client/ — .shape-icon (см. utils.js SHAPE_ICONS) */
.cat-sr__profiles { display: flex; flex-wrap: wrap; gap: var(--sr-space-1); }
.cat-sr__profile {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-secondary);
  cursor: pointer; font-size: var(--sr-text-base); line-height: 1;
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__profile:hover { border-color: var(--accent); color: var(--text); }
.cat-sr__profile.active {
  background: var(--accent); color: var(--text-on-accent);
  border-color: var(--accent);
}
.cat-sr__profile:active { transform: scale(0.92); }

/* [2026-05-20][CLX][CATALOG-SHOWROOM] Тип радиатора — 2x2 grid плашек-кнопок.
   4 типа: БиМет/Ст.пан/Трубч/Профил. Multi-select (toggle .active = выделение тёмным). */
.cat-sr__type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sr-space-1-5, 6px);
}
.cat-sr__profile--construction {
  width: auto; min-height: 40px;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 6px 10px; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-secondary);
  cursor: pointer; font-size: var(--sr-text-xs);
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__profile--construction:hover { border-color: var(--accent); color: var(--text); }
.cat-sr__profile--construction.active {
  background: var(--accent); color: var(--text-on-accent);
  border-color: var(--accent);
}
.cat-sr__profile--construction .shape-icon { width: 22px; height: 22px; flex-shrink: 0; }
.cat-sr__profile-label {
  font-size: var(--sr-text-xs, 0.7rem); font-weight: 500; line-height: 1;
  white-space: nowrap;
}

/* Формы трубок — 4x2 grid (7 иконок) с одинаковыми крупными плашками. */
.cat-sr__profiles--grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sr-space-1-5, 6px);
}
.cat-sr__profiles--grid .cat-sr__profile {
  width: 100%; height: 42px;
  border-radius: var(--radius-sm);
}
.cat-sr__profiles--grid .cat-sr__profile .shape-icon { width: 26px; height: 26px; }

/* «Авторская» — расширенная плашка для 7-й формы (other).
   Занимает 2 колонки grid, выше остальных, под иконкой — подпись. */
.cat-sr__profiles--grid .cat-sr__profile--other {
  grid-column: span 2;
  flex-direction: row;
  justify-content: flex-start;
  padding: 0 10px;
  gap: 8px;
  height: 42px;
}
.cat-sr__profiles--grid .cat-sr__profile--other .shape-icon { width: 22px; height: 22px; flex-shrink: 0; }
.cat-sr__shape-caption {
  font-size: var(--sr-text-xs, 0.7rem);
  font-weight: 500; line-height: 1.1;
  font-style: italic;
  opacity: 0.95;
  white-space: nowrap;
}

/* Счётчик SKU рядом с именем бренда в фильтре «Завод» */
.cat-sr__brand-count {
  margin-left: auto; padding-left: 8px;
  font-size: var(--sr-text-xs, 0.7rem);
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.cat-sr__checkbox { justify-content: flex-start; }
.cat-sr__checkbox > input + * { flex: 1; }

/* Селектор размера страницы (25/50/100/250/500) в пагинации */
.cat-sr__pg-size {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--sr-text-sm); color: var(--text-secondary);
}
.cat-sr__pg-size select {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: var(--sr-font-ui);
  cursor: pointer; outline: none;
  font-size: var(--sr-text-sm);
}
.cat-sr__pg-size select:focus { border-color: var(--accent); }

.cat-sr .shape-icon { width: 24px; height: 24px; display: block; }
.cat-sr .cell-shape { text-align: center; }
.cat-sr .cell-shape .shape-icon {
  width: 18px; height: 18px; color: var(--text-muted); margin: 0 auto;
}
/* [2026-05-26][CLX][TYPE-ORIENT] «не указан» — приглушённая пиктограмма + курсор-подсказка */
.cat-sr .cell-shape .shape-icon--muted { opacity: 0.4; }
.cat-sr .cell-shape span[title] { cursor: help; display: inline-flex; }

.cat-sr__range { display: flex; gap: var(--sr-space-2); align-items: center; }
.cat-sr__range input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: var(--sr-text-sm);
  font-family: var(--sr-font-data); text-align: center;
  background: var(--bg); outline: none; color: var(--text);
}
.cat-sr__range input:focus { border-color: var(--accent); }
.cat-sr__range-sep { color: var(--text-muted); font-size: var(--sr-text-sm); }

.cat-sr__presets {
  display: flex; flex-wrap: wrap; gap: var(--sr-space-1);
  margin-top: var(--sr-space-2);
}
.cat-sr__preset {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--sr-text-xs); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text);
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__preset:hover { border-color: var(--accent); }
.cat-sr__preset.active {
  background: var(--accent); color: var(--text-on-accent);
  border-color: var(--accent);
}
.cat-sr__preset:active { transform: scale(0.95); }

.cat-sr__swatches {
  display: flex; flex-wrap: wrap; gap: var(--sr-space-2);
  margin-top: var(--sr-space-1);
}
.cat-sr__swatch {
  width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; border: 2px solid var(--border);
  transition: all var(--sr-tr-fast) var(--sr-ease);
  position: relative;
}
.cat-sr__swatch:hover { transform: scale(1.1); }
.cat-sr__swatch.active {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light);
}

.cat-sr__factions {
  display: flex; gap: var(--sr-space-2); margin-top: var(--sr-space-4);
}

/* ── Buttons (префиксные — НЕ трогаем глобальный .btn) ── */
.cat-sr__btn {
  padding: 8px 16px; border-radius: var(--radius);
  font-size: var(--sr-text-sm); font-weight: 500;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  transition: all var(--sr-tr-fast) var(--sr-ease);
  font-family: var(--sr-font-ui);
}
.cat-sr__btn:hover { border-color: var(--border-strong); }
.cat-sr__btn--primary {
  background: var(--accent); color: var(--text-on-accent);
  border-color: var(--accent);
}
.cat-sr__btn--primary:hover { background: var(--accent-hover); }
.cat-sr__btn--ghost { border-color: transparent; }
.cat-sr__btn--ghost:hover { background: var(--bg-secondary); }
.cat-sr__btn--sm { padding: 5px 10px; font-size: var(--sr-text-xs); }
.cat-sr__btn--block { width: 100%; }
.cat-sr__btn:active { transform: scale(0.97); }
.cat-sr__btn--primary:active { background: #8F5A22; }
.cat-sr__btn:disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}

/* ── Catalog area (right) ───────────────────────────── */
.cat-sr__catalog {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* ── Data table (table-layout:fixed + colgroup, эталон) ── */
.cat-sr__table-wrap {
  flex: 1; overflow: auto; padding: 0; position: relative;
}
.cat-sr__table {
  width: 100%; border-collapse: collapse;
  font-size: var(--sr-text-sm);
  table-layout: fixed;
}
.cat-sr__table thead { position: sticky; top: 0; z-index: 2; }
.cat-sr__table th {
  padding: 10px 12px; text-align: left;
  font-size: var(--sr-text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer; white-space: nowrap; user-select: none;
}
.cat-sr__table th:hover { color: var(--text); }
.cat-sr__table th.sorted { color: var(--accent); }
.cat-sr__table th.th-num { text-align: right; }
.cat-sr__table th.th-center { text-align: center; cursor: default; }
.cat-sr__table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-sr__table tbody tr { cursor: pointer; }
.cat-sr__table tr:hover td { background: var(--surface-hover); }
.cat-sr__table tr:active td { background: var(--accent-subtle); }
.cat-sr__table td.num {
  text-align: right; font-family: var(--sr-font-data);
  font-size: var(--sr-text-xs);
}
.cat-sr__table td.center { text-align: center; }

.cat-sr .sort-ind {
  display: inline-block; margin-left: 5px;
  font-size: 9px; line-height: 1;
  color: var(--text-muted); opacity: .4;
  transition: color var(--sr-tr-fast) var(--sr-ease),
              opacity var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__table th.sorted .sort-ind { color: var(--accent); opacity: 1; }

.cat-sr__brand-badge {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 500;
}
.cat-sr__brand-dot { width: 8px; height: 8px; border-radius: 50%; }
.cat-sr__model-name { font-weight: 500; white-space: normal; word-break: break-word; line-height: 1.3; }
.cat-sr__model-variant { font-size: var(--sr-text-xs); color: var(--text-muted); }

.cat-sr__price-cell {
  font-family: var(--sr-font-data); font-weight: 600;
  font-size: var(--sr-text-base); white-space: nowrap;
}

.cat-sr__btn-card {
  padding: 5px 8px; border-radius: var(--radius-sm);
  font-size: var(--sr-text-xs); font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent);
  transition: all var(--sr-tr-fast) var(--sr-ease);
  font-family: var(--sr-font-ui); white-space: nowrap;
  max-width: 100%;
}
.cat-sr__btn-card:hover { background: var(--accent); color: var(--text-on-accent); }
.cat-sr__btn-card:active {
  transform: scale(0.97); background: var(--accent); color: var(--text-on-accent);
}
.cat-sr__table .cell-card,
.cat-sr__table th.th-card {
  text-align: right; padding-right: var(--sr-space-3);
}
/* [2026-05-24][CLX][TABLE-FIT] Все ячейки клипуют контент — ничто не расширяет таблицу
   за пределы table-layout:fixed (раньше кнопка «Карточка» переполняла узкую колонку). */
.cat-sr__table td { overflow: hidden; }

/* ── Pagination (префикс — НЕ глобальный .pagination) ── */
.cat-sr__pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sr-space-3) var(--sr-space-4);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface); font-size: var(--sr-text-sm);
}
.cat-sr__pg-info { color: var(--text-muted); font-size: var(--sr-text-xs); }
.cat-sr__pg-pages { display: flex; gap: 2px; flex-wrap: wrap; }
.cat-sr__pg-page {
  min-width: 30px; height: 30px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: var(--sr-text-sm); color: var(--text-secondary);
  background: transparent; border: none;
  font-family: var(--sr-font-ui);
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__pg-page:hover:not(:disabled) { background: var(--bg-secondary); }
.cat-sr__pg-page.active {
  background: var(--accent); color: var(--text-on-accent); font-weight: 600;
}
.cat-sr__pg-page:disabled { opacity: .4; cursor: not-allowed; }
.cat-sr__pg-page:active:not(:disabled) { transform: scale(0.9); }
.cat-sr__pg-ellipsis {
  min-width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--sr-text-sm);
}

/* ── State boxes (loading/empty/error) ──────────────── */
.cat-sr__state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--sr-space-3);
  padding: 60px 20px; color: var(--text-secondary);
  font-size: var(--sr-text-sm); text-align: center;
}
.cat-sr__state svg { width: 36px; height: 36px; color: var(--text-muted); }
.cat-sr__spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: cat-sr-spin 0.7s linear infinite;
}
@keyframes cat-sr-spin { to { transform: rotate(360deg); } }

/* «Скоро» — заглушка будущих категорий (status:"soon") */
.cat-sr__soon {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--sr-space-4);
  padding: 80px 24px; text-align: center; flex: 1;
}
.cat-sr__soon-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-subtle);
  color: var(--accent);
}
.cat-sr__soon-icon svg { width: 28px; height: 28px; }
.cat-sr__soon-title {
  font-size: var(--sr-text-2xl); font-weight: 600; color: var(--text);
}
.cat-sr__soon-text {
  font-size: var(--sr-text-sm); color: var(--text-secondary);
  max-width: 380px; line-height: 1.6;
}

/* ── Product card drawer (right slide-over) ─────────── */
.cat-sr__drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(44,36,32,.32);
  z-index: 10; opacity: 1;
  transition: opacity var(--sr-tr) var(--sr-ease);
}
.cat-sr__drawer-overlay.is-hidden { opacity: 0; pointer-events: none; }
.cat-sr__drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: var(--sr-drawer-w); min-width: var(--sr-drawer-w);
  background: var(--surface); box-shadow: var(--shadow-lg);
  z-index: 11; display: flex; flex-direction: column;
  overflow: hidden; transform: translateX(0);
  transition: transform var(--sr-tr) var(--sr-ease);
}
.cat-sr__drawer.is-hidden { transform: translateX(100%); pointer-events: none; }
.cat-sr__drawer-close {
  position: absolute; top: var(--sr-space-4); right: var(--sr-space-4);
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); z-index: 2;
  transition: all var(--sr-tr-fast) var(--sr-ease);
  font-size: var(--sr-text-lg); line-height: 1;
}
.cat-sr__drawer-close:hover {
  background: var(--bg-secondary); color: var(--text);
  border-color: var(--border-strong);
}
.cat-sr__drawer-body { flex: 1; overflow-y: auto; padding: var(--sr-space-6); }

.cat-sr__photo {
  width: 100%; height: 240px; border-radius: var(--radius-lg);
  background: var(--bg-secondary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--sr-text-sm);
  margin-bottom: var(--sr-space-5);
  background-image:
    linear-gradient(135deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(225deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(45deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(315deg, var(--bg-secondary) 25%, var(--bg) 25%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 0, 10px -10px, 0 10px;
}
.cat-sr__photo span {
  background: var(--surface); padding: 4px 12px;
  border-radius: var(--radius-full); border: 1px solid var(--border);
}

.cat-sr__drawer-title {
  font-family: var(--sr-font-ui); font-size: var(--sr-text-2xl);
  font-weight: 600; color: var(--text);
  line-height: 1.25; margin-bottom: var(--sr-space-2);
}
.cat-sr__drawer-price {
  font-family: var(--sr-font-data); font-size: var(--sr-text-3xl);
  font-weight: 600; color: var(--accent); margin-bottom: var(--sr-space-5);
}
.cat-sr__drawer-price small {
  font-size: var(--sr-text-sm); color: var(--text-muted); font-weight: 500;
}

.cat-sr__dsection { margin-bottom: var(--sr-space-5); }
.cat-sr__dsection-title {
  font-size: var(--sr-text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: var(--sr-space-3);
  padding-bottom: var(--sr-space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.cat-sr__spec-table {
  width: 100%; font-size: var(--sr-text-sm); border-collapse: collapse;
}
.cat-sr__spec-table tr td {
  padding: 6px 0; border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.cat-sr__spec-table tr:last-child td { border-bottom: none; }
.cat-sr__spec-key { color: var(--text-secondary); width: 42%; }
.cat-sr__spec-val { color: var(--text); font-weight: 500; }

.cat-sr__colors { display: flex; flex-wrap: wrap; gap: var(--sr-space-3); }
.cat-sr__color {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; cursor: pointer; width: 64px;
}
.cat-sr__color-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border);
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__color:hover .cat-sr__color-dot { transform: scale(1.08); }
.cat-sr__color.active .cat-sr__color-dot {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light);
}
.cat-sr__color-label {
  font-size: var(--sr-text-xs); color: var(--text-secondary);
  text-align: center; line-height: 1.3;
}
/* [2026-05-25][CLX][KZTO-COLORS] Палитра «на заказ» с наценкой — компактные чипы (RAL-коды) */
.cat-sr__color-extra-title {
  font-size: var(--sr-text-xs); color: var(--text-muted);
  margin: var(--sr-space-3) 0 6px;
}
.cat-sr__color-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-sr__color-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: 11px; color: var(--text-secondary); cursor: default; white-space: nowrap;
}
.cat-sr__color-chip .cat-sr__color-dot { width: 14px; height: 14px; border-width: 1px; }
.cat-sr__color-chip b { color: var(--accent, #b5985a); font-weight: 600; }

.cat-sr__chips { display: flex; flex-wrap: wrap; gap: var(--sr-space-2); }
.cat-sr__chip {
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: var(--sr-text-xs); cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__chip:hover { border-color: var(--accent); }
.cat-sr__chip.active {
  background: var(--accent); color: var(--text-on-accent);
  border-color: var(--accent);
}
.cat-sr__chip:active { transform: scale(0.96); }

.cat-sr__warranty {
  display: inline-flex; align-items: center; gap: var(--sr-space-2);
  padding: var(--sr-space-2) var(--sr-space-4);
  background: var(--success-light); color: var(--success);
  border-radius: var(--radius); font-weight: 600;
  font-size: var(--sr-text-base);
}
.cat-sr__warranty svg { width: 18px; height: 18px; }

.cat-sr__desc {
  font-size: var(--sr-text-sm); color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Product card full-page (overlay over content) ──── */
.cat-sr__full {
  position: absolute; inset: 0;
  background: var(--bg); z-index: 12;
  display: flex; flex-direction: column;
  overflow: hidden; opacity: 1;
  transition: opacity var(--sr-tr) var(--sr-ease);
}
.cat-sr__full.is-hidden { opacity: 0; pointer-events: none; }
.cat-sr__full-bar {
  display: flex; align-items: center; gap: var(--sr-space-3);
  padding: var(--sr-space-3) var(--sr-space-6);
  background: var(--surface); border-bottom: 1px solid var(--border-subtle);
  min-height: 52px;
}
.cat-sr__full-body {
  flex: 1; overflow-y: auto;
  padding: var(--sr-space-8) var(--sr-space-8);
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: var(--sr-space-8); align-content: start;
}
.cat-sr__full-photo {
  width: 100%; height: 420px; border-radius: var(--radius-lg);
  background: var(--bg-secondary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--sr-text-sm);
  position: sticky; top: 0;
  background-image:
    linear-gradient(135deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(225deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(45deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(315deg, var(--bg-secondary) 25%, var(--bg) 25%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 0, 12px -12px, 0 12px;
}
.cat-sr__full-photo span {
  background: var(--surface); padding: 4px 12px;
  border-radius: var(--radius-full); border: 1px solid var(--border);
}

/* [2026-05-25][CLX][VARMMET-GALLERY] Галерея фото товара: главное + лента превью + лайтбокс */
.cat-sr__gallery { margin-bottom: var(--sr-space-5); }
.cat-sr__gallery .cat-sr__photo,
.cat-sr__gallery .cat-sr__full-photo { margin-bottom: var(--sr-space-3); }
.cat-sr__gallery-main {
  position: relative; padding: 0; cursor: zoom-in; overflow: hidden;
  background: #fff; background-image: none;
}
.cat-sr__gallery-main img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.cat-sr__gallery-count {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(0,0,0,.62); color: #fff; font-size: 11px; font-weight: 500;
  padding: 3px 9px; border-radius: var(--radius-full); pointer-events: none;
}
.cat-sr__thumbs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin;
}
.cat-sr__thumb {
  flex: 0 0 auto; width: 58px; height: 58px; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: #fff; overflow: hidden; transition: border-color .15s, transform .1s;
}
.cat-sr__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cat-sr__thumb:hover { border-color: var(--border-strong); }
.cat-sr__thumb.is-active { border-color: var(--accent, #b5985a); border-width: 2px; }
.cat-sr__gallery--full .cat-sr__thumb { width: 70px; height: 70px; }

/* Лайтбокс */
.cat-sr__lightbox {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(12,12,14,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.cat-sr__lightbox.is-hidden { display: none; }
.cat-sr__lb-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--radius-md); background: #fff;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.cat-sr__lb-close, .cat-sr__lb-nav {
  position: absolute; background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.18); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cat-sr__lb-close:hover, .cat-sr__lb-nav:hover { background: rgba(255,255,255,.22); }
.cat-sr__lb-close {
  top: 20px; right: 24px; width: 44px; height: 44px;
  border-radius: 50%; font-size: 26px; line-height: 1;
}
.cat-sr__lb-nav {
  top: 50%; transform: translateY(-50%); width: 52px; height: 52px;
  border-radius: 50%; font-size: 34px; line-height: 1;
}
.cat-sr__lb-prev { left: 24px; }
.cat-sr__lb-next { right: 24px; }
.cat-sr__lb-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; letter-spacing: .02em;
  background: rgba(0,0,0,.4); padding: 5px 14px; border-radius: var(--radius-full);
}

.cat-sr__full-info { min-width: 0; }
.cat-sr__full-title {
  font-family: var(--sr-font-ui); font-size: var(--sr-text-4xl);
  font-weight: 700; color: var(--text);
  line-height: 1.2; margin-bottom: var(--sr-space-2);
}
.cat-sr__full-price {
  font-family: var(--sr-font-data); font-size: var(--sr-text-4xl);
  font-weight: 600; color: var(--accent); margin-bottom: var(--sr-space-6);
}
.cat-sr__full-price small {
  font-size: var(--sr-text-sm); color: var(--text-muted); font-weight: 500;
}
.cat-sr__fp-section { margin-bottom: var(--sr-space-6); }
.cat-sr__fp-placeholder {
  width: 100%; min-height: 110px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--sr-text-sm);
  text-align: center; padding: var(--sr-space-4);
}
.cat-sr__fp-docs { display: flex; flex-wrap: wrap; gap: var(--sr-space-3); }
.cat-sr__fp-doc {
  display: flex; align-items: center; gap: var(--sr-space-2);
  padding: var(--sr-space-3) var(--sr-space-4);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: var(--sr-text-sm);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__fp-doc:hover { border-color: var(--accent); color: var(--text); }
.cat-sr__fp-doc svg {
  width: 18px; height: 18px; color: var(--error); flex-shrink: 0;
}

/* ── Compare modal (overlay + centered window) ──────── */
.cat-sr__cmp-overlay {
  position: absolute; inset: 0;
  background: rgba(44,36,32,.32);
  z-index: 13; opacity: 1;
  transition: opacity var(--sr-tr) var(--sr-ease);
}
.cat-sr__cmp-overlay.is-hidden { opacity: 0; pointer-events: none; }
.cat-sr__cmp-modal {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, calc(100% - var(--sr-space-8)));
  max-height: calc(100% - var(--sr-space-8));
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 14;
  display: flex; flex-direction: column; overflow: hidden;
  transition: opacity var(--sr-tr) var(--sr-ease),
              transform var(--sr-tr) var(--sr-ease);
}
.cat-sr__cmp-modal.is-hidden {
  opacity: 0; pointer-events: none; transform: translate(-50%, -48%);
}
.cat-sr__cmp-head {
  display: flex; align-items: center; gap: var(--sr-space-4);
  padding: var(--sr-space-4) var(--sr-space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.cat-sr__cmp-title {
  font-size: var(--sr-text-xl); font-weight: 600;
  color: var(--text); flex: 1;
}
.cat-sr__cmp-difftoggle {
  display: flex; align-items: center; gap: var(--sr-space-2);
  font-size: var(--sr-text-sm); color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
}
.cat-sr__cmp-difftoggle input { accent-color: var(--accent); }
.cat-sr__cmp-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--sr-tr-fast) var(--sr-ease);
  font-size: var(--sr-text-lg); line-height: 1; flex-shrink: 0;
}
.cat-sr__cmp-close:hover {
  background: var(--bg-secondary); color: var(--text);
  border-color: var(--border-strong);
}
.cat-sr__cmp-body { overflow: auto; padding: var(--sr-space-5); }

.cat-sr__cmp-table {
  width: 100%; border-collapse: collapse; font-size: var(--sr-text-sm);
}
.cat-sr__cmp-table th,
.cat-sr__cmp-table td {
  padding: var(--sr-space-3) var(--sr-space-4);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center; vertical-align: middle;
}
.cat-sr__cmp-table thead th {
  background: var(--bg-secondary); vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.cat-sr__cmp-corner { background: var(--surface) !important; }
.cat-sr__cmp-photo {
  width: 100%; height: 96px; border-radius: var(--radius);
  background: var(--bg-secondary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--sr-text-xs);
  margin-bottom: var(--sr-space-2);
}
.cat-sr__cmp-model {
  font-weight: 600; color: var(--text);
  font-size: var(--sr-text-sm); line-height: 1.3;
}
.cat-sr__cmp-key {
  text-align: left; font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface); width: 24%;
}
.cat-sr__cmp-num { font-family: var(--sr-font-data); font-size: var(--sr-text-xs); }
.cat-sr__cmp-table .shape-wrap .shape-icon {
  width: 20px; height: 20px; color: var(--text-secondary); margin: 0 auto;
}
.cat-sr__cmp-row.is-diff td {
  background: var(--accent-subtle); font-weight: 600;
}
.cat-sr__cmp-row.is-diff .cat-sr__cmp-key { background: var(--accent-light); }
.cat-sr__cmp-modal.diff-only .cat-sr__cmp-row:not(.is-diff) { display: none; }
.cat-sr__cmp-table tfoot td {
  border-bottom: none; padding-top: var(--sr-space-4);
}

/* ── Focus-visible (эталон 1:1) ─────────────────────── */
.cat-sr :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.cat-sr button:focus-visible,
.cat-sr .cat-sr__btn:focus-visible,
.cat-sr .cat-sr__btn-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-light);
}
.cat-sr input:focus-visible,
.cat-sr select:focus-visible,
.cat-sr textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ── Selection (эталон 1:1) ─────────────────────────── */
.cat-sr ::selection { background: var(--accent-light); color: var(--text); }

/* ── Reduced motion (эталон 1:1) ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cat-sr *, .cat-sr *::before, .cat-sr *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Responsive: фильтры сворачиваются на узких экранах ── */
@media (max-width: 1024px) {
  .cat-sr__filters { width: 220px; min-width: 220px; }
  .cat-sr__full-body { grid-template-columns: 1fr; }
  .cat-sr__full-photo { position: static; height: 280px; }
}

/* ════════════════════════════════════════════════════════════════
   Settings page — [2026-05-21][CLX][SETTINGS]
   ════════════════════════════════════════════════════════════════ */
.settings-page {
  display: flex; flex-direction: column;
  gap: var(--sr-space-4);
  padding: var(--sr-space-4);
  max-width: 1200px;
}
.settings-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.settings-tab {
  background: transparent; border: none;
  padding: 10px 18px;
  font-family: var(--sr-font-ui);
  font-size: var(--sr-text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.settings-tab:hover:not(.disabled) {
  color: var(--text); background: var(--bg-secondary);
}
.settings-tab.active {
  color: var(--accent); border-bottom-color: var(--accent);
  font-weight: 600;
}
.settings-tab.disabled {
  color: var(--text-muted); cursor: not-allowed; opacity: 0.65;
}
.settings-tab__badge {
  display: inline-block; margin-left: 6px;
  padding: 1px 6px; font-size: 10px;
  background: var(--bg-secondary); color: var(--text-muted);
  border-radius: 8px; vertical-align: middle;
}

.settings-section {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--sr-radius);
  overflow: hidden;
}
.settings-section__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sr-space-3) var(--sr-space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.settings-section__header h3 {
  margin: 0; font-size: var(--sr-text-md);
  font-weight: 600; color: var(--text);
}
.settings-section__body { padding: 0; }
.settings-section__hint {
  padding: var(--sr-space-3) var(--sr-space-4);
  border-top: 1px solid var(--border);
  font-size: var(--sr-text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--bg-secondary);
}

.settings-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--sr-text-sm);
}
.settings-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600; color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: var(--sr-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.settings-table tr:last-child td { border-bottom: none; }
.settings-table tr:hover { background: var(--bg-secondary); }
.settings-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.settings-table .center { text-align: center; }
.settings-row--inactive { opacity: 0.5; }

.settings-modal {
  position: fixed; inset: 0;
  background: rgba(44,36,32,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.settings-modal__inner {
  background: var(--bg);
  border-radius: var(--sr-radius);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.settings-modal__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sr-space-3) var(--sr-space-4);
  border-bottom: 1px solid var(--border);
}
.settings-modal__header h3 { margin: 0; font-size: var(--sr-text-md); font-weight: 600; }
.settings-modal__close {
  background: transparent; border: none;
  font-size: 24px; cursor: pointer; color: var(--text-muted);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.settings-modal__close:hover { background: var(--bg-secondary); color: var(--text); }
.settings-modal__body {
  padding: var(--sr-space-4);
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 10px;
}
.settings-modal__body label {
  font-size: var(--sr-text-sm); color: var(--text-secondary);
  display: block;
}
/* [2026-05-26][CLX][CATALOG-MARKUP] Комбо-правила: списки чекбоксов (мульти-выбор / исключения) */
.mr-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: 460px;
  max-height: 132px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--border, #e7e3dd);
  border-radius: 8px; background: var(--surface, #fff); }
.mr-chk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--sr-text-sm);
  color: var(--text-primary, #1a1a1a); cursor: pointer; white-space: nowrap; }
.mr-chk input { width: auto; margin: 0; cursor: pointer; }
.mr-exclude-sub { font-size: .78rem; color: var(--text-secondary); margin: 6px 0 2px; }
#ff-exclude { border-top: 1px dashed var(--border, #e7e3dd); padding-top: 10px; }
.settings-modal__body input[type="text"],
.settings-modal__body input[type="number"],
.settings-modal__body select {
  width: 100%; max-width: 320px;
  padding: 6px 10px;
  font-family: var(--sr-font-ui); font-size: var(--sr-text-sm);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  margin-top: 4px;
}
.settings-modal__body input:focus,
.settings-modal__body select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,115,51,.18);
}
.settings-modal__footer {
  display: flex; align-items: center; gap: 8px;
  padding: var(--sr-space-3) var(--sr-space-4);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.settings-modal__spacer { flex: 1; }
.settings-modal__id { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* ── Form fields (Settings modal) — [2026-05-22][CLX][SETTINGS-UX] ── */
.form-field { display: flex; flex-direction: column; gap: 2px; }
.form-field--inline { flex-direction: row; align-items: center; }
.form-field > label {
  font-size: var(--sr-text-sm); color: var(--text); font-weight: 500;
}
.form-field .req { color: #c0552b; }
.form-field input[type="text"],
.form-field input[type="number"],
.form-field select {
  width: 100%; max-width: 360px;
}
.form-hint {
  font-size: var(--sr-text-xs); color: var(--text-secondary);
  line-height: 1.4; margin-top: 2px;
}
.toggle-label {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; font-weight: 500;
}
.form-error {
  background: #fbece5; border: 1px solid #e0a890; border-radius: 6px;
  color: #a8431f; padding: 10px 12px; font-size: var(--sr-text-sm);
  line-height: 1.5;
}
.cat-sr__btn--danger {
  border-color: #d08060; color: #b8431f;
}
.cat-sr__btn--danger:hover { background: #fbece5; border-color: #c0552b; }

/* ── Toast stack — [2026-05-22][CLX][SETTINGS-TOAST] ── */
.ac-toast-stack {
  position: fixed; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2000; pointer-events: none;
}
.ac-toast {
  min-width: 240px; max-width: 380px;
  padding: 12px 16px; border-radius: 8px;
  font-size: 0.8125rem; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;
}
.ac-toast.is-visible { opacity: 1; transform: translateY(0); }
.ac-toast--success { background: #2a8050; }
.ac-toast--error { background: #b8431f; }
.ac-toast--info { background: #5a4e44; }

@media (max-width: 600px) {
  .settings-modal { padding: 12px; align-items: flex-start; }
  .settings-modal__inner { max-width: 100%; }
  .settings-modal__footer { flex-wrap: wrap; }
  .form-field input, .form-field select { max-width: 100%; }
  .ac-toast-stack { right: 12px; left: 12px; bottom: 12px; }
  .ac-toast { max-width: 100%; }
}

/* [2026-05-26][CLX][PRICE-MAP] Кнопка «подробнее» + модалка карты цены.
   Зона видимости базовой цены поставщика / закупки: скрыта по умолчанию,
   раскрывается по клику. */
.cat-sr__price-more {
  margin-top: 4px;
  padding: 0; border: none; background: none;
  font-size: 11px; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-style: dotted; cursor: pointer;
  transition: color .15s ease;
  user-select: none; -webkit-user-select: none;
}
.cat-sr__price-more:hover { color: var(--accent); }

.cat-sr__pm-overlay {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(44,36,32,.42);
  z-index: 3000; padding: 16px;
}
.cat-sr__pm-overlay.is-open { display: flex; }
.cat-sr__pm-modal {
  width: min(440px, 100%);
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 12px 48px rgba(0,0,0,.32));
  overflow: hidden;
}
.cat-sr__pm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border-subtle);
}
.cat-sr__pm-head-title { font-size: 15px; font-weight: 600; color: var(--text); }
.cat-sr__pm-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-secondary); font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cat-sr__pm-close:hover { background: var(--bg-secondary); color: var(--text); }
.cat-sr__pm-subtitle {
  padding: 10px 18px 0; font-size: 12px; color: var(--text-muted);
}
.cat-sr__pm-table {
  width: 100%; border-collapse: collapse; margin: 8px 0;
  font-size: 13px;
}
.cat-sr__pm-table td {
  padding: 10px 18px; border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary); vertical-align: top;
}
.cat-sr__pm-num {
  text-align: right; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500;
}
.cat-sr__pm-scope {
  margin-top: 3px; font-size: 11px; color: var(--text-muted); font-weight: 400;
}
.cat-sr__pm-muted { color: var(--text-muted); font-weight: 400; }
.cat-sr__pm-final-row td {
  background: var(--accent-subtle);
  color: var(--text); font-weight: 600; font-size: 14px;
}
.cat-sr__pm-final-row .cat-sr__pm-num { color: var(--accent); font-weight: 700; }
.cat-sr__pm-soon-row td { color: var(--text-muted); }
.cat-sr__pm-soon-row small { opacity: .8; }
.cat-sr__pm-dates { padding: 10px 18px 0; }
.cat-sr__pm-sync {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 11px; color: var(--text-muted);
}
.cat-sr__pm-sync strong { color: var(--text-secondary); font-weight: 600; }
.cat-sr__pm-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex: 0 0 auto; background: var(--text-muted);
}
.cat-sr__pm-sync.is-ok .cat-sr__pm-dot { background: #2a8050; }
.cat-sr__pm-sync.is-ok strong { color: #2a8050; }
.cat-sr__pm-sync.is-stale .cat-sr__pm-dot { background: #c8821f; }
.cat-sr__pm-sync.is-stale strong { color: #c8821f; }
.cat-sr__pm-sync-warn { color: #b8431f; font-weight: 600; }
.cat-sr__pm-sync.is-manual .cat-sr__pm-dot { background: var(--border); }
.cat-sr__pm-note {
  padding: 10px 18px 16px; font-size: 11px; line-height: 1.45;
  color: var(--text-muted);
}

/* [2026-05-27][CLX][CARD-COLORS] Кликабельный выбор цвета в карточке + отметка наличия */
.cat-sr__cc-summary {
  font-size: 12px; color: var(--text-secondary); margin: 2px 0 8px;
  padding: 6px 10px; background: var(--bg-secondary); border-radius: var(--radius-sm);
}
.cat-sr__cc-summary .cat-sr__cc-instock-tag { color: #2a8050; font-weight: 600; }
.cat-sr__cc-group-title { font-size: 11px; color: var(--text-muted); margin: 8px 0 4px; }
.cat-sr__cc-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-sr__color-chip2 {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border: 1px solid var(--border); border-radius: var(--radius-full, 20px);
  background: var(--surface); cursor: pointer; font-size: 12px; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.cat-sr__color-chip2:hover { border-color: var(--accent); }
.cat-sr__color-chip2.is-active { border-color: var(--accent); background: var(--accent-subtle); box-shadow: 0 0 0 1px var(--accent) inset; }
.cat-sr__color-chip2 .cat-sr__color-dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex: 0 0 auto; }
.cat-sr__cc-pct { color: var(--accent); font-weight: 600; font-size: 11px; }
.cat-sr__cc-stock { color: #2a8050; font-size: 9px; line-height: 1; }
.cat-sr__color-chip2.in-stock { border-color: #2a805066; }

/* [2026-05-27][CLX][DRAWER-STICKY] Шапка карточки (название+цена+подробнее+даты) липнет вверху drawer */
.cat-sr__drawer-sticky {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface);
  margin: 0 calc(-1 * var(--sr-space-6));
  padding: 8px var(--sr-space-6) 10px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ── [2026-05-27][CLX][AG-GRID] Клиентская таблица AG Grid Community 32.3.3 ── */
.cat-sr__ag { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Тема quartz → переменные портала (тёмная/светлая через :root) */
.cat-sr .ag-theme-quartz {
  --ag-background-color: var(--surface);
  --ag-foreground-color: var(--text);
  --ag-border-color: var(--border-subtle);
  --ag-row-border-color: var(--border-subtle);
  --ag-header-background-color: var(--bg-secondary);
  --ag-header-foreground-color: var(--text-muted);
  --ag-odd-row-background-color: var(--surface);
  --ag-row-hover-color: var(--bg-secondary);
  --ag-selected-row-background-color: color-mix(in srgb, var(--accent) 12%, transparent);
  --ag-control-panel-background-color: var(--surface);
  --ag-font-family: var(--sr-font-ui);
  --ag-font-size: var(--sr-text-sm);
  --ag-grid-size: 5px;
  --ag-cell-horizontal-padding: 12px;
  /* [2026-05-27][CLX] Вертикальные разделители колонок шапки (пожелание #1) */
  --ag-header-column-separator-display: block;
  --ag-header-column-separator-height: 60%;
  --ag-header-column-separator-width: 1px;
  --ag-header-column-separator-color: var(--border);
}
/* Вертикальные линии между колонками (шапка + тело) */
.cat-sr .ag-theme-quartz .ag-cell { border-right: 1px solid var(--border-subtle); }
.cat-sr .ag-theme-quartz .ag-header-cell { border-right: 1px solid var(--border-subtle); }
/* Кликабельный чекбокс сравнения (span вместо input — AG-Grid перехватывает клик по input) */
.cat-sr-cb {
  cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-muted);
  padding: 2px 4px; user-select: none; display: inline-block;
  transition: color var(--sr-tr-fast) var(--sr-ease), transform var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr-cb:hover { color: var(--accent); transform: scale(1.12); }
.cat-sr-cb.is-on { color: var(--accent); }
.cat-sr__ag-empty { color: var(--text-muted); font-size: var(--sr-text-sm); }
.cat-sr__count-loading, .cat-sr__count-fav { color: var(--text-muted); font-weight: 400; }
.cat-sr .ag-theme-quartz .ag-header-cell { font-size: var(--sr-text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.cat-sr .ag-theme-quartz .ag-row { cursor: pointer; }
.cat-sr .ag-theme-quartz .ag-cell { display: flex; align-items: center; }
.cat-sr .ag-theme-quartz .cat-ag-num,
.cat-sr .ag-theme-quartz .cat-ag-num .ag-cell-value { justify-content: flex-end; text-align: right; }
.cat-sr .ag-theme-quartz .cat-ag-center,
.cat-sr .ag-theme-quartz .cat-ag-center .ag-cell-value { justify-content: center; text-align: center; }
.cat-sr .ag-theme-quartz .ag-header-cell.cat-ag-center-h .ag-header-cell-label { justify-content: center; }
.cat-sr .ag-theme-quartz .ag-pinned-left-header,
.cat-sr .ag-theme-quartz .ag-cell.ag-cell-last-left-pinned { border-right: 1px solid var(--border-subtle); }
.cat-sr .ag-theme-quartz .cat-ag-fav-cell { padding: 0 !important; }

/* ── Звезда «избранное» ── */
.cat-sr__fav {
  background: none; border: none; cursor: pointer; line-height: 1;
  font-size: 17px; color: var(--text-muted); padding: 2px 4px;
  transition: color var(--sr-tr-fast) var(--sr-ease), transform var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__fav:hover { color: var(--accent); transform: scale(1.15); }
.cat-sr__fav.is-on { color: #f5b301; }

/* ── Нижняя строка: действия слева, навигация справа ── */
.cat-sr__bottombar { gap: var(--sr-space-4); flex-wrap: wrap; }
.cat-sr__bb-actions { display: flex; align-items: center; gap: var(--sr-space-2); }
.cat-sr__bb-nav { display: flex; align-items: center; gap: var(--sr-space-3); margin-left: auto; }
.cat-sr__bb-fav, .cat-sr__bb-cmp, .cat-sr__bb-clear {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  font-family: var(--sr-font-ui); font-size: var(--sr-text-sm); color: var(--text-secondary);
  transition: all var(--sr-tr-fast) var(--sr-ease);
}
.cat-sr__bb-fav:hover, .cat-sr__bb-cmp:hover:not(:disabled), .cat-sr__bb-clear:hover { background: var(--bg-secondary); color: var(--text); }
.cat-sr__bb-fav.is-active { background: color-mix(in srgb, #f5b301 18%, transparent); border-color: #f5b301; color: var(--text); }
.cat-sr__bb-fav .cat-sr__bb-star { color: #f5b301; }
.cat-sr__bb-cmp:disabled { opacity: .45; cursor: not-allowed; }
.cat-sr__bb-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); color: var(--text-secondary);
  font-size: var(--sr-text-xs); font-weight: 600;
}
.cat-sr__bb-fav.is-active .cat-sr__bb-badge { background: #f5b301; color: #1a1205; }
.cat-sr__bb-capped { color: var(--warning, #d98b1f); font-size: var(--sr-text-xs); margin-left: 6px; cursor: help; white-space: nowrap; }

/* [2026-05-27][CLX][FILTER-NOTE] Явная надпись вверху: параметр фильтра не заполнен у позиций */
.cat-sr__filter-note {
  margin: 0 var(--sr-space-4) var(--sr-space-2); padding: 8px 12px;
  background: color-mix(in srgb, var(--warning, #d98b1f) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning, #d98b1f) 45%, transparent);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: var(--sr-text-sm); line-height: 1.4;
}
.cat-sr__filter-note.is-hidden { display: none; }

/* [2026-05-31][CLX][CONFIGURATOR] Карточка-конфигуратор: группы опций + явный индикатор цены + «Доступно сейчас» */
.cat-sr__cfg { display: flex; flex-direction: column; gap: var(--sr-space-4); }
.cat-sr__cfg-group { display: flex; flex-direction: column; gap: 6px; }
.cat-sr__cfg-glabel {
  font-size: var(--sr-text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
/* чип опции наследует .cat-sr__chip; внутри — бейдж бесплатно/доплата */
.cat-sr__opt { display: inline-flex; align-items: center; gap: 6px; }
.cat-sr__opt-free {
  font-size: 10px; font-weight: 500; color: var(--text-muted);
  padding: 0 5px; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
}
.cat-sr__opt-paid {
  font-size: 11px; font-weight: 600; color: var(--accent);
  padding: 0 5px; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent) 12%, transparent); cursor: help;
}
.cat-sr__opt.active .cat-sr__opt-free { background: color-mix(in srgb, var(--text-on-accent) 22%, transparent); color: var(--text-on-accent); }
.cat-sr__opt.active .cat-sr__opt-paid { background: color-mix(in srgb, var(--text-on-accent) 22%, transparent); color: var(--text-on-accent); }
.cat-sr__cfg-total {
  margin-top: 4px; padding-top: var(--sr-space-3);
  border-top: 1px dashed var(--border); font-size: var(--sr-text-base);
  color: var(--text); font-family: 'JetBrains Mono', monospace;
}
.cat-sr__cfg-total strong { color: var(--accent); font-size: var(--sr-text-lg); }
.cat-sr__cfg-total small { color: var(--text-muted); font-family: var(--sr-font-ui); }

/* «Доступно сейчас» */
.cat-sr__avail { background: color-mix(in srgb, var(--success, #6B8F71) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--success, #6B8F71) 35%, transparent);
  border-radius: var(--radius); padding: var(--sr-space-3) var(--sr-space-4); }
.cat-sr__avail-title { font-size: var(--sr-text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--success, #2a8050); margin-bottom: 6px; }
.cat-sr__avail-row { display: flex; justify-content: space-between; align-items: center;
  font-size: var(--sr-text-sm); padding: 2px 0; }
.cat-sr__avail-row b { color: var(--success, #2a8050); }
.cat-sr__lead { font-size: var(--sr-text-xs); color: var(--text-muted); margin-top: 6px; }
