/* Shared typography scale. */

:root {
    --ink: #151922;
    --ink-soft: #515866;
    --muted: #515866;
    --border: var(--ui-border);
    --surface: #ffffff;
    --surface-soft: #f5f6fa;
    --accent: #ff5a36;
    --accent-dark: #dc3f1f;
    --accent-soft: #fff0ec;
    --navy: #13233f;
    --good: color-mix(in srgb, #0f9d58 80%, var(--ink));
    --warn-bg: #fff4e0;
    --warn-text: #93650b;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(18, 21, 28, 0.04), 0 8px 24px rgba(18, 21, 28, 0.06);
    --shadow-hover: 0 4px 10px rgba(18, 21, 28, 0.06), 0 16px 32px rgba(18, 21, 28, 0.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {

    color: var(--ink);
    margin: 0;
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.container { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
a { color: inherit; }

/* ---------- header ---------- */
.site-header {
    --header-lime: #90d418;
    --header-phone-green: #2fba67;
    --header-red: #e64b45;
    position: sticky; z-index: 50; top: 0;
    min-width: 0; padding: 0;
    background: var(--ui-white); color: #171819;
}
.site-header__inner {
    position: relative; z-index: 2;
    width: 100%; max-width: 1560px; height: 90px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    margin: 0 auto; padding: 0 24px;
    border-radius: 0; background: var(--ui-white);
}
.site-header__start, .site-header__actions, .site-header__links { display: flex; align-items: center; }
.site-header__start { min-width: 0; gap: 18px; }
.header-phone-button { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 16px; background: var(--header-phone-green); color: #fff; cursor: pointer; }
.header-phone-button svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.header-phone-button:focus { outline: none; }
.header-phone-button:focus-visible { outline: 3px solid color-mix(in srgb,var(--header-phone-green) 34%,transparent); outline-offset: 3px; }
.header-placeholder-phone { white-space: nowrap; color: #171819;    }
.site-header__logo { width: 250px; height: 58px; flex: 0 0 250px; line-height: 0; }
.ruta-header-logo { display: block; width: 100%; height: auto; }
.site-header .logo__text { color: #171819; font-size: 32px;  line-height: 1; letter-spacing: -.07em; }
.site-header .logo__text b { color: var(--header-lime);  }
.site-header__links { gap: 8px; }
.site-header__links a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 8px; border-radius: 10px; color: #171819;   text-decoration: none; white-space: nowrap; }
.site-header__links a:hover { background: var(--ui-gray); }

.site-header__links a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mega-menu { position: static; flex-shrink: 0; }
.mega-menu > summary { position: relative; z-index: 3; list-style: none; width: 58px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 18px; background: var(--ui-gray); cursor: pointer; }
.mega-menu > summary::-webkit-details-marker { display: none; }
.mega-menu > summary:focus:not(:focus-visible) { outline: none; }
.mega-menu > summary:focus-visible { outline: 3px solid #1f73d2; outline-offset: 3px; }
.mega-menu > summary span { width: 24px; height: 2px; border-radius: 2px; background: #171819; transition: transform .2s, opacity .2s; }
.mega-menu[open] > summary { background: #171819; }
.mega-menu[open] > summary span { background: var(--ui-white); }
.mega-menu[open] > summary span { position: absolute; }
.mega-menu[open] > summary span:nth-child(1) { transform: rotate(45deg); }
.mega-menu[open] > summary span:nth-child(2) { opacity: 0; }
.mega-menu[open] > summary span:nth-child(3) { transform: rotate(-45deg); }
.site-header:has(.mega-menu[open]) { padding-top: 12px; background: transparent; }
.site-header:has(.mega-menu[open])::before { content: ""; position: fixed; z-index: 0; inset: 0; background: rgba(20,22,21,.19); }
.site-header__inner:has(.mega-menu[open]) { width: min(1560px, calc(100% - 32px)); margin-bottom: 0; border-radius: 28px 28px 0 0; background: #fff; }
.site-header__inner:has(.mega-menu[open]) > .site-header__start,
.site-header__inner:has(.mega-menu[open]) > .site-header__actions { position: relative; z-index: 3; }
.mega-menu__panel { position: fixed; z-index: 2; left: 50%; top: 102px; width: min(1560px, calc(100vw - 32px)); max-height: calc(100vh - 118px); overflow-y: auto; transform: translateX(-50%); display: grid; grid-template-columns: minmax(590px,1fr) minmax(520px,1.05fr); gap: 34px; padding: 34px 38px 40px; border: 0; border-radius: 0 0 28px 28px; background: #fff; box-shadow: none; }
.mega-menu:not([open]) .mega-menu__panel { display: none; }
.mega-menu__catalog { display: grid; grid-template-columns: minmax(320px,1.2fr) minmax(210px,.8fr); align-content: start; gap: 30px; }
.mega-menu__primary-column { display: grid; gap: 28px; align-content: start; }
.mega-menu__section { min-width: 0; }
.mega-menu__label { margin: 0 0 12px; color: var(--ui-muted);     }
.mega-menu__primary { display: grid; gap: 2px; }
.mega-menu__primary a, .mega-menu__primary > span { padding: 7px 0; color: #171819;    text-decoration: none; }
.mega-menu__primary > .mega-menu__inactive { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; white-space: normal; }
.mega-menu__primary > .mega-menu__inactive small { flex: 0 0 auto; margin-left: 0; }
.mega-menu__primary a:hover { color: #79aa26; }
.mega-menu__secondary nav { display: grid; gap: 1px; }
.mega-menu__secondary a, .mega-menu__secondary nav > span { min-width: 0; padding: 6px 0; color: #292c2a;    text-decoration: none; }
.mega-menu__secondary a:hover { color: #79aa26; }
.mega-menu__inactive { cursor: default; }
.mega-menu__inactive small { display: inline-flex; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: #f1f2f4; color: #777b82;     vertical-align: 2px;  }
.mega-menu__services { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; column-gap: 24px; row-gap: 14px; }
.mega-menu__services .mega-menu__label { grid-column: 1/-1; margin-bottom: 0; }
.mega-menu__services > a, .mega-menu__service-soon { min-width: 0; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 4px 6px; border-radius: 12px; color: #171819; text-decoration: none; transition: background .15s; }
.mega-menu__services > a:hover { background: var(--ui-gray); }
.mega-menu__services img { width: 48px; height: 48px; flex: 0 0 48px; display: block; border-radius: 12px; object-fit: cover; }
.mega-menu__services > a > span, .mega-menu__service-soon > span { min-width: 0; }
.mega-menu__services strong, .mega-menu__services small { display: block; }

.mega-menu__services small { margin-top: 4px; color: var(--ui-muted);   }

.site-header__actions { flex: 0 0 auto; justify-content: flex-end; gap: 6px; }
.header-action { position: relative; width: 82px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 14px; color: #171819;   text-decoration: none; }
.header-action:hover { background: var(--ui-gray); }
.header-action__icon { position: relative; width: 34px; height: 30px; display: grid; place-items: center; }
.header-action__icon svg { width: 30px; height: 30px; fill: #171819; stroke: #171819; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.favorites-link .header-action__icon svg { width: 27px; height: 27px; fill: var(--header-red); stroke: none; }
.header-counter { position: absolute; top: -5px; right: -10px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid var(--ui-border); border-radius: 999px; background: var(--header-red); color: #fff;  font-style: normal;   }
.header-counter[hidden] { display: none; }
.header-lead { min-height: 62px; display: inline-flex; align-items: center; gap: 10px; margin-left: 4px; color: #171819;    text-decoration: none; white-space: nowrap; }
.header-lead b { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; background: var(--header-lime); color: #171819;    }
.user-avatar{position:relative;display:inline-grid;place-items:center;width:var(--avatar-size,40px);height:var(--avatar-size,40px);flex:0 0 var(--avatar-size,40px);border-radius:50%;overflow:hidden;background:#f0f1f3}
.user-avatar__fallback,.user-avatar>img{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit}
.user-avatar__fallback{display:grid;place-items:center;color:#777b82;background:#f0f1f3}
.user-avatar__fallback svg{width:52%;height:52%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.user-avatar__service{font-size:calc(var(--avatar-size,40px)*.45);font-weight:700;color:#171819}
.user-avatar>img{z-index:1;display:block;object-fit:contain}
.user-avatar>img[hidden]{display:none}
.header-account { position:relative; min-width: 104px; height: 52px; display: inline-flex; align-items:center; justify-content:center; gap:9px; margin-left: 4px; padding:0 14px; border:1px solid transparent; border-radius: 15px; background: transparent; color: #111111; text-decoration: none; user-select: none; transition:background .17s ease,border-color .17s ease; }
.header-account-wrap { position: relative; }
.header-account:hover,.header-account[aria-expanded=true]{background:#f5f5f6}
.header-account:focus-visible{outline:3px solid #171819;outline-offset:3px}
.header-account--user { min-width:0;padding:5px 10px 5px 6px; }
.header-account__name { font-weight: 600; font-size: 15px; white-space: nowrap; }
.header-account__unread{position:absolute;top:0;right:0;z-index:2;min-width:20px;height:20px;padding:0 5px;border:2px solid #fff;border-radius:10px;background:#e0392f;color:#fff;font-size:10px;line-height:16px;font-weight:700;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.16)}
.header-account__unread[hidden]{display:none}
.header-account__chevron{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .17s ease}
.header-account[aria-expanded=true] .header-account__chevron{transform:rotate(180deg)}
.header-account--guest{border-color:var(--ui-border);padding-inline:14px}
.header-account__guest-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
/* Выпадающее меню профиля. */
.account-menu[hidden] { display: none; }
.account-menu { position: fixed; top: 82px; right: 24px; left: auto; bottom: auto; margin: 0; width: 352px; height: auto; max-width: calc(100vw - 32px); max-height: calc(100dvh - 94px); padding: 0; border: 1px solid rgba(20,24,28,.08); border-radius: 20px; background: var(--ui-white); color: #171819; box-shadow: 0 18px 48px rgba(20,24,28,.14); overflow-y: auto; }
.account-menu::backdrop { background: transparent; }
.account-menu svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-menu__profile { display:flex;align-items:center;gap:16px;padding:22px 22px 18px; }
.account-menu__avatar{flex:0 0 64px}
.account-menu__identity{min-width:0;display:flex;flex-direction:column;align-items:flex-start}
.account-menu__name { display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#171819;text-decoration:none;font-size:20px;line-height:26px;font-weight:600; }
.account-menu__name:hover{text-decoration:underline;text-underline-offset:3px}
.account-menu__subtitle{font-size:13px;line-height:19px;color:var(--ui-muted)}
.account-menu__id { display: flex; align-items: center; gap: 6px; color: var(--ui-muted); font-size: 13px; }
.account-menu__copy { position: relative; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ui-muted); cursor: pointer; }
.account-menu__copy svg { width: 16px; height: 16px; }
.account-menu__copy:hover { background: var(--ui-gray); color: #171819; }
.account-menu__copy-hint[hidden] { display: none; }
.account-menu__copy-hint { position: absolute; z-index: 2; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: #171819; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; padding: 6px 10px; border-radius: 8px; }
.account-menu__logout-form { margin: 0; }
.account-menu__logout { width:100%;border:0;background:transparent;font:inherit;cursor:pointer;text-align:left; }
.account-menu__list { display: flex; flex-direction: column; padding: 8px 12px 16px; border-top: 1px solid var(--ui-border); }
.account-menu__item { display: flex; align-items: center; gap: 13px; min-height: 44px; padding: 0 12px; border-radius: 11px; color: #171819; text-decoration: none; font-size: 15px;font-weight:400; }
.account-menu__item:hover,.account-menu__item:focus-visible { background: #f3f4f5; }
.account-menu__item:focus-visible{outline:2px solid #171819;outline-offset:1px}
.account-menu__count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--ui-gray); color: var(--ui-muted); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.account-menu__count--unread{background:#ff6974;color:#fff}
.account-menu__count[hidden]{display:none}
.account-menu__section { margin: 12px 12px 4px; font-size: 12px; font-weight: 500; color: var(--ui-muted); }
@media (max-width: 600px) {
	html.account-menu-open{overflow:hidden}
	.header-account--user{width:48px;height:48px;padding:4px;border-radius:14px}
	.header-account--user .header-account__name,.header-account--user .header-account__chevron{display:none}
	.header-account--guest{min-width:48px;width:48px;height:48px;padding:0}
	.header-account--guest span{display:none}
	.account-menu { top:68px;right:8px;width:calc(100vw - 16px);max-height:calc(100dvh - 76px);border-radius:20px; }
	.account-menu::backdrop{background:rgba(20,24,28,.18)}
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark {
    width: 34px; height: 34px; border-radius: 11px; background: var(--accent);
    display: flex; align-items: center; justify-content: center;
     font-size:var(--font-size-body);
}
.logo__mark--footer { background: var(--accent); color: #fff; }
.logo__text {  font-size:var(--font-size-body-large); letter-spacing: 0.02em; }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a {
    text-decoration: none; color: var(--ink-soft);
    padding: 8px 14px; border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: var(--surface-soft); color: var(--ink); }
.favorites-link, .compare-link { display: inline-flex; align-items: center; gap: 6px; }
.favorites-count {
    display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center;
    border-radius: 12px; background: var(--accent); color: #fff;
}
.site-header__contact { display: flex; align-items: center; gap: 16px; }
.phone { text-decoration: none; color: var(--ink);   white-space: nowrap; }
.mobile-menu { display: none; position: relative; }
.mobile-menu > summary { list-style: none; }
.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-menu > summary {
    width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.mobile-menu > summary span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.mobile-menu__panel {
    position: absolute; top: 50px; right: 0; width: min(300px, calc(100vw - 32px));
    padding: 12px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--ui-white); color: var(--ink); box-shadow: var(--shadow-hover);
    display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu__panel > a:not(.btn) { padding: 12px; border-radius: 8px; text-decoration: none;   }
.mobile-menu__panel > a:not(.btn):hover { background: var(--surface-soft); }

@media (max-width: 1180px) {
    .site-header__inner { width: calc(100% - 24px); padding-inline: 22px; }
    .site-header__start { gap: 12px; }
    .site-header__logo { width: 220px; flex-basis: 220px; }
    .site-header .logo__text { font-size: 28px; }
    .site-header__links { display: none; }
    .header-action { width: 72px; }
    .header-account { min-width: 104px; }
    .mega-menu__panel { width: calc(100vw - 24px); grid-template-columns: minmax(250px,.65fr) minmax(560px,1.45fr); gap: 28px; }
    .mega-menu__catalog { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .header-account.header-account--user,.header-account.header-account--guest { min-width: 48px; }
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer; text-decoration: none; padding: 11px 20px;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--primary:active { transform: scale(0.98); }
.btn--small { padding: 9px 16px;  }
.btn--full { width: 100%; padding: 13px;  }
.btn--secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--surface-soft); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--ui-gray); }
.site-footer__inner { max-width: 1240px; margin: 0 auto; padding: 48px 24px 24px; }
.site-footer__brand { display: flex; align-items: center; justify-content: center; gap: 8px;  margin-bottom: 10px; }
.disclaimer {  color: var(--muted); max-width: 640px; margin: 0 auto;  }

/* ---------- shared contact block ---------- */
.contact-layout { display: grid; grid-template-columns: 1.05fr 1.4fr 0.65fr; gap: 18px; align-items: stretch; }
.contact-card, .footer-lead, .footer-nav {
    border-radius: 22px; padding: 28px; background: var(--surface);
}
.contact-card { background: var(--navy); color: #fff; }
.logo--contact { color: #fff; width: fit-content; }
.contact-card__caption { max-width: 260px; margin: 24px 0 8px; color: rgba(255,255,255,0.68);   }
.contact-card__phone { display: inline-block; margin-bottom: 22px; color: #fff;   text-decoration: none; }
.contact-card__messengers { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-card__messengers a { padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,0.1); color: #fff; text-decoration: none;   }
.contact-card__messengers a:hover { background: rgba(255,255,255,0.18); }
.contact-card__address { margin: 24px 0 0;   }
.contact-card__meta { margin: 18px 0 0; color: rgba(255,255,255,0.48);   }
.footer-lead { scroll-margin-top: 88px; }
.footer-lead .lead-form { height: 100%; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav h2 { margin: 0 0 14px;  }
.footer-nav a { padding: 9px 0; color: var(--ink-soft); text-decoration: none;   }
.footer-nav a:hover { color: var(--accent); }
.site-footer__legal { max-width: 1240px; margin: 20px auto 0; padding-top: 18px; border-top: 1px solid var(--ui-border); color: var(--muted);   }
.site-footer__legal p { margin: 3px 0; }
.site-footer--compact { padding: 0 24px 24px; }
.site-footer--compact .site-footer__legal { padding-top: 20px; }

/* ---------- hero ---------- */
.eyebrow { margin: 0 0 12px; color: var(--accent);     }
.home-hero {
    position: relative; min-height: 540px; margin-bottom: 24px; padding: 56px;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); align-items: center; gap: 28px;
    overflow: hidden; border-radius: 28px; background: linear-gradient(135deg, #f4f5f8 0%, #eef1f6 100%);
}
.home-hero__content { position: relative; z-index: 2; }
.home-hero h1 { max-width: 680px; margin: 0;    }
.home-hero__lead { max-width: 620px; margin: 22px 0 28px; color: var(--ink-soft);   }
.hero-search { max-width: 690px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; padding: 7px 7px 7px 18px; border: 1px solid var(--ui-border); border-radius: 15px; background: var(--ui-white); box-shadow: var(--shadow); }
.hero-search svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.hero-search input { min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink);   }
.hero-search input::placeholder { transition: opacity .18s, transform .18s; }
.hero-search input.is-changing::placeholder { opacity: 0; transform: translateY(5px); }
.hero-search .btn { min-height: 44px; }
.home-hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.home-hero__catalog-link { margin-left: 6px; color: var(--ink);   text-decoration: none; }
.home-hero__visual { position: relative; z-index: 1; min-height: 360px; display: flex; align-items: center; justify-content: center; }
.home-hero__visual svg { position: relative; z-index: 2; width: 112%; filter: drop-shadow(0 28px 20px rgba(19,35,63,0.18)); }
.home-hero__glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255,90,54,0.28), rgba(255,90,54,0) 68%); }
.hero-car__body { fill: #fdfdfd; stroke: #d4d8df; stroke-width: 3; }
.hero-car__glass { fill: var(--navy); opacity: 0.88; }
.hero-car__line { fill: none; stroke: #ccd1d9; stroke-width: 3; }
.hero-car__wheel { fill: #1b202a; stroke: #fff; stroke-width: 5; }
.hero-car__hub { fill: var(--accent); }
.home-hero__note { position: absolute; z-index: 3; right: 8px; bottom: 28px; display: flex; flex-direction: column; padding: 13px 16px; border: 1px solid rgba(255,255,255,0.9); border-radius: 14px; background: rgba(255,255,255,0.78); box-shadow: var(--shadow); backdrop-filter: blur(12px); }

.home-hero__note span { color: var(--muted);  }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- home page sections ---------- */
.home-search-stage { padding: 0 0 28px; }
.home-search-stage__intro { display: flex; flex-direction: column; width: 100%; max-width: 840px; margin: 0 auto 24px; text-align: center; }
.home-search-stage__intro h1 { order: 2; margin: 0;    white-space: nowrap; }
.home-search-stage__lead { order: 3; min-height: 20px; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 2px 7px; margin: 10px 0 0; color: var(--ui-muted);   }
/* Счётчики визуально выше заголовка через flex-порядок (order), а не через
   position:absolute — так их реальная высота всегда учитывается в потоке и
   не может наехать на заголовок, даже если шрифт ещё не загрузился или
   счётчик перенесётся на вторую строку (см. правку 01.09.2026: раньше был
   position:absolute с top:-30px, подобранным под одну конкретную высоту
   строки — хрупко). На мобильных (см. @media 860px) order сбрасывается
   обратно к обычному порядку — там компоновка не менялась. */
.home-market-summary { order: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 4px; }
.home-ecosystem-rotation { min-width: 0; min-height: 25px; display: inline-flex; align-items: center; margin: 0; color: #171819;   }
.home-ecosystem-rotation b { min-width: 0;  transition: opacity .18s ease, transform .18s ease; }
.home-ecosystem-rotation b.is-changing { opacity: 0; transform: translateY(4px); }
.home-market-count { min-height: 22px; display: inline-flex; align-items: center; gap: 6px; color: #747981; text-decoration: none; white-space: nowrap; }
.home-market-count strong { color: inherit;   }
.home-market-count span { height: 22px; min-height: 22px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--ui-border); border-radius: 11px; color: #747981;  }
.home-market-count b { color: var(--ui-muted);   }
.home-market-count:hover span { border-color: var(--ui-border); }
@media (max-width: 1180px) {
    .home-search-stage__intro, .home-search-shell, .home-picker { max-width: min(840px,calc(100vw - 48px)); }
}
.home-search-shell { position: relative; z-index: 20; width: 100%; max-width: 840px; margin: 0 auto; }
.home-mobile-condition { display: none; }
.home-model-show { display: none; }
.home-main-search { width: 100%; height: 80px; display: grid; grid-template-columns: minmax(0,1fr) 64px; align-items: stretch; border: 0; border-radius: 24px; background: rgba(73,84,104,.1); box-shadow: none; }
.home-main-search__field { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 14px; padding: 0 12px 0 24px; cursor: text; }
.home-main-search svg { width: 24px; height: 24px; fill: none; stroke: #171819; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-main-search input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);   }
.home-main-search input::placeholder { color: #a0a5b0; transition: opacity .18s, transform .18s; }
.home-main-search input.is-changing::placeholder { opacity: 0; transform: translateY(5px); }
.home-main-search__advanced { display: grid; place-items: center; margin: 12px 20px 12px 4px; border-radius: 14px; color: #171819; text-decoration: none; }
.home-main-search__advanced:hover { background: var(--ui-gray); }
.home-main-search__advanced:focus-visible, .home-main-search:focus-within { outline: 3px solid rgba(172,232,70,.45); outline-offset: 3px; }
.home-main-search__advanced svg { width: 24px; height: 24px; }
.home-search-suggestions { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 100%; max-height: min(470px,calc(100vh - 180px)); overflow-y: auto; padding: 22px 28px 26px; border: 1px solid var(--ui-border); border-radius: 24px; background: var(--ui-white); box-shadow: 0 28px 72px rgba(23,24,25,.16); text-align: left; }
.home-search-suggestions[hidden] { display: none; }
.home-search-suggestions section + section { margin-top: 20px; }
.home-search-suggestions h2 { margin: 0 0 8px; color: var(--ui-muted);   }
.home-search-suggestions__list { display: grid; gap: 2px; }
.home-search-suggestions__list button { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: #171819;   text-align: left; cursor: pointer; }
.home-search-suggestions__list button:hover, .home-search-suggestions__list button:focus-visible, .home-search-suggestions__list button[aria-selected="true"] { outline: 0; background: var(--ui-gray); }
.home-search-suggestions__list small { color: var(--ui-muted);  }
.home-picker { position: relative; width: 100%; max-width: 840px; display: flex; align-items: center; gap: 5px; margin: 12px auto 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.home-market-switch { min-width: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; margin: 0; padding: 4px; border: 0; border-radius: 12px; background: var(--surface-soft); }
.home-market-switch label { min-width: 0; cursor: pointer; }
.home-market-switch input { position: absolute; opacity: 0; pointer-events: none; }
.home-market-switch span { height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 9px; border-radius: 9px; color: var(--muted);   text-align: center; }
.home-market-switch input:checked + span { background: var(--ui-white); color: var(--ink); box-shadow: 0 2px 8px rgba(19,35,63,.08); }
.home-market-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-picker__field { position: relative; min-width: 0; }
.home-picker__field > span { position: absolute; z-index: 1; left: 13px; top: 7px; color: var(--muted);   pointer-events: none; }
.home-picker__field select { width: 100%; height: 56px; padding: 18px 34px 3px 12px; border: 1px solid var(--border); border-radius: 12px; outline: 0; background: var(--ui-white); color: var(--ink);    }
.home-picker__field select:focus { border-color: var(--accent); }
.home-picker__field select:disabled { color: var(--muted); background: var(--surface-soft); }
.home-picker > .btn { min-width: 130px; border-radius: 12px; }
.home-picker__control { position: relative; min-width: 0; }
.home-picker__control > button { width: auto; height: 28px; min-height: 28px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 5px; padding: 0 11px; border: 0; border-radius: 14px; background: rgba(73,84,104,.1); color: var(--ink);   text-align: left; cursor: pointer; white-space: nowrap; }
.home-picker__control > button::after { content: "⌄"; margin-top: -3px; font-size:var(--font-size-caption); line-height: 1; }
.home-picker__control > button:hover, .home-picker__control > button[aria-expanded="true"] { background: var(--ui-gray); }
.home-picker__control > button:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--accent); outline-offset: -2px; }
.home-picker__control > button:disabled { background: rgba(73,84,104,.07); color: var(--ui-muted); cursor: not-allowed; }
.home-picker__control > button:disabled span { color: inherit; }
.home-picker__control > button span { color: #171819;   }
.home-picker__control > button strong { display: none; }
.home-picker__control > button.is-changed span { display: none; }
.home-picker__control > button.is-changed strong { display: block; max-width: 150px; overflow: hidden; color: #171819;   text-overflow: ellipsis; white-space: nowrap; }
.home-picker__submit { width: 92px; min-width: 92px; height: 28px; min-height: 28px; margin-left: auto; padding: 0 10px; border: 0; border-radius: 8px; background: var(--header-lime,#ace846); color: #171819;    cursor: pointer; transition: background .16s,color .16s,opacity .16s; }
.home-picker__submit:hover:not(:disabled) { background: #9ed73f; }
.home-picker__submit:disabled { background: var(--ui-gray); color: #b6b8be; cursor: not-allowed; }
.home-picker__submit:focus-visible { outline: 3px solid rgba(172,232,70,.45); outline-offset: 2px; }
.home-picker-panel { position: absolute; z-index: 25; top: calc(100% + 9px); left: 0; width: 300px; max-height: 480px; overflow: auto; padding: 16px; border: 1px solid var(--border); border-radius: 17px; background: var(--ui-white); box-shadow: 0 22px 55px rgba(19,35,63,.16); }
.home-picker-panel[hidden] { display: none; }
.home-picker-panel--wide { width: min(720px,calc(100vw - 48px)); }
.home-picker__control:nth-of-type(3) .home-picker-panel--wide { left: -160px; }
.home-picker-panel--small { width: 250px; }
.home-picker-panel--medium { width: 310px; }
.home-picker-panel--price { left: auto; right: 0; width: 350px; }
.home-picker-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }

.home-picker-panel__head > button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--muted);  cursor: pointer; }
.home-panel-search { min-height: 46px; display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 0 13px; border: 1px solid #1a1a1a; border-radius: 11px; }
.home-panel-search-row { display: contents; }
.home-panel-search__cancel { display: none; }
.home-panel-search svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: #858a85; stroke-width: 1.8; }
.home-panel-search input { width: 100%; border: 0; outline: 0; background: transparent; -webkit-appearance: none; appearance: none; }
.home-panel-search input::-webkit-search-decoration, .home-panel-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.home-panel-markets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.home-panel-markets > button, .home-panel-markets > span { min-height: 36px; display: inline-flex; border: 1px solid var(--border); border-radius: 10px; background: var(--ui-white); overflow: hidden; }
.home-panel-markets button { min-height: 34px; padding: 0 11px; border: 0; background: transparent; color: var(--ink);    cursor: pointer; }
.home-panel-markets button.is-selected { background: var(--navy); color: #fff; }
.home-panel-markets [data-brand-expand] { width: 32px; padding: 0; border-left: 1px solid var(--border); color: var(--accent);  }
.home-picker-list-section + .home-picker-list-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.home-picker-list-section h3 { margin: 0 0 8px; color: var(--muted);    }
.home-picker-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px 12px; }
.home-picker-list button { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink);   text-align: left; cursor: pointer; }
.home-picker-list button:hover, .home-picker-list button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.home-picker-list small { color: var(--muted);  }
.home-picker-options { display: grid; gap: 3px; }
.home-picker-options--scroll { max-height: 360px; overflow: auto; }
.home-picker-options button { min-height: 40px; padding: 8px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--ink);   text-align: left; cursor: pointer; }
.home-picker-options button:hover, .home-picker-options button.is-selected { background: var(--accent-soft); color: var(--accent); }
.home-price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.home-price-fields label { position: relative; }
.home-price-fields span { position: absolute; left: 11px; top: 6px; color: var(--muted);  }
.home-price-fields input { width: 100%; height: 54px; padding: 18px 10px 4px; border: 1px solid var(--border); border-radius: 10px; outline: 0;   }
.home-price-fields input:focus { border-color: var(--accent); }
.home-quick-scenarios { max-width: 980px; display: flex; gap: 8px; margin: 14px auto 0; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.home-quick-scenarios::-webkit-scrollbar { display: none; }
.home-quick-scenarios a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-soft); text-decoration: none;   }
.home-quick-scenarios a:first-child { border-color: var(--navy); background: var(--navy); color: #fff; }
.home-quick-scenarios a:hover { border-color: var(--accent); color: var(--accent); }

.home-popular-cars { width: 100%; max-width: 840px; margin: 0 auto 12px; padding: 32px 0 18px; border-bottom: 0; scroll-margin-top: 108px; }
.home-popular-cars__heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.home-popular-cars__heading h2 { margin: 0;    }
.home-popular-cars__heading a { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 17px; border-radius: 11px; background: var(--ui-gray); color: #171819;   text-decoration: none; transition: background .16s, transform .16s; }
.home-popular-cars__heading a:hover { background: var(--ui-gray); transform: translateY(-1px); }
.home-popular-cars__brands { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); column-gap: 24px; row-gap: 8px; }
.home-popular-cars__brands[hidden] { display: none; }
.home-popular-cars__brands a { min-width: 0; min-height: 54px; display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 10px; padding: 4px 7px 4px 2px; border-radius: 10px; color: #171819; text-decoration: none; transition: background .16s, transform .16s; }
.home-popular-cars__brands a:hover { background: var(--ui-gray); }
.home-popular-cars__brands a:hover { transform: translateY(-1px); }
.home-popular-cars__logo { width: 64px; height: 44px; display: grid; place-items: center; color: #60666d; }
.home-popular-cars__logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.home-popular-cars__logo b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ui-border); background: var(--ui-gray);    }
.home-popular-cars__brands strong { min-width: 0;    overflow-wrap: anywhere; }
.home-popular-cars__empty { min-height: 160px; display: grid; place-items: center; padding: 24px; border-radius: 16px; background: var(--ui-gray); color: #747981;  text-align: center; }
.home-popular-cars__empty[hidden] { display: none; }
.home-popular-cars__expand { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; margin: 13px 0 0; padding: 0 12px; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-gray); color: #444a50;    cursor: pointer; transition: background .16s, border-color .16s; }
.home-popular-cars__expand[hidden] { display: none; }
.home-popular-cars__expand:hover { border-color: var(--ui-border); background: var(--ui-gray); }
.home-popular-cars__expand svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .16s; }
.home-popular-cars__expand[aria-expanded="true"] svg { transform: rotate(180deg); }
.home-popular-cars__filters-wrap, .home-popular-cars__quick-wrap { position: relative; }
.home-popular-cars__filters { display: flex; align-items: flex-end; gap: 14px; margin-top: 28px; overflow-x: auto; padding: 0 1px 2px; scrollbar-width: none; }
.home-popular-cars__filters::-webkit-scrollbar, .home-popular-cars__quick::-webkit-scrollbar { display: none; }
.home-popular-cars__filter-group { flex: 0 0 auto; display: grid; gap: 5px; margin: 0; padding: 0; border: 0; }
.home-popular-cars__filter-group legend { padding: 0 2px; color: var(--ui-muted);      }
.home-popular-cars__filter-group > div { display: flex; gap: 6px; }
.home-popular-cars__separator { width: 1px; height: 42px; flex: 0 0 1px; margin-bottom: 2px; background: var(--ui-gray); }
.home-popular-cars__filters button, .home-popular-cars__filters a, .home-popular-cars__quick a, .home-popular-cars__quick button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; background: var(--ui-gray); color: #303438;     text-decoration: none; white-space: nowrap; }
.home-popular-cars__filter-group button { min-width: 58px; cursor: pointer; }
.home-popular-cars__filter-group button[aria-pressed="true"] { background: var(--header-lime,#ace846); color: #171819; }
.home-popular-cars__filter-group button:hover:not([aria-pressed="true"]) { background: var(--ui-gray); }
.home-popular-cars__filters button:focus-visible, .home-popular-cars__quick a:focus-visible, .home-popular-cars__quick button:focus-visible, .home-popular-cars__heading a:focus-visible, .home-popular-cars__brands a:focus-visible, .home-popular-cars__expand:focus-visible, .home-popular-cars__show:focus-visible { outline: 3px solid rgba(172,232,70,.48); outline-offset: 2px; }
.home-popular-cars__filters svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-popular-cars__quick svg { width: 24px; height: 24px; flex: 0 0 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-popular-cars__disabled:disabled, .home-popular-cars__quick button:disabled { border-color: var(--ui-border); background: var(--ui-gray); color: var(--ui-muted); cursor: not-allowed; opacity: 1; }
.home-popular-cars small { padding: 3px 6px; border-radius: 999px; background: var(--ui-gray); color: var(--ui-muted);    }
.home-popular-cars__quick { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-top: 20px; overflow-x: auto; padding: 1px 1px 2px; scrollbar-width: none; }
.home-popular-cars__quick a, .home-popular-cars__quick button { min-width: 0; min-height: 54px; padding-inline: 11px; border-color: var(--ui-border); background: var(--ui-gray); }
.home-popular-cars__quick a:hover { background: var(--ui-gray); }
.home-popular-cars__quick svg { color: var(--ui-muted); }
.home-popular-cars__quick a:first-child svg { color: #ff6947; }
.home-popular-cars__quick a:nth-child(2) svg { color: #6b8d35; }
.home-popular-cars__quick button:nth-child(3) svg { color: #596069; }
.home-popular-cars__quick button:nth-child(4) svg { color: #e76d47; }
.home-popular-cars__quick a:nth-child(5) svg { color: #8ebf37; }
.home-popular-cars__show { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; margin-top: 22px; padding: 0 18px; border-radius: 11px; background: #202124; color: #fff;    text-align: center; text-decoration: none; }
.home-popular-cars__show[hidden] { display: none; }
.home-popular-cars__show:hover { background: #34363a; }
.home-popular-cars__quick a:active,
.home-popular-cars__filters a:active { background: #d8dcdf; border-color: #c8cdd1; color: #171819; }

.home-quick-services { width: 100%; max-width: 840px; display: grid; grid-template-columns: minmax(0,516px) minmax(0,300px); align-items: start; gap: 24px; margin: 0 auto 30px; }
.home-quick-services__tiles { min-width: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) 132px; justify-content: space-between; gap: 8px; }
.home-quick-service { text-decoration: none; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #171819; text-align: center; }
.home-quick-service img { width: 76px; height: 76px; aspect-ratio: 1; display: block; border-radius: 19px; object-fit: cover; }
.home-quick-service strong { min-height: 26px; display: flex; align-items: flex-start; justify-content: center;    }
.home-promo-carousel { position: relative; min-width: 0; height: 118px; }
.home-promo-carousel__viewport { height: 118px; overflow: hidden; border-radius: 20px; background: var(--ui-gray); }
.home-promo-carousel__track { height: 100%; display: flex; transition: transform .5s ease; }
.home-promo-slide { position: relative; min-width: 100%; height: 118px; display: block; overflow: hidden; color: #171819; text-decoration: none; }
.home-promo-slide img { width: 100%; height: 100%; display: block; border-radius: 0; object-fit: cover; object-position: center; }
.home-promo-slide::after { content: ""; position: absolute; z-index: 1; left: 17px; bottom: 10px; width: 84px; height: 26px; border-radius: 13px; }
.home-promo-slide:nth-child(1)::after { background: #f0fdb8; }
.home-promo-slide:nth-child(2)::after { background: #fe9e94; }
.home-promo-slide:nth-child(3)::after { background: #f9d1d0; }
.home-promo-slide:nth-child(4)::after { background: #f0fdb5; }
.home-promo-slide:nth-child(5)::after { background: #eff7d5; }
.home-promo-slide:focus-visible { outline: 3px solid rgba(172,232,70,.68); outline-offset: -3px; }
.home-promo-carousel__dots { position: absolute; z-index: 2; left: 22px; bottom: 17px; height: 18px; display: flex; align-items: center; gap: 6px; }
.home-promo-carousel__dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--ui-gray); cursor: pointer; transition: width .18s ease, border-radius .18s ease, background .18s ease; }
.home-promo-carousel__dots button[aria-current="true"] { width: 18px; border-radius: 999px; background: #171819; }
.home-promo-carousel__dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .home-promo-carousel__track { transition: none; } }

.home-brands-v2, .home-services-v2 { padding: 52px 0; border-top: 1px solid var(--border); }
.home-popular-models { margin-bottom: 16px; padding: 18px; border-radius: 18px; background: var(--navy); color: #fff; }
.home-popular-models[hidden] { display: none; }
.home-popular-models > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.home-popular-models > div:first-child span { color: rgba(255,255,255,.55);  }

.home-popular-models__list { display: flex; flex-wrap: wrap; gap: 8px; }
.home-popular-models__list a { padding: 10px 13px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none;   }
.home-popular-models__list a:hover { background: var(--ui-white); color: var(--ink); }
.home-popular-models__list small { margin-left: 5px; opacity: .6; }
.home-brand-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); column-gap: 34px; row-gap: 4px; }
.home-brand-grid a { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px; padding: 5px 2px; border: 0; border-radius: 8px; color: var(--ink); text-decoration: none; transition: color .16s, background .16s; }
.home-brand-grid a:hover { background: var(--surface-soft); color: var(--accent); }
.home-brand-grid__logo { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.home-brand-grid__logo img { width: 25px; height: 25px; object-fit: contain; }
.home-brand-grid__logo b { color: var(--accent);  }
.home-brand-grid a > span:last-child { min-width: 0; }
.home-brand-grid strong, .home-brand-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-brand-grid small { margin-top: 2px; color: var(--muted);  }
.home-service-grid { display: flex; align-items: flex-start; gap: 34px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.home-service-grid::-webkit-scrollbar { display: none; }
.home-service-grid a, .home-service-grid > span { flex: 0 0 100px; display: flex; flex-direction: column; align-items: center; gap: 9px; color: var(--ink); text-align: center; text-decoration: none; }
.home-service-grid a:hover { color: var(--accent); }
.home-service-grid b { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 17px; background: var(--surface-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--border);  transition: transform .18s, background .18s; }
.home-service-grid a:hover b { transform: translateY(-2px); background: var(--accent-soft); }


.home-discovery, .home-services, .home-brands, .home-recommendations { padding: 48px 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0;    }
.section-heading p:last-child:not(.eyebrow) { max-width: 650px; margin: 10px 0 0; color: var(--muted);   }
.section-heading > a { flex-shrink: 0; color: var(--ink);   text-decoration: none; }
.filter-pills { display: flex; gap: 9px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 2px; }
.filter-pills a, .filter-pills > span { flex-shrink: 0; padding: 10px 15px; border: 1px solid var(--border); border-radius: 999px; background: var(--ui-white); color: var(--ink); text-decoration: none;   }
.filter-pills a:first-child { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-pills > span { color: var(--muted); background: var(--surface-soft); cursor: default; }
.filter-pills small { margin-left: 4px;   }
.home-filter { display: grid; grid-template-columns: 1.15fr 1fr 1fr .8fr auto; gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface-soft); }
.home-filter label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.home-filter label span { padding-left: 3px; color: var(--muted);   }
.home-filter select, .home-filter input { width: 100%; min-width: 0; height: 44px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--ui-white); color: var(--ink);   }
.home-filter .btn { align-self: end; height: 44px; white-space: nowrap; }
.home-services { border-top: 1px solid var(--border); }
.service-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.service-grid a { min-height: 180px; display: flex; flex-direction: column; align-items: flex-start; padding: 22px; border-radius: 18px; background: var(--surface-soft); color: var(--ink); text-decoration: none; transition: transform .18s, background .18s; }
.service-grid a:hover { transform: translateY(-3px); background: var(--accent-soft); }
.service-card__icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: auto; border-radius: 15px; background: var(--ui-white); color: var(--accent);   box-shadow: var(--shadow); }
.service-grid strong { margin: 22px 0 6px;  }
.service-grid small { color: var(--muted);   }
.home-brands { border-top: 1px solid var(--border); }
.brand-list { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.brand-list a { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 13px; color: var(--ink); text-decoration: none;   }
.brand-list a:hover { border-color: var(--accent); }
.brand-list span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-soft); color: var(--accent);  }
.home-recommendations { border-top: 0; }
.home-recommendations .section-heading { align-items: center; margin-bottom: 20px; }

.home-recommendations .section-heading p:last-child:not(.eyebrow) { margin-top: 7px;  }
.home-showcase-groups { display: grid; gap: 52px; }
.home-showcase-group__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.home-showcase-group__heading h3 { margin: 0; font-size: 24px; line-height: 30px; }
.home-showcase-group__heading p { max-width: 680px; margin: 6px 0 0; color: var(--muted); }
.home-showcase-group__heading > a { flex-shrink: 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.home-showcase-more { margin-top: 52px; }
.home-car-grid { grid-template-columns: repeat(4,minmax(0,1fr)); column-gap: 12px; row-gap: 44px; }
.home-car-item[hidden] { display: none; }
.home-car-item .car-card { height: 100%; }
.home-feed-promo { min-height: 300px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(300px,.95fr); align-items: center; gap: 28px; margin: 44px 0 58px; padding: 34px 38px; border-radius: 22px; background: var(--ui-gray); color: #171819; overflow: hidden; }
.home-feed-promo__copy h2 { max-width: 610px; margin: 0;    }
.home-feed-promo__copy p:not(.eyebrow) { max-width: 560px; margin: 14px 0 22px; color: var(--ui-muted);   }
.home-feed-promo__visual { position: relative; min-height: 220px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.home-feed-promo__car, .home-feed-promo__shield { position: relative; display: grid; place-items: center; min-height: 150px; border-radius: 18px; background: linear-gradient(145deg,#e4e7e2,#fff); overflow: hidden; }
.home-feed-promo__car img, .home-feed-promo__shield img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.home-feed-promo__car span, .home-feed-promo__shield span, .home-feed-promo__mini-car span {  filter: grayscale(1); }
.home-feed-promo__steps { display: flex; align-items: center; justify-content: center; gap: 10px;   }
.home-feed-promo__steps span, .home-feed-promo__visual--process span { animation: home-promo-step 3.6s ease-in-out infinite; }
.home-feed-promo__steps span:nth-of-type(2), .home-feed-promo__visual--process span:nth-of-type(2) { animation-delay: 1.2s; }
.home-feed-promo__steps span:nth-of-type(3), .home-feed-promo__visual--process span:nth-of-type(3) { animation-delay: 2.4s; }
.home-feed-promo__steps i, .home-feed-promo__visual--process i { color: var(--ui-muted); font-style: normal; }
.home-feed-promo__visual--five { flex-direction: row; align-items: center; gap: 8px; }
.home-feed-promo__mini-car { flex: 1; display: grid; place-items: center; min-width: 0; height: 112px; border-radius: 15px; background: var(--ui-gray); overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
.home-feed-promo__mini-car img { width: 100%; height: 100%; object-fit: cover; }
.home-feed-promo__mini-car.is-featured { transform: translateY(-12px); box-shadow: 0 0 0 3px #ace846; }
.home-feed-promo__visual--process { flex-direction: row; align-items: center; gap: 9px; }
.home-feed-promo__visual--process span { flex: 1; min-height: 100px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--ui-white);   text-align: center; }
.home-feed-promo__visual--process b { color: var(--ui-muted);  }
.home-feed-promo__visual--shield { align-items: center; }
.home-feed-promo__shield { width: min(100%,340px); border: 3px solid #ace846; clip-path: polygon(50% 0,92% 16%,84% 73%,50% 100%,16% 73%,8% 16%); animation: home-shield-form 3.8s ease-in-out infinite; }
.home-feed-promo__parts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.home-feed-promo__parts span { padding: 6px 9px; border-radius: 999px; background: var(--ui-white); color: var(--ui-muted);   }
@keyframes home-promo-step { 0%,20%,100% { color: var(--ui-muted); opacity: .5; transform: translateY(0); } 35%,62% { color: #171819; opacity: 1; transform: translateY(-3px); } }
@keyframes home-shield-form { 0%,15% { opacity: .45; clip-path: polygon(50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%); } 45%,100% { opacity: 1; clip-path: polygon(50% 0,92% 16%,84% 73%,50% 100%,16% 73%,8% 16%); } }
.home-feed-promo .btn { display: inline-flex; }
.home-feed-promo .btn--primary { border-color: #ace846; background: #ace846; color: #171819; }
.home-feed-promo .btn--primary:hover { border-color: #9ed73f; background: #9ed73f; }
.home-feed-promo--selection .btn--primary, .home-feed-promo--warranty .btn--primary { border-color: #171819; background: #171819; color: #fff; }
.home-feed-promo--selection .btn--primary:hover, .home-feed-promo--warranty .btn--primary:hover { border-color: #303338; background: #303338; }
.home-feed-promo--inspection .home-feed-promo__steps { position: relative; display: grid; grid-template-columns: repeat(5,1fr); grid-template-rows: 34px 22px; gap: 0; min-height: 58px; }
.home-feed-promo--inspection .home-feed-promo__steps::before { content: ""; position: absolute; top: 16px; left: 4%; right: 4%; height: 2px; background: #ace846; }
.home-feed-promo--inspection .home-feed-promo__steps span { position: relative; z-index: 1; width: 24px; height: 24px; justify-self: center; display: grid; place-items: center; border: 2px solid #ace846; border-radius: 50%; background: var(--ui-gray); color: #171819;  }
.home-feed-promo--inspection .home-feed-promo__steps span.is-done, .home-feed-promo--inspection .home-feed-promo__steps span.is-active { background: #ace846; }
.home-feed-promo--inspection .home-feed-promo__steps span:nth-child(1) { grid-column: 1; }
.home-feed-promo--inspection .home-feed-promo__steps span:nth-child(3) { grid-column: 3; }
.home-feed-promo--inspection .home-feed-promo__steps span:nth-child(5) { grid-column: 5; }
.home-feed-promo--inspection .home-feed-promo__steps i { display: none; }
.home-feed-promo--inspection .home-feed-promo__steps div { grid-row: 2; justify-self: center; color: #171819;  }
.home-feed-promo--inspection .home-feed-promo__steps div:nth-of-type(1) { grid-column: 1; }
.home-feed-promo--inspection .home-feed-promo__steps div:nth-of-type(2) { grid-column: 3; }
.home-feed-promo--inspection .home-feed-promo__steps div:nth-of-type(3) { grid-column: 5; }
.home-feed-promo--compact {
    display: flex; align-items: center; gap: 24px; height: 143px; min-height: 143px; margin: 44px 0 58px;
    padding: 0 28px; border-radius: 22px; background: var(--ui-gray); overflow: hidden;
}
.home-feed-promo--compact .home-feed-promo__copy { flex: 1 1 auto; min-width: 0; }
.home-feed-promo--compact .eyebrow { margin: 0 0 4px; }
.home-feed-promo--compact h3 { margin: 0;    }
.home-feed-promo--compact .btn { flex: 0 0 auto; white-space: nowrap; }
.home-feed-promo__thumb { position: relative; flex: 0 0 300px; height: 135px; border-radius: 14px; overflow: hidden; background: var(--ui-gray); }
.home-feed-promo__thumb img { position: absolute; max-width: none; }
.home-feed-promo--approved { display: block; min-height: 0; margin: 44px 0 58px; padding: 0; border-radius: 22px; background: transparent; overflow: hidden; }
.home-feed-promo__approved-link { display: block; width: 100%;  border-radius: 22px; overflow: hidden; }
.home-feed-promo__approved-link img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 1; object-fit: cover; border-radius: 22px; }
.car-card--home .car-card__photo { aspect-ratio: 4/3; border-radius: 20px; }
.car-card--home .car-card__photo img { position: absolute; inset: 0; }
.car-card--home .car-card__photo img[hidden] { display: none; }
.car-card--home:hover .car-card__photo img { transform: none; }
.car-card--home .favorite-button { top: 9px; right: 9px; width: 31px; height: 31px; border: 0; background: transparent; box-shadow: none; color: #fff;  text-shadow: 0 1px 4px rgba(0,0,0,.7); backdrop-filter: none; }
.car-card--home .favorite-button:hover { color: var(--accent); transform: scale(1.12); text-shadow: 0 0 9px rgba(241,99,69,.55); }
.car-card--home .favorite-button.is-favorite { color: var(--accent); }
.car-card--home .car-card__body { padding: 10px 2px 0; }
.car-card--home .car-card__footer { margin-bottom: 3px; }



.car-card--home .car-card__body h3 { margin: 0 0 4px;   }
.car-card--home .car-card__specs { margin: 0; color: var(--ink-soft);   }
.car-card__slide-progress { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 7px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s ease; }
.car-card--home:hover .car-card__slide-progress { opacity: 1; }
.car-card__slide-progress i { height: 3px; flex: 1; border-radius: 999px; background: rgba(255,255,255,.58); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.car-card__slide-progress i.is-active { background: var(--accent); }
.car-card__gallery-zones { position: absolute; inset: 0; z-index: 2; display: flex; }
.car-card__gallery-zone { flex: 1; }
.recommendations-refresh { width: 100%; min-height: 58px; margin-top: 22px; border: 0; border-radius: 14px; background: #111; color: #fff; font-size: 18px; font-weight: 600; cursor: pointer; }
.recommendations-refresh:hover { filter: brightness(1.15); }
.recommendations-refresh:disabled { opacity: .65; cursor: wait; }
.recommendations-sentinel { width: 100%; height: 1px; }
.inspection-banner { min-height: 340px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 30px; margin: 40px 0 70px; padding: 46px; border-radius: 24px; overflow: hidden; background: var(--navy); color: #fff; }
.inspection-banner h2 { max-width: 650px; margin: 0;    }
.inspection-banner p:not(.eyebrow) { max-width: 620px; margin: 18px 0 25px; color: rgba(255,255,255,.65);   }
.inspection-banner__graphic { position: relative; min-height: 230px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.inspection-banner__graphic span { display: flex; align-items: center; justify-content: center; width: 88px; height: 115px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.45); font-size: 24px;  transform: rotate(-7deg); }
.inspection-banner__graphic span:nth-child(2) { transform: translateY(-18px); }
.inspection-banner__graphic span:nth-child(3) { transform: rotate(7deg); }
.inspection-banner__graphic b { position: absolute; bottom: 16px; padding: 11px 18px; border-radius: 999px; background: var(--accent); font-size:var(--font-size-caption); }
.purchase-journey { margin-bottom: 70px; padding-top: 10px; }
.purchase-journey .section-heading { max-width: 930px; }
.purchase-journey__steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.purchase-journey__steps li { min-height: 250px; padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface-soft); }
.purchase-journey__steps li > span { display: block; margin-bottom: 34px; color: rgba(21,25,34,.22);   }
.purchase-journey__steps h3 { margin: 0 0 10px;   }
.purchase-journey__steps p { margin: 0; color: var(--muted);   }
.purchase-journey__footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 18px; }
.purchase-journey__footer p { max-width: 760px; margin: 0; color: var(--muted);   }
.purchase-journey__footer sup { color: var(--accent);   }
.purchase-journey__footer .btn { flex-shrink: 0; }
.selection-banner { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 70px; padding: 34px 40px; border-radius: 20px; background: var(--accent-soft); }
.selection-banner h2 { margin: 0;   }
.selection-banner p:not(.eyebrow) { margin: 10px 0 0; color: var(--ink-soft);  }
.selection-banner .btn { flex-shrink: 0; min-width: 190px; }

.catalog-heading, .page-intro { max-width: 820px; margin: 18px 0 34px; }
.catalog-heading h1, .page-intro h1 { margin: 0 0 12px;   }
.catalog-heading > p:last-child, .page-intro > p:last-child { margin: 0; color: var(--ink-soft);  }
.page-intro--placeholder { min-height: 310px; }
.page-intro--placeholder .btn { margin-top: 24px; }
.hero {
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    background: linear-gradient(135deg, var(--ink) 0%, #23283a 100%);
    color: #fff; border-radius: 20px; padding: 40px; margin-bottom: 28px;
}
.hero__text h1 {   margin: 0 0 10px; max-width: 560px; }
.hero__text p { margin: 0; color: rgba(255,255,255,0.7); max-width: 460px;  }
.hero__stats { display: flex; gap: 28px; flex-shrink: 0; }
.hero__stat { text-align: center; }
.hero__stat strong { display: block;   }
.hero__stat span {  color: rgba(255,255,255,0.6); }

/* ---------- filters ---------- */
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 24px; align-items: start; }
.catalog-layout__main { min-width: 0; }
.catalog-sidebar { position: sticky; top: 88px; }
.catalog-lead-card, .inspection-side-card { padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface-soft); }
.inspection-side-card { display: flex; min-height: 440px; flex-direction: column; overflow: hidden; }
.inspection-side-card h2 { margin: 5px 0 10px;   }
.inspection-side-card p:not(.eyebrow) { margin: 0; color: var(--muted);   }
.inspection-side-card__graphic { position: relative; flex: 1; min-height: 170px; margin: 12px -22px 16px; overflow: hidden; background: radial-gradient(circle at 70% 48%, rgba(241,99,69,.22), transparent 31%), linear-gradient(145deg, #eef1f6, #fff); }
.inspection-side-card__graphic::before, .inspection-side-card__graphic::after, .inspection-side-card__graphic span { content: ""; position: absolute; border-radius: 50%; border: 16px solid #30394b; }
.inspection-side-card__graphic::before { width: 116px; height: 116px; right: -18px; top: 22px; }
.inspection-side-card__graphic::after { width: 68px; height: 68px; right: 62px; top: 76px; border-width: 12px; border-color: var(--accent); }
.inspection-side-card__graphic span { width: 42px; height: 42px; right: 24px; top: 117px; border-width: 9px; border-color: #9099aa; }
.filters-panel { margin-bottom: 24px; }
.filters-panel__summary { display: none; }
.filters {
    background: var(--surface-soft); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.filters__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px;  color: var(--ink-soft);  }
.field select, .field input {
    padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
      background: var(--ui-white); color: var(--ink); min-width: 120px;
}
.field--search { flex: 1 1 220px; }
.field--search input { width: 100%; }
.field select:focus, .field input:focus { outline: none; border-color: var(--accent); }
.field__range { display: flex; gap: 6px; }
.field__range input { width: 84px; min-width: 0; }
.filters .btn { align-self: end; height: 38px; }

/* ---------- toolbar ---------- */
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.catalog-toolbar__count { color: var(--muted);  margin: 0; }
.catalog-toolbar__count strong { color: var(--ink); }

/* ---------- grid & cards ---------- */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.car-card {
    display: block; position: relative; color: inherit;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.car-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.car-card__link { display: block; color: inherit; text-decoration: none; }
.car-card__photo { position: relative; aspect-ratio: 4/3; background: var(--surface-soft); overflow: hidden; }
.car-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.car-card:hover .car-card__photo img { transform: scale(1.04); }
.car-card__photo-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    height: 100%; color: var(--muted);
}
.tag {
    position: absolute; padding: 4px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.94); backdrop-filter: blur(2px);
}
.tag--country { top: 10px; left: 10px; color: var(--ink); }
.tag--stock { bottom: 10px; left: 10px; color: var(--good); }
.favorite-button {
    position: absolute; z-index: 4; top: 10px; right: 10px; width: 40px; height: 40px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(18,21,28,0.08);
    border-radius: 50%; background: rgba(255,255,255,0.94); color: var(--ink); box-shadow: 0 4px 14px rgba(18,21,28,0.12);
       cursor: pointer; backdrop-filter: blur(6px); transition: transform 0.15s ease, color 0.15s ease;
}
.favorite-button:hover { transform: scale(1.06); }
.favorite-button.is-favorite { color: #e23858; }
.favorite-button.is-favorite span:first-child { font-size: 0; }
.favorite-button.is-favorite span:first-child::after { content: "♥"; font-size: 24px; }
.favorite-button:focus-visible { outline: 3px solid rgba(43,95,255,0.34); outline-offset: 2px; }
.car-card__body { padding: 14px 16px 16px; }
.car-card__body h3 { margin: 0 0 6px;   }
.car-card__specs { margin: 0 0 12px; color: var(--muted);   }
.car-card__footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.car-card__price {   margin: 0;  }
/* после общей карточки — иначе рамка/фон/скругление базового .car-card перетирают модификатор */
.car-card--home { overflow: visible; border: 0; border-radius: 0; background: transparent; transition: none; }
.car-card--home:hover { box-shadow: none; transform: none; }
.compare-button {
    display: flex; width: calc(100% - 32px); min-height: 38px; margin: 0 16px 16px; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink-soft);
       cursor: pointer;
}
.compare-button:hover { border-color: var(--accent); color: var(--accent); }
.compare-button.is-compared { border-color: rgba(43,95,255,0.25); background: rgba(43,95,255,0.08); color: var(--accent); }
.compare-button--limit { border-color: #e0a01b; background: var(--warn-bg); color: var(--warn-text); }
.cart-button {
    display: flex; width: calc(100% - 32px); min-height: 40px; margin: -8px 16px 16px; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff;
       cursor: pointer;
}
.cart-button:hover { background: #dc5437; }
.cart-button.is-in-cart { border-color: rgba(21,160,76,.3); background: rgba(21,160,76,.1); color: var(--good); }
.cart-button--limit { border-color: #e0a01b; background: var(--warn-bg); color: var(--warn-text); }
.price-on-request { color: var(--ink-soft);   margin: 0; }
.badge {   padding: 3px 8px; border-radius: 6px; }
.badge--tbd { background: var(--warn-bg); color: var(--warn-text); }
.badge--recycling { display: inline-flex; align-items: center; width: fit-content; background: rgba(21,160,76,.1); color: var(--good); }
.badge--recycling::before { content: "✓"; margin-right: 5px;  }
.badge--recycling[hidden] { display: none; }

.empty-state { grid-column: 1/-1; text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state p:first-child { margin-top: 0; color: var(--ink);  }
.empty-state__hint { margin-bottom: 20px; }

/* ---------- pagination ---------- */
.catalog-load-more { display: flex; justify-content: center; margin: 28px 0 0; }
.catalog-load-more .btn { min-width: 220px; }
.pagination { display: flex; gap: 6px; margin: 28px 0 0; justify-content: center; }
.pagination a {
    padding: 7px 13px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none;
    color: var(--ink-soft);
}
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- car detail ---------- */
.back-link { display: inline-block; margin-bottom: 16px;   color: var(--ink-soft); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.car-detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.car-detail__main h1 {  margin: 0 0 16px; }
.car-detail__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.car-detail__actions { display: flex; flex-shrink: 0; gap: 8px; }
.compare-button--detail { width: auto; min-height: 40px; margin: 0; padding: 0 13px; border-radius: 20px; background: var(--surface-soft); }
.favorite-button--detail {
    position: static; width: auto; height: 40px; padding: 0 13px; gap: 7px; border-radius: 20px;
    flex-shrink: 0;  box-shadow: none; background: var(--surface-soft);
}


.favorite-button--detail.is-favorite .favorite-button__text::after { content: "Сохранено";  }
.car-detail__photo-main { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; background: var(--surface-soft); }
.car-detail__photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-detail__photo-strip { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery-main { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; color: #fff; }
.gallery-main__hint {
    position: absolute; right: 12px; bottom: 12px; padding: 7px 11px; border-radius: 20px;
    background: rgba(18,21,28,0.72); backdrop-filter: blur(6px);
    opacity: 0; transform: translateY(4px); transition: opacity 0.18s ease, transform 0.18s ease;
}
.gallery-main:hover .gallery-main__hint, .gallery-main:focus-visible .gallery-main__hint { opacity: 1; transform: translateY(0); }
.gallery-thumb {
    width: 96px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 9px;
    background: var(--surface-soft); overflow: hidden; flex-shrink: 0; cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.is-active { border-color: var(--accent); }
.gallery-thumb:focus-visible, .gallery-main:focus-visible { outline: 3px solid rgba(43,95,255,0.32); outline-offset: 2px; }
.section-title {   margin: 28px 0 12px; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 11px 0; border-bottom: 1px solid var(--border);  }
.specs-table td:first-child { color: var(--muted); width: 44%; }


.car-detail__sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.price-box { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.price-box__label {  color: var(--muted);  margin-bottom: 4px; }
.price-box__amount {    margin-bottom: 8px; }
.price-box__details { margin-top: 10px;  }
.price-box__details summary { cursor: pointer; color: var(--accent);  }
.price-box__details ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-soft); }
.note {  color: var(--muted); }
.equipment-box { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.equipment-box__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.equipment-box__heading a { color: var(--accent);   text-decoration: none; }
.equipment-box > strong { display: block;   }
.equipment-box > p { margin: 7px 0 14px; color: var(--muted);   }
.equipment-box__groups { display: flex; flex-wrap: wrap; gap: 7px; }
.equipment-box__groups span { padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink-soft);   }

.lead-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.lead-form { display: flex; flex-direction: column; gap: 10px; }
.lead-form h3 { margin: 0;  }
.lead-form__hint { margin: 0 0 4px; color: var(--muted);  }
.lead-form input:not([type="radio"]):not([type="checkbox"]), .lead-form textarea {
    padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px;
    resize: vertical;
}
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--accent); }
.lead-form__methods { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.lead-form__methods label { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 9px; border-radius: 10px; background: var(--surface-soft); color: var(--ink-soft);   cursor: pointer; }
.lead-form__method-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: #525a55; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.lead-form__methods label:has(input:checked) { background: #eef8dc; color: #171819; box-shadow: inset 0 0 0 1px #b4dc70; }
.lead-form__methods label:has(input:checked) .lead-form__method-icon { stroke: #648f20; }
.lead-form__methods input { accent-color: #88bd2f; }
.consent-field { display: flex; align-items: flex-start; gap: 8px; color: var(--muted);   cursor: pointer; }
.consent-field input { margin: 2px 0 0; accent-color: var(--accent); }
.consent-field a { color: var(--ink-soft); }
.lead-form__status {  color: var(--good); margin: 0; min-height: 16px; }
.lead-modal {
    width: min(760px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0;
    border-radius: 24px; background: var(--surface); color: var(--ink);
    box-shadow: 0 28px 90px rgba(12,18,30,.28); overflow: visible;
}
.lead-modal::backdrop { background: rgba(18,24,34,.62); backdrop-filter: blur(4px); }
.lead-modal__content { padding: 48px 54px 44px; }
.lead-modal .lead-form h3 {  text-align: center; }
.lead-modal .lead-form__hint { margin-bottom: 10px; text-align: center; }
.lead-modal .lead-form .btn--primary { background: #ace846; color: #171819; }
.lead-modal .lead-form .btn--primary:hover { background: #9bd437; }
.lead-modal .lead-form .btn--primary:focus-visible { outline: 3px solid rgba(136,189,47,.32); outline-offset: 3px; }
.lead-modal__close {
    position: absolute; z-index: 1; top: 14px; right: 14px; width: 38px; height: 38px;
    border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--ink);
    font-size: 27px; line-height: 1; cursor: pointer;
}
.lead-modal__close:hover { background: var(--border); }
.inspection-modal {
    width: min(840px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 0;
    border-radius: 26px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 90px rgba(12,18,30,.28);
    overflow-y: auto;
}
.inspection-modal::backdrop { background: rgba(18,24,34,.62); backdrop-filter: blur(4px); }
.inspection-modal__content { padding: 52px 56px 48px; }
.inspection-modal__content h2 { margin: 8px 52px 14px 0;   }
.inspection-modal__intro { margin: 0 0 38px; max-width: 640px; color: var(--muted);  }
.inspection-modal__close {
    position: absolute; z-index: 1; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.inspection-modal__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.inspection-modal__close:hover { background: var(--surface-soft); }
.inspection-modal__close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; background: var(--surface-soft); }
.inspection-steps { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 44px; row-gap: 36px; margin: 0 0 40px; padding: 0; list-style: none; }
.inspection-steps li { display: flex; align-items: flex-start; gap: 18px; padding: 0; border-radius: 0; background: none; }
.inspection-step__visual { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.inspection-step__number { display: block; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.inspection-step__icon { width: 58px; height: 58px; display: block; }
.inspection-step__copy strong { display: block; margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--ink); }
.inspection-step__copy p { margin: 0; font-size: 15px; line-height: 22px; font-weight: 400; color: var(--muted); }
.inspection-modal__cta { background: #ace846; color: #171819; }
.inspection-modal__cta:hover { background: #9bd437; }
.inspection-modal__cta:focus-visible { outline: 3px solid rgba(136,189,47,.32); outline-offset: 3px; }
.mobile-contact-bar { display: none; }

/* ---------- fullscreen gallery ---------- */
.gallery-lightbox {
    width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0;
    border: 0; background: rgba(8,10,15,0.96); color: #fff; overflow: hidden;
}
.gallery-lightbox[open] { display: grid; grid-template-columns: 76px 1fr 76px; grid-template-rows: 64px 1fr; }
.gallery-lightbox::backdrop { background: rgba(8,10,15,0.86); }
.gallery-lightbox__toolbar {
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.gallery-lightbox__counter {   color: rgba(255,255,255,0.76); }
.gallery-lightbox__close, .gallery-lightbox__nav {
    border: 0; background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
}
.gallery-lightbox__close { width: 42px; height: 42px; border-radius: 50%; font-size: 30px; line-height: 1; }
.gallery-lightbox__nav { align-self: center; width: 48px; height: 64px; border-radius: 12px; font-size: 42px; }
.gallery-lightbox__nav--prev { justify-self: center; }
.gallery-lightbox__nav--next { justify-self: center; }
.gallery-lightbox__nav[hidden] { display: none; }
.gallery-lightbox__stage {
    grid-column: 2; position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: auto;
    touch-action: pan-y;
}
.gallery-lightbox__stage img {
    display: block; max-width: 100%; max-height: calc(100vh - 88px); object-fit: contain; cursor: zoom-in;
    transition: transform 0.2s ease;
}
.gallery-lightbox__stage.is-zoomed { align-items: flex-start; justify-content: flex-start; touch-action: pan-x pan-y; }
.gallery-lightbox__stage.is-zoomed img { max-width: none; max-height: none; width: auto; min-width: 150%; cursor: zoom-out; }
.gallery-lightbox__zoom-hint {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 7px 12px;
    border-radius: 20px; background: rgba(0,0,0,0.62);  color: rgba(255,255,255,0.82);
    pointer-events: none; transition: opacity 0.2s ease;
}
.gallery-lightbox__stage.is-zoomed .gallery-lightbox__zoom-hint { opacity: 0; }

/* ---------- favorites ---------- */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 8px;  }
.page-heading p { margin: 0; color: var(--muted); }
.favorites-loading { padding: 42px 0; text-align: center; color: var(--muted); }
.favorites-empty { max-width: 520px; margin: 54px auto; text-align: center; }
.favorites-empty__icon {   color: var(--muted); }
.favorites-empty h2 { margin: 14px 0 8px; }
.favorites-empty p { color: var(--muted); margin: 0 0 22px;  }
.favorites-modal {
    width: min(1120px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 40px);
    padding: 0; border: 0; border-radius: 26px; background: var(--surface); color: var(--ink);
    box-shadow: 0 28px 90px rgba(12,18,30,.3); overflow: auto;
}
.favorites-modal::backdrop { background: rgba(18,24,34,.62); backdrop-filter: blur(4px); }
.favorites-modal__content { padding: 42px; }
.favorites-modal .page-heading { padding-right: 44px; }
.favorites-modal .page-heading h2 { margin: 0 0 8px;  }
.favorites-modal__close {
    position: sticky; z-index: 3; top: 14px; float: right; margin: 14px 14px -52px 0;
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-soft);
    color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer;
}
.favorites-modal__close:hover { background: var(--border); }
.cart-modal {
    width: min(900px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 40px); padding: 0; border: 0;
    border-radius: 26px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 90px rgba(12,18,30,.3); overflow: auto;
}
.cart-modal::backdrop { background: rgba(18,24,34,.62); backdrop-filter: blur(4px); }
.cart-modal__content { padding: 42px; }
.cart-modal .page-heading { align-items: flex-start; padding-right: 44px; }
.cart-modal .page-heading h2 { margin: 0 0 8px;  }
.cart-modal .page-heading p { max-width: 650px;   }
.cart-modal__close {
    position: sticky; z-index: 3; top: 14px; float: right; margin: 14px 14px -52px 0; width: 40px; height: 40px;
    border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer;
}
.cart-modal__loading { padding: 35px 0; color: var(--muted); text-align: center; }
.cart-modal__list { display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: grid; grid-template-columns: 150px 1fr 38px; gap: 18px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 16px; }
.cart-item__photo { display: block; height: 95px; overflow: hidden; border-radius: 11px; background: var(--surface-soft); color: var(--muted); text-decoration: none; }
.cart-item__photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__placeholder { display: flex; height: 100%; align-items: center; justify-content: center; padding: 12px;  text-align: center; }
.cart-item__info a { color: var(--ink); text-decoration: none; }

.cart-item__info p { margin: 7px 0; color: var(--muted);  }

.cart-item > button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: 23px; cursor: pointer; }
.cart-modal__empty { max-width: 500px; margin: 50px auto; text-align: center; }
.cart-modal__empty > div { color: var(--muted);  }
.cart-modal__empty h2 { margin: 10px 0 8px; }
.cart-modal__empty p { margin: 0 0 22px; color: var(--muted); }
.cart-modal__footer { display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; margin-top: 20px; padding: 20px; border-radius: 16px; background: var(--accent-soft); }
.cart-modal__footer[hidden] { display: none; }
.cart-modal__footer p { margin: 0; color: var(--ink-soft);   }
.cart-modal__footer p strong { display: block; margin-bottom: 3px; color: var(--ink); }
.cart-modal__footer small { grid-column: 1/-1; color: var(--muted);  }
[data-cart-clear][hidden] { display: none; }

/* Dev-каталог 99 моделей: фильтры остаются в визуальном языке AUTOHUB. */
.catalog-filter-shell { overflow: visible; }
.catalog-filters { display: grid; gap: 18px; }
.market-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.market-switch label { cursor: pointer; }
.market-switch input { position: absolute; opacity: 0; pointer-events: none; }
.market-switch span { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--ui-white); color: var(--ink-soft);   transition: .18s ease; }
.market-switch small { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface); color: var(--muted);  }
.market-switch input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(241,99,69,.2); }
.market-switch input:checked + span small { background: rgba(255,255,255,.18); color: #fff; }
.filters__row--catalog { grid-template-columns: minmax(190px,1.2fr) repeat(2,minmax(165px,1fr)) repeat(5,minmax(140px,.8fr)); align-items: end; }
.multi-filter { position: relative; min-width: 0; }
.multi-filter > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--ui-white); color: var(--ink);  cursor: pointer; list-style: none; }
.multi-filter > summary::-webkit-details-marker { display: none; }
.multi-filter > summary::after { content: "⌄"; color: var(--muted); margin-left: 8px; }
.multi-filter > summary b { color: var(--ink);   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-filter__menu { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; width: min(330px,86vw); max-height: 320px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--ui-white); box-shadow: 0 18px 40px rgba(28,34,45,.14); }
.multi-filter__menu label { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 9px;  cursor: pointer; }
.multi-filter__menu label:hover { background: var(--surface); }
.multi-filter__menu input { accent-color: var(--accent); }
.multi-filter__menu small { color: var(--muted);  }
.filters__actions { display: flex; align-items: center; gap: 10px; }
.demo-data-note { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 9px; padding: 6px 10px; border: 1px solid rgba(188,91,55,.28); border-radius: 999px; background: #fff3eb; color: #974526;    }
.car-card__demo-placeholder { width: 100%; height: 100%; object-fit: cover; background: var(--ui-gray); }
.car-card__photo-placeholder { background: linear-gradient(145deg,#f5f1ec,#e9e2da); }
.car-card__photo-placeholder svg { width: 56px; height: 56px; color: #9b8f83; }
.car-card__photo-placeholder span { color: #83776d;  }

/* Каталог v2: быстрый поиск, популярные марки и пары марка → модель. */
.catalog-discovery { display: grid; gap: 26px; margin-bottom: 28px; }
.catalog-search-box { display: grid; grid-template-columns: minmax(300px,1.7fr) auto; gap: 16px 20px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--ui-white); box-shadow: 0 14px 45px rgba(25,34,48,.07); }
.catalog-search-main { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--ui-white); }
.catalog-search-main span { color: var(--accent);  }
.catalog-search-main input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);   }
.market-switch--compact { align-self: center; flex-wrap: nowrap; }
.market-switch--compact span { min-height: 44px; padding: 8px 13px; white-space: nowrap; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-filters button { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink);    cursor: pointer; }
.quick-filters button:hover { border-color: var(--accent); background: var(--accent-soft); }
.quick-filters__all span { color: var(--accent); }
.catalog-show-button { min-height: 50px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--accent); color: #fff;    cursor: pointer; box-shadow: 0 10px 22px rgba(241,99,69,.22); }
.popular-brands { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--ui-white); }
.popular-brands__head, .brand-pairs__head, .advanced-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.popular-brands__head h2, .brand-pairs__head h2, .advanced-filters__head h2 { margin: 2px 0 0;  }
.popular-brands__head button, .brand-pairs__head button { padding: 8px 0; border: 0; background: transparent; color: var(--accent);    cursor: pointer; }
.brand-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.brand-tile { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 58px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--ui-white); color: var(--ink); text-align: left; cursor: pointer; transition: .16s ease; }
.brand-tile:hover, .brand-tile.is-hovered { border-color: #b9bec6; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(27,35,47,.08); }
.brand-tile.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(241,99,69,.1); }
.brand-tile__logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface); }
.brand-tile__logo img { width: 26px; height: 26px; object-fit: contain; }

.brand-tile__name { overflow: hidden;   text-overflow: ellipsis; white-space: nowrap; }
.brand-tile small { color: var(--muted);  }
.brand-tile--extra { display: none; }
.brand-grid.is-expanded .brand-tile--extra { display: grid; }
.popular-models { display: none; margin: 0 0 14px; padding: 15px; border-radius: 14px; background: var(--surface); }
.popular-models.is-open { display: block; }
.popular-models__heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted);  }
.popular-models__heading strong { color: var(--ink); }
.popular-models__list { display: flex; flex-wrap: wrap; gap: 8px; }
.popular-models__list button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--ui-white); color: var(--ink);   cursor: pointer; }
.popular-models__list button:hover, .popular-models__list button.is-selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.popular-models__list small { margin-left: 6px; opacity: .65; }
.brand-pairs { padding: 18px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.brand-pairs.is-empty { display: none; }
.brand-pair { display: inline-flex; align-items: center; gap: 7px; margin: 0 8px 8px 0; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--ui-white); }
.brand-pair button { border: 0; background: transparent; color: var(--ink);    }
.brand-pair__remove { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%!important; background: var(--surface)!important; color: var(--muted)!important; cursor: pointer; }
.advanced-filters { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--ui-white); box-shadow: 0 20px 55px rgba(26,34,48,.12); }
.advanced-filters[hidden] { display: none; }
.advanced-filters__head > button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface);  cursor: pointer; }
.advanced-filters__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.advanced-filters__footer { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.advanced-filters__footer a { color: var(--muted);  }
.catalog-discovery:has(.advanced-filters:not([hidden])) .popular-brands,
.catalog-discovery:has(.advanced-filters:not([hidden])) .brand-pairs { display: none; }

@media (max-width: 1200px) { .brand-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 760px) {
  .catalog-search-box { grid-template-columns: 1fr; padding: 14px; border-radius: 16px; }
  .catalog-search-main { min-height: 50px; padding: 0 13px; }

  .market-switch--compact { display: flex!important; overflow-x: auto; flex-wrap: nowrap; }
  .market-switch--compact label { flex: 0 0 auto; }
  .market-switch--compact span { min-height: 40px; justify-content: center; padding: 8px 14px; }
  .quick-filters { flex-wrap: nowrap; margin-right: -14px; padding-right: 14px; overflow-x: auto; }
  .quick-filters button { flex: 0 0 auto; }
  .catalog-show-button { width: 100%; }
  .popular-brands { padding: 16px; overflow: hidden; }
  .brand-grid { display: flex; margin-right: -16px; padding-right: 16px; overflow-x: auto; scroll-snap-type: x proximity; }
  .brand-tile { flex: 0 0 128px; grid-template-columns: 36px 1fr; scroll-snap-align: start; }
  .brand-tile small { grid-column: 2; }
  .brand-grid.is-expanded { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-right: 0; padding-right: 0; overflow: visible; }
  .popular-models { margin: 0 -16px 14px; padding: 18px 16px 22px; border-radius: 0; }
  .brand-pairs { padding: 15px; }
  .advanced-filters { position: fixed; z-index: 90; inset: 0; overflow-y: auto; padding: 22px 16px 110px; border: 0; border-radius: 0; }
  .advanced-filters__grid { grid-template-columns: 1fr; }
  .advanced-filters__footer { position: fixed; z-index: 2; right: 0; bottom: 0; left: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ui-white); box-shadow: 0 -10px 28px rgba(20,28,40,.12); }
  .advanced-filters__footer .catalog-show-button { width: auto; flex: 1; }
}

@media (max-width: 1500px) {
  .filters__row--catalog { grid-template-columns: repeat(4,minmax(150px,1fr)); }
}
@media (max-width: 900px) {
  .filters__row--catalog { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .filters__row--catalog { grid-template-columns: 1fr; }
  .market-switch { display: grid; grid-template-columns: 1fr; }
  .market-switch span { justify-content: space-between; }
  .filters__actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 380px) {
    .header-placeholder-phone { display: none; }
}
.car-card__footer--favorite { margin: 0 16px 12px; }
.favorite-price-button { padding: 9px 13px; border: 1px solid rgba(241,99,69,.25); border-radius: 10px; background: var(--accent-soft); color: var(--ink);  cursor: pointer; appearance: none; -webkit-appearance: none; }
.favorite-price-button:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.favorite-detail-modal {
    width: min(980px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px);
    padding: 0; border: 0; border-radius: 26px; background: var(--surface); color: var(--ink);
    box-shadow: 0 30px 100px rgba(8,14,25,.34); overflow: auto;
}
.favorite-detail-modal::backdrop { background: rgba(18,24,34,.66); backdrop-filter: blur(4px); }
.favorite-detail-modal__layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.8fr); gap: 30px; padding: 36px; }
.favorite-detail-modal__photo { aspect-ratio: 16/10; border-radius: 18px; background: var(--surface-soft); overflow: hidden; }
.favorite-detail-modal__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.favorite-detail-modal__car h2 { margin: 22px 0 8px;   }
.favorite-detail-modal__specs { margin: 0; color: var(--muted); }
.favorite-detail-modal__price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.favorite-detail-modal__market { padding: 7px 10px; border-radius: 999px; background: var(--accent); color: #fff;   }
.favorite-detail-modal__note { margin: 12px 0 0; color: var(--muted);   }
.favorite-detail-modal__lead { align-self: start; padding: 22px; border-radius: 18px; background: var(--surface-soft); }
.favorite-detail-modal__close {
    position: sticky; z-index: 4; top: 12px; float: right; margin: 12px 12px -52px 0;
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ui-white);
    box-shadow: 0 8px 24px rgba(16,22,34,.14); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer;
}

/* ---------- comparison ---------- */
.compare-table-wrap { overflow-x: auto; padding-bottom: 8px; }
.compare-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.compare-table tr > *:first-child { width: 170px; border-left: 1px solid var(--border); color: var(--muted);   }
.compare-table thead th { vertical-align: top; background: var(--surface); border-top: 1px solid var(--border); }
.compare-table thead th:first-child { border-top-left-radius: 12px; }
.compare-table thead th:last-child { border-top-right-radius: 12px; }
.compare-table__row--different > th, .compare-table__row--different > td { background: rgba(43,95,255,0.065); }
.compare-table__row--different > th { color: var(--accent); }
.compare-table__difference-label { display: block; margin-top: 3px; color: var(--accent);   }
.compare-table__car { display: block; color: var(--ink); text-decoration: none; }
.compare-table__car img, .compare-table__placeholder { width: 100%; aspect-ratio: 16/10; margin-bottom: 10px; border-radius: 8px; object-fit: cover; background: var(--surface-soft); }
.compare-table__placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted);  }
.compare-table__car strong { display: block;  }
.compare-table__remove { margin-top: 9px; padding: 5px 0; border: 0; background: none; color: var(--muted);   cursor: pointer; }
.compare-table__remove:hover { color: #d13a50; }

@media (max-width: 860px) {
    .container { padding: 24px 20px 56px; }
    .site-header { padding: 8px 0; }
    .site-header__inner { width: calc(100% - 16px); height: 72px; padding: 0 16px; border-radius: 20px; }
    .site-header__start { width: auto; flex: 1 1 auto; justify-content: space-between; }
    .site-header__inner:has(.header-catalog-search) .site-header__start { flex: 1 1 0; min-width: 0; }
    .site-nav, .site-header__contact { display: none; }
    .site-header__links { display: none; }
    .site-header__actions { display: flex; flex: 0 0 auto; }
    .site-header__actions > :not(.header-account-wrap) { display: none!important; }
    .mobile-menu { display: none; }
    .mega-menu { margin-left: auto; }
    .mega-menu > summary { width: 50px; height: 50px; border-radius: 15px; }
    .mega-menu__panel { top: 88px; width: calc(100vw - 16px); max-height: calc(100dvh - 96px); grid-template-columns: 1fr; gap: 24px; padding: 24px; overflow-y: auto; border-radius: 0 0 20px 20px; }
    .mega-menu__services { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    .inspection-side-card { min-height: 360px; }
    .home-hero { min-height: auto; grid-template-columns: 1fr; padding: 42px; }
    .home-hero__visual { min-height: 300px; }
    .home-hero__visual svg { width: min(620px, 100%); }
    .contact-layout { grid-template-columns: 1fr 1fr; }
    .footer-nav { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
    .footer-nav h2 { width: 100%; margin-bottom: 4px; }
    .hero { flex-direction: column; align-items: flex-start; padding: 28px; gap: 24px; }
    .home-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-filter .btn { grid-column: 1/-1; }
    .service-grid { grid-template-columns: repeat(2,1fr); }
    .brand-list { grid-template-columns: repeat(3,1fr); }
    .home-car-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .purchase-journey__steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .purchase-journey__footer { align-items: flex-start; flex-direction: column; }
    .hero__stats { align-self: stretch; justify-content: space-between; }
    .home-search-stage { padding-top: 30px; }
    .home-search-stage__intro { margin-bottom: 20px; }
    /* На мобильных возвращаем обычный порядок (заголовок → подзаголовок →
       счётчики) — компоновка мобильного блока не менялась этой правкой. */
    .home-search-stage__intro h1 { order: 1;   }
    .home-search-stage__lead { order: 2; min-height: 24px; gap: 3px 8px; margin-top: 10px;   }
    .home-market-summary { order: 3; justify-content: center; gap: 6px 18px; margin: 8px 0 0; }
    .home-market-count { min-height: 30px; gap: 7px; }

    .home-market-count span { height: 28px; min-height: 28px; padding: 3px 10px; border-radius: 999px;  }

    .home-main-search { height: 74px; grid-template-columns: minmax(0,1fr) 64px; border-radius: 20px; background: var(--ui-gray); }
    .home-main-search__field { grid-template-columns: 32px minmax(0,1fr); gap: 16px; padding-left: 28px; }
    .home-main-search svg { width: 30px; height: 30px; }

    .home-picker { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .home-picker::-webkit-scrollbar { display: none; }
    .home-picker__control { flex: 0 0 auto; }
    .home-picker__control > button { height: 36px; min-height: 36px; gap: 7px; padding: 0 12px; border-radius: 999px; background: var(--ui-gray);  }
    .home-picker__control > button::after { margin-top: -4px; font-size:var(--font-size-secondary); }
    .home-picker__control > button:disabled { background: var(--ui-gray); color: var(--muted); }

    .home-picker__submit { flex: 0 0 112px; min-width: 112px; height: 36px; min-height: 36px; padding: 0 16px; border-radius: 9px;  }
    .home-picker__submit:disabled { background: var(--ui-gray); color: #92979f; }
    .home-popular-cars { max-width: min(840px,calc(100vw - 40px)); padding: 34px 0 32px; margin-bottom: 30px; }
    .home-popular-cars__brands { grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 20px; }
    .home-popular-cars__quick { display: flex; }
    .home-popular-cars__quick a, .home-popular-cars__quick button { flex: 0 0 auto; min-width: 148px; }
    .home-quick-services { max-width: min(840px,calc(100vw - 40px)); grid-template-columns: 1fr; gap: 18px; margin-bottom: 28px; }
    .home-quick-services__tiles { gap: 12px; }
    .home-quick-service img { border-radius: 16px; }
    .home-promo-carousel, .home-promo-carousel__viewport, .home-promo-slide { height: clamp(174px,36vw,300px); }
    .home-brand-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .home-service-grid { gap: 24px; }
    .filters__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field select, .field input { width: 100%; min-width: 0; }
    .filters .btn { width: 100%; grid-column: 1 / -1; }
    .car-detail { grid-template-columns: 1fr; }
    .car-detail__sidebar { position: static; }
    .car-detail__sidebar .lead-box { scroll-margin-top: 76px; }
}

@media (max-width: 560px) {
    .inspection-modal { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 20px; overflow-y: auto; }
    .inspection-modal__content { padding: 26px 18px 22px; }
    .inspection-modal__content h2 { margin-right: 40px;  }
    .inspection-modal__intro { margin-bottom: 28px; }
    .inspection-steps { grid-template-columns: 1fr; row-gap: 26px; margin-bottom: 30px; }
    .inspection-step__icon { width: 48px; height: 48px; }
    .inspection-modal__content > .btn { width: 100%; }
    body { padding-bottom: 78px; }
    .container { padding: 18px 14px 40px; }
    .site-header__inner { padding: 0 14px; }
    .site-header__logo { width: 182px; height: 50px; flex-basis: 182px; }
    .header-phone-button { display: none; }
    .header-placeholder-phone { display: none; }
    .site-header .logo__text { font-size: 26px; }
    .mega-menu { margin-left: auto; }
    .mega-menu__panel { top: 88px; width: 100vw; height: calc(100dvh - 88px); max-height: none; grid-template-columns: 1fr; gap: 20px; padding: 24px 18px 40px; border-radius: 0; }
    .mega-menu__services { grid-template-columns: 1fr; }

    .home-hero { margin: 0 -14px 20px; padding: 34px 18px 24px; border-radius: 0; }

    .home-hero__lead { margin: 18px 0 22px;  }
    .hero-search { grid-template-columns: 20px 1fr; padding: 8px 12px; }
    .hero-search .btn { grid-column: 1 / -1; width: 100%; }
    .home-hero__actions { align-items: stretch; }
    .home-hero__actions .btn { flex: 1 1 calc(50% - 6px); padding-inline: 10px; }
    .home-hero__catalog-link { width: 100%; margin: 4px 0 0; text-align: center; padding: 8px; }
    .home-hero__visual { min-height: 220px; margin-top: -8px; }
    .home-hero__glow { width: 300px; height: 300px; }
    .home-hero__note { right: 0; bottom: 4px; }
    .home-search-stage { margin: 0 -14px; padding: 22px 14px 20px; }
    .home-search-stage__intro { max-width: none; margin-bottom: 14px; padding: 0 5px; }
    .home-search-stage__intro h1 {   white-space: normal; text-wrap: balance; }
    .home-search-stage__lead { min-height: 54px; display: block; margin-top: 9px;  }
    .home-ecosystem-rotation { min-height: 22px; display: flex; justify-content: center; margin-top: 5px; padding: 0;  }
    .home-market-summary { gap: 5px; margin-top: 8px; }
    .home-market-count { gap: 4px; justify-content: center; }

    .home-quick-services { max-width: none; margin-bottom: 22px; }
    .home-quick-services__tiles { display: flex; gap: 10px; overflow-x: auto; padding: 1px 28px 5px 0; scrollbar-width: none; }
    .home-quick-services__tiles::-webkit-scrollbar { display: none; }
    .home-quick-service { flex: 0 0 104px; }
    .home-quick-service { gap: 6px; }
    .home-quick-service img { border-radius: 12px; }

    .home-promo-carousel__dots { left: 20px; bottom: 16px; }
    .home-market-count span { min-height: 28px; padding: 3px 4px;  }

    .home-popular-cars { max-width: none; padding: 30px 0 32px; margin-bottom: 24px; scroll-margin-top: 92px; }
    .home-popular-cars__heading { align-items: flex-start; gap: 16px; margin-bottom: 22px; }

    .home-popular-cars__heading a { min-height: 38px; padding: 0 12px;  }
    .home-popular-cars__brands { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 8px; row-gap: 7px; }
    .home-popular-cars__brands a { min-height: 50px; grid-template-columns: 50px minmax(0,1fr); gap: 8px; padding: 3px 2px; }
    .home-popular-cars__logo { width: 50px; height: 38px; }
    .home-popular-cars__brands strong {   overflow-wrap: normal; word-break: normal; }
    .home-popular-cars__expand { margin-top: 16px; }
    .home-popular-cars__filters-wrap::after, .home-popular-cars__quick-wrap::after { content: ""; position: absolute; z-index: 2; top: 0; right: -1px; bottom: 0; width: 26px; pointer-events: none; background: linear-gradient(90deg,rgba(255,255,255,0),#fff 88%); }
    .home-popular-cars__filters { align-items: flex-end; margin-top: 27px; padding-right: 28px; scroll-padding-inline: 0 28px; }
    .home-popular-cars__separator { height: 42px; }
    .home-popular-cars__quick { margin-top: 21px; padding-right: 28px; scroll-padding-inline: 0 28px; }
    .home-popular-cars__filters button { min-height: 42px; }
    .home-popular-cars__quick a, .home-popular-cars__quick button { min-width: 148px; min-height: 52px; }
    .home-popular-cars__show { width: 100%; }
    .home-search-shell { width: 100%; max-width: none; }
    .home-main-search { height: 64px; grid-template-columns: minmax(0,1fr) 54px; border-radius: 18px; }
    .home-main-search__field { grid-template-columns: 24px minmax(0,1fr); gap: 11px; padding: 0 8px 0 18px; }
    .home-main-search svg { width: 24px; height: 24px; }
    .home-main-search input { height: 100%;  }
    .home-main-search__advanced { margin: 9px; border-radius: 14px; }
    .home-main-search__advanced svg { width: 26px; height: 26px; }
    .home-search-suggestions { top: calc(100% + 6px); max-height: min(430px,calc(100dvh - 120px)); padding: 18px 15px 20px; border-radius: 18px; }
    .home-search-suggestions__list button { min-height: 42px; padding-inline: 7px;  }
    .home-picker { max-width: none; margin: 8px -14px 0 0; padding-right: 14px; }
    .home-picker__control { position: static; flex: 0 0 auto; }
    .home-picker__control > button { height: 36px; min-height: 36px; padding-inline: 12px; border-radius: 999px;  }

    .home-picker__submit { position: sticky; right: 0; flex: 0 0 112px; min-width: 112px; height: 36px; min-height: 36px; border-radius: 9px;  box-shadow: -10px 0 12px #fff; }
    .home-picker-panel { position: fixed; left: 8px!important; right: 8px!important; top: 72px; width: auto!important; max-height: calc(100dvh - 88px); border-radius: 19px; }
    .home-picker-panel--wide { bottom: 8px; }
    .home-picker-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-brands-v2, .home-services-v2 { padding: 44px 0 38px; }
    .home-brand-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-brand-grid { column-gap: 15px; }
    .home-brand-grid a { min-height: 48px; grid-template-columns: 29px 1fr; gap: 7px; }
    .home-brand-grid__logo { width: 29px; height: 29px; }
    .home-brand-grid__logo img { width: 23px; height: 23px; }
    .home-popular-models { margin: 0 -14px 14px; border-radius: 0; }
    .home-popular-models > div:first-child { align-items: flex-start; flex-direction: column; gap: 4px; }
    .home-popular-models__list { flex-wrap: nowrap; margin-right: -18px; overflow-x: auto; padding-right: 18px; }
    .home-popular-models__list a { flex: 0 0 auto; }
    .home-service-grid { margin-right: -14px; padding-right: 14px; }
    .catalog-heading, .page-intro { margin: 8px 0 24px; }

    .home-discovery, .home-services, .home-brands, .home-recommendations { padding: 36px 0; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 18px; }

    .home-filter { grid-template-columns: 1fr; padding: 12px; }
    .home-filter .btn { grid-column: auto; }
    .service-grid { display: flex; overflow-x: auto; padding-bottom: 5px; }
    .service-grid a { min-width: 220px; min-height: 165px; }
    .brand-list { display: flex; overflow-x: auto; }
    .brand-list a { min-width: 150px; }
    .home-car-grid { grid-template-columns: 1fr; }
    .home-feed-promo { grid-template-columns: 1fr; margin: 30px -14px 44px; padding: 28px 20px; border-radius: 0; }
    .home-feed-promo__visual { min-height: 190px; }
    .home-feed-promo__visual--five { min-height: 150px; }
    .home-feed-promo__visual--process { gap: 5px; }
    .home-feed-promo--approved { margin: 30px -14px 44px; border-radius: 0; }
    .home-feed-promo__approved-link { border-radius: 0; }
    .home-feed-promo__approved-link img { width: 100%; height: auto; object-fit: contain; border-radius: 0; }
    .inspection-banner { grid-template-columns: 1fr; margin: 28px -14px 48px; padding: 34px 20px; border-radius: 0; }
    .inspection-banner__graphic { min-height: 190px; }
    .purchase-journey { margin-bottom: 48px; }
    .purchase-journey__steps { grid-template-columns: 1fr; }
    .purchase-journey__steps li { min-height: 0; padding: 22px; }
    .purchase-journey__steps li > span { margin-bottom: 22px; }
    .purchase-journey__footer .btn { width: 100%; }
    .selection-banner { align-items: stretch; flex-direction: column; margin: 0 0 48px; padding: 28px 22px; }

    .contact-layout { grid-template-columns: 1fr; gap: 12px; }
    .contact-card, .footer-lead, .footer-nav { padding: 22px; border-radius: 17px; }

    .footer-nav { grid-column: auto; align-items: flex-start; flex-direction: column; gap: 2px; }
    .site-footer__inner { padding: 28px 14px 18px; }
    .site-footer--compact { padding: 0 14px 18px; }
    .lead-form__methods label { flex: 1 1 auto; justify-content: center; }
    .lead-modal { width: calc(100vw - 20px); border-radius: 18px; }
    .lead-modal__content { padding: 52px 18px 20px; }

    .favorites-modal { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 18px; }
    .favorites-modal__content { padding: 52px 14px 24px; }
    .favorites-modal .page-heading { align-items: flex-start; flex-direction: column; padding-right: 34px; }

    .cart-modal { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 18px; }
    .cart-modal__content { padding: 52px 14px 24px; }
    .cart-modal .page-heading { flex-direction: column; padding-right: 34px; }

    .cart-item { grid-template-columns: 90px 1fr 34px; gap: 10px; }
    .cart-item__photo { height: 76px; }


    .cart-modal__footer { grid-template-columns: 1fr; }
    .cart-modal__footer .btn { width: 100%; }
    .favorite-detail-modal { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 18px; }
    .favorite-detail-modal__layout { grid-template-columns: 1fr; gap: 18px; padding: 54px 14px 20px; }
    .favorite-detail-modal__car h2 { margin-top: 16px;  }

    .favorite-detail-modal__lead { padding: 18px 14px; }

    .hero { margin: 0 -14px 18px; padding: 24px 18px; border-radius: 0; }


    .hero__stats { gap: 18px; }
    .hero__stat { text-align: left; }


    .filters-panel {
        border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft);
        overflow: hidden; margin-bottom: 18px;
    }
    .filters-panel__summary {
        display: flex; align-items: center; justify-content: space-between; list-style: none;
        min-height: 52px; padding: 0 16px; cursor: pointer;
    }
    .filters-panel__summary::-webkit-details-marker { display: none; }
    .filters-panel__chevron { font-size: 22px; transition: transform 0.2s ease; }
    .filters-panel__chevron::before { content: "−"; }
    .filters-panel:not([open]) .filters-panel__chevron::before { content: "+"; }
    .filters { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 14px; }
    .filters__row { grid-template-columns: 1fr; gap: 12px; }
    .field__range input { width: 50%; }
    .filters .btn { min-height: 46px; }

    .car-grid { grid-template-columns: 1fr; gap: 14px; }
    .car-card { border-radius: 12px; }
    .car-card__photo { aspect-ratio: 16/10; }
    .car-card__body { padding: 13px 14px 15px; }


    .back-link { margin-bottom: 12px; }
    .car-detail { gap: 18px; }

    .car-detail__title-row { align-items: center; }
    .favorite-button--detail { width: 42px; padding: 0; }
    .favorite-button--detail .favorite-button__text { display: none; }
    .compare-button--detail { width: 42px; padding: 0;  }

    .car-detail__photo-main { margin: 0 -14px; border-radius: 0; aspect-ratio: 4/3; }
    .car-detail__photo-strip { margin-right: -14px; padding-right: 14px; }
    .gallery-thumb { width: 82px; height: 62px; }
    .gallery-main__hint { opacity: 1; transform: none; padding: 6px 9px;  }
    .specs-table td {  padding: 10px 0; }
    .specs-table td:first-child { width: 52%; }
    .price-box, .lead-box { padding: 17px; }


    .mobile-contact-bar {
        position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,0.96); border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px rgba(18,21,28,0.08); backdrop-filter: blur(10px);
    }
    .mobile-contact-bar > div { min-width: 0; }
    .mobile-contact-bar span { display: block; color: var(--muted);  }
    .mobile-contact-bar strong { display: block;  white-space: nowrap; }
    .mobile-contact-bar .btn { padding: 11px 18px; }

    .page-heading { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 22px; }

    .page-heading .btn { width: 100%; }
    .compare-table { min-width: 680px; }
    .compare-table tr > *:first-child { width: 140px; }

    .gallery-lightbox[open] { grid-template-columns: 48px 1fr 48px; grid-template-rows: 56px 1fr; }
    .gallery-lightbox__toolbar { padding: 0 12px; }
    .gallery-lightbox__close { width: 38px; height: 38px; font-size: 27px; }
    .gallery-lightbox__nav { width: 38px; height: 54px; font-size: 34px; background: rgba(255,255,255,0.08); }
    .gallery-lightbox__stage img { max-height: calc(100vh - 76px); }
    .gallery-lightbox__stage.is-zoomed img { min-width: 220%; }
}

@media (max-width: 420px) {
    .site-header__logo { width: 164px; flex-basis: 164px; }
}

@media (max-width: 380px) {
    .site-header__logo { width: 164px; flex-basis: 164px; }
}

@media (max-width: 340px) {
    .home-popular-cars__heading { display: grid; justify-items: start; }
    .home-popular-cars__heading a { justify-self: start; }
    .home-popular-cars__brands a { grid-template-columns: 46px minmax(0,1fr); gap: 6px; }
    .home-popular-cars__logo { width: 46px; height: 36px; }

}

/* Home filter readability and market-grouped brand picker. */
.home-picker-panel { padding: 22px; }
.home-picker-panel--wide { width: min(460px,calc(100vw - 48px)); }
.home-picker-panel--price { width: 440px; }
.home-picker-panel__head { margin-bottom: 18px; }

.home-picker-panel__head > button { width: 42px; height: 42px;  }
.home-panel-search { min-height: 56px; margin-bottom: 14px; padding-inline: 16px; border-radius: 14px; }


.home-brand-reset { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 13px; padding: 8px 12px; border: 0; border-radius: 11px; background: transparent; color: #676d74;    text-align: left; cursor: pointer; }
.home-brand-reset:hover { background: var(--ui-gray); color: #171819; }
.home-brand-reset span { width: 20px;    text-align: center; }
.home-brand-market { border-top: 1px solid var(--ui-border); }
.home-brand-market__toggle { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border: 0; background: transparent; color: #171819;    text-align: left; cursor: pointer; }
.home-brand-market__toggle:hover { color: #4f7620; }
.home-brand-market__plus { position: relative; width: 34px; height: 34px; min-width: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--header-lime,#ace846); }
.home-brand-market__plus i { position: absolute; display: block; border-radius: 2px; background: #171819; }
.home-brand-market__plus i:first-child { width: 15px; height: 2.5px; }
.home-brand-market__plus i:last-child { width: 2.5px; height: 15px; transition: transform .15s ease; }
.home-brand-market__toggle[aria-expanded="true"] .home-brand-market__plus i:last-child { transform: scaleY(0); }

.home-picker-list--market { grid-template-columns: 1fr; padding: 0 4px 12px 20px; }
.home-picker-list--market[hidden] { display: none; }
.home-picker-list-section--popular { margin-top: 0; padding-top: 16px; border-top: 1px solid var(--ui-border); }
.home-picker-list-section--popular h3 { margin-bottom: 9px;   }
.home-picker-list--popular { grid-template-columns: 1fr; }
.home-picker-list button { min-height: 46px; padding: 9px 12px;   }

.home-picker-options { gap: 4px; }
.home-picker-options button { min-height: 48px; padding: 10px 13px;   }
.home-picker-options--scroll { max-height: 390px; }
.home-price-fields { gap: 12px; margin-bottom: 12px; }
.home-price-fields span { left: 14px; top: 10px;   }
.home-price-fields input { height: 72px; padding: 27px 14px 7px; border-radius: 14px; background: var(--ui-white);   }
.home-price-fields input:focus { border-color: #89c932; box-shadow: 0 0 0 3px rgba(172,232,70,.22); }
.home-price-error { margin: 0 0 11px; color: #c34237;   }
.home-price-actions { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 10px; }
.home-price-actions button { min-height: 50px; border-radius: 13px;    }
.home-price-reset { border: 1px solid var(--ui-border); background: var(--ui-white); color: #454b50; cursor: pointer; }
.home-price-reset:disabled { color: var(--ui-muted); background: var(--ui-gray); cursor: not-allowed; }
.home-price-actions [data-apply-price] { border: 0; background: var(--header-lime,#ace846); color: #171819; cursor: pointer; }
.home-price-actions [data-apply-price]:disabled { background: var(--ui-gray); color: var(--ui-muted); cursor: not-allowed; }
.home-popular-cars__quick a,.home-popular-cars__quick button { border-color: var(--ui-border); background: var(--ui-gray); }
.home-popular-cars__quick a:hover { background: var(--ui-gray); }
.home-popular-cars__disabled:disabled,.home-popular-cars__quick button:disabled { border-color: var(--ui-border); background: var(--ui-gray); color: var(--ui-muted); }
.home-popular-cars__panel { border-color: var(--ui-border); background: var(--ui-gray); }
.home-popular-cars__filter-group > div { background: var(--ui-gray); }

.home-popular-cars__brands a > span { color: var(--ui-muted);   }
.home-popular-cars__empty { background: var(--ui-gray); }
.home-popular-cars__panel .home-popular-cars__filters-wrap::after { background: linear-gradient(90deg,rgba(236,239,236,0),#ecefec 88%); }

@media (max-width: 560px) {
    .home-picker-panel { padding: 20px 18px; }

    .home-picker-panel--price { width: auto; }
    .home-price-fields { grid-template-columns: 1fr; }
    .home-price-fields input { height: 64px; }



}

/* Popular cars — approved scenario-first composition. */
.home-popular-cars { max-width: 840px; padding-top: 32px; }
.home-popular-cars__heading { margin-bottom: 18px; }

.home-popular-cars__logo-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; overflow-x: auto; padding: 3px 2px 8px; scrollbar-width: none; }
.home-popular-cars__logo-strip::-webkit-scrollbar { display: none; }
.home-popular-cars__logo-strip a { width: 72px; height: 64px; flex: 0 0 72px; display: grid; place-items: center; padding: 3px; border-radius: 10px; background: transparent; text-decoration: none; transition: background .16s,transform .16s; }
.home-popular-cars__logo-strip a:hover { background: var(--ui-gray); transform: translateY(-1px); }
.home-popular-cars__logo-image { width: auto; height: auto; max-width: 60px; max-height: 47px; display: block; object-fit: contain; }
.home-popular-cars__logo-image--audi { max-width: 64px; max-height: 34px; }
.home-popular-cars__logo-image--volkswagen { max-width: 48px; max-height: 48px; }
.home-popular-cars__logo-image--bmw { max-width: 52px; max-height: 52px; transform: scale(1.3); }
.home-popular-cars__logo-image--mercedes-benz { width: 54px; height: 54px; max-width: 54px; max-height: 54px; transform: scale(1.08); }
.home-popular-cars__logo-image--mazda { width: 50px; height: 50px; max-width: 50px; max-height: 50px; }
.home-popular-cars__logo-image--hyundai { width: 56px; height: 46px; max-width: 56px; max-height: 46px; }
.home-popular-cars__logo-image--toyota { max-width: 59px; max-height: 39px; }
.home-popular-cars__logo-image--jetta { width: 52px; height: 52px; max-width: 52px; max-height: 52px; filter: brightness(.44) saturate(.88); }
.home-popular-cars__logo-image--honda { width: 50px; height: 50px; max-width: 50px; max-height: 50px; }
.home-popular-cars__logo-image--nissan { max-width: 57px; max-height: 45px; }
.home-popular-cars__quick { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 14px; }
.home-popular-cars__quick a,.home-popular-cars__quick button { min-height: 48px; padding-inline: 6px; border-color: var(--ui-border); background: var(--ui-white);  }
.home-popular-cars__quick button { position: relative; }
.home-popular-cars__quick button small { position: absolute; top: 3px; right: 3px; padding: 2px 4px; }
.home-popular-cars__quick svg { width: 20px; height: 20px; flex-basis: 20px; }
.home-popular-cars__panel { margin-top: 17px; padding: 20px; border: 1px solid var(--ui-border); border-radius: 19px; background: var(--ui-gray); }
.home-popular-cars__filters { align-items: end; gap: 7px; margin-top: 0; }
.home-popular-cars__filter-group { gap: 5px; }
.home-popular-cars__filter-group > div { --segment-left: 0px; --segment-width: 0px; position: relative; gap: 0; padding: 3px; border-radius: 11px; background: var(--ui-gray); isolation: isolate; }
.home-popular-cars__filter-group > div::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: var(--segment-width); border-radius: 8px; background: var(--ui-white); box-shadow: 0 1px 3px rgba(23,24,25,.08); transform: translateX(var(--segment-left)); transition: width .28s ease,transform .28s ease; z-index: -1; }
.home-popular-cars__filter-group button { min-height: 36px; padding-inline: 12px; border-radius: 0; background: transparent; position: relative; z-index: 1; }
.home-popular-cars__filter-group button[aria-pressed="true"] { background: transparent; color: #171819; }
.home-popular-cars__filter-group button:hover:not([aria-pressed="true"]) { background: transparent; color: #171819; }
.home-popular-cars__separator { height: 42px; }
.home-popular-cars__disabled { min-height: 42px !important; padding-inline: 8px !important; }
.home-popular-cars__brands { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 2px 22px; margin-top: 12px; }
.home-popular-cars__brands a { min-height: 34px; display: flex; grid-template-columns: none; align-items: center; gap: 7px; padding: 4px 5px; border-radius: 7px; }
.home-popular-cars__brands a:hover { background: var(--ui-gray); transform: none; }
.home-popular-cars__brands strong { min-width: 0;    overflow-wrap: normal; white-space: normal; }
.home-popular-cars__brands a > span { flex: 0 0 auto; color: var(--ui-muted);   }
.home-popular-cars__expand { margin: 12px auto 0; border-color: transparent; background: transparent; color: #557f20; }
.home-popular-cars__expand:hover { border-color: transparent; background: #edf4e5; }
.home-popular-cars__empty { min-height: 130px; margin-top: 19px; background: var(--ui-gray); }
.home-popular-cars__show { min-height: 48px; margin-top: 16px; }
.home-popular-cars__panel .home-popular-cars__filters-wrap::after { background: linear-gradient(90deg,rgba(247,248,246,0),#f7f8f6 88%); }

@media (max-width: 980px) {
    .home-popular-cars__logo-strip { justify-content: flex-start; }
    .home-popular-cars__quick { display: flex; }
    .home-popular-cars__quick a,.home-popular-cars__quick button { flex: 0 0 152px; }
}

@media (max-width: 560px) {
    .home-popular-cars { max-width: none; padding-top: 28px; }
    .home-popular-cars__heading { align-items: center; gap: 12px; margin-bottom: 15px; }

    .home-popular-cars__heading a { min-height: 36px; padding-inline: 11px;  }
    .home-popular-cars__logo-strip { width: 100%; gap: 12px; margin-inline: 0; padding: 2px 0 8px; }
    .home-popular-cars__logo-strip a { width: 58px; height: 48px; flex-basis: 58px; }
    .home-popular-cars__quick { margin-top: 12px; padding-right: 28px; }
    .home-popular-cars__quick a,.home-popular-cars__quick button { flex-basis: 150px; min-width: 150px; min-height: 48px; }
    .home-popular-cars__panel { margin-top: 15px; padding: 15px 13px; border-radius: 16px; }
    .home-popular-cars__filters { margin-top: 0; padding-right: 28px; }
    .home-popular-cars__brands { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 10px; margin-top: 17px; }
    .home-popular-cars__brands a { min-height: 36px; display: flex; grid-template-columns: none; gap: 5px; padding: 4px 2px; }


    .home-popular-cars__expand { margin-top: 11px; }
    .home-popular-cars__show { margin-top: 14px; }
}

@media (max-width: 340px) {
    .home-popular-cars__heading { display: flex; }

    .home-popular-cars__heading a { padding-inline: 9px; }
    .home-popular-cars__brands a { display: flex; grid-template-columns: none; }
}

/* Final contrast/readability pass for the approved popular-cars layout. */
.home-popular-cars__quick a,.home-popular-cars__quick button { border-color: var(--ui-border); background: var(--ui-gray); }
.home-popular-cars__quick a:hover { background: var(--ui-gray); }
.home-popular-cars__disabled:disabled,.home-popular-cars__quick button:disabled { border-color: var(--ui-border); background: var(--ui-gray); color: var(--ui-muted); }
.home-popular-cars__panel { border-color: var(--ui-border); background: var(--ui-gray); }
.home-popular-cars__filter-group > div { background: var(--ui-gray); }

.home-popular-cars__brands a > span { color: var(--ui-muted);   }
.home-popular-cars__empty { background: var(--ui-gray); }
.home-popular-cars__panel .home-popular-cars__filters-wrap::after { background: linear-gradient(90deg,rgba(236,239,236,0),#ecefec 88%); }

@media (max-width: 560px) {
    .home-picker__submit { position: static; box-shadow: none; }


}

/* Home picker — final interaction states and compact price card. */
.home-picker__control > button:not(:disabled):hover,
.home-picker__control > button:not(:disabled)[aria-expanded="true"] {
    background: var(--ui-gray);
    color: #171819;
}
.home-picker__control > button.is-changed,
.home-picker__control > button.is-changed:hover,
.home-picker__control > button.is-changed[aria-expanded="true"] {
    background: #111;
    color: #fff;
}
.home-picker__control > button.is-changed strong,
.home-picker__control > button.is-changed::after { color: #fff; }

.home-picker-options button:not(:disabled):hover,
.home-picker-list button:not(:disabled):hover { background: var(--ui-gray); color: #171819; }
.home-picker-options button.is-selected,
.home-picker-options button.is-selected:hover,
.home-picker-list button[aria-selected="true"],
.home-picker-list button[aria-selected="true"]:hover {
    background: #111;
    color: #fff;
}
.home-picker-option-soon {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--ui-muted) !important;
    cursor: not-allowed !important;
    background: var(--ui-gray) !important;
}
.home-picker-option-soon span { color: var(--ui-muted);  }
.home-picker-option-soon small {
    margin-left: auto;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--ui-gray);
    color: var(--ui-muted);




}

.home-picker-panel--price { width: 350px; padding: 18px; }
.home-price-reset {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 10px;
    padding: 5px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ui-muted);



    text-align: left;
    cursor: pointer;
}
.home-price-reset:hover:not(:disabled) { background: var(--ui-gray); color: #171819; }
.home-price-reset:disabled { background: transparent; color: var(--ui-muted); cursor: not-allowed; }
.home-price-reset span { width: 18px;    text-align: center; }
.home-price-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 13px;
    background: var(--ui-white);
}
.home-price-fields label { background: var(--ui-gray); }
.home-price-fields span { left: 14px; top: 9px; color: var(--ui-muted);   }
.home-price-fields input {
    height: 66px;
    padding: 25px 14px 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #171819;


}
.home-price-fields input:focus {
    border-color: transparent;
    box-shadow: inset 0 0 0 2px #111;
}
.home-picker-panel--price [data-apply-price] {
    min-height: 52px;
    border: 0;
    border-radius: 13px;
    background: var(--header-lime,#ace846);
    color: #171819;


}
.home-picker-panel--price [data-apply-price]:disabled {
    background: var(--ui-gray);
    color: var(--ui-muted);
    cursor: not-allowed;
}

@media (max-width: 560px) {
    .home-picker-panel--price { width: min(350px,calc(100vw - 28px)); padding: 16px; }
    .home-price-fields input { height: 62px; }
}

/* Home picker — compact Auto.ru-like finish. */
.home-picker__control > button,
.home-picker__control > button span,
.home-picker__control > button strong {
    align-items: center;

}
.home-picker__control > button span,
.home-picker__control > button strong { min-height: 1em; }
.home-picker__submit:not(:disabled) { background: #111; color: #fff; }
.home-picker__submit:not(:disabled):hover { background: #2d2d2d; }

.home-picker-options button {
    display: flex;
    align-items: center;

}

.home-picker-panel--price { width: 320px; padding: 14px; }
.home-picker-panel--price .home-price-reset { margin-bottom: 6px; }
.home-price-fields { gap: 0; margin-bottom: 9px; background: transparent; }
.home-price-fields label { background: var(--ui-gray); }
.home-price-fields label:first-child { border-radius: 12px 12px 0 0; }
.home-price-fields label:last-child { border-radius: 0 0 12px 12px; }
.home-price-fields input { height: 58px; border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.home-price-fields input:focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.home-price-fields input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.home-price-fields input[type="number"]::-webkit-inner-spin-button,
.home-price-fields input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.home-picker-panel--price [data-apply-price]:not(:disabled) { background: #111; color: #fff; }
.home-picker-panel--price [data-apply-price]:not(:disabled):hover { background: #2d2d2d; }

.home-picker-panel[data-home-panel="brand"] {
    width: min(400px,calc(100vw - 32px));
    padding: 16px;
}
.home-picker-panel[data-home-panel="brand"] .home-picker-panel__head { display: flex; }
.home-picker-panel[data-home-panel="brand"] .home-panel-search {
    margin-bottom: 8px;
}
.home-picker-panel[data-home-panel="brand"] .home-brand-market,
.home-picker-panel[data-home-panel="brand"] .home-picker-list-section--popular {
    border: 0;
}
.home-picker-panel[data-home-panel="brand"] .home-picker-list-section--popular { padding-top: 8px; }
.home-brand-market__toggle { min-height: 50px; border-radius: 10px; }
.home-brand-market__toggle:hover { background: var(--ui-gray); color: #171819; }
.home-brand-reset:hover,
.home-picker-panel[data-home-panel="brand"] .home-picker-list button:hover { background: var(--ui-gray); color: #171819; }

@media (max-width: 560px) {
    .home-picker-panel { top: 96px; max-height: calc(100dvh - 104px); }
    .home-picker-panel--price { width: min(320px,calc(100vw - 28px)); padding: 14px; }
    .home-price-fields input { height: 56px; }
    .home-picker-panel[data-home-panel="brand"] { width: calc(100vw - 28px); padding: 14px; }
    .home-picker-list button[aria-selected="true"],
    .home-picker-list button[aria-selected="true"]:hover {
        background: #e7e8ea;
        color: #171819;
    }
    .home-mobile-condition {
        display: grid;
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: 3px;
        width: 100%;
        margin: 0 0 6px;
        padding: 2px;
        border-radius: 9px;
        background: #edeef0;
    }
    .home-mobile-condition label { position: relative; min-width: 0; }
    .home-mobile-condition input { position: absolute; width: 1px; height: 1px; opacity: 0; }
    .home-mobile-condition span {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 28px;
        padding: 0 6px;
        border-radius: 7px;
        color: #171819;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
    }
    .home-mobile-condition input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(17,17,17,.08); }
    .home-mobile-condition input:focus-visible + span { outline: 2px solid #171819; outline-offset: -2px; }
    body.home-picker-panel-open .help-widget { display: none !important; }
    .home-panel-search-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-bottom: 7px;
    }
    .home-panel-search-row .home-panel-search {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 38px;
        margin: 0;
        padding: 0 11px;
        border: 0;
        border-radius: 10px;
        background: #edeef0;
        transition: flex-basis .18s ease;
    }
    .home-panel-search-row .home-panel-search svg {
        flex: 0 0 23px;
        width: 23px;
        height: 23px;
        stroke: #777d85;
        stroke-width: 1.8;
    }
    .home-panel-search-row .home-panel-search input {
        min-width: 0;
        color: #171819;
        font-size: 14px;
        font-weight: 450;
        letter-spacing: -.2px;
    }
    .home-panel-search-row .home-panel-search input::placeholder { color: #747a83; opacity: 1; }
    .home-panel-search__cancel {
        display: block;
        flex: 0 0 0;
        width: 0;
        min-height: 32px;
        padding: 0;
        overflow: hidden;
        border: 0;
        background: transparent;
        color: #646b75;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: width .18s ease, flex-basis .18s ease, opacity .14s ease;
    }
    .home-panel-search-row:focus-within .home-panel-search__cancel {
        flex-basis: 58px;
        width: 58px;
        opacity: 1;
        pointer-events: auto;
    }
    .home-picker-panel[data-home-panel="model"] { padding-bottom: 0; }
    .home-picker-panel[data-home-panel="model"] .home-picker-list-section h3 {
        color: #171819;
        font-size: 14px;
        font-weight: 600;
    }
    .home-picker-panel[data-home-panel="model"] .home-picker-list { display: grid; grid-template-columns: 1fr; gap: 0; }
    .home-picker-panel[data-home-panel="model"] .home-picker-list button {
        min-height: 42px;
        padding: 7px 5px;
        border-bottom: 1px solid #eceef1;
        border-radius: 0;
        background: transparent;
        color: #171819;
    }
    .home-picker-panel[data-home-panel="model"] .home-picker-list button > span:first-child {
        font-size: 14px;
        font-weight: 600;
        line-height: 18px;
    }
    .home-picker-panel[data-home-panel="model"] .home-picker-list button[aria-selected="true"],
    .home-picker-panel[data-home-panel="model"] .home-picker-list button[aria-selected="true"]:hover {
        background: transparent;
        color: #171819;
    }
    .home-model-option__meta { display: inline-flex; align-items: center; gap: 7px; }
    .home-model-option__meta small { display: none; min-width: 18px; color: #8b9098; font-size: 11px; font-weight: 400; text-align: right; }
    .home-model-option[aria-selected="true"] .home-model-option__meta small { display: inline; }
    .home-model-option__meta i {
        display: grid;
        place-items: center;
        width: 18px;
        height: 18px;
        border: 1px solid #c8cdd4;
        border-radius: 4px;
        background: #fff;
        color: #fff;
        font: 700 12px/1 system-ui,sans-serif;
        font-style: normal;
    }
    .home-model-option[aria-selected="true"] .home-model-option__meta i { border-color: #66b5ef; background: #66b5ef; }
    .home-model-show {
        position: sticky;
        bottom: 8px;
        z-index: 3;
        display: block;
        width: 100%;
        min-height: 40px;
        margin: 12px 0 8px;
        border: 0;
        border-radius: 12px;
        background: #111317;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
    }
}

/* Home filters: compact, control-anchored popovers like Auto.ru. */
@media (min-width: 561px) {
    .home-picker-panel,
    .home-picker-panel--wide,
    .home-picker-panel--small,
    .home-picker-panel--medium,
    .home-picker-panel--price,
    .home-picker-panel[data-home-panel="brand"] {
        width: min(288px,calc(100vw - 32px));
        left: 0;
        right: auto;
    }

    .home-picker__control:nth-last-of-type(-n/**/+2) .home-picker-panel {
        left: auto;
        right: 0;
    }

    .home-picker-panel .home-picker-list {
        grid-template-columns: minmax(0,1fr);
    }
}

/* Каталог: открытая сетка фильтров, размеры по референсу Auto.ru. */
.catalog-heading { margin-bottom: 24px; }
.catalog-heading h1 { margin: 6px 0 8px;    }
.catalog-heading > p:not(.eyebrow) { color: var(--muted);   }
.catalog-discovery--inline { gap: 24px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
/* Keep intrinsic form-control widths from enlarging the parent grid track. */
.catalog-filter-main { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; }
.catalog-filter-main > *, .catalog-pair-list > *, .catalog-pair-row > *, .catalog-field-grid > * { min-width: 0; }
.catalog-query input, .catalog-filter-main select, .catalog-range input { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: var(--surface-soft); color: var(--ink);   }
.catalog-filter-main input::placeholder { color: var(--ink-soft); opacity: 1; }
.catalog-filter-main :is(input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.catalog-filter-main select:disabled { color: var(--muted); }
.catalog-query { margin-bottom: 2px; }
.catalog-pair-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; }
.catalog-pair-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.catalog-field-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px 16px; }
.catalog-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; grid-column: span 2; gap: 10px; }
.catalog-filter-actions { display: flex; align-items: center; gap: 20px; }
.catalog-filter-actions > button:not(.catalog-show-button), .catalog-pair-row > button { border: 0; padding: 0; background: transparent; color: var(--accent);   cursor: pointer; text-align: left; }
.catalog-filter-actions > a { color: var(--muted);  }
.catalog-filter-main .catalog-show-button { min-height: 44px; margin-left: auto; border-radius: 10px; background: var(--ink); color: var(--surface);   box-shadow: none; }
.catalog-filter-main .catalog-show-button:hover { background: var(--ink-soft); }
.catalog-segments { display: inline-flex; justify-self: start; flex-wrap: wrap; gap: 2px; border-radius: 12px; padding: 2px; background: var(--surface-soft); }
.catalog-segments label { position: relative; cursor: pointer; }
.catalog-segments input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.catalog-segments span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 10px;   }
.catalog-segments input:checked + span { background: var(--surface); color: var(--ink);  box-shadow: var(--shadow); }
.catalog-segments input:focus-visible + span { outline: 2px solid var(--accent); }
.catalog-quick-panel { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.catalog-quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-quick-chips button, .catalog-switch-row > button { min-height: 36px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 20px; color: var(--ink); background: var(--surface);   cursor: pointer; }
.catalog-quick-chips button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.catalog-quick-panel button:disabled { color: var(--muted); cursor: default; }
.catalog-quick-panel small { margin-left: 5px;   }
.catalog-switch-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.catalog-switch-row > span { width: 92px;  color: var(--muted);  }
.catalog-switch-row .catalog-segments span { min-height: 32px; padding: 0 12px;  }
.car-card__details { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; margin: 12px 0 16px;   color: var(--ink-soft); }
.car-card__details > span { min-width: 0; overflow-wrap: anywhere; }


.catalog-layout .car-card { border-radius: 14px; }
.catalog-layout .tag--country { background: var(--surface); color: var(--ink);  }
@media (max-width: 760px) {

  .catalog-pair-row { gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-pair-row > :last-child { grid-column: 1 / -1; }
  .catalog-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .catalog-range { grid-column: span 2; }
  .catalog-filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.5fr); gap: 10px; }
  .catalog-filter-main .catalog-show-button { width: 100%; min-width: 0; margin-left: 0; padding: 8px;  }
  .catalog-switch-row > span { width: 100%; }
}

/* Restored catalog brand shortcuts, below the result count. */
.catalog-popular-brands { display: flex; gap: 16px; overflow-x: auto; padding: 4px 0 16px; margin-bottom: 20px; border: 0; border-radius: 0; }
.catalog-brand { flex: 0 0 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink);  text-align: center; }
.catalog-brand__logo { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-soft); }
.catalog-brand__logo img { width: 44px; height: 38px; object-fit: contain; }
.catalog-brand small { color: var(--muted); }
.catalog-brand:hover .catalog-brand__logo, .catalog-brand.is-selected .catalog-brand__logo { border-color: var(--accent); background: var(--accent-soft); }
.catalog-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* Shared header search uses the catalog's existing GET search. */
.header-catalog-search { position: relative; flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--ui-gray); }
.header-catalog-search svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: #858a85; stroke-width: 1.8; }
.header-catalog-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink);   outline-offset: 5px; }
.smart-search-clear { position: relative; z-index: 2; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #737982; font: 300 30px/30px Arial,sans-serif; cursor: pointer; }
.home-search-shell > .smart-search-clear { position: absolute; top: 23px; right: 78px; }
.smart-search-clear:hover { background: rgba(31,36,45,.07); color: #171819; }
.smart-search-clear[hidden] { display: none; }
.smart-search-suggestions { position: absolute; z-index: 1200; top: calc(100% + 8px); left: 0; box-sizing: border-box; width: 100%; max-height: min(520px,calc(100vh - 150px)); overflow-y: auto; padding: 12px; border: 1px solid var(--ui-border); border-radius: 20px; background: #fff; box-shadow: 0 26px 70px rgba(23,24,25,.18); text-align: left; }
.smart-search-suggestions[hidden] { display: none; }
.header-catalog-search .smart-search-suggestions { width: min(680px,calc(100vw - 32px)); }
.smart-search-heading { margin: 2px 8px 8px; color: #7a8089; font-size: 12px; font-weight: 600; }
.smart-search-suggestions [role="option"] { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 11px; width: 100%; min-height: 58px; padding: 7px 9px; border: 0; border-radius: 12px; background: transparent; color: #171819; text-align: left; cursor: pointer; }
.smart-search-suggestions [role="option"]:hover,.smart-search-suggestions [role="option"][aria-selected="true"] { background: #f0f1f3; }
.smart-search-suggestions img,.smart-search-mark { display: grid; place-items: center; width: 34px; height: 34px; object-fit: contain; }
.smart-search-mark { border-radius: 10px; background: #eff0f2; color: #555c66; font-size: 14px; font-weight: 700; }
.smart-search-suggestions [role="option"] > span:last-child { min-width: 0; display: grid; gap: 2px; }
.smart-search-suggestions strong { overflow: hidden; font-size: 16px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.smart-search-suggestions small { color: #7a8089; font-size: 12px; line-height: 16px; }
.smart-search-empty { margin: 0; padding: 18px 12px; color: #777d87; font-size: 14px; }
@media (max-width: 600px) {
  .home-search-shell > .smart-search-clear { top: 15px; right: 61px; }
  .smart-search-suggestions { max-height: min(440px,calc(100dvh - 118px)); padding: 8px; border-radius: 16px; }
  .header-catalog-search .smart-search-suggestions { left: -14px; width: calc(100vw - 28px); }
}
.site-header__inner:has(.header-catalog-search) .site-header__start { flex-shrink: 0; }
@media (max-width: 1100px) {
  .site-header__inner:has(.header-catalog-search) { flex-wrap: wrap; height: auto; min-height: 90px; padding-bottom: 10px; gap: 10px 16px; }
  .header-catalog-search { order: 3; flex-basis: 100%; height: 40px; }
}
/* Role-based typography; geometry stays with each component. */








@media(max-width:600px){}

.home-picker__submit{width:auto;min-width:max-content;padding-inline:12px;}
.home-popular-cars__quick a,.home-popular-cars__quick button{white-space:nowrap;flex-wrap:nowrap;gap:8px;}
.home-popular-cars__quick button small{position:absolute;margin-left:0;}
.home-popular-cars__brands a>span,.home-search-stage__intro p,.home-main-search input::placeholder{color:var(--ink-soft);}

/* ---------- Панель «Сообщения» (список + открытый диалог), 15.09.2026 ---------- */
.messages-panel{display:none;}
.messages-panel[open]{position:fixed;top:0;right:0;left:auto;bottom:0;margin:0;height:100dvh;max-height:100dvh;width:auto;max-width:100vw;padding:0;border:0;border-radius:0;background:var(--ui-white);color:#171819;box-shadow:-8px 0 28px rgba(0,0,0,.07);display:flex;overflow:hidden;}
.messages-panel::backdrop{background:rgba(20,24,28,.22);}
.messages-panel *{box-sizing:border-box;}
.messages-panel [hidden]{display:none!important;}
.messages-panel svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.messages-panel :is(button,a,textarea):focus-visible{outline:2px solid #171819;outline-offset:2px;}
.messages-panel__list{width:380px;max-width:100vw;flex:none;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;border-right:1px solid var(--ui-border);}
.messages-panel__thread{width:460px;max-width:100vw;flex:none;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;}
.messages-panel__thread[hidden]{display:none;}
.messages-panel__head{flex:none;display:flex;align-items:center;gap:14px;padding:22px 24px 10px;}
.messages-panel__head h2{margin:0;font-size:25px;font-weight:600;letter-spacing:-.01em;}
.messages-panel__close{width:36px;height:36px;flex:none;border:0;border-radius:10px;background:transparent;display:grid;place-items:center;color:#171819;cursor:pointer;}
.messages-panel__close svg{width:20px;height:20px;}
.messages-panel__close:hover{background:var(--ui-gray);}
.messages-panel__notify{flex:none;margin:6px 24px 12px;height:52px;border:0;border-radius:14px;background:#171819;color:#fff;font:inherit;font-size:16px;font-weight:500;cursor:pointer;}
.messages-panel__notify:disabled{opacity:.55;cursor:default;}
.messages-panel__notify:not(:disabled):hover{background:#000;}
.messages-panel__quick{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 24px 16px;}
.messages-panel__tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:76px;padding:14px 10px;border:0;border-radius:14px;background:var(--ui-gray);cursor:pointer;font:inherit;font-size:14px;color:#171819;}
.messages-panel__tile svg{width:22px;height:22px;}
.messages-panel__tile:hover{background:var(--ui-gray);}
.messages-panel__badge{position:absolute;top:8px;right:10px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e0392f;color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;}
.messages-panel__threads{flex:1;min-height:0;overflow-y:auto;}
.messages-row{display:flex;align-items:flex-start;gap:14px;width:100%;padding:14px 24px;border:0;border-bottom:1px solid var(--ui-border);background:transparent;text-align:left;cursor:pointer;font:inherit;color:inherit;}
.messages-row.is-active{background:var(--ui-gray);}
.messages-row:hover{background:var(--ui-gray);}
.messages-row__thumb,.messages-thumb{width:52px;height:52px;flex:none;border-radius:50%;overflow:hidden;background:#f0f1f3;display:grid;place-items:center;}
.messages-row__thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.messages-row__thumb .user-avatar,.messages-thumb .user-avatar{width:100%;height:100%;}
.messages-thumb--small{width:40px;height:40px;border-radius:50%;}
.messages-thumb__icon{width:100%;height:100%;display:grid;place-items:center;color:#171819;}
.messages-thumb__icon svg{width:22px;height:22px;}
.messages-thumb__brand{width:100%;height:100%;display:grid;place-items:center;background:var(--header-lime,#ace846);color:#171819;font-weight:700;font-size:16px;}
.messages-row__body{flex:1;min-width:0;display:grid;gap:3px;}
.messages-row__top{display:flex;justify-content:space-between;gap:10px;}
.messages-row__top strong{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.messages-row__top time{flex:none;font-size:12px;color:var(--ui-muted);white-space:nowrap;padding-top:1px;}
.messages-row__topic{font-size:13px;font-weight:600;color:#3d4147;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.messages-row__preview{font-size:13px;color:var(--ui-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.messages-row__unread{flex:none;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#e0392f;color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;margin-top:2px;}
.messages-empty,.messages-loading,.messages-error{padding:44px 24px;text-align:center;color:var(--ui-muted);font-size:14px;}
.messages-empty__hint{color:var(--ui-muted);font-size:13px;margin-top:4px;}
.messages-retry{margin-top:10px;padding:9px 16px;border:0;border-radius:10px;background:var(--ui-gray);color:#171819;font:inherit;cursor:pointer;}
.messages-thread__head{flex:none;display:flex;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid var(--ui-border);}
.messages-back{display:none;width:34px;height:34px;flex:none;border:0;border-radius:10px;background:transparent;color:#171819;cursor:pointer;}
.messages-back svg{width:20px;height:20px;}
.messages-thread__name{flex:1;min-width:0;font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.messages-more{width:34px;height:34px;flex:none;border:0;border-radius:10px;background:transparent;color:var(--ui-muted);cursor:pointer;}
.messages-more svg{width:20px;height:20px;}
.messages-more:hover,.messages-back:hover{background:var(--ui-gray);}
.messages-context{flex:none;display:flex;align-items:center;gap:12px;padding:12px 22px;border-bottom:1px solid var(--ui-border);text-decoration:none;color:inherit;}
.messages-context img,.messages-context .messages-thumb__icon{width:44px;height:44px;border-radius:10px;flex:none;object-fit:cover;}
.messages-context strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.messages-context>span>span{display:block;font-size:12px;color:var(--ui-muted);margin-top:2px;}
.messages-context b{margin-left:auto;flex:none;color:var(--ui-muted);font-weight:400;font-size:20px;}
.messages-context--plain{cursor:default;}
.messages-scroll{flex:1;min-height:0;overflow-y:auto;padding:16px 22px;display:flex;flex-direction:column;gap:8px;justify-content:flex-end;background:var(--ui-white);}
.messages-day{align-self:center;margin:10px 0 2px;font-size:12px;color:var(--ui-muted);}
.messages-message{align-self:flex-start;display:flex;align-items:flex-end;gap:7px;max-width:82%;}
.messages-message--out{align-self:flex-end;flex-direction:row-reverse;}
.messages-message__avatar{margin-bottom:2px;}
.messages-bubble{max-width:100%;padding:10px 13px;border-radius:16px;}
.messages-bubble--in{background:var(--ui-gray);border-bottom-left-radius:4px;}
.messages-bubble--out{background:#e4f5d6;border-bottom-right-radius:4px;}
.messages-bubble__author{display:block;margin:0 0 2px;font-size:12px;line-height:17px;font-weight:600;color:#5f6570;}
.messages-bubble p{margin:0 0 4px;font-size:15px;line-height:22px;white-space:pre-wrap;overflow-wrap:anywhere;}
.messages-bubble__meta{display:flex;align-items:center;gap:4px;justify-content:flex-end;font-size:11px;color:var(--ui-muted);}
.messages-bubble__status svg{width:14px;height:14px;stroke-width:2;}
.messages-composer{flex:none;display:flex;align-items:flex-end;gap:8px;margin:12px 22px 18px;padding:8px 10px 8px 14px;border-radius:18px;background:var(--ui-gray);}
.messages-clip{width:32px;height:32px;flex:none;border:0;background:transparent;color:var(--ui-muted);border-radius:9px;cursor:pointer;}
.messages-clip svg{width:20px;height:20px;}
.messages-clip:disabled{opacity:.4;cursor:not-allowed;}
.messages-composer textarea{flex:1;min-width:0;max-height:160px;border:0;background:transparent;resize:none;font:inherit;font-size:15px;line-height:22px;padding:6px 0;color:#171819;}
.messages-composer textarea:focus{outline:none;}
.messages-composer textarea::placeholder{color:var(--ui-muted);}
.messages-send{width:36px;height:36px;flex:none;border:0;border-radius:10px;background:#171819;color:#fff;display:grid;place-items:center;cursor:pointer;}
.messages-send svg{width:18px;height:18px;stroke-width:2;}
.messages-panel .messages-error[role=alert]{padding:0 22px 12px;text-align:left;color:#a4271f;font-size:13px;}
@media (max-width:900px){
  .messages-panel__list{width:100vw;}
  .messages-panel__thread{width:100vw;}
  .messages-panel.messages-panel--thread-open .messages-panel__list{display:none;}
  .messages-back{display:grid;place-items:center;}
}

/* New service tiles share the supplied artwork across navigation and home. */
.service-soon-badge { display: inline-block; padding: 2px 6px; border-radius: 999px; background: #f1f2f4; color: #777b82; font: 400 12px/18px var(--font-family); vertical-align: middle; }
.mega-menu__service-soon strong .service-soon-badge { margin-left: 4px; }
.home-quick-service .service-soon-badge { margin-top: -5px; }
@media (max-width: 1000px) {
 .home-quick-services { grid-template-columns: minmax(0,1fr); max-width: 840px; }
 .home-quick-services__tiles { overflow-x: auto; padding-bottom: 6px; }
 .home-quick-services .home-promo-carousel { width: min(100%,300px); justify-self: end; }
}

@media (max-width: 600px) {
 .home-quick-service:last-child { flex-basis: 140px; }
}

/* Keep the service row aligned with the 840px home search and filter column. */
.home-promo-slide { background: var(--promo-background); }
.home-promo-slide:nth-child(1) { --promo-background: #eef6c1; }
.home-promo-slide:nth-child(2) { --promo-background: #ffa69c; }
.home-promo-slide:nth-child(3) { --promo-background: #f9d1d0; }
.home-promo-slide:nth-child(4) { --promo-background: #eff7c0; }
.home-promo-slide:nth-child(5) { --promo-background: #eff3d8; }
.home-promo-slide img { object-fit: fill; mask-image: linear-gradient(to right,transparent 50%,#000 57%); }
.home-promo-slide__title { position: absolute; z-index: 2; top: 14px; left: 16px; width: 55%; margin: 0; color: #111; font: 500 15px/19px var(--font-family); }
.home-promo-slide::after { background: var(--promo-background); }
