/* Витрина: главная, каталог, карточка и страница машины, сравнение, избранное, заявка.
   Сначала 360 px, затем шире. Акцент — var(--brand); токены — common/storefront.css. */
.storefront h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
.storefront h3 { font-size: 1rem; margin: 0; }
.storefront .pre { white-space: pre-line; }
.storefront [hidden] { display: none !important; }

/* --- Общие элементы ------------------------------------------------------------------------- */
.storefront .button { min-height: var(--tap); border-radius: var(--radius-cta); font-weight: 720; padding: 0 20px; }
.storefront .button.btn-lg { min-height: 50px; padding: 0 24px; font-size: .95rem; }
.storefront .button-outline { background: var(--card) !important; border-color: var(--input) !important; }
.storefront .button-outline:hover { filter: none; background: var(--secondary) !important; border-color: color-mix(in srgb, var(--foreground) 30%, var(--input)) !important; }
.storefront .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

.page-head { margin: 4px 0 20px; }
.page-head h1 { margin-bottom: 8px; }
.page-lead { margin: 0; max-width: 60ch; color: var(--muted-foreground); font-size: 1rem; line-height: 1.6; }

.back-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); margin: -6px 0 6px -6px; padding: 0 10px 0 4px;
  border-radius: 999px; color: var(--muted-foreground); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.back-link .icon { width: 18px; height: 18px; }
.back-link:hover { color: var(--foreground); background: var(--accent); }

.chip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap); padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--secondary); color: var(--foreground);
  font-weight: 700; font-size: .84rem; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip-btn .icon { width: 16px; height: 16px; }
.chip-btn:hover { background: var(--accent); border-color: var(--input); }
.chip-btn:active { transform: translateY(1px); }
.chip-btn[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.chip-btn[data-fav][aria-pressed="true"] .icon { fill: var(--fav); color: var(--fav); }
.chip-btn .t-on, .chip-btn[aria-pressed="true"] .t-off { display: none; }
.chip-btn[aria-pressed="true"] .t-on { display: inline; }

.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid var(--glass-line); border-radius: 50%; background: rgb(255 255 255 / 80%); color: var(--foreground);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer;
  box-shadow: 0 4px 14px -6px rgb(30 20 12 / 35%); transition: transform .15s, background-color .15s, color .15s;
}
.fav-btn .icon { width: 20px; height: 20px; }
.fav-btn:hover { transform: scale(1.06); background: #fff; }
.fav-btn:active { transform: scale(.94); }
.fav-btn[aria-pressed="true"] { color: var(--fav); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }

/* Строка состояния с точкой */
.car-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; font-weight: 720; color: var(--live); }
.car-status.is-auction { color: var(--auction); }
.car-status.is-sold { color: var(--sold); }
.car-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.is-live > .car-dot::after, .is-auction > .car-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: sf-pulse 2.2s ease-out infinite;
}
@keyframes sf-pulse { 0% { transform: scale(1); opacity: .5; } 75%, 100% { transform: scale(2.8); opacity: 0; } }

/* Метки на фото */
.label {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 88%); color: var(--foreground); font-size: .74rem; font-weight: 800; line-height: 1.2;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 2px 8px -4px rgb(30 20 12 / 30%);
}
.label .icon { width: 13px; height: 13px; }
.label-new { color: var(--live); }
.label-drop { color: #b4400b; }
.label-sold { background: var(--sold); color: #fff; }

/* --- Карточка машины ------------------------------------------------------------------------ */
.car-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.car-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); border-color: #d6cfc5; }
.car-card:has(.car-card-link:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; }
.car-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; border-radius: 22px 22px 0 0; }
.car-card-link:focus-visible { outline: none; }
.car-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 21px 21px 0 0; background: #e8e2d9; }
.car-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.car-card:hover .car-photo img { transform: scale(1.035); }
.car-labels { position: absolute; left: 12px; top: 12px; right: 64px; display: flex; flex-wrap: wrap; gap: 6px; }
.car-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 14px; }
.car-title { margin: 2px 0 0; font-size: 1.12rem; font-weight: 720; line-height: 1.28; letter-spacing: -.02em; overflow-wrap: anywhere; }
.car-line { margin: 0; color: var(--muted-foreground); font-size: .84rem; line-height: 1.5; }
.car-price-block { margin-top: auto; padding-top: 10px; }
.car-price {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0;
  font-size: 1.55rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.15;
}
.car-price-note { font-size: .78rem; font-weight: 650; letter-spacing: 0; color: var(--muted-foreground); }
.car-price-request { font-size: 1.2rem; letter-spacing: -.02em; }
.car-price-sub { margin: 4px 0 0; font-size: .78rem; color: var(--muted-foreground); }
.car-price-sold { margin: auto 0 0; padding-top: 10px; font-size: .86rem; font-weight: 650; color: var(--muted-foreground); }
.car-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 18px; padding: 12px 0 16px; border-top: 1px solid #ece6de; }
.car-actions .chip-btn { flex: 1 1 auto; }
.chip-ask { background: transparent; }
.car-card.is-sold .car-photo img { filter: grayscale(.85); opacity: .8; }
.car-card.is-sold:hover { transform: none; }

.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.card-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 320px); gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none;
  margin: 0 -16px; padding: 4px 16px 20px;
}
.card-row::-webkit-scrollbar { display: none; }
.card-row > .car-card { scroll-snap-align: start; }

/* --- Главная -------------------------------------------------------------------------------- */
/* Первый экран: тёплое стекло, медленно плывущие пятна цвета бренда, точечная сетка, поиск с
   бегущим кантом и лента свежих машин. Движение отключается при prefers-reduced-motion. */
@property --hero-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.sf-hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 22px; padding: 28px 18px 18px;
  border: 1px solid var(--glass-line); border-radius: 30px;
  background: linear-gradient(160deg, #fdfaf5 0%, #f4ece1 55%, #efe5d8 100%);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 90%), 0 40px 80px -48px rgb(60 38 22 / 50%);
}
.hero-aura { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero-aura i { position: absolute; display: block; border-radius: 50%; filter: blur(64px); opacity: .55; will-change: transform; }
.hero-aura i:nth-child(1) {
  width: 520px; height: 520px; top: -220px; right: -120px;
  background: color-mix(in srgb, var(--brand) 55%, #fff); animation: hero-drift-a 22s ease-in-out infinite alternate;
}
.hero-aura i:nth-child(2) {
  width: 460px; height: 460px; bottom: -240px; left: -140px;
  background: #e7c9a1; animation: hero-drift-b 26s ease-in-out infinite alternate;
}
.hero-aura i:nth-child(3) {
  width: 340px; height: 340px; top: 30%; left: 38%;
  background: color-mix(in srgb, var(--brand) 25%, #f6d9c4); opacity: .4; animation: hero-drift-c 30s ease-in-out infinite alternate;
}
@keyframes hero-drift-a { to { transform: translate(-90px, 70px) scale(1.12); } }
@keyframes hero-drift-b { to { transform: translate(110px, -60px) scale(1.08); } }
@keyframes hero-drift-c { to { transform: translate(-120px, -40px) scale(.9); } }
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgb(70 48 28 / 16%) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 75% 20%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 80% at 75% 20%, #000, transparent 70%);
}
.sf-hero-copy > *, .ask-form, .hero-ticker { animation: hero-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.sf-hero-copy > :nth-child(2) { animation-delay: .06s; }
.sf-hero-copy > :nth-child(3) { animation-delay: .12s; }
.sf-hero-copy > :nth-child(4) { animation-delay: .18s; }
.ask-form { animation-delay: .22s; }
.hero-ticker { animation-delay: .32s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } }

.sf-hero h1 {
  margin: 0 0 14px; font-size: clamp(2.3rem, 1.2rem + 4.4vw, 4.4rem); line-height: .98; letter-spacing: -.055em; overflow-wrap: anywhere;
  color: var(--foreground);
  background: linear-gradient(105deg, var(--foreground) 35%, color-mix(in srgb, var(--brand) 75%, var(--foreground)) 70%, var(--foreground) 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: hero-rise .7s cubic-bezier(.2, .7, .2, 1) both .06s, hero-sheen 9s ease-in-out 1s infinite;
}
@keyframes hero-sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.sf-hero .page-lead { color: #5d554c; font-size: 1.02rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 0 16px; padding: 6px 12px;
  border: 1px solid var(--glass-line); border-radius: 999px; background: rgb(255 255 255 / 72%);
  color: var(--brand-ink); font-size: .78rem; font-weight: 800;
  box-shadow: 0 6px 16px -10px rgb(60 38 22 / 40%);
}
.eyebrow .icon { width: 15px; height: 15px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.hero-facts li { display: grid; align-content: start; gap: 2px; min-width: 0; }
.hero-facts li + li { padding-left: 12px; border-left: 1px solid rgb(90 64 40 / 14%); }
.hero-facts strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--foreground); }
.hero-facts span { color: var(--muted-foreground); font-size: .72rem; font-weight: 600; line-height: 1.3; }

.ask-form {
  position: relative; padding: 16px; border-radius: 24px; border: 1px solid rgb(255 255 255 / 85%);
  background: rgb(255 255 255 / 64%); backdrop-filter: blur(16px) saturate(1.35); -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 95%), 0 24px 50px -28px rgb(60 38 22 / 45%);
}
/* бегущий кант по краю поиска */
.ask-form::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--hero-angle), transparent 0 55%, color-mix(in srgb, var(--brand) 70%, transparent) 72%, #f1c89a 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: hero-spin 7s linear infinite;
}
.ask-form:focus-within::before { animation-duration: 2.6s; }
@keyframes hero-spin { to { --hero-angle: 360deg; } }
.ask-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 780; font-size: .95rem; }
.ask-label .icon { width: 18px; height: 18px; color: var(--brand); }
.ask-row { display: grid; gap: 8px; }
.ask-input > input {
  min-height: 54px; border-radius: 16px; font-size: 1rem; background: #fff;
  transition: box-shadow .2s, border-color .2s;
}
.ask-input > input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.ask-input > .icon { color: var(--muted-foreground); }
.ask-row .button { width: 100%; min-height: 54px; border-radius: 16px; gap: 8px; }
.ask-row .button .icon { transition: transform .18s; }
.ask-row .button:hover .icon { transform: translateX(3px); }
.ask-chips { display: flex; gap: 6px; margin: 12px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.ask-chips::-webkit-scrollbar { display: none; }
.ask-chip { flex: none; }
.ask-chip {
  min-height: 34px; padding: 0 12px; border: 1px solid rgb(90 64 40 / 14%); border-radius: 999px;
  background: rgb(255 255 255 / 70%); color: var(--foreground); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.ask-chip:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); transform: translateY(-1px); }
.ask-hint { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--muted-foreground); font-size: .8rem; }
.ask-live { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.ask-live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--live); opacity: .35; animation: hero-pulse 2s ease-out infinite; }
@keyframes hero-pulse { from { transform: scale(.5); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }

/* лента свежих машин */
.hero-ticker {
  grid-column: 1 / -1; margin: 6px -18px -6px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; gap: 10px; width: max-content; margin: 0; padding: 4px 0; list-style: none; animation: hero-ticker 60s linear infinite; }
.hero-ticker:hover .ticker-track, .hero-ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes hero-ticker { to { transform: translateX(calc(-50% - 5px)); } }
.ticker-track a {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 80%); background: rgb(255 255 255 / 62%); color: var(--foreground); text-decoration: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .15s, transform .15s;
}
.ticker-track a:hover { background: #fff; transform: translateY(-2px); }
.ticker-track img { width: 72px; height: 48px; object-fit: cover; border-radius: 11px; background: #e9e1d6; }
.ticker-text { display: grid; gap: 1px; min-width: 0; }
.ticker-title { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 700; }
.ticker-price { font-size: .8rem; font-weight: 800; color: var(--brand-ink); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .hero-aura i, .sf-hero h1, .sf-hero-copy > *, .ask-form, .ask-form::before, .hero-ticker, .ask-live::after { animation: none !important; }
  .hero-ticker { overflow-x: auto; scrollbar-width: none; }
  .ticker-track { animation: none; }
}

.home-block { margin: 36px 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -.03em; }
.block-tools { display: flex; align-items: center; gap: 6px; }
.block-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 6px;
  color: var(--foreground); font-weight: 720; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.block-link .icon { width: 16px; height: 16px; transition: transform .15s; }
.block-link:hover { color: var(--brand-ink); }
.block-link:hover .icon { transform: translateX(3px); }
.rail-btn {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--foreground); cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
.rail-btn .icon { width: 18px; height: 18px; }
.rail-btn:hover { background: var(--secondary); }
.rail-btn:disabled { opacity: .4; cursor: default; }

/* Плитки стран: знак площадки, откуда берутся машины, число машин и переход в каталог */
.country-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.country-tile {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "plat plat" "name more";
  align-items: end; gap: 14px 12px; min-height: 68px; padding: 14px 16px;
  border: 1px solid var(--card-border); border-radius: 22px; background: var(--card); box-shadow: var(--card-shadow);
  color: var(--foreground); text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.platforms { grid-area: plat; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.platform {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 14px;
  font-weight: 900; font-size: 1.3rem; letter-spacing: -.035em; line-height: 1; white-space: nowrap;
  transition: transform .2s;
}
.platform-encar { background: #fdeeec; color: #d9261c; text-transform: lowercase; }
.platform-che168 { background: #fff2e5; color: #ef6c00; }
.platform-copart { background: #e9f0fa; color: #0c4a9c; box-shadow: inset 0 -3px 0 #f5b800; }
.platform-iaai { background: #fbecef; color: #b3122f; font-size: 1.05rem; }
.country-name { grid-area: name; display: grid; gap: 2px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.025em; }
.country-name small { color: var(--muted-foreground); font-size: .78rem; font-weight: 650; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.country-more { grid-area: more; display: inline-flex; align-items: center; gap: 4px; color: var(--muted-foreground); font-size: .8rem; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.country-more .icon { width: 15px; height: 15px; transition: transform .15s; }
.country-tile:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); border-color: var(--brand-line); }
.country-tile:hover .platform { transform: translateY(-1px); }
.country-tile:hover .country-more { color: var(--brand-ink); }
.country-tile:hover .country-more .icon { transform: translateX(3px); }

.quick-pick { padding: 20px 18px; border: 1px solid var(--card-border); border-radius: 24px; background: var(--card); box-shadow: var(--card-shadow); }
.quick-form { display: grid; gap: 12px; }
.quick-form label { display: grid; gap: 6px; font-weight: 700; font-size: .85rem; }
.quick-form select:disabled { opacity: .55; cursor: not-allowed; }

.text-blocks { display: grid; gap: 14px; margin: 36px 0; }
.text-blocks .home-block { margin: 0; }
.text-block { padding: 22px 20px; border: 1px solid var(--card-border); border-radius: 24px; background: var(--card); box-shadow: var(--card-shadow); }
.text-block h2 { display: flex; align-items: center; gap: 10px; }
.text-block h2 .icon { width: 20px; height: 20px; color: var(--brand); }
.text-block p { margin: 0; color: #4a433b; line-height: 1.65; }

/* --- Каталог: заголовок, страны, фильтры ---------------------------------------------------- */
.catalog-head { margin: 4px 0 18px; }
.catalog-head h1 { margin-bottom: 8px; }
.market-tabs { display: flex; width: fit-content; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; background: rgb(255 255 255 / 55%); }
.market-tabs::-webkit-scrollbar { display: none; }
.market-tabs > a { flex: none; min-height: var(--tap); padding: 0 18px; font-size: .88rem; }
.market-tabs > a.is-active { box-shadow: 0 4px 12px -6px var(--brand-line); }

.filters { margin: 0; }
.filters > .alert { margin-bottom: 12px; }
.filter-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.filter-bar > .price-range { grid-column: 1 / -1; }
.filter-bar > .fpill-reset { grid-column: 1 / -1; justify-self: start; }

.fgroups { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; grid-column: 1 / -1; }
.js .fgroups { grid-column: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.js .fgroups::-webkit-scrollbar { display: none; }
.sheet-head, .sheet-foot, .sheet-sort { display: none; }
.sheet-body { display: contents; }
/* Со скриптом редкие группы и «Цена» (её заменяет ползунок) — только в панели, если не выбраны и без ошибки */
.js .filters:not(.is-sheet) .fgroup.is-extra:not(.is-set, .has-error),
.js .filters:not(.is-sheet) .fgroup-price:not(.has-error) { display: none; }

.fpill {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px 0 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--foreground);
  font-weight: 720; font-size: .86rem; white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none;
  box-shadow: var(--shadow-sm); transition: border-color .15s, background-color .15s;
}
.fpill:hover { border-color: color-mix(in srgb, var(--foreground) 28%, var(--border)); }
.fpill-chevron { width: 16px !important; height: 16px !important; color: var(--muted-foreground); transition: rotate .2s; }
.fgroup { position: relative; flex: none; }
.fgroup[open] > .fpill { border-color: var(--foreground); }
.fgroup[open] > .fpill .fpill-chevron { rotate: 180deg; }
.fgroup.is-set > .fpill { background: var(--brand-soft); border-color: var(--brand-line); }
.fgroup.is-set .fpill-label { color: var(--muted-foreground); font-weight: 600; }
.fpill-value { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; color: var(--brand-ink); }
.fgroup.has-error > .fpill { border-color: var(--destructive); background: color-mix(in srgb, var(--destructive) 7%, var(--card)); }
.fpill-all { flex: none; gap: 8px; padding: 0 16px; background: var(--foreground); border-color: var(--foreground); color: #fff8f0; }
.fpill-all:hover { border-color: var(--foreground); filter: brightness(1.25); }
.fpill-all .icon { width: 17px; height: 17px; }
.fpill-all > span:first-of-type { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fpill-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--brand-fg); font-size: .72rem; font-weight: 800;
}
.fpill-reset { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted-foreground); padding: 0 12px; }
.fpill-reset .icon { width: 15px; height: 15px; }
.fpill-reset:hover { color: var(--foreground); background: var(--accent); border-color: transparent; }

/* Выпадающая панель фильтра: на телефоне — лист снизу */
.fgroup[open] > .fpill::before { content: ""; position: fixed; inset: 0; z-index: 1004; cursor: default; background: rgb(28 22 18 / 42%); }
.fpop {
  position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 1005;
  display: grid; gap: 14px; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  border: 1px solid var(--border); border-radius: 24px; background: var(--popover); box-shadow: var(--shadow-lg);
  animation: sf-sheet-up .22s cubic-bezier(.2, .8, .2, 1);
}
.fpop-title { margin: 0; font-size: 1.1rem; font-weight: 780; letter-spacing: -.02em; }
.fpop-fields { display: grid; gap: 12px; }
.fpop label { display: grid; gap: 6px; font-weight: 700; font-size: .84rem; }
.fpop-actions .button { width: 100%; }
.range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.is-invalid { color: var(--destructive); }
.is-invalid input, .is-invalid select, .is-invalid textarea { border-color: var(--destructive); background: color-mix(in srgb, var(--destructive) 5%, #fff); }
.field-error { color: var(--destructive); font-size: .85rem; font-weight: 600; }

@keyframes sf-sheet-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes sf-sheet-in { from { transform: translateX(32px); opacity: 0; } }

/* Режим «Фильтры и сортировка»: те же группы списком в боковой панели (на телефоне — снизу) */
.filters.is-sheet .fgroups {
  position: fixed; z-index: 1010; left: 0; right: 0; bottom: 0; max-height: 92dvh;
  display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0; overflow: hidden;
  background: var(--card); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  animation: sf-sheet-up .25s cubic-bezier(.2, .8, .2, 1);
}
.is-sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.sheet-title { margin: 0 !important; font-size: 1.2rem !important; font-weight: 780; letter-spacing: -.02em; }
.sheet-close {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: var(--secondary); color: var(--foreground); cursor: pointer;
}
.sheet-close:hover { background: var(--accent); }
.sheet-close .icon { width: 18px; height: 18px; }
.is-sheet .sheet-body { display: block; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 12px; }
.is-sheet .sheet-sort { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--border); font-size: .95rem; font-weight: 760; }
.is-sheet .fgroup { display: block; padding: 16px 0; border-bottom: 1px solid var(--border); }
.is-sheet .fgroup:last-child { border-bottom: 0; }
.is-sheet .fpill { min-height: 0; padding: 0; border: 0 !important; background: none !important; box-shadow: none; pointer-events: none; font-size: .95rem; font-weight: 760; }
.is-sheet .fpill .fpill-label { color: var(--foreground); font-weight: 760; }
.is-sheet .fpill-value, .is-sheet .fpill-chevron, .is-sheet .fpop-title, .is-sheet .fpop-actions { display: none; }
.is-sheet .fgroup[open] > .fpill::before { display: none; }
.filters.is-sheet .fpop { position: static; width: auto; max-height: none; overflow: visible; padding: 12px 0 0; border: 0; border-radius: 0; box-shadow: none; background: none; animation: none; }
.is-sheet .sheet-foot {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--card);
}
.sheet-backdrop { position: fixed; inset: 0; z-index: 1009; background: rgb(28 22 18 / 44%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.is-sheet .sheet-head .sheet-title { color: var(--foreground); }
body.has-sheet { overflow: hidden; }

/* Двойной ползунок цены (появляется со скриптом; без него — поля «от/до» в фильтре «Цена») */
.price-range {
  display: grid; gap: 2px; min-width: 0; padding: 10px 16px 2px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--card); box-shadow: var(--shadow-sm);
}
.price-range-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .82rem; }
.price-range-title { font-weight: 760; }
.price-range-value { color: var(--brand-ink); font-weight: 760; white-space: nowrap; }
.dual-range { position: relative; height: var(--tap); }
.dual-range-track { position: absolute; left: 22px; right: 22px; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: var(--accent); }
.dual-range-fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: 4px; background: var(--brand); }
.dual-range input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  background: none; -webkit-appearance: none; appearance: none; pointer-events: none; outline: none;
}
.dual-range input[type="range"]::-webkit-slider-runnable-track { height: var(--tap); background: none; }
.dual-range input[type="range"]::-moz-range-track { height: var(--tap); background: none; }
.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; width: 44px; height: 44px; border: 0; cursor: grab;
  background: radial-gradient(circle, #fff 0 9px, var(--brand) 9.5px 12px, rgb(40 28 18 / 14%) 12.5px 13.5px, transparent 14px);
}
.dual-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 44px; height: 44px; border: 0; cursor: grab;
  background: radial-gradient(circle, #fff 0 9px, var(--brand) 9.5px 12px, rgb(40 28 18 / 14%) 12.5px 13.5px, transparent 14px);
}
.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: radial-gradient(circle, #fff 0 9px, var(--brand) 9.5px 12px, color-mix(in srgb, var(--brand) 30%, transparent) 12.5px 18px, transparent 18.5px);
}
.dual-range input[type="range"]:focus-visible::-moz-range-thumb {
  background: radial-gradient(circle, #fff 0 9px, var(--brand) 9.5px 12px, color-mix(in srgb, var(--brand) 30%, transparent) 12.5px 18px, transparent 18.5px);
}
.dual-range input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }

/* Счётчик и сортировка над сеткой */
.list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 18px 0 14px; }
.count { margin: 0; font-weight: 720; font-size: .95rem; }
.sort { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; justify-content: flex-end; color: var(--muted-foreground); font-weight: 650; font-size: .84rem; }
.sort-label { white-space: nowrap; }
.sort select { width: auto; flex: 1 1 auto; max-width: 290px; border-radius: 999px; font-weight: 700; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0; flex-wrap: wrap; color: var(--muted-foreground); font-weight: 650; }
.pager a {
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--input); background: var(--card); color: var(--foreground); font-weight: 720; text-decoration: none;
}
.pager a .icon { width: 16px; height: 16px; }
.pager a:hover { background: var(--secondary); }
.js .pager { display: none; }
.more-wrap { margin: 26px 0 0; text-align: center; }
.more-wrap .button { min-width: 220px; }
.more-wrap .button:disabled { opacity: .55; }

/* Пустые состояния */
.storefront .empty { gap: 10px; padding: 48px 20px; background: rgb(255 255 255 / 55%); border-color: #d9d1c5; }
.storefront .empty-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); color: var(--brand); }
.storefront .empty-icon .icon { width: 24px; height: 24px; }
.storefront .empty-title, .storefront .empty h1 { margin: 6px 0 0; color: var(--foreground); font-size: 1.25rem; font-weight: 760; letter-spacing: -.02em; }
.storefront .empty h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); }
.storefront .empty p { max-width: 46ch; }
.storefront .empty .actions { justify-content: center; margin-top: 8px; }
.empty-icon-success { color: var(--success) !important; }

/* Плавающая панель фильтров (появляется при прокрутке каталога) */
.float-bar {
  position: fixed; top: 10px; left: 50%; z-index: 50; width: min(calc(100% - 20px), 1120px);
  translate: -50% calc(-100% - 20px); opacity: 0; pointer-events: none;
  transition: translate .32s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.float-bar.is-shown { translate: -50% 0; opacity: 1; pointer-events: auto; }
.float-bar-inner {
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 16%); background: var(--glass-dark); color: #fff;
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 20px 44px -18px rgb(0 0 0 / 50%);
}
.fb-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: var(--tap); padding: 0 14px;
  border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; background: rgb(255 255 255 / 8%); color: #fff;
  font-weight: 720; font-size: .84rem; white-space: nowrap; cursor: pointer; transition: background-color .15s;
}
.fb-btn:hover { background: rgb(255 255 255 / 18%); }
.fb-btn .icon { width: 16px; height: 16px; }
.fb-all { background: #fff8f0; border-color: transparent; color: #1d1a17; }
.fb-all:hover { background: #fff; }
.fb-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--brand-fg); font-size: .72rem; font-weight: 800;
}
.fb-chips { display: none; flex: 1 1 auto; min-width: 0; gap: 6px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.fb-total { display: none; padding: 0 6px; color: rgb(255 255 255 / 72%); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.fb-sort { flex: 1 1 auto; min-width: 0; }
.fb-sort select {
  min-height: var(--tap); width: 100%; border-radius: 999px; border-color: rgb(255 255 255 / 16%); box-shadow: none;
  background-color: rgb(255 255 255 / 8%); color: #fff; font-weight: 700; font-size: .84rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.fb-sort select:focus-visible { border-color: #fff; box-shadow: 0 0 0 3px rgb(255 255 255 / 25%); }
.fb-sort option { color: #1d1a17; background: #fff; }
.fb-cta {
  display: none; align-items: center; gap: 8px; flex: none; min-height: var(--tap); padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-fg); font-weight: 760; font-size: .86rem; white-space: nowrap; cursor: pointer;
}
.fb-cta:hover { filter: brightness(1.1); }
.fb-cta .icon { width: 17px; height: 17px; }

.compare-bar {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; background: rgb(28 22 18 / 82%); color: #fff;
  font-weight: 760; text-decoration: none; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px -14px rgb(0 0 0 / 50%);
}
.compare-bar .icon { width: 18px; height: 18px; }
.compare-bar:hover { background: rgb(28 22 18 / 92%); }
.sf-toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 200; transform: translateX(-50%);
  max-width: min(90vw, 420px); padding: 12px 18px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 14%);
  background: rgb(28 22 18 / 88%); color: #fff; font-weight: 650; font-size: .92rem;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 14px 34px -14px rgb(0 0 0 / 50%);
  animation: sf-sheet-up .2s ease;
}

/* --- Страница машины ------------------------------------------------------------------------ */
.car-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "aside" "specs"; gap: 18px; }
.car-media { grid-area: media; min-width: 0; }
.car-aside { grid-area: aside; min-width: 0; display: grid; gap: 14px; align-content: start; }
.car-layout > .specs { grid-area: specs; min-width: 0; }
.gallery { position: relative; overflow: hidden; border-radius: 22px; background: #e8e2d9; box-shadow: var(--card-shadow); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ring); }
.gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 4 / 3; }
.gallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-arrow {
  position: absolute; top: 50%; z-index: 1; translate: 0 -50%; display: none; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid var(--glass-line); border-radius: 50%; background: rgb(255 255 255 / 82%); color: var(--foreground); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 18px -8px rgb(30 20 12 / 45%); transition: background-color .15s;
}
.gallery-arrow:hover { background: #fff; }
.gallery-arrow .icon { width: 22px; height: 22px; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-count {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px;
  border-radius: 999px; background: rgb(20 16 12 / 56%); color: #fff; font-size: .8rem; font-weight: 720;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.gallery-count .icon { width: 15px; height: 15px; }
.gallery-zoom {
  position: absolute; right: 12px; bottom: 8px; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid rgb(255 255 255 / 20%); border-radius: 50%; background: rgb(20 16 12 / 56%); color: #fff; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.gallery-zoom:hover { background: rgb(20 16 12 / 75%); }
.gallery-zoom .icon { width: 18px; height: 18px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding: 2px 2px 6px; }
.gallery-thumb {
  flex: none; width: 92px; height: 62px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px;
  background: #e8e2d9; opacity: .65; cursor: pointer; transition: opacity .15s, border-color .15s;
}
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb[aria-current="true"] { opacity: 1; border-color: var(--brand); }
.gallery-modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; background: rgb(12 10 8 / 95%); }
.gallery-modal[hidden] { display: none; }
.modal-img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pan-y; }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid rgb(255 255 255 / 20%); border-radius: 50%; background: rgb(255 255 255 / 14%); color: #fff; cursor: pointer;
}
.modal-close:hover { background: rgb(255 255 255 / 24%); }
.modal-close .icon { width: 20px; height: 20px; }
.gallery-modal .gallery-arrow { display: grid; background: rgb(255 255 255 / 14%); color: #fff; border-color: rgb(255 255 255 / 20%); }
.gallery-modal .gallery-count { left: 50%; transform: translateX(-50%); }

.car-summary { padding: 20px 18px; border: 1px solid var(--card-border); border-radius: 24px; background: var(--card); box-shadow: var(--card-shadow); }
.car-summary h1 { margin: 8px 0 16px; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); overflow-wrap: anywhere; }
.price-box { margin: 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
.price-box.is-loading [data-price] { opacity: .5; transition: opacity .15s; }
.city-pick { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 700; font-size: .84rem; }
.city-pick-label { display: inline-flex; align-items: center; gap: 6px; }
.city-pick-label .icon { width: 15px; height: 15px; color: var(--brand); }
.price-label { margin: 0 0 2px; color: var(--muted-foreground); font-size: .8rem; font-weight: 700; }
.price-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; font-size: clamp(1.8rem, 1.5rem + 1vw, 2.2rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.15; }
.price-note { font-size: .84rem; font-weight: 650; letter-spacing: 0; color: var(--muted-foreground); white-space: nowrap; }
.price-request { font-size: 1.6rem; }
.price-sub { margin: 4px 0 0; font-size: .82rem; color: var(--muted-foreground); }
.price-fx, .source-price { display: flex; gap: 6px; margin: 12px 0 0; font-size: .8rem; color: var(--muted-foreground); }
.price-fx .icon { width: 14px; height: 14px; margin-top: 3px; }
.source-price { margin-top: 6px; }
.price-breakdown { margin-top: 14px; padding: 0 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-muted); }
.price-breakdown summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 720; font-size: .88rem; }
.price-breakdown summary .icon { width: 16px; height: 16px; color: var(--brand); }
.price-breakdown summary .price-chevron { margin-left: auto; color: var(--muted-foreground); transition: rotate .2s; }
.price-breakdown[open] summary .price-chevron { rotate: 180deg; }
.price-lines { width: 100%; margin-bottom: 8px; border-collapse: collapse; font-size: .84rem; }
.price-lines th, .price-lines td { padding: 8px 0; border-top: 1px solid var(--border); vertical-align: top; text-align: left; }
.price-lines th { font-weight: 560; }
.price-lines td { padding-left: 12px; text-align: right; white-space: nowrap; font-weight: 700; }
.price-lines small { display: block; color: var(--muted-foreground); font-weight: 500; font-size: .76rem; }
.price-lines tfoot th, .price-lines tfoot td { font-weight: 800; border-top-color: var(--input); }
.car-cta { display: grid; gap: 10px; margin-top: 18px; }
.car-cta .button { width: 100%; }
.car-actions-page { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; border: 0; }
.car-actions-page .chip-btn { flex: 1 1 0; }
.notice-us h2 { margin: 0 0 4px !important; font-size: 1rem !important; }
.notice-us p + p { margin-top: 4px; }
.specs { padding: 4px 0 0; }
.specs h2 { font-size: 1.3rem; font-weight: 750; letter-spacing: -.03em; margin-bottom: 12px; }
.spec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.spec-list > div { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border: 1px solid var(--card-border); border-radius: 16px; background: var(--card); }
.spec-list dt { color: var(--muted-foreground); font-size: .78rem; font-weight: 650; }
.spec-list dd { margin: 0; font-weight: 760; overflow-wrap: anywhere; }

/* --- Состояния машины, политика ------------------------------------------------------------- */
.notice-box { max-width: 760px; }
.notice-box.empty { margin: 16px auto; }
.state-card { padding: 22px 18px; border: 1px solid var(--card-border); border-radius: 24px; background: var(--card); box-shadow: var(--card-shadow); margin-bottom: 8px; }
.state-card h1 { margin: 8px 0 16px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.state-card .alert p { font-weight: 700; }
.state-card > .muted { margin: 0 0 16px; }
.storefront .alert h2 { font-size: 1rem; }
.text-page {
  max-width: 820px; padding: 24px 18px; border: 1px solid var(--card-border); border-radius: 24px;
  background: var(--card); box-shadow: var(--card-shadow);
}
.text-page h1 { margin-bottom: 18px; }
.text-page-body { color: #3d362f; font-size: .95rem; line-height: 1.75; overflow-wrap: anywhere; }

/* --- Сравнение ------------------------------------------------------------------------------ */
.compare-scroll {
  max-width: 100%; overflow-x: auto; scrollbar-width: thin;
  border: 1px solid var(--card-border); border-radius: 22px; background: var(--card); box-shadow: var(--card-shadow);
}
.compare-scroll:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.compare-table thead th { min-width: 168px; vertical-align: bottom; }
.compare-table tbody th {
  position: sticky; left: 0; z-index: 1; width: 112px; min-width: 112px;
  background: var(--surface-muted); color: var(--muted-foreground); font-weight: 650; font-size: .82rem;
}
.compare-corner { position: sticky; left: 0; z-index: 2; background: var(--card); width: 112px; min-width: 112px; }
.compare-table tbody td { font-weight: 650; }
.compare-table tbody tr:first-child td { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.compare-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.compare-car { display: grid; gap: 8px; color: var(--foreground); font-weight: 740; text-decoration: none; line-height: 1.3; }
.compare-car img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; background: #e8e2d9; }
.compare-car:hover span { color: var(--brand-ink); }
.compare-table .label-sold { display: inline-flex; margin-top: 8px; backdrop-filter: none; }
.compare-remove { display: flex; margin-top: 4px; padding: 0; color: var(--muted-foreground); font-size: .84rem; }
.compare-remove .icon { width: 15px; height: 15px; }
.compare-remove:hover { color: var(--destructive); }

/* --- Заявка --------------------------------------------------------------------------------- */
.lead-layout { display: grid; gap: 14px; }
.lead-layout > .lead-cars-box { order: -1; }
.lead-form.card { padding: 20px 18px; border-radius: 24px; border-color: var(--card-border); }
.lead-form label { font-weight: 700; }
.lead-form label.is-invalid { color: var(--destructive); }
.lead-form textarea { min-height: 110px; }
.lead-form .check { display: flex; align-items: flex-start; gap: 12px; font-weight: 550; font-size: .86rem; line-height: 1.5; color: var(--foreground); cursor: pointer; }
.lead-form .check input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--brand); }
.lead-form .check.is-invalid span { color: var(--destructive); }
.lead-form .alert { margin: 0; }
.lead-form [data-submit] { width: 100%; }
.lead-cars-box { padding: 18px; border-radius: 24px; border-color: var(--card-border); }
.lead-cars-title { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 760; }
.lead-cars-title .icon { width: 18px; height: 18px; color: var(--brand); }
.lead-cars { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.lead-car {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 60px; padding: 6px;
  border-radius: 16px; color: var(--foreground); text-decoration: none; transition: background-color .15s;
}
.lead-car:hover { background: var(--secondary); }
.lead-car img { width: 88px; height: 56px; object-fit: cover; border-radius: 12px; background: #e8e2d9; }
.lead-car > span { display: grid; gap: 2px; min-width: 0; }
.lead-car-title { font-weight: 720; line-height: 1.3; overflow-wrap: anywhere; }
.lead-car .muted { font-size: .82rem; }
.thanks h1 { color: var(--foreground); }

/* --- Телефон: поля 16 px, чтобы iOS не увеличивал страницу ----------------------------------- */
@media (max-width: 639px) {
  .storefront input:not([type="checkbox"], [type="radio"], [type="range"]), .storefront select, .storefront textarea { font-size: 16px; }
  .sort-label { display: none; }
  .quick-pick .block-link { display: none; }
  .gallery-thumbs { display: none !important; }
  .sort select { max-width: none; }
  .storefront .actions .button { flex: 1 1 100%; }
}

@media (min-width: 520px) {
  .ask-chips { flex-wrap: wrap; margin-inline: 0; padding: 0; overflow: visible; }
  .ask-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ask-row .button { width: auto; }
  .fpill-all > span:first-of-type { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card-row { grid-auto-columns: calc((100% - 16px) / 2.15); gap: 16px; }
  .country-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
  .country-tile { min-height: 150px; padding: 20px; grid-template-areas: "plat plat" "name name" "more more"; gap: 12px; }
  .platforms { align-self: start; }
  .country-name { font-size: 1.3rem; }
  .hero-facts { gap: 26px; }
  .hero-facts li + li { padding-left: 26px; }
  .hero-facts strong { font-size: 1.45rem; }
  .hero-facts span { font-size: .78rem; }
  .quick-pick { padding: 22px 24px; }
  .quick-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
  .car-cta { grid-template-columns: 1fr 1fr; }
  .lead-form [data-submit] { width: auto; justify-self: start; }
  .spec-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .car-summary, .state-card { padding: 24px; }
  .text-page { padding: 36px 40px; }
  .lead-form.card { padding: 26px; }
  .sf-hero { padding: 40px 32px 22px; }
  .hero-ticker { margin-inline: -32px; }
  .fb-total { display: inline; }
}
@media (min-width: 768px) {
  /* Выпадающая панель под пилюлей */
  .fgroup[open] > .fpill::before { background: transparent; }
  .fpop {
    position: absolute; top: calc(100% + 8px); left: 0; right: auto; bottom: auto; width: 320px; max-height: none; overflow: visible;
    padding: 16px; border-radius: 20px; animation: sf-pop .16s ease;
  }
  .fpop.is-flip { left: auto; right: 0; }
  .fgroup-brand .fpop, .fgroup-engine .fpop, .fgroup-price .fpop { width: 360px; }
  .fpop-title { display: none; }
  .js .fgroups { flex-wrap: wrap; overflow: visible; }
  .filters.is-sheet .fgroups {
    top: 0; left: auto; max-height: none; width: min(440px, 100%); border-radius: 28px 0 0 28px;
    animation-name: sf-sheet-in;
  }
  .float-bar { top: 12px; }
  .fb-chips { display: flex; }
}
@keyframes sf-pop { from { transform: translateY(-4px); opacity: 0; } }
@media (min-width: 900px) {
  .filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .filter-bar > .price-range { flex: 0 1 340px; }
  .fgroups { flex: 1 1 auto; }
  .filter-bar > .fpill-all { order: 10; margin-left: auto; }
  .filter-bar > .fpill-reset { order: 9; }
  .fb-cta { display: inline-flex; }
  .fb-sort { flex: none; }
  .fb-sort select { width: auto; }
  .sf-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 28px 48px; padding: 64px 52px 26px; min-height: 460px; }
  .ask-form { padding: 24px; }
  .hero-ticker { margin: 18px -52px -8px; }
  .country-tile { grid-template-areas: "plat plat" "name more"; grid-template-rows: 1fr auto; }
  .text-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .text-block { padding: 26px 28px; }
  .home-block { margin: 48px 0; }
  .block-head h2 { font-size: 1.6rem; }
  .lead-layout { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); align-items: start; gap: 20px; }
  .lead-layout > .lead-cars-box { order: 0; position: sticky; top: 20px; }
}
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-row { grid-auto-columns: calc((100% - 32px) / 3); margin: 0 -4px; padding: 4px 4px 22px; scroll-padding-inline: 4px; }
  .car-title { font-size: 1.25rem; }
  .car-price { font-size: 1.62rem; }
  .car-layout { grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); grid-template-areas: "media aside" "specs aside"; align-items: start; gap: 24px 32px; }
  .car-aside { position: sticky; top: 20px; }
  .gallery { border-radius: 26px; }
}
@media (hover: hover) and (min-width: 640px) {
  .gallery > .gallery-arrow { display: grid; opacity: 0; transition: opacity .2s, background-color .15s; }
  .gallery:hover > .gallery-arrow, .gallery > .gallery-arrow:focus-visible { opacity: 1; }
}
