/* Главная: шапка, поиск, быстрые фильтры, карточки. Дополняет style.css. */

.logo { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.topbar .fx { font-size: 12px; }
.select-compact { width: auto; padding: 6px 8px; }
.count-badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }

/* Hero */
.hero {
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(35, 87, 217, 0.18), transparent 60%),
    radial-gradient(900px 300px at 100% 0%, rgba(255, 140, 60, 0.14), transparent 60%),
    var(--panel);
  border-bottom: 1px solid var(--line);
}
.hero__inner { max-width: 1180px; margin: 0 auto; padding: 36px 20px 22px; }
.hero h1 { font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -0.02em; max-width: 760px; }
.hero__sub { color: var(--muted); font-size: 16px; max-width: 680px; margin: 10px 0 22px; }

.searchbar {
  display: grid; grid-template-columns: 1.3fr 1.6fr 0.8fr 0.9fr auto; gap: 0; align-items: stretch;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(16, 24, 40, 0.10);
  overflow: hidden;
}
.searchbar__field { display: flex; flex-direction: column; padding: 8px 14px; border-right: 1px solid var(--line); min-width: 0; }
.searchbar__field label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.searchbar__field select, .searchbar__field input { border: none; padding: 4px 0 2px; font-size: 16px; font-weight: 600; background: transparent; }
.searchbar__field select:focus, .searchbar__field input:focus { outline: none; }
.searchbar__field:focus-within { background: var(--bg); }
.btn--lg { padding: 0 30px; font-size: 16px; font-weight: 700; border-radius: 0; }
@media (max-width: 860px) {
  .searchbar { grid-template-columns: 1fr 1fr; }
  .searchbar__field { border-bottom: 1px solid var(--line); }
  .btn--lg { grid-column: 1 / -1; padding: 14px; }
  .hero__inner { padding: 22px 16px 16px; }
}

.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bchip, .qchip {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 6px 14px;
  cursor: pointer; font-size: 13px; transition: border-color 0.15s, background 0.15s;
}
.bchip:hover, .qchip:hover { border-color: var(--accent); }
.bchip.on, .qchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Контент */
.page { max-width: 1180px; margin: 0 auto; padding: 18px 20px 90px; }
@media (max-width: 860px) { .page { padding: 14px 16px 90px; } }
.quickbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.qchip { padding: 5px 12px; font-size: 12.5px; }
.btn--ghost { background: transparent; }

.more-filters { margin-bottom: 16px; }
.more-filters__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .more-filters__grid { grid-template-columns: 1fr; } }
.model-pickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 860px) { .model-pickers { grid-template-columns: 1fr; } }
.picker { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.results-head__right { display: flex; gap: 12px; align-items: center; }
.summary { color: var(--muted); }
.summary b { color: var(--ink); }
.tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.tab { border: none; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tab span { font-weight: 400; opacity: 0.8; margin-left: 2px; }
.tab.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.sources-status { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; min-height: 24px; }

/* Карточки */
.grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12); }
.card:focus-visible { outline: 2px solid var(--accent); }
.card__src { background: rgba(255, 255, 255, 0.92) !important; color: #1b1f27; backdrop-filter: blur(4px); }
.card__badge {
  position: absolute; left: 8px; bottom: 8px; background: #12805c; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.card__fav {
  position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: #1b1f27; font-size: 18px; font-weight: 700; line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); transition: transform 0.12s;
}
.card__fav:hover { transform: scale(1.08); }
.card__fav.on { background: var(--accent); color: #fff; }
.card__price { font-size: 20px; font-weight: 800; margin: 0; padding: 0; letter-spacing: -0.01em; }
.card__price-src { color: var(--muted); font-size: 12px; margin-top: -2px; }
.card__title { font-weight: 500; font-size: 13.5px; margin-top: 4px; }
.card__facts { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.card__facts span:not(:last-child)::after { content: '·'; margin-left: 6px; }

/* Скелетоны */
.card--skeleton { pointer-events: none; }
.card--skeleton .card__img, .card--skeleton i {
  background: linear-gradient(90deg, var(--bg) 0%, var(--line) 50%, var(--bg) 100%); background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
.card--skeleton i { display: block; height: 12px; border-radius: 6px; margin: 6px 0; }
.card--skeleton i:first-child { height: 20px; width: 55%; }
.card--skeleton i.short { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.how__item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.how__item span { color: var(--muted); }
@media (max-width: 700px) { .how { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .card, .card__fav { transition: none; }
  .card--skeleton .card__img, .card--skeleton i { animation: none; }
}

/* Телефон: машины должны быть видны с первого экрана */
@media (max-width: 700px) {
  .topbar { gap: 10px; padding: 10px 16px; }
  .topbar .fx { display: none; }
  .hero__inner { padding: 16px 16px 12px; }
  .hero h1 { font-size: 22px; }
  .hero__sub { font-size: 14px; margin: 6px 0 14px; }
  .brand-chips, .quick {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px;
  }
  .brand-chips::-webkit-scrollbar, .quick::-webkit-scrollbar { display: none; }
  .bchip, .qchip { flex: none; }
  .brand-chips { margin-top: 12px; }
  .quickbar { display: block; }
  .quickbar > .btn { margin-top: 8px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__price { font-size: 17px; }
  .card__body { padding: 8px 10px 10px; }
  .results-head__right { width: 100%; justify-content: space-between; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
  .tab { flex: none; }
}

/* Недавние поиски */
.recent { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-width: 0; }
.recent__label { color: var(--muted); font-size: 12px; flex: none; }
.recent__list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.recent__list::-webkit-scrollbar { display: none; }
.rchip {
  flex: none; border: 1px dashed var(--line); background: transparent; color: var(--ink); border-radius: 8px;
  padding: 4px 10px; font-size: 12.5px; cursor: pointer;
}
.rchip:hover { border-color: var(--accent); border-style: solid; }

/* Карточка автомобиля */
body.no-scroll { overflow: hidden; }
.modal__nav { display: flex; align-items: center; gap: 10px; margin: 0 110px 14px 0; }
.modal__nav .muted { font-size: 13px; }
.gallery { position: relative; }
.gallery__main { cursor: zoom-in; background-color: #0d0f12; }
.gallery__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.9); color: #1b1f27; font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.gallery__arrow--prev { left: 10px; }
.gallery__arrow--next { right: 10px; }
.gallery__count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px;
  padding: 2px 8px; border-radius: 6px;
}
.quick-facts { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.quick-facts span {
  display: flex; flex-direction: column; background: var(--bg); border-radius: 8px; padding: 6px 12px;
  font-size: 11px; color: var(--muted);
}
.quick-facts b { color: var(--ink); font-size: 14px; }
.detail__actions { margin: 10px 0; flex-wrap: wrap; }
.modal__bar { display: none; }

@media (max-width: 800px) {
  .modal { padding: 0; }
  .modal__box { border-radius: 0; min-height: 100%; padding: 12px 12px 90px; }
  .modal__nav { margin-right: 90px; }
  .modal__nav .btn { padding: 4px 8px; }
  .gallery__main { border-radius: 8px; }
  .gallery__arrow { width: 34px; height: 34px; font-size: 20px; }
  .detail__actions .js-draft { display: none; }
  .modal__bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; justify-content: space-between; align-items: center;
    gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  }
  .modal__bar div { display: flex; flex-direction: column; }
  .modal__bar b { font-size: 18px; }
  .modal__bar .muted { font-size: 12px; }
}

/* Под ключ и рынок */
.card__price-label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.card__price--pending { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; gap: 6px; align-items: center; min-height: 38px; }
.mbadge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--bg); color: var(--muted); }
.mbadge--good { background: rgba(18, 128, 92, 0.14); color: var(--ok); }
.mbadge--high { background: rgba(192, 54, 44, 0.1); color: var(--bad); }
.mbadge--risk { background: rgba(181, 71, 8, 0.14); color: var(--warn); }
.calc__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.calc__head h3 { margin: 0; }
.calc__hp { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.calc__hp input { width: 80px; padding: 4px 8px; }
.calc__table { width: 100%; border-collapse: collapse; }
.calc__table td { padding: 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.calc__table td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; }
.calc__table td .muted { font-size: 11.5px; }
.calc__total td { font-weight: 800; font-size: 15px; border-bottom: none; padding-top: 8px; }
.calc__notes { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; }
.calc__foot { font-size: 11.5px; margin-top: 6px; }
.market h3 { margin-bottom: 4px; }
.market .muted { font-size: 12.5px; margin-top: 2px; }

.settings { max-width: 680px; }
.settings h2 { margin-bottom: 6px; }
.settings__table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.settings__table th { font-size: 12px; text-align: left; color: var(--muted); padding: 4px; }
.settings__table td { padding: 6px 4px; vertical-align: top; }
.settings__table td:first-child { font-size: 13px; width: 38%; }
.settings__table .muted { font-size: 11px; }
.settings__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .settings__grid { grid-template-columns: 1fr; } .settings__table td:first-child { width: auto; } }

@media (max-width: 700px) {
  .topbar nav { gap: 6px; }
  .topbar .btn, .select-compact { padding: 6px 8px; }
  #settingsBtn { font-size: 0; }
  #settingsBtn::before { content: '⚙'; font-size: 16px; }
  .logo { font-size: 16px; }
  .settings__table { table-layout: fixed; }
  .settings__table td:first-child { width: 34%; font-size: 12px; }
  .settings__table input { min-width: 0; padding: 6px; }
  .settings__table th { font-size: 11px; }
}
@media (max-width: 700px) {
  .results-head__right { flex-wrap: wrap; gap: 8px; }
  .results-head__right .summary { width: 100%; }
  .results-head__right select { flex: 1; min-width: 0; }
  .tray { max-width: calc(100% - 24px); gap: 8px; padding: 8px 10px; }
}
.tray span { white-space: nowrap; }
@media (max-width: 700px) { .tray .btn { padding: 6px 10px; font-size: 13px; } }

/* ===== Панель фильтров ===== */
.searchbar { grid-template-columns: 1fr 1.4fr auto; max-width: 820px; }
@media (max-width: 860px) { .searchbar { grid-template-columns: 1fr 1fr; } }

.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.fitem { position: relative; }
.fpill {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink);
  cursor: pointer; font-size: 13.5px; box-shadow: var(--shadow); transition: border-color 0.15s, background 0.15s;
}
.fpill:hover { border-color: var(--muted); }
.fpill__label { color: var(--muted); }
.fpill__value { font-weight: 600; }
.fpill__value:empty { display: none; }
.fpill__caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.55; margin-left: 2px; transition: transform 0.15s; }
.fpill[aria-expanded="true"] { border-color: var(--accent); }
.fpill[aria-expanded="true"] .fpill__caret { transform: rotate(-135deg) translateY(-2px); }
.fpill.on { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.fpill.on .fpill__label { color: var(--accent); }

.fpop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 15; width: 340px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
}
.fpop--wide { width: 560px; }
.fitem:last-child .fpop { left: auto; right: 0; }
.fpop__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fpop__x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px; }
.fpop__presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fchip {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 6px 10px;
  font-size: 13px; cursor: pointer;
}
.fchip:hover { border-color: var(--accent); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fpop__range { display: flex; align-items: center; gap: 8px; }
.fpop__range input { flex: 1; min-width: 0; }
.fpop__pre, .fpop__post { color: var(--muted); font-size: 13px; }
.fpop__hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; line-height: 1.4; }
.fpop__hint:empty { display: none; }
.fpop__checks { display: flex; flex-direction: column; gap: 4px; }
.fpop__checks label { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.fpop__checks label:hover { background: var(--bg); }
.fpop__checks input { width: 16px; height: 16px; }
.fpop__checks .muted { margin-left: auto; font-size: 12px; }
.fpop__actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fpop .model-pickers { grid-template-columns: 1fr; }
.fpop-backdrop { display: none; }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.achip {
  display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px; padding: 5px 8px 5px 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--ink); font-size: 12.5px; cursor: pointer;
}
.achip span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 22%, transparent); font-size: 10px; }
.achip:hover span { background: var(--accent); color: var(--accent-ink); }
.achip--reset { background: transparent; color: var(--accent); text-decoration: underline; padding-left: 6px; }

/* Телефон: окошко фильтра снизу экрана, панель кнопок прокручивается */
@media (max-width: 700px) {
  .filterbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 10px; padding: 2px 16px; }
  .filterbar::-webkit-scrollbar { display: none; }
  .fitem { position: static; flex: none; }
  .fpill { height: 36px; padding: 0 10px 0 12px; }
  .fpop, .fpop--wide {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 80vh; overflow-y: auto;
    border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  }
  .fpop-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; background: rgba(10, 12, 16, 0.45); z-index: 29; }
  .fchip { padding: 8px 12px; font-size: 14px; }
  .fpop__range input { font-size: 16px; }
}

/* ===== Модель: поле с поиском ===== */
.combo { position: relative; }
.combo input { border: none; padding: 4px 0 2px; font-size: 16px; font-weight: 600; background: transparent; width: 100%; }
.combo input:focus { outline: none; }
.combo input::placeholder { color: var(--ink); opacity: 0.9; font-weight: 600; }
.combo input:disabled::placeholder { color: var(--muted); font-weight: 500; }
.combo::after {
  content: ''; position: absolute; right: 16px; bottom: 16px; width: 7px; height: 7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.searchbar { overflow: visible; }
.searchbar__field:first-child { border-radius: 14px 0 0 14px; }
.combo__list {
  position: absolute; left: -1px; top: calc(100% + 6px); z-index: 20; width: min(520px, 92vw); max-height: 420px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(16, 24, 40, 0.2); padding: 6px;
}
.combo__hint { font-size: 11.5px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.combo__opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combo__opt.active { background: var(--bg); }
.combo__opt.selected b { color: var(--accent); }
.combo__main { display: flex; flex-direction: column; min-width: 0; }
.combo__main b { font-size: 14px; font-weight: 600; }
.combo__local { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo__where { display: flex; gap: 4px; align-items: center; flex: none; font-size: 11.5px; }
.combo__tag { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.combo__count { color: var(--muted); margin-left: 4px; min-width: 34px; text-align: right; }
.combo__empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 700px) {
  .searchbar { position: relative; }
  .combo { position: static; }
  .combo::after { display: none; }
  .combo__list { left: 0; right: 0; top: calc(100% + 6px); width: auto; max-height: 55vh; }
  .combo__tag { padding: 1px 4px; }
  .combo__tag-name { display: none; }
}
.orig-title { font-size: 12px; margin-bottom: 8px; overflow-wrap: anywhere; }

/* Подфильтр списка моделей: страны и семейства */
.combo__list { padding: 0 6px 6px; }
.combo__countries {
  position: sticky; top: 0; z-index: 1; display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 4px 6px; background: var(--panel);
}
.combo__ctab { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.combo__ctab:hover { border-color: var(--accent); }
.combo__ctab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.combo__fam b { display: inline-flex; align-items: center; gap: 6px; }
.combo__chev { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
.combo__chev.open { transform: rotate(45deg); }
.combo__fam[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.combo__child { padding-left: 28px; border-left: 2px solid var(--line); margin-left: 12px; border-radius: 0 8px 8px 0; }

.combo__section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 12px 10px 4px; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 6px 8px; border-radius: 7px; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg input:checked + span { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.card__trim { font-size: 12.5px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__trim span, .detail__trim span { color: var(--muted); }
.detail__trim { font-size: 14px; margin-bottom: 4px; }

/* ===== Комплектация ===== */
.searchbar { grid-template-columns: 1fr 1.25fr 1.25fr auto; max-width: 1000px; }
#trimInput { cursor: pointer; text-overflow: ellipsis; }
#trimInput:disabled { cursor: default; }
.combo__list--trim { width: min(560px, 92vw); padding: 0; display: flex; flex-direction: column; max-height: 480px; overflow: hidden; }
.trim__top { padding: 10px 10px 4px; border-bottom: 1px solid var(--line); }
.trim__top input { width: 100%; }
.trim__top .combo__hint { border: none; padding: 6px 2px 4px; margin: 0; }
.trim__items { overflow-y: auto; padding: 0 6px 6px; flex: 1; }
.trim__opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.trim__opt:hover { background: var(--bg); }
.trim__opt input { width: 16px; height: 16px; flex: none; }
.trim__opt .combo__main { flex: 1; }
.trim__count { color: var(--muted); font-size: 12px; flex: none; }
.trim__actions { display: flex; justify-content: space-between; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--panel); }
@media (max-width: 860px) {
  .searchbar { grid-template-columns: 1fr 1fr; }
  #trimCombo { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .combo__list--trim { left: 0; right: 0; width: auto; max-height: 65vh; }
}

.trim__code { align-self: flex-start; width: max-content; text-transform: none; margin: 2px 0; font-size: 11px; font-weight: 600; color: var(--accent, #4f7cff); background: color-mix(in srgb, currentColor 12%, transparent); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
