/* LiftShop — тема default
   Светлая витрина под B2B-каталог. Акцент задаётся в настройках сайта,
   поэтому одна тема обслуживает все домены сети с разными цветами. */

:root {
  --accent: #1565C0;
  --accent-dark: #0D47A1;
  --accent-soft: #E8F1FB;
  --ink: #16202B;
  --ink-2: #4A5765;
  --ink-3: #7B8794;
  --line: #E3E8EF;
  --bg: #FFFFFF;
  --bg-2: #F6F8FA;
  --ok: #1B8A4B;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16,32,48,.06), 0 4px 16px rgba(16,32,48,.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.55 var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 3vw, 32px); }
h2 { font-size: clamp(20px, 2.4vw, 25px); }

.container { max-width: var(--page-width, 1280px); margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 24px; padding: var(--header-pad, 14px) 20px; }
.logo { flex-shrink: 0; }
/* Логотип-картинка: SVG без своих размеров иначе растягивается на всю шапку. */
.logo img { display: block; height: 40px; width: auto; max-width: 240px; }
.logo__text { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }

.search { flex: 1; display: flex; max-width: 620px; position: relative; }
.search input {
  flex: 1; height: 44px; padding: 0 48px 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; background: var(--bg-2); color: var(--ink); outline: none;
  transition: border-color .15s, background .15s;
}
.search input:focus { border-color: var(--accent); background: var(--bg); }
.search button {
  position: absolute; right: 4px; top: 4px; width: 36px; height: 36px;
  border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.search button:hover { background: var(--accent-dark); }

.header__contacts { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.phone { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---------- Выбор города ---------- */
/* Раскрывается тегом details, поэтому работает и без скриптов. */
.cities { position: relative; }
.cities__current {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  list-style: none; user-select: none;
}
.cities__current::-webkit-details-marker { display: none; }
.cities__current:hover { color: var(--accent); }
.cities[open] .cities__current { color: var(--accent); }
.cities__list {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  min-width: 180px; max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
  padding: 6px;
}
.cities__item {
  padding: 7px 10px; border-radius: 6px; font-size: 14px; color: var(--ink);
  white-space: nowrap;
}
.cities__item:hover { background: var(--bg-2); }
.cities__item--on { font-weight: 600; color: var(--accent); }

/* Условия доставки в этот город — под вступлением на главной. */
.region-note {
  margin: 0 0 22px; padding: 10px 14px;
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-2); color: var(--ink-2); font-size: 14.5px;
}
.cart-link { position: relative; color: var(--ink); display: grid; place-items: center; }
.cart-link__count {
  position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Меню ---------- */
/* Тонкая строка над шапкой: условия доставки и оплаты. Мелкая
   и приглушённая — это справка, а не навигация по каталогу. */
.topbar { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; gap: 20px; padding: 7px 20px; overflow-x: auto; scrollbar-width: none; }
.topbar__inner::-webkit-scrollbar { display: none; }
.topbar__item { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.topbar__item:hover { color: var(--accent); text-decoration: none; }

.nav { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; gap: 4px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.nav__inner::-webkit-scrollbar { display: none; }
.nav__item {
  padding: 12px 14px; font-size: 14.5px; color: var(--ink-2);
  white-space: nowrap; border-bottom: 2px solid transparent;
}
.nav__item:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
.nav__item--all { font-weight: 650; color: var(--ink); }


.main { padding: 28px 0 64px; min-height: 60vh; }

/* ---------- Хлебные крошки ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs span::after { content: "/"; margin-left: 8px; color: var(--line); }
/* После последней крошки разделитель не нужен — иначе строка кончается слэшем. */
.crumbs span:last-child::after { content: none; }
.crumbs__current { color: var(--ink-2); }

/* ---------- Сетка категорий ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0 0 32px; }
.cat-card {
  display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.cat-card__name { font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
.cat-card__count { font-size: 13px; color: var(--ink-3); }
/* Картинка раздела — только если она есть (перенесена из темы Shop-Script). */
.cat-card__img { display: block; width: 100%; height: 120px; object-fit: contain; margin: 0 0 12px; background: #fff; border-radius: calc(var(--radius) / 2); }

/* ---------- Сетка товаров ---------- */
.grid { display: grid; grid-template-columns: var(--grid-columns, repeat(auto-fill, minmax(240px, 1fr))); gap: 16px; }

.card {
  display: flex; flex-direction: column; border: 1px solid var(--card-border, var(--line));
  border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: var(--card-shadow, none);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: #C9D6E5; box-shadow: var(--shadow); }
.card__img { aspect-ratio: 4/3; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: var(--img-blend, multiply); background: var(--img-bg-inner, transparent); padding: var(--img-pad, 0); }
.card__img--empty { color: var(--ink-3); font-size: 12px; }
.card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { font-size: 14.5px; line-height: 1.4; color: var(--ink); font-weight: 500; }
.card__name:hover { color: var(--accent); text-decoration: none; }
.card__sku { font-size: 12.5px; color: var(--ink-3); }
/* Цена отдельной строкой, кнопки под ней: двум кнопкам рядом с ценой
   в плитке тесно, и на узком экране они наезжают друг на друга. */
.card__foot { margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.card__actions { display: flex; gap: 8px; }
.card__actions .btn { flex: 1 1 0; justify-content: center; }
.card__price { font-size: 17px; font-weight: 700; white-space: nowrap; }
.card__price--none { font-size: 14px; font-weight: 500; color: var(--ink-3); }

/* ---------- Кнопки ---------- */
/* Эталон согласован ранее: синяя #1565C0, высота 40, скругление 16. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border: 0; border-radius: var(--radius-lg);
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn--ghost { background: var(--accent-soft); color: var(--accent); }
.btn--ghost:hover { background: #D8E7F8; color: var(--accent-dark); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn--wide { width: 100%; }
.btn--lg { height: 48px; padding: 0 28px; font-size: 16px; }

/* ---------- Карточка товара ---------- */
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 36px; align-items: start; }
.product__gallery { position: sticky; top: 96px; }
.product__main-img {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden;
}
.product__main-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: var(--img-blend, multiply); background: var(--img-bg-inner, transparent); padding: var(--img-pad, 0); }
.product__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product__thumb {
  width: 68px; height: 68px; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: var(--bg-2); cursor: pointer; padding: 4px;
}
.product__thumb.is-active { border-color: var(--accent); }
.product__thumb img { width: 100%; height: 100%; object-fit: contain; }

.product__sku { color: var(--ink-3); font-size: 14px; margin-bottom: 12px; }
.product__price { font-size: 30px; font-weight: 750; letter-spacing: -.02em; margin: 16px 0; }
.product__price--none { font-size: 18px; font-weight: 600; color: var(--ink-2); }
.product__stock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ok); font-weight: 600; }
.product__stock--out { color: var(--ink-3); }
.product__actions { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.product__desc { margin-top: 32px; line-height: 1.7; }
.product__desc img { border-radius: 8px; margin: 12px 0; }

.features { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 14.5px; }
.features td { padding: 9px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.features td:first-child { color: var(--ink-3); width: 45%; padding-right: 16px; }

.section-title { margin: 44px 0 18px; }

/* ---------- Панель сортировки ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar__count { color: var(--ink-3); font-size: 14px; }
.toolbar__sort { display: flex; gap: 6px; }
.toolbar__sort a {
  padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); background: var(--bg-2);
}
.toolbar__sort a:hover { text-decoration: none; color: var(--accent); }
.toolbar__sort a.is-active { background: var(--accent); color: #fff; }

/* ---------- Пагинация ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin: 36px 0 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px;
  display: grid; place-items: center; font-size: 15px; border: 1px solid var(--line); color: var(--ink-2);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pager .is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager .is-gap { border: 0; }

/* ---------- Формы ---------- */
.form { display: grid; gap: 14px; max-width: 520px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.field input, .field textarea {
  height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; font-family: inherit; color: var(--ink); background: var(--bg); outline: none;
}
.field textarea { height: auto; padding: 12px 14px; min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field--hp { position: absolute; left: -9999px; opacity: 0; }

/* Поле выбора файла.
   Родная кнопка браузера прижимается к верхнему краю: содержимое
   файлового поля не центрируется само, как в обычном input.
   Делаем поле flex-контейнером и приводим кнопку к виду остальных. */
.field input[type="file"] {
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px; cursor: pointer;
  font-size: 14px; color: var(--ink-3);
}
.field input[type="file"]::file-selector-button {
  height: 32px; padding: 0 14px; margin: 0;
  border: 1px solid var(--line); border-radius: calc(var(--radius) - 3px);
  background: var(--bg-2); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover {
  border-color: var(--accent); color: var(--accent);
}

/* ---------- Корзина ---------- */
/* Строка корзины: фото, название, количество, сумма — колонки одинаковой
   ширины во всех строках, поэтому цифры выстраиваются столбцом. */
.cart { max-width: 900px; }
.cart-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 132px 150px;
  gap: 20px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-row__img { width: 88px; height: 72px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.cart-row__img img { width: 100%; height: 100%; object-fit: contain; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 34px; height: 36px; border: 0; background: var(--bg-2); cursor: pointer; font-size: 16px; color: var(--ink-2); }
.qty button:hover { background: var(--accent-soft); color: var(--accent); }
.qty input { width: 48px; height: 36px; border: 0; text-align: center; font-size: 15px; font-family: inherit; }
.cart-total { max-width: 900px; display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin: 24px 0; font-size: 18px; }
.cart-total strong { font-size: 24px; }

/* ---------- Сообщения и пустые состояния ---------- */
.notice { padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 20px; }
.notice--error { background: #FDECEC; color: #B3261E; }
.empty { text-align: center; padding: 64px 20px; color: var(--ink-3); }
.empty h1 { color: var(--ink); }

.lead { font-size: 17px; color: var(--ink-2); max-width: 760px; }
.prose { max-width: 820px; line-height: 1.7; }
.prose img { border-radius: 8px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 24px; }
  .product__gallery { position: static; }
}
@media (max-width: 720px) {
  .header__inner { flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header__contacts { margin-left: auto; }
  .phone { display: none; }
  .cities__current span { display: none; }
  .cities__list { left: auto; right: 0; transform: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  /* Счётчик и цена стоят в одной строке под названием: растянутый
     во всю ширину счётчик оставлял справа пустую белую полосу. */
  .cart-row { grid-template-columns: 64px minmax(0, 1fr); row-gap: 12px; column-gap: 14px; }
  .cart-row .qty { grid-column: 2; width: max-content; justify-self: start; }
  .cart-row__sum {
    grid-column: 2; justify-items: end; text-align: right;
    grid-row: 3; align-self: center;
  }
  .cart-row .qty { grid-row: 3; }
  .cart-row__img { width: 64px; height: 56px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

/* ---------- Подвал ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 60px; }
.footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-bottom: 28px; }
.footer__title { font-weight: 650; margin-bottom: 12px; }
.footer__col p { margin: 0 0 8px; font-size: 14.5px; }
.footer__col a { color: var(--ink-2); }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid var(--line); padding-top: 20px;
  font-size: 13.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}

/* ---------- Исполнения (модификации) товара ---------- */
.skus { margin: 20px 0; display: grid; gap: 8px; }
.skus__title { font-size: 14px; color: var(--ink-3); margin-bottom: 2px; }
.sku {
  display: grid; grid-template-columns: 20px 1fr auto 74px; align-items: center; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.sku:hover { border-color: #C9D6E5; }
.sku:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.sku__name { font-size: 15px; font-weight: 500; }
.sku__code { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.sku__price { font-weight: 700; white-space: nowrap; }
.sku__stock { font-size: 13px; color: var(--ok); text-align: right; }
.sku--out { opacity: .55; cursor: not-allowed; }
.sku--out .sku__stock { color: var(--ink-3); }

@media (max-width: 520px) {
  .sku { grid-template-columns: 20px 1fr auto; row-gap: 4px; }
  .sku__stock { grid-column: 2 / -1; text-align: left; }
}

/* ---------- Телефоны: правки поверх общих правил ---------- */
@media (max-width: 720px) {
  /* Панель сортировки прокручивается, а не вылезает за край экрана. */
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar__count { white-space: nowrap; }
  .toolbar__sort {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px; max-width: 100%;
  }
  .toolbar__sort::-webkit-scrollbar { display: none; }
  .toolbar__sort a { flex-shrink: 0; }

  /* Цена и кнопка не помещаются в строку на узком экране — ставим друг под друга. */
  .card__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card__foot .btn { width: 100%; }
  .card__price { font-size: 16px; }

  /* Кнопки в карточке товара — во всю ширину, чтобы легко попадать пальцем. */
  .product__actions { flex-direction: column; }
  .product__actions .btn { width: 100%; }

  /* Исполнения: цена и остаток уходят под название. */
  .sku { grid-template-columns: 20px 1fr; row-gap: 6px; }
  .sku__price, .sku__stock { grid-column: 2 / -1; text-align: left; }
  .sku__stock { margin-top: -4px; }

  /* Строка заявки в корзине: убираем горизонтальную тесноту. */
  .cart-total { flex-direction: column; align-items: stretch; gap: 12px; }
  .cart-total .btn { width: 100%; }
}

/* Совсем узкие экраны — один товар в ряд читается лучше двух сплющенных. */
@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
}

/* ---------- Каталог с подбором ---------- */
.catalog--with-filters { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.catalog__side { position: sticky; top: 96px; }
.catalog__main, .catalog__side { min-width: 0; }
.filters__toggle { display: none; }

.filters {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 18px; background: var(--bg);
}
.filters__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.filters__title { font-weight: 650; font-size: 15.5px; }
.filters__reset { font-size: 13px; color: var(--ink-3); }
.filters__reset:hover { color: var(--accent); }

.filters__group { display: grid; gap: 8px; }
.filters__label { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }

.filters__price { display: flex; align-items: center; gap: 8px; }
.filters__price input {
  width: 100%; min-width: 0; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2);
  color: var(--ink); font-size: 14px; font-family: inherit; outline: none;
}
.filters__price input:focus { border-color: var(--accent); background: var(--bg); }
.filters__price span { color: var(--ink-3); }

.filters__values { display: grid; gap: 2px; }
.filters__values--scroll { max-height: 232px; overflow-y: auto; padding-right: 4px; }
.filters__item {
  display: flex; align-items: center; gap: 8px; padding: 4px 2px;
  font-size: 14px; cursor: pointer; border-radius: 6px;
}
.filters__item:hover { background: var(--bg-2); }
.filters__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filters__count { color: var(--ink-3); font-size: 12.5px; }

@media (max-width: 900px) {
  .catalog--with-filters { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .catalog__side { position: static; }
  .filters__toggle { display: inline-flex; }
  /* На телефоне подбор скрыт, пока его не открыли, — иначе он занимает весь экран. */
  .catalog__side-inner { display: none; margin-top: 10px; }
  .catalog__side-inner.is-open { display: block; }
}

/* ---------- Подсказки поиска ---------- */
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(16,32,48,.14); overflow: hidden; max-height: 70vh; overflow-y: auto;
}
.suggest__item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:hover { background: var(--bg-2); text-decoration: none; }
.suggest__img {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; background: var(--bg-2);
  display: grid; place-items: center; overflow: hidden;
}
.suggest__img img { width: 100%; height: 100%; object-fit: contain; }
.suggest__img--none { color: var(--ink-3); font-size: 16px; }
.suggest__text { flex: 1; min-width: 0; }
.suggest__title { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__note { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.suggest__price { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ---------- Карта сайта ---------- */
/* Дерево разделов: колонки задаются вложенному списку, иначе ветка с
   подразделами не разбивается и всё жмётся в один столбец. */
.sitemap { list-style: none; padding-left: 0; margin: 0 0 24px; }
.sitemap > li { margin-bottom: 14px; }
.sitemap > li > a { font-weight: 650; }
.sitemap ul { list-style: none; padding-left: 16px; margin: 6px 0 0; columns: 3; column-gap: 32px; }
.sitemap li { margin-bottom: 6px; break-inside: avoid; line-height: 1.45; }
.sitemap__count { color: var(--ink-3); font-size: 12.5px; margin-left: 6px; }
.sitemap--products { columns: 1; }
@media (min-width: 760px)  { .sitemap--products { columns: 2; } }
@media (min-width: 1100px) { .sitemap--products { columns: 3; } }
@media (max-width: 900px) { .sitemap ul { columns: 2; } }
@media (max-width: 560px) { .sitemap ul { columns: 1; } }

/* ---------- Мелкие служебные классы витрины ---------- */
/* Заведены, чтобы в шаблонах не было атрибутов style: иначе отступы
   расходятся от страницы к странице. */
.crumbs__current { color: var(--ink-2); }
.actions-row { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.search--center { max-width: 420px; margin: 32px auto 0; }
.cart-row__sum { text-align: right; display: grid; gap: 6px; justify-items: end; font-variant-numeric: tabular-nums; }
.prose--after { margin-top: 40px; }
.prose--before { margin-bottom: 28px; }
.notice--center { max-width: 520px; margin: 0 auto 24px; text-align: left; }
.form-legal { font-size: 13px; color: var(--ink-3); margin: 0; }
.section-title--sub { margin-top: 28px; font-size: 18px; }
.request-block { margin-top: 48px; }
.empty__action { margin-top: 20px; }

/* ---------- Компактный список подразделов ---------- */
/* Показывается вместо карточек, когда подразделов больше двенадцати. */
.subcats {
  list-style: none; margin: 0 0 28px; padding: 0;
  columns: 4; column-gap: 28px;
}
/* Не flex: при переносе длинного названия счётчик отрывался к краю колонки. */
.subcats li { break-inside: avoid; margin-bottom: 7px; line-height: 1.4; }
.subcats a { color: var(--ink); }
.subcats a:hover { color: var(--accent); }
.subcats__count { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-left: 6px; }
@media (max-width: 1100px) { .subcats { columns: 3; } }
@media (max-width: 760px)  { .subcats { columns: 2; column-gap: 18px; } }
/* На телефоне одна колонка отодвигала товары на несколько экранов —
   две колонки с короткими названиями читаются так же и вчетверо короче. */
@media (max-width: 480px)  { .subcats { columns: 2; column-gap: 14px; font-size: 14.5px; } }
@media (max-width: 340px)  { .subcats { columns: 1; } }
.product__price-from { font-size: .6em; font-weight: 500; color: var(--ink-3); vertical-align: middle; }

/* ---------- Оформление заявки ---------- */
.order { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 340px); gap: 40px; align-items: start; }
.order__form { min-width: 0; }

.order__summary {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: var(--bg-2); position: sticky; top: 96px;
}
.order__summary-title { font-weight: 650; margin-bottom: 14px; }

.order__items { list-style: none; margin: 0 0 16px; padding: 0; }
.order__item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.order__item:first-child { padding-top: 0; }
.order__item:last-child { border-bottom: 0; }
.order__item-name { display: block; font-size: 14px; line-height: 1.4; color: var(--ink); }
.order__item-name:hover { color: var(--accent); }
.order__item-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 4px; font-size: 13.5px; }
.order__item-sum { font-weight: 650; font-variant-numeric: tabular-nums; }

.order__total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 14px; border-top: 1px solid var(--line); font-size: 17px;
}
.order__total strong { font-size: 20px; font-variant-numeric: tabular-nums; }

.order__note { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin: 14px 0 10px; }
.order__edit { font-size: 13.5px; }

@media (max-width: 900px) {
  .order { grid-template-columns: 1fr; gap: 24px; }
  .order__summary { position: static; order: -1; }
}

/* ---------- Мессенджеры ---------- */
.messengers { display: flex; gap: 6px; }
.messenger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg-2); color: var(--ink-2); flex-shrink: 0;
}
.messenger:hover { text-decoration: none; color: #fff; }
.messenger--telegram:hover { background: #2AABEE; }
.messenger--max:hover      { background: #6D3BF5; }
.messenger--vk:hover       { background: #0077FF; }
.messenger--whatsapp:hover { background: #25D366; }

/* Ровная сетка: ссылки одной ширины, без рваного переноса. */
.footer__messengers {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; margin-top: 14px; max-width: 300px;
}
.footer__messengers .messenger {
  width: auto; padding: 0 12px; font-size: 13.5px;
  justify-content: flex-start;
}
.footer__note { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.footer__address, .footer__hours { color: var(--ink-2); }
.footer__hours { font-size: 13px; color: var(--ink-3); }

/* Спросить о наличии — в карточке товара */
.ask {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 20px 0;
}
.ask__title { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 10px; }
.ask__links { display: flex; flex-wrap: wrap; gap: 8px; }
.ask__link {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  background: var(--bg-2); color: var(--ink); font-size: 14px; font-weight: 500;
}
.ask__link:hover { text-decoration: none; color: #fff; }
.ask__link--telegram:hover { background: #2AABEE; }
.ask__link--max:hover      { background: #6D3BF5; }
.ask__link--vk:hover       { background: #0077FF; }
.ask__link--whatsapp:hover { background: #25D366; }
.ask__note { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

@media (max-width: 720px) { .messengers { order: -1; } }

/* ---------- Теги ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.tag-chip {
  display: inline-block; padding: 5px 12px; border-radius: 14px;
  background: var(--bg-2); color: var(--ink-2); font-size: 13.5px;
}
.tag-chip:hover { background: var(--accent); color: #fff; text-decoration: none; }
.tag__intro { max-width: 80ch; margin-bottom: 24px; }
.tag__text { max-width: 80ch; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Наклейки товара ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; margin-bottom: 10px;
}
.badge--new   { background: #E3F3E8; color: #1B8A4B; }
.badge--hit   { background: #FDF0DC; color: #A66A00; }
.badge--sale  { background: #FDE8E8; color: #C0332B; }
.badge--order { background: var(--bg-2); color: var(--ink-3); }
.badge--corner { position: absolute; top: 10px; left: 10px; margin: 0; z-index: 2; }
.card__img { position: relative; }

/* ---------- Отзывы ---------- */
.reviews { margin-top: 48px; }
.reviews__summary { font-size: 15px; font-weight: 400; color: var(--ink-2); margin-left: 12px; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.star { color: var(--line); font-size: 15px; line-height: 1; }
.star--on { color: #F5A623; }

.reviews__list { display: grid; gap: 16px; margin-bottom: 32px; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.review__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.review__author { font-weight: 650; }
.review__date { color: var(--ink-3); font-size: 13px; margin-left: auto; }
.review__text { margin: 0 0 8px; line-height: 1.6; }
.review__pros, .review__cons { margin: 0 0 4px; font-size: 14px; color: var(--ink-2); }
.review__pros strong { color: var(--ok, #1B8A4B); }
.review__cons strong { color: #C0332B; }
.review__answer {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  background: var(--bg-2); font-size: 14px; line-height: 1.55;
}
.note-empty { color: var(--ink-3); margin-bottom: 28px; }
.review-form { max-width: 560px; }

/* Оценка звёздами: порядок в разметке обратный, чтобы подсветка шла влево. */
/* В сетке поля блок растягивался на всю ширину, и звёзды уезжали вправо. */
.rating-pick {
  display: inline-flex; flex-direction: row-reverse; gap: 2px;
  width: max-content; justify-self: start;
}
.rating-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-pick label {
  font-size: 26px; line-height: 1; color: var(--line); cursor: pointer; padding: 0 1px;
}
.rating-pick input:checked ~ label,
.rating-pick label:hover,
.rating-pick label:hover ~ label { color: #F5A623; }
.rating-pick input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.review__product { font-size: 13.5px; color: var(--ink-3); margin: 0 0 8px; }

/* ---------- Баннеры ---------- */
.banners { display: grid; gap: 14px; margin: 0 0 32px; }
.banners--home-top { margin-top: 4px; }
.banners--footer { margin: 32px 0 0; }

.banner {
  --banner-bg: var(--bg-2);
  --banner-ink: var(--ink);
  display: block; padding: 26px 28px; border-radius: var(--radius);
  background: var(--banner-bg); color: var(--banner-ink);
  border: 1px solid var(--line);
}
a.banner:hover { text-decoration: none; filter: brightness(.97); }

/* С фотографией фон затемняется, иначе текст на светлом снимке не прочесть. */
.banner--photo {
  background-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), var(--banner-img);
  background-size: cover; background-position: center;
  color: #fff; border-color: transparent; min-height: 200px;
  display: flex; flex-direction: column; justify-content: center;
}

.banner__title { display: block; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.banner__text { display: block; margin-top: 8px; font-size: 15.5px; opacity: .92; max-width: 62ch; }
.banner__btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 20px;
  margin-top: 16px; border-radius: var(--radius-lg);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px;
}
.banner--photo .banner__btn { background: #fff; color: #111; }

@media (min-width: 900px) {
  .banners--product-side { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .banner { padding: 20px; }
  .banner__title { font-size: 19px; }
}

/* ---------- Подбор по параметрам на главной ---------- */
.picker {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 0 0 36px; background: var(--bg-2);
}
.picker__title { font-size: 19px; font-weight: 650; margin: 0 0 4px; }
.picker__note { color: var(--ink-3); font-size: 14px; margin: 0 0 18px; }

.picker__form {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end;
}
.picker__field { display: grid; gap: 6px; min-width: 0; }
.picker__label { font-size: 12.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.picker__select, .picker__range input {
  height: 40px; padding: 0 10px; width: 100%; min-width: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font-family: inherit; font-size: 14.5px; line-height: 1.4; outline: none;
}
.picker__select:focus, .picker__range input:focus { border-color: var(--accent); }
.picker__range { display: flex; align-items: center; gap: 8px; }
.picker__range span { color: var(--ink-3); }

.picker__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.picker__check { display: flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; }
.picker__actions .btn { height: 40px; }

@media (max-width: 620px) {
  .picker { padding: 18px; }
  .picker__form { grid-template-columns: 1fr; }
}

/* ---------- Чат на витрине ---------- */
.chat-button {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 9px;
  height: 52px; padding: 0 20px; border: 0; border-radius: 26px;
  background: var(--accent); color: #fff; cursor: pointer;
  font-family: inherit; font-size: 15px; line-height: 1; font-weight: 600; box-shadow: 0 6px 24px rgba(16,32,48,.22);
}
.chat-button:hover { filter: brightness(1.06); }
.chat-button.is-open .chat-button__label { display: none; }
.chat-button.is-open { padding: 0; width: 52px; justify-content: center; }

.chat-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 91;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 160px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(16,32,48,.24);
}
/* display:flex перебивает браузерное [hidden] — прячем окно явно. */
.chat-panel[hidden] { display: none; }

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: var(--accent); color: #fff;
}
.chat-head__title { font-weight: 650; font-size: 15px; }
.chat-head__close { border: 0; background: none; color: #fff; font-size: 16px; cursor: pointer; line-height: 1; }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-offline {
  background: var(--bg-2); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; color: var(--ink-3);
}

.chat-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.chat-msg--theirs { align-self: flex-start; background: var(--bg-2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg--mine   { align-self: flex-end;   background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg__text { display: block; word-wrap: break-word; }
.chat-msg__time { display: block; font-size: 11px; opacity: .65; margin-top: 4px; text-align: right; }
.chat-msg__photo { display: block; margin-bottom: 6px; }
.chat-msg__photo img { max-width: 220px; border-radius: 10px; display: block; }

.chat-form { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 8px; }
.chat-contacts { display: grid; gap: 6px; }
/* display:grid перебивает браузерное [hidden], поэтому прячем явно. */
.chat-contacts[hidden] { display: none; }
.chat-contacts input {
  height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg-2); color: var(--ink); font-family: inherit; font-size: 14px; outline: none;
}
.chat-contacts input:focus { border-color: var(--accent); background: var(--bg); }

.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row textarea {
  flex: 1; min-height: 38px; max-height: 120px; padding: 9px 12px; resize: none;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); color: var(--ink); font-family: inherit; font-size: 14.5px; line-height: 1.4; outline: none;
}
.chat-row textarea:focus { border-color: var(--accent); background: var(--bg); }

.chat-clip, .chat-send {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; cursor: pointer; flex-shrink: 0; border: 0;
}
.chat-clip { background: var(--bg-2); color: var(--ink-3); }
.chat-clip:hover { color: var(--accent); }
.chat-send { background: var(--accent); color: #fff; }
.chat-send:disabled { opacity: .6; cursor: default; }
.chat-file { font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 480px) {
  .chat-panel { right: 8px; left: 8px; width: auto; bottom: 78px; height: 70vh; }
  /* На телефоне подпись съедает пол-экрана — оставляем кружок. */
  .chat-button { right: 12px; bottom: 12px; width: 52px; padding: 0; justify-content: center; }
  .chat-button__label { display: none; }
}
.chat-note {
  align-self: center; max-width: 90%;
  background: #FDECEC; border: 1px solid #F3C6C6; color: #A32020;
  border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.45;
}

/* ---------- Карта сайта ---------- */
.sitemap--inline { columns: 3; column-gap: 32px; }
.sitemap--inline li { break-inside: avoid; margin-bottom: 6px; }
.sitemap--inline > li > a { font-weight: 500; }

.sitemap-features { margin: 0 0 28px; }
.sitemap-features dt { font-weight: 650; margin-top: 14px; }
.sitemap-features dd { margin: 4px 0 0; color: var(--ink-2); line-height: 1.55; }

.sitemap-block { margin: 0 0 32px; padding-top: 4px; }
.sitemap-block__title { font-size: 18px; margin: 0 0 6px; }
.sitemap-block__title .sitemap__count { font-weight: 400; }
.sitemap-block__near { margin: 0 0 12px; color: var(--ink-3); font-size: 13.5px; line-height: 1.6; }
.sitemap-block__near a { color: var(--ink-2); }
.sitemap-block__empty { color: var(--ink-3); font-size: 14px; margin: 0; }

/* Название на своей строке, артикул и производитель — под ним:
   так столбцы читаются ровно, а не сплошным полотном. */
.sitemap--products li > a { display: block; }
.sitemap__sku   { color: var(--ink-3); font-size: 12.5px; }
.sitemap__brand { color: var(--ink-3); font-size: 12.5px; margin-left: 8px; }

.sitemap-parts {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  margin: 32px 0 20px; padding-top: 20px; border-top: 1px solid var(--line);
}
.sitemap-parts__label { color: var(--ink-3); font-size: 14px; margin-right: 4px; }
.sitemap-parts a, .sitemap-parts__cur {
  min-width: 34px; height: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px;
  font-variant-numeric: tabular-nums; text-decoration: none;
}
.sitemap-parts a:hover { border-color: var(--accent); color: var(--accent); }
.sitemap-parts__cur { background: var(--accent); border-color: var(--accent); color: #fff; }

.sitemap-foot { color: var(--ink-3); font-size: 13.5px; margin-top: 24px; }

@media (max-width: 900px) { .sitemap--inline { columns: 2; } }
/* Названия производителей и подборок короткие — на телефоне
   две колонки вдвое сокращают прокрутку. */
@media (max-width: 560px) { .sitemap--inline { columns: 2; column-gap: 14px; font-size: 14.5px; } }
@media (max-width: 340px) { .sitemap--inline { columns: 1; } }
.sitemap-block__more {
  font-size: 12.5px; font-weight: 400; color: var(--ink-3);
  margin-left: 8px; white-space: nowrap;
}
/* Форма-обёртка вокруг «В корзину» не должна влиять на раскладку. */
.card__add { margin: 0; display: contents; }
.product__actions form { margin: 0; display: contents; }

/* ---------- Выбор доставки и оплаты при оформлении ---------- */
.choices { border: 0; margin: 0 0 20px; padding: 0; }
.choices legend {
  padding: 0; margin-bottom: 10px;
  font-size: 15px; font-weight: 650; color: var(--ink);
}

.choice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); cursor: pointer;
}
.choice:hover { border-color: var(--accent); }
.choice input { margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.choice__body { flex: 1; min-width: 0; display: block; }
.choice__head { display: flex; align-items: baseline; gap: 10px; }
.choice__name { font-weight: 600; flex: 1; min-width: 0; }
.choice__price { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.choice__tag {
  font-size: 12px; color: var(--ink-3); background: var(--bg-2);
  border-radius: 20px; padding: 2px 9px; white-space: nowrap;
}
.choice__note { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-3); line-height: 1.45; }

/* Строка доставки в сводке. */
.order__line {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0 0; color: var(--ink-2); font-size: 14.5px;
}
.order__line[hidden] { display: none; }

/* ---------- Готовые подборки внутри раздела ---------- */
.picks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; }
.picks__label { font-size: 13.5px; color: var(--ink-3); margin-right: 2px; }
.picks__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--ink); font-size: 14px; line-height: 1;
}
.picks__item:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.picks__count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.picks__item:hover .picks__count { color: var(--accent); }

/* ---------- Вход и личный кабинет ---------- */
.auth { max-width: 420px; margin: 20px auto 60px; }
.auth h1 { text-align: center; margin-bottom: 12px; }
.auth__lead { color: var(--ink-2); text-align: center; margin-bottom: 22px; }
.auth__note { color: var(--ink-3); font-size: 13.5px; text-align: center; margin-top: 18px; line-height: 1.5; }
.auth__code { font-size: 24px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.auth__again { text-align: center; margin-top: 14px; }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }

.cabinet__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.cabinet__head h1 { margin: 0; }
.cabinet__exit { color: var(--ink-3); font-size: 14.5px; }
.cabinet__group {
  background: var(--accent-soft); color: var(--accent-dark);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px;
}
.cabinet__cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
/* Форма шире колонки распирала страницу вбок: внутри кабинета она
   должна ужиматься по месту, а не держать свои 520 пикселей. */
.cabinet__main, .cabinet__side { min-width: 0; }
.cabinet__side .form { max-width: none; min-width: 0; }
.cabinet__side .field--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cabinet__side input { width: 100%; min-width: 0; }
.cabinet__side { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg-2); }
.cabinet__side h2 { font-size: 18px; margin-bottom: 6px; }
.cabinet__hint { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; line-height: 1.5; }
.cabinet__hint--last { margin: 16px 0 0; }
.field--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.req { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.req__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.req__num { font-weight: 650; }
.req__date { color: var(--ink-3); font-size: 13.5px; margin-left: 8px; }
.req__status { font-size: 13px; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.req__status--new { background: #E8F1FB; color: #1565C0; }
.req__status--work { background: #FDF0D5; color: #8A5A00; }
.req__status--done { background: #E6F4EC; color: #167C4A; }
.req__status--reject { background: #FDECEC; color: #B3261E; }

.req__items { list-style: none; margin: 0 0 10px; padding: 0; }
.req__items li { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.req__items li:last-child { border-bottom: 0; }
.req__name { flex: 1; min-width: 0; }
.req__qty { color: var(--ink-3); font-size: 13.5px; white-space: nowrap; }
.req__sum { white-space: nowrap; font-variant-numeric: tabular-nums; }

.req__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.req__term, .req__doc { background: var(--bg-2); border-radius: 20px; padding: 3px 10px; }
.req__doc { background: var(--accent-soft); color: var(--accent-dark); }
.req__total { margin-left: auto; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .cabinet__cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Вход в кабинет в шапке. */
.account-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); white-space: nowrap; }
.account-link:hover { color: var(--accent); text-decoration: none; }
.account-link__name { font-size: 14.5px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .account-link__name { display: none; } }

/* ---------- Производители ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.brand-card {
  display: block; padding: 18px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.brand-card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.brand-card__logo { height: 56px; display: grid; place-items: center; margin-bottom: 10px; }
.brand-card__logo img { max-height: 56px; width: auto; object-fit: contain; }
.brand-card__initials {
  font-size: 22px; font-weight: 700; color: var(--ink-3);
  letter-spacing: .04em; text-transform: uppercase;
}
.brand-card__name { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.brand-card__count { font-size: 13px; color: var(--ink-3); }

.brand-head { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; flex-wrap: wrap; }
.brand-head__logo { max-height: 60px; width: auto; object-fit: contain; }
.brand-head__text h1 { margin: 0; }
.brand-head__meta { display: flex; gap: 16px; font-size: 14px; color: var(--ink-3); margin-top: 4px; }

/* ---------- Акции: старая цена и величина скидки ---------- */
.card__price-old, .product__price-old {
  color: var(--ink-3); font-weight: 400; text-decoration: line-through;
  margin-left: 8px; white-space: nowrap;
}
.card__price-old { font-size: 13.5px; }
.product__price-old { font-size: .58em; }
.product__sale {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  padding: 3px 10px; border-radius: 20px;
  background: #FDECEC; color: #B3261E;
  font-size: 14px; font-weight: 650; white-space: nowrap;
}

/* Строка акции над каталогом. */
.promo-line {
  display: flex; align-items: center; gap: 10px;
  background: #FDECEC; color: #8A1F18; border-radius: var(--radius);
  padding: 12px 18px; margin-bottom: 20px; font-size: 15px;
}
.promo-line__tag {
  background: #B3261E; color: #fff; border-radius: 20px;
  padding: 2px 10px; font-size: 12.5px; font-weight: 650; white-space: nowrap;
}

/* Кнопка снимка экрана в чате — рядом со скрепкой. */
.chat-shot {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: var(--bg-2); color: var(--ink-3);
}
.chat-shot:hover { color: var(--accent); }

/* ---------- Лента картинок на странице подборки ---------- */
.tag-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin: 0 0 28px;
}
.tag-gallery__item { margin: 0; }
.tag-gallery__item img {
  width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s;
}
.tag-gallery__item a:hover img { border-color: var(--accent); }
.tag-gallery figcaption {
  margin-top: 6px; font-size: 13.5px; color: var(--ink-3); line-height: 1.4;
}

/* ---------- Галерея на странице подборки ---------- */
.tag-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; margin: 0 0 28px;
}
.tag-gallery__item {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-2); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.tag-gallery__item:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.tag-gallery__item img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; }
.tag-gallery__cap {
  display: block; padding: 9px 12px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2);
}

.cart-quantity { display: grid; gap: 4px; justify-items: start; }
.order-error { padding: 16px; border: 1px solid #b3261e; color: #9b201a; border-radius: 8px; }
@media (max-width: 768px) { .cart-row .cart-quantity { grid-column: 2; grid-row: 3; } .cart-row__sum { grid-row: 4; justify-items: start; text-align: left; } }
