/* Витрина REVAMP. Цвета и шрифты бренда — только здесь, в переменных (ADR-0004).
   Вид страниц — по макетам design/mockups/project/RevCatalog и RevProduct (BUG-002). */
/* Китайский (US-030): свои шрифты витрины китайских знаков не содержат — знаки берутся из системного шрифта устройства. */
html:lang(zh-CN) {
  --font-body: "Onest", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  --font-head: "Montserrat", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
}
:root {
  --ink: #131a26;
  --ink-deep: #0c111a;
  --accent: #4fa3ff;
  --link: #1f6fd1;
  --page: #f4f6fa;
  --line: #e2e7ef;
  --line-soft: #eef2f7;
  --field: #d5dce6;
  --muted: #6b7686;
  --soft-blue: #eaf2fd;
  --font-body: "Onest", system-ui, sans-serif;
  --font-head: "Montserrat", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.4; }
body > main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }

/* Кнопки и поля (макет: .btn, .pri, .ghost, .on, .fld) */
.btn { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:disabled { cursor: default; opacity: 0.6; filter: none; }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--field), inset 0 -2px 0 var(--line-soft); }
.btn-ghost:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--accent), inset 0 -2px 0 var(--line-soft); }
.btn-on { background: var(--soft-blue); color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent); }
.field { height: 36px; min-width: 0; border: 0; border-radius: 8px; padding: 0 10px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--field); }
.card { background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 8px 22px rgba(19, 26, 38, 0.05); }
.grp { margin: 0; padding: 8px 14px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; background: #fff; }
.grp legend { padding: 0 6px; font-weight: 700; color: var(--link); }

/* Шапка */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 130px; margin: 0; padding: 4px; list-style: none; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--field), 0 8px 22px rgba(19, 26, 38, 0.12); }
.lang-list a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); }
.lang-list a:hover { background: var(--page); text-decoration: none; }
.lang-list a.on { background: var(--soft-blue); font-weight: 700; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-text { font-family: var(--font-head); font-size: 24px; font-weight: 500; letter-spacing: 0.5px; }
.logo-text b { font-weight: 800; }
.search { flex: 1 1 300px; min-width: 0; display: flex; gap: 6px; }
.search .field { flex: 1; }

/* Хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-top: 14px; font-size: 14px; color: var(--muted); }
.crumb-current { color: var(--ink); }

/* Каталог: две колонки (макет RevCatalog) */
.catalog-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding-top: 14px; }
.catalog-aside { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.catalog-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.section-link { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px; margin: 0 -6px; border-radius: 6px; }
.section-link:hover { text-decoration: none; background: var(--page); }
.section-on { font-weight: 700; background: var(--soft-blue); }

.catalog-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.catalog-head h1 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); }
.sort-form { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sort-form label { display: flex; align-items: center; gap: 8px; }
.views { display: flex; gap: 4px; }

.cards { display: grid; gap: 12px; }
.cards-list { grid-template-columns: 1fr; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(min(228px, 100%), 1fr)); gap: 12px; }
.cards .card { padding: 10px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; min-width: 0; }
.cards .card:hover { box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgba(19, 26, 38, 0.08); }
.card-photo { position: relative; flex: 0 0 150px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: linear-gradient(160deg, var(--soft-blue), #f7f9fc); display: flex; align-items: center; justify-content: center; }
.cards-grid .card-photo { flex: 1 1 100%; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.side-badge { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.no-photo { color: var(--muted); font-size: 13px; }
.card-body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.card-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.card-line { font-size: 13px; overflow-wrap: anywhere; }
.card-meta { font-size: 13px; color: var(--muted); }
.card-price { flex: 0 1 170px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.price-big { font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1; white-space: nowrap; }
/* Справочная сумма в долларах рядом с ценой в юанях (US-031) */
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.price-usd, .buy-usd, .cart-usd { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.buy-usd { font-size: 13px; margin-top: -4px; }
.cart-usd { text-align: right; font-size: 13px; }
.tiers-line { font-size: 13px; color: var(--link); font-weight: 600; }
.price-request { font-weight: 700; }
.stock { font-weight: 700; }
.stock-in { color: #1d7a45; }
.stock-order { color: #9a6400; }
.stock-out { color: #b42318; }
.empty { padding: 24px; text-align: center; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }

/* Карточка товара (макет RevProduct) */
.product-page { display: flex; flex-direction: column; gap: 24px; padding-top: 14px; }
.product-top { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.gallery { flex: 2 1 340px; min-width: 0; display: flex; gap: 8px; }
.gallery-thumbs { flex: none; display: flex; flex-direction: column; gap: 6px; }
.gallery-thumb { width: 62px; height: 62px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px var(--field); }
.gallery-thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-main { position: relative; flex: 1; min-width: 0; aspect-ratio: 1; overflow: hidden; background: linear-gradient(160deg, var(--soft-blue), #fff); display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .side-badge { left: 12px; top: 12px; padding: 3px 10px; font-size: 14px; }
.photo-count { position: absolute; right: 12px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.85); font-size: 13px; color: var(--muted); }

.product-info { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.facts-line { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.short-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.short-row .dots { flex: 1; min-width: 12px; border-bottom: 1px dotted #9aa6b5; }
.short-row b { text-align: right; overflow-wrap: anywhere; }

.buy-box { flex: 1 1 290px; min-width: 0; padding: 5px; }
.buy-head { background: linear-gradient(90deg, #1e2a3f, #2c5c9e); color: #fff; border-radius: 7px; padding: 9px 14px; font-weight: 700; }
.buy-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.buy-price { font-family: var(--font-head); font-weight: 800; font-size: 34px; line-height: 1; }
.buy-price span { font-family: var(--font-body); font-weight: 500; font-size: 15px; color: var(--muted); }
.buy-price.price-request { font-size: 24px; }
.tiers-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; }
.tier-row { display: flex; justify-content: space-between; padding: 7px 12px; }
.tier-row:nth-child(even) { background: var(--page); }
.tier-first { font-weight: 700; background: var(--soft-blue); }
.buy-note { margin: 0; font-size: 13px; color: var(--muted); }
.buy-note b { color: var(--ink); }

.details h2:not(.visually-hidden) { margin: 0 0 4px; font-family: var(--font-head); font-weight: 800; font-size: 22px; }

/* Общая часть карточки и варианты производителей (US-029, часть 2; картинка, одобренная 2026-11-15) */
.product-common { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.product-info h1 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; }
.short-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; }
.variant-zone { display: flex; flex-direction: column; gap: 24px; }
.variants h2 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.variant-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.variant-tile { display: flex; flex-direction: column; gap: 4px; padding: 8px; color: var(--ink); }
.variant-tile:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgba(19, 26, 38, 0.08); }
.variant-tile.on { box-shadow: 0 0 0 2px var(--accent), 0 8px 22px rgba(19, 26, 38, 0.08); }
.variant-photo { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, var(--soft-blue), #f7f9fc); display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.variant-photo img { width: 100%; height: 100%; object-fit: cover; }
.variant-tile .quality { align-self: flex-start; }
.variant-brand { font-size: 13px; color: var(--muted); }
.variant-price { font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.variant-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.quality { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.quality-original { background: #ddf3e4; color: #14532d; }
.quality-copy { background: #e3eeff; color: #1f4e9c; }
.quality-economy { background: #fdf1dc; color: #7a4f00; }
/* Состояние варианта (US-033): «Новая» — без отметки. */
.condition { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.condition-used { background: #fde8d8; color: #8a3b0c; }
.condition-refurbished { background: #ece6fb; color: #4b2a9a; }
.variant-tile .condition { align-self: flex-start; }
.variants-count { font-weight: 600; color: var(--link); }
.num { text-align: right; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.tab { min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px 10px 0 0; background: var(--line); color: var(--ink); font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: #fff; box-shadow: 0 -2px 0 var(--accent) inset; }
.tab-panel { padding: 18px; border-top-left-radius: 0; }
.specs { margin: 0; max-width: 860px; }
.specs div { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 7px 10px; border-radius: 6px; }
.specs div:nth-child(odd) { background: var(--page); }
.specs dt { flex: 1 1 220px; color: #4a5565; }
.specs dd { flex: 1 1 220px; margin: 0; font-weight: 700; }
.fitments { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; max-width: 860px; }
.fitments li { padding: 8px 10px; border-radius: 6px; background: var(--page); font-weight: 700; }
.description { white-space: pre-line; margin: 0; max-width: 760px; }

/* Плитка: фото, цена, название в две строки, затем по строке на каждую надпись, кнопка внизу.
   У каждой надписи своё место (владелец 2026-11-16): строки одной высоты во всех карточках, длинное — с многоточием. */
.cards-grid .card { flex-direction: column; flex-wrap: nowrap; gap: 8px; padding: 12px; }
.cards-grid .card-photo { flex: none; width: 100%; }
.cards-grid .card-price { order: 2; flex: none; width: 100%; gap: 2px; min-height: 40px; }
.cards-grid .price-big { font-size: 22px; }
.cards-grid .price-request { font-size: 16px; line-height: 22px; }
.cards-grid .card-body { order: 3; flex: none; width: 100%; gap: 4px; }
.cards-grid .card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: 15px; line-height: 20px; height: 40px; }
.cards-grid .card-line, .cards-grid .card-variants, .cards-grid .card-lead { font-size: 13px; line-height: 20px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards-grid .card-line { color: var(--muted); }
.cards-grid .card-variants .quality { vertical-align: 1px; }
.cards-grid .card-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; }
.cards-grid .card-stock .stock { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; line-height: 18px; }
.cards-grid .stock-in { background: #ddf3e4; }
.cards-grid .stock-order { background: #fdf1dc; }
.cards-grid .stock-out { background: #fde4e1; }
.cards-grid .tiers-line { display: block; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-wrap { position: relative; display: block; }
.btn-cart { width: 100%; min-height: 32px; font-size: 13px; }
.site-header .cart-hint { bottom: auto; top: calc(100% + 6px); }
.cart-hint { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 4px 10px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; z-index: 2; }
.cards-grid .cart-list, .cards-list .cart-grid { display: none; }
.cards-grid .cart-grid { order: 9; margin-top: auto; padding-top: 4px; }
.cards-grid .btn-cart { min-height: 36px; font-size: 14px; }

/* Список — плотные строки (просьба владельца 2026-11-14): маленькое фото, две строки текста, цена и кнопка справа */
.cards-list { gap: 6px; }
.cards-list .card { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 6px 10px 6px 6px; }
.cards-list .card-photo { width: 96px; flex: none; border-radius: 6px; }
.cards-list .side-badge { left: 4px; top: 4px; padding: 1px 5px; font-size: 10px; border-radius: 4px; }
.cards-list .card-body { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; }
.cards-list .card-title { flex: 1 1 100%; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards-list .card-line, .cards-list .card-meta { font-size: 12px; }
.cards-list .card-status { flex: 1 1 100%; display: flex; flex-wrap: wrap; column-gap: 14px; }  /* срок и наличие — всегда третьей строкой */
.cards-list .card-variants.is-empty, .cards-list .card-oem:empty { display: none; }
.cards-list .card-price { display: grid; grid-template-columns: auto 128px; align-items: center; column-gap: 14px; row-gap: 2px; flex: none; text-align: right; }
.cards-list .card-price > :not(.cart-wrap) { grid-column: 1; }
.cards-list .cart-list { grid-column: 2; grid-row: 1 / span 2; }
.cards-list .price-big { font-size: 18px; }
.cards-list .price-row { justify-content: flex-end; }
.cards-list .tiers-line { font-size: 11px; max-width: 190px; }

/* Неактивное до своих историй */
.soon { opacity: 0.55; cursor: default; }

/* Верхняя полоса и строка разделов (макет RevHome) */
.topbar { background: var(--ink-deep); color: #c9d3e1; font-size: 12px; }
.topbar-row { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 5px; padding-bottom: 5px; }
.topbar-accent { margin-left: auto; color: var(--accent); }
.header-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-bottom: 10px; font-weight: 500; font-size: 14px; }

/* Главная (макет RevHome) */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero-beam { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(24px, 4vw, 48px); }
.hero-text { flex: 3 1 420px; min-width: 0; }
.hero-text h1 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; }
/* Заголовок первого экрана — прежнего размера и в одну строку на широком экране (владелец 2026-11-15); на узком переносится. */
@media (min-width: 1200px) { .hero-text h1 { white-space: nowrap; } }
.hero-text p { margin: 14px 0 0; max-width: 560px; font-size: 16px; color: #c9d3e1; }
.pick-box { flex: 2 1 340px; min-width: 0; background: #fff; color: var(--ink); border-radius: 12px; padding: 5px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.pick-head { background: linear-gradient(90deg, #1e2a3f, #2c5c9e); color: #fff; border-radius: 8px; padding: 8px 14px; font-weight: 700; }
.pick-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pick-body label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 13px; }
.pick-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.pick-or::before, .pick-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pick-oem { display: flex; gap: 6px; }
.pick-oem .field { flex: 1; }
.home { display: flex; flex-direction: column; gap: 32px; padding-top: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-head h2, .how h2, .request-text h2 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 22px; }
.more-link { color: var(--link); font-weight: 600; }
.cards-home { grid-template-columns: repeat(auto-fill, minmax(min(228px, 100%), 1fr)); }
.how { display: flex; flex-wrap: wrap; gap: 12px; }
.how h2 { flex: 1 1 100%; }
.how .grp { flex: 1 1 240px; }
.request { background: var(--ink); color: #fff; border-radius: 12px; padding: clamp(18px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 16px 36px; align-items: center; }
.request-text { flex: 1 1 300px; min-width: 0; }
.request-text p { margin: 6px 0 0; color: #c9d3e1; }
.request-form { flex: 1 1 360px; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.request-form .field { flex: 1 1 160px; }
.request-form .wide { flex: 1 1 100%; }

/* Подвал (макет RevHome) и строка состояния */
.site-footer { margin-top: 32px; background: var(--ink-deep); color: #c9d3e1; font-size: 13px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; padding-top: 24px; padding-bottom: 24px; }
.footer-logo { display: flex; align-items: center; gap: 8px; color: #fff; }
/* Как в шапке: значок и надпись шрифтом сайта, надпись по центру значка по высоте. */
.footer-logo .logo-text { line-height: 1; }
.footer-col { display: flex; flex-direction: column; gap: 5px; }
.footer-col b { color: #fff; }
.status-bar { border-top: 1px solid #222c3c; font-size: 12px; }
.status-row { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 6px; padding-bottom: 6px; }

/* Фильтры (US-012, макет RevCatalog) */
.filters { display: flex; flex-direction: column; gap: 8px; }
.chk { min-height: 26px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.chk input { width: 15px; height: 15px; margin: 0; flex: none; accent-color: var(--accent); }
.chk span:first-of-type { flex: 1; }
.range { width: 100%; accent-color: var(--accent); }

/* Корзина (US-013, макет RevCart) */
.buy-cart { display: flex; align-items: flex-end; gap: 8px; }
.buy-cart .btn-cart { flex: 1; min-height: 40px; font-size: 14px; }
.qty-label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
/* Счётчик количества на странице товара: «− 1 +» в одной рамке, кнопки — по 38 точек. */
.qty-stepper { display: inline-flex; align-items: stretch; height: 40px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty-step { width: 38px; border: 0; background: #f3f5f9; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.qty-step:hover:not(:disabled) { background: #e7ebf2; }
.qty-step:disabled { color: var(--muted); cursor: default; opacity: .55; }
.qty-step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.qty-stepper .qty-input { width: 52px; height: 100%; border: 0; border-radius: 0; padding: 0; text-align: center; font-size: 16px; font-weight: 600; color: var(--ink); background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty-stepper .qty-input::-webkit-outer-spin-button, .qty-stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper .qty-input:focus { outline: none; }
.qty-stepper:focus-within { border-color: var(--accent); }
.cart-page { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.cart-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; }
.cart-head h1 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); }
.cart-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cart-lines { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cart-summary { flex: 1 1 280px; position: sticky; top: 12px; }
.cart-group { padding: 4px 12px; }
.cart-group-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 140px auto; align-items: center; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.cart-line:last-child { border-bottom: 0; }
.cart-photo { width: 72px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, var(--soft-blue), #f7f9fc); }
.cart-photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-title { font-weight: 600; font-size: 14px; }
.cart-qty { display: flex; align-items: center; gap: 4px; }
.qty-btn { width: 32px; min-height: 32px; padding: 0; }
.qty-value { min-width: 44px; text-align: center; font-weight: 700; }
.cart-sum { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 12px; }
.cart-sum b { font-size: 15px; white-space: nowrap; }
.link-btn { border: 0; background: none; padding: 0; color: var(--link); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.is-gone { opacity: 0.6; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cart-total b { font-family: var(--font-head); font-weight: 800; font-size: 26px; }
.cart-login { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--soft-blue); font-size: 13px; }
.btn-send { min-height: 44px; font-size: 15px; }

/* Подборка по ссылке (US-015, макет RevSelection) */
.sel-head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; padding: 16px 18px; }
.sel-intro { flex: 3 1 420px; min-width: 0; }
.sel-number { font-size: 13px; font-weight: 700; color: var(--link); }
.sel-intro h1 { margin: 4px 0 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); }
.sel-comment { margin: 8px 0 0; max-width: 720px; color: var(--muted, #5b6676); }
.sel-valid { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 8px; background: var(--soft-blue); font-size: 13px; }
.sel-valid b { font-size: 18px; }
.sel-valid.is-recalc { background: #fdf1dc; color: #9a6400; }
.sel-valid.is-recalc b { font-size: 14px; }
.sel-lines { flex: 3 1 560px; min-width: 0; }
.sel-line { display: grid; grid-template-columns: 28px 72px minmax(0, 1fr) auto 140px; align-items: center; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.sel-line:last-child { border-bottom: 0; }
.sel-pick { display: flex; align-items: center; justify-content: center; min-height: 32px; cursor: pointer; }
.sel-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, #4FA3FF); }
.sel-note { margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--accent, #4FA3FF); background: #f7f9fc; font-size: 13px; }
.sel-qty { font-weight: 700; white-space: nowrap; }
.sel-picked { margin: 0; font-size: 13px; color: var(--muted); }
.sel-closed { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sel-closed h1 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); }
.sel-closed p { margin: 0; }

/* Учётная запись покупателя (US-019): как корзина — белая карточка с тёмно-синей полосой */
.auth-page { display: flex; justify-content: center; padding-top: 28px; }
.auth-box { flex: 0 1 420px; }
.auth-wide { flex-basis: 520px; }
.auth-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 8px; background: var(--page); }
.auth-tab { flex: 1; text-align: center; padding: 7px 0; border-radius: 6px; font-weight: 700; color: var(--muted); }
.auth-tab:hover { text-decoration: none; color: var(--ink); }
.auth-tab.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form > label:not(.chk), .auth-form fieldset label, .auth-form .phone-block label:not(.msg-chip) { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 13px; }
.auth-form .grp { display: flex; flex-direction: column; gap: 8px; }
.consent span { font-weight: 400; }
.field-error { color: #b42318; font-size: 12px; font-weight: 600; }
.form-error { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fdecea; color: #b42318; font-size: 13px; font-weight: 600; }
.form-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: #e3f4ea; color: #1d7a45; font-size: 13px; font-weight: 600; }
.email-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.account-link { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* Заявка (US-013, часть 2) */
.textarea { height: auto; padding: 8px 10px; resize: vertical; font: inherit; }
.checkout { gap: 8px; }
.done-number { font-family: var(--font-head); font-weight: 800; font-size: 28px; }
.done-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.done-step { padding: 3px 8px; border-radius: 6px; background: var(--page); }
.done-step.on { background: var(--soft-blue); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.done-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Мои заявки (US-014) */
.my-list { display: flex; flex-direction: column; }
.my-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.my-row:hover { text-decoration: none; background: var(--page); }
.my-sum { text-align: right; }
.my-status { font-size: 13px; font-weight: 700; color: var(--link); }
.my-cancelled { color: #b42318; }
.my-issued { color: var(--muted); }
.my-items { display: flex; flex-direction: column; }
.my-item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.done-step.past { color: var(--ink); }

/* Поиск (US-011) */
.search { position: relative; }
.suggest-box { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; }
.suggest-list { list-style: none; margin: 0; padding: 4px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(19, 26, 38, 0.15); }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; }
.suggest-item:hover, .suggest-item:focus { text-decoration: none; background: var(--page); }
.suggest-item img { border-radius: 4px; object-fit: cover; flex: none; }
.suggest-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.suggest-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-all { display: block; padding: 8px; color: var(--link); font-weight: 600; font-size: 13px; }
.search-page { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.search-block h2 { margin: 0 0 10px; font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.search-block > .muted { margin: -6px 0 10px; font-size: 13px; }
.search-empty { text-align: left; }
.search-empty ul { margin: 6px 0 0; padding-left: 18px; }

/* Подбор по машине (US-010) */
[x-cloak] { display: none !important; }
.pick-form { display: flex; flex-direction: column; gap: 8px; }
.pick-form label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 13px; }
.pick-reset { font-size: 12px; color: var(--link); }
.make-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.make-tile { padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.make-tile:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgba(19, 26, 38, 0.08); }
.make-tile b { font-size: 15px; }
.make-tile .muted { font-size: 12px; }
.carbar-wrap { padding-top: 8px; }
.carbar { background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.carbar-label { color: var(--accent); font-weight: 700; }
.carbar-car { font-size: 15px; }
.carbar-note { margin-left: auto; font-size: 12px; color: #c9d3e1; }
.btn-small { min-height: 30px; padding: 0 12px; font-size: 13px; }
.fit-note { padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.fit-yes { background: #e3f4ea; color: #1d7a45; }
.fit-no { background: #fdf1dc; color: #9a6400; }

@media (max-width: 720px) {
  .cart-line { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-qty, .cart-sum, .cart-remove { grid-column: 2; }
  .cart-sum { align-items: flex-start; text-align: left; }
  .cart-summary { position: static; }
  .sel-line { grid-template-columns: 28px 64px minmax(0, 1fr); }
  .sel-qty, .sel-line .cart-sum { grid-column: 3; }
  .sel-line .cart-sum { align-items: flex-start; text-align: left; }
  .header-row { gap: 10px 12px; }
  .header-row .logo { margin-right: auto; }
  .header-row .search { order: 3; flex-basis: 100%; }
  .header-row .btn { padding: 0 12px; }
  /* На телефоне (вариант Б): название — над фото, производитель, код и описание — под фото, затем цена. */
  .product-top { gap: 12px; }
  .product-info { display: contents; }
  .product-info > * { order: 1; flex: 1 1 100%; }
  .product-info > h1, .product-info > .fit-note { order: -1; }
  .product-top .buy-box { order: 2; }
  .logo img { width: 36px; height: auto; }
  .logo-text { font-size: 22px; }
  .sort-form { margin-left: 0; }
  .cards-list .card { grid-template-columns: 80px minmax(0, 1fr); }
  .cards-list .card-photo { width: 80px; }
  .cards-list .card-title { white-space: normal; }
  .cards-list .card-price { grid-column: 1 / -1; grid-template-columns: auto 1fr; text-align: left; }
  .cards-grid, .cards-home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cards-grid .card { padding: 8px; gap: 6px; }
  .cards-grid .card-title { font-size: 14px; }
  .cards-grid .card-line, .cards-grid .card-variants, .cards-grid .card-lead { font-size: 12px; }
  .cards-grid .price-big { font-size: 19px; }
  .topbar-accent { margin-left: 0; }
  .header-nav { flex-wrap: nowrap; overflow-x: auto; gap: 16px; white-space: nowrap; }
  .gallery { flex-direction: column-reverse; }
  .gallery-thumbs { flex-direction: row; }
}

/* Профиль покупателя: пароль, почта, удаление (US-020) */
.account-more { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; }
.account-more > summary { cursor: pointer; font-weight: 700; color: var(--link); }
.account-more[open] > summary { margin-bottom: 8px; }
.btn-danger { background: #fff; color: #b42318; box-shadow: inset 0 0 0 1px #f0b4b4; }

/* US-012, часть 2: сравнение, пара, «Похожие», «Вы смотрели» */
.card-actions { order: 9; display: flex; gap: 6px; align-items: stretch; margin-top: auto; padding-top: 4px; }
.cards-grid .card-actions .cart-grid { order: 0; margin-top: 0; padding-top: 0; flex: 1 1 auto; }
.cards-list .card-actions { display: none; }
.cards-grid .list-actions { display: none; }
.cards-list .list-actions { display: flex; gap: 6px; align-items: center; }
.cards-list .card-price > .list-actions { grid-column: 2; grid-row: 1 / span 2; }
.btn-compare { min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; }
.btn-compare.is-on { color: var(--link); background: var(--soft-blue); }
.compare-buy .btn-compare { width: 100%; justify-content: center; min-height: 36px; }
/* fixed, а не sticky: у body overflow-x: hidden, sticky от него не работает; отступ снизу — чтобы полоса не закрывала подвал */
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); color: #fff; box-shadow: 0 -6px 18px rgba(19, 26, 38, 0.18); }
.compare-bar[hidden] { display: none; }
body:has(#compare-bar:not([hidden])) { padding-bottom: 56px; }
.compare-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.pair-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.pair-chip { padding: 4px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.pair-chip.is-on { background: var(--soft-blue); border-color: var(--accent); }
a.pair-chip:hover { text-decoration: none; border-color: var(--accent); }
.related { margin-top: 24px; }
.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 10px; }
.mini-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; color: var(--ink); min-width: 0; }
.mini-card:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--accent); }
.mini-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, var(--soft-blue), #f7f9fc); display: flex; align-items: center; justify-content: center; }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-photo .side-badge { left: 4px; top: 4px; padding: 1px 6px; font-size: 11px; }
.mini-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: 15px; }
.mini-title { font-size: 13px; line-height: 18px; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.compare-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 10px; }
.compare-only { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.compare-scroll { overflow-x: auto; padding: 0; }
.compare-table { border-collapse: collapse; min-width: 100%; font-size: 14px; }
.compare-table th, .compare-table td { padding: 8px 10px; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.compare-table tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; width: 1%; }
.compare-table thead th { border-top: 0; }
.compare-head { min-width: 170px; max-width: 260px; font-weight: 500; }
.compare-photo { display: block; aspect-ratio: 4 / 3; max-width: 200px; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, var(--soft-blue), #f7f9fc); margin-bottom: 6px; }
.compare-photo img { width: 100%; height: 100%; object-fit: cover; }
.compare-name { display: block; margin-bottom: 4px; }
.compare-remove .btn { min-height: 28px; padding: 0 8px; font-size: 12px; }
.compare-table tr.is-diff td { background: #fff6e0; }
.compare-price b { font-size: 17px; }

/* Правовые и информационные страницы (US-017) */
.info-page { padding-top: 14px; }
.info-body { max-width: 860px; padding: clamp(16px, 3vw, 32px); line-height: 1.6; }
.info-body h1 { margin: 0 0 12px; font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
.info-body h2 { margin: 22px 0 8px; font-size: 18px; }
.info-body h3 { margin: 16px 0 6px; font-size: 16px; }
.info-body p { margin: 0 0 10px; }
.info-body ul { margin: 0 0 10px; padding-left: 22px; }
.info-body li { margin: 3px 0; }
.footer-col a { color: inherit; }
.topbar-row a { color: inherit; }
.status-row a { color: inherit; text-decoration: underline; }
.not-offer a { color: var(--link); }

/* Плитка ниже (владелец 2026-11-16, вариант «Б»): наличие — в правом углу фото, срок — слева от «В корзину»,
   пустая строка вариантов не держит место (кнопки и так прижаты к низу карточки). */
.cards .card { position: relative; }
.card-flag { display: none; }
.cards-grid .card-flag { display: block; position: absolute; top: 20px; right: 20px; z-index: 1; pointer-events: none; }
.cards-grid .card-flag .stock { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; line-height: 18px; box-shadow: 0 1px 2px rgba(19, 26, 38, 0.12); }
.cards-grid .card-status, .cards-grid .card-variants.is-empty { display: none; }
.card-due { display: none; }
.cards-grid .card-actions { align-self: stretch; align-items: center; }  /* строка во всю ширину: срок слева, кнопка у правого края */
.cards-grid .card-due { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; margin-right: auto; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards-grid .card-due svg { flex: none; }
.cards-grid .card-actions .cart-grid { flex: 0 0 auto; }
.cards-grid .btn-cart { padding-left: 14px; padding-right: 14px; }
@media (max-width: 720px) {
  /* Телефон: две карточки в ряд — срок своей строкой над кнопкой. */
  /* Узкое фото: метка стороны или «Комплект» занимает верх — наличие в правом нижнем углу фото (фото 4:3 во всю ширину). */
  .cards-grid .card { container-type: inline-size; }
  .cards-grid .card-flag { top: calc(8px + 100cqw * 0.75 - 26px); right: 14px; }
  .cards-grid .card-flag .stock { padding: 1px 6px; font-size: 11px; }
  .cards-grid .card-actions { flex-wrap: wrap; }
  .cards-grid .card-due { flex: 1 1 100%; font-size: 12px; }
  .cards-grid .card-actions .cart-grid { flex: 1 1 auto; }
}

/* «В корзину» — анимация нажатия (владелец 2026-11-16): кнопка проседает, затем на 1,6 с зелёная «✓ Добавлено»,
   счётчик корзины в шапке подпрыгивает (htmx держит класс htmx-added, пока идёт settle). */
.btn-cart { position: relative; overflow: hidden; transition: transform 0.08s ease, background-color 0.2s ease, color 0.2s ease; }
.btn-cart:active:not(:disabled) { transform: translateY(1px) scale(0.96); }
.btn-cart { display: inline-grid; place-items: center; }  /* обе надписи в одной клетке — кнопка по ширине более длинной */
.btn-cart .cart-label, .btn-cart .cart-done { grid-area: 1 / 1; }
.btn-cart .cart-done { display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; transform: translateY(60%); transition: opacity 0.2s ease, transform 0.2s ease; }
.btn-cart .cart-label { transition: opacity 0.15s ease, transform 0.2s ease; }
.btn-cart.is-added { background: #1d7a45; color: #fff; animation: cart-pop 0.35s ease; }
.btn-cart.is-added .cart-label { opacity: 0; transform: translateY(-60%); }
.btn-cart.is-added .cart-done { opacity: 1; transform: none; }
#cart-count.htmx-added { animation: cart-bump 0.6s ease; }
@keyframes cart-pop { 0% { transform: scale(0.96); } 55% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes cart-bump { 0% { transform: scale(1); } 30% { transform: scale(1.18); box-shadow: inset 0 0 0 2px var(--accent); } 60% { transform: scale(0.96); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .btn-cart, .btn-cart .cart-label, .btn-cart .cart-done { transition: none; }
  .btn-cart:active:not(:disabled) { transform: none; }
  .btn-cart.is-added, #cart-count.htmx-added { animation: none; }
}

/* Карточка без «В корзину» (владелец 2026-11-16): вся карточка — ссылка на товар (растянутая ссылка названия). */
.cards .card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.cards .card-title a:focus-visible { outline: none; }
.cards .card:has(.card-title a:focus-visible) { box-shadow: 0 0 0 2px var(--accent); }
.cards-list .card-price { grid-template-columns: auto; }

/* Шапка (владелец 2026-11-16): поиск уже, у корзины запас под большое число; корзина — тёмно-синяя (цвет бренда). */
.header-row .search { max-width: 560px; }
.btn-head-cart { margin-left: auto; min-width: 150px; gap: 7px; background: var(--ink); color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35); }
.btn-head-cart:hover { color: #fff; }
.head-cart-count { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 12px; line-height: 20px; text-align: center; }
@media (max-width: 720px) {
  .btn-head-cart { margin-left: 0; min-width: 0; }
}

/* Наличие — внизу карточки справа, напротив срока (владелец 2026-11-16); не помещается в узкой карточке — переносится строкой ниже. */
.cards-grid .card-flag { position: static; margin-left: auto; }
.cards-grid .card-actions { flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.cards-grid .card-due { flex: 0 1 auto; margin-right: 0; }
@media (max-width: 720px) {
  .cards-grid .card-flag { top: auto; right: auto; flex: 1 1 100%; text-align: right; }  /* на телефоне — всегда своей строкой, одинаково во всех карточках */
  .cards-grid .card-due { flex: 0 1 auto; }
}

/* Подбор по автомобилю на главной — уже (владелец 2026-11-16). */
.pick-box { flex: 0 1 440px; }  /* чуть шире (владелец 2026-11-16, по отметке на снимке) */

/* Шапка чуть выше, логотип и название крупнее (владелец 2026-11-16). */
.site-header .header-row { padding-top: 14px; padding-bottom: 14px; }
.site-header .logo { gap: 10px; }
.site-header .logo img { width: 52px; height: auto; }
.site-header .logo-text { font-size: 30px; line-height: 1; }
@media (max-width: 720px) {
  .site-header .header-row { padding-top: 10px; padding-bottom: 10px; }
  .site-header .logo img { width: 42px; }
  .site-header .logo-text { font-size: 25px; }
}

/* BUG-005: телефон — фильтры за кнопкой (C-02), полоса цены внизу экрана товара (C-03). На компьютере — как раньше. */
.filters-toggle, .buy-bar { display: none; }
.filters-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 12px; line-height: 20px; text-align: center; }
@media (max-width: 720px) {
  .filters-toggle { display: inline-flex; flex: 1 1 100%; }
  .catalog-aside { display: none; }
  .catalog-aside.is-open { display: flex; }
  .buy-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; padding: 8px 16px;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(19, 26, 38, 0.12);
  }
  .buy-bar-price { display: flex; flex-direction: column; min-width: 0; }
  .buy-bar-price b { font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.1; white-space: nowrap; }
  .buy-bar-price span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buy-bar .cart-wrap { flex: 0 0 auto; }
  .buy-bar .btn-cart { min-height: 40px; padding: 0 18px; font-size: 15px; }
  body:has(.buy-bar) { padding-bottom: 64px; }
  /* Полоса сравнения тоже внизу — цена поднимается над ней. */
  body:has(#compare-bar:not([hidden])) .buy-bar { bottom: 56px; }
  body:has(.buy-bar):has(#compare-bar:not([hidden])) { padding-bottom: 120px; }
}

/* Телефоны и мессенджеры (US-034): отметки «где удобно писать» — капсулы под номером. */
.phone-block { display: flex; flex-direction: column; gap: 6px; }
.msg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.msg-chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; user-select: none; background: #fff; }
.msg-chip input { margin: 0; accent-color: var(--ink); }
.msg-chip:has(input:checked) { border-color: var(--accent); background: #eef6ff; }
.msg-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.msg-hint { margin: 0; font-size: 12px; }
.phone-second { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.phone-add { align-self: flex-start; }
.phone-second[hidden], .phone-add[hidden] { display: none; }
