/* ============================================================
   АвтоЗапАсс.РФ — стили. Палитра: красный акцент, графит, белый, мягкие серые поверхности.
   Красный — только для акцентов (кнопки, цены, иконки), большие плоскости светлые.
   ============================================================ */
:root {
  /* Тёмная тема (по умолчанию): глубокий графит, красный — акцент */
  color-scheme: dark;
  --red: #cc2a30;
  --red-dark: #e0383e;
  --red-text: #ff7378;
  --red-soft: #2b1d20;
  --red-line: #4d2a2e;
  --black: #f2f3f5;
  --ink: #d6d9de;
  --muted: #9ba2ab;
  --grey: #1b1e23;
  --grey-2: #2b2f36;
  --border: #2f343c;
  --white: #fff;
  --bg: #14161a;
  --surface: #1e2126;
  --surface-hover: #262a31;
  --field: #181b1f;
  --field-border: #3a3f47;
  --inverse: #f2f3f5;
  --inverse-ink: #14161a;
  --header-bg: rgba(20, 22, 26, .94);
  --ok: #5fd18a;
  --ok-bg: #16281e;
  --ok-line: #2a4a38;
  --warn-bg: #2b2516;
  --warn-line: #4d4224;
  --overlay: rgba(14, 16, 19, .72);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --container: 1200px;
  --gold: var(--red-text);
  --gold-text: var(--black);
  --gold-line: var(--red-line);
  --gold-soft: var(--red-soft);
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --gold: var(--red-text);
  --gold-text: var(--black);
  --gold-line: var(--red-line);
  --gold-soft: var(--red-soft);
  --red-dark: #ad2228;
  --red-text: #cc2a30;
  --red-soft: #fcf0f0;
  --red-line: #f3d3d4;
  --black: #25282d;
  --ink: #33373d;
  --muted: #6c727a;
  --grey: #f6f7f9;
  --grey-2: #eceef1;
  --border: #e5e7eb;
  --bg: #fdfbfa;
  --surface: #fff;
  --surface-hover: #f6f7f9;
  --field: #fff;
  --field-border: #d9dce1;
  --inverse: #25282d;
  --inverse-ink: #fff;
  --header-bg: rgba(255, 255, 255, .96);
  --ok: #1f7a43;
  --ok-bg: #eef8f1;
  --ok-line: #cbe8d5;
  --warn-bg: #fffaf0;
  --warn-line: #f2e2b8;
  --overlay: rgba(255, 255, 255, .7);
  --shadow: 0 8px 30px rgba(37, 40, 45, .07);
  --shadow-sm: 0 2px 10px rgba(37, 40, 45, .05);
}

:root { --hdr-top: rgba(8, 9, 11, 0); --hdr-mid: rgba(10, 11, 14, 0); --hdr-bot: rgba(10, 11, 14, 0); --cbg-sky: linear-gradient(180deg, #0e1013 0%, #14161a 45%, #1c1416 100%); --hero-a: rgba(30, 33, 38, .55); --hero-b: rgba(20, 22, 26, .25); --section-tint: rgba(27, 30, 35, .72); }
:root[data-theme="light"] { --hdr-top: rgba(253, 251, 250, 0); --hdr-mid: rgba(253, 251, 250, 0); --hdr-bot: rgba(253, 251, 250, 0); --cbg-sky: linear-gradient(180deg, #fbf8f6 0%, #fdfbfa 45%, #f8f2ef 100%); --hero-a: rgba(247, 248, 250, .7); --hero-b: rgba(255, 255, 255, .35); --section-tint: rgba(246, 247, 249, .72); }
.logo img, .footer__logo img { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .45)); }
:root[data-theme="light"] .logo img, :root[data-theme="light"] .footer__logo img { filter: none; }
.theme-toggle { width: 46px; height: 46px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--black); border-radius: 12px; cursor: pointer; }
.theme-toggle:hover { background: var(--surface-hover); }
.theme-toggle .icon-sun { display: inline-block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline-block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--red-text); text-decoration: none; }
a:hover { color: var(--red-text); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.22; color: var(--black); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid rgba(204, 42, 48, .45); outline-offset: 2px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--inverse); color: var(--inverse-ink); padding: 10px 16px; z-index: 300; }
.skip-link:focus { left: 8px; top: 8px; }
.icon { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.placeholder { color: var(--muted); font-style: italic; }
[hidden] { display: none !important; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s; text-align: center;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(204, 42, 48, .18); }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { background: var(--surface); color: var(--black); border-color: var(--field-border); }
.btn-outline:hover { background: var(--surface-hover); border-color: var(--muted); color: var(--black); }
.btn-large { min-height: 54px; padding: 0 30px; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 8px 0; }
.link-more { font-weight: 600; white-space: nowrap; }

/* ---------- Верхняя плашка ---------- */
.topbar { background: transparent; color: var(--ink); font-size: .85rem; }
.topbar__inner { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar__item, .topbar__right > span { display: inline-flex; align-items: center; gap: 6px; }
.topbar__right { display: inline-flex; gap: 18px; }
.topbar a { color: var(--ink); }
.topbar .icon { color: var(--red-text); }

/* ---------- Шапка ---------- */
.header { background: linear-gradient(180deg, var(--hdr-top) 0%, var(--hdr-mid) 60%, var(--hdr-bot) 100%); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid transparent;
  transition: background-color .4s ease, border-color .4s ease, box-shadow .4s ease; }
.header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transition: opacity .4s ease; }
.header.is-scrolled::before { opacity: 1; }
.header.is-scrolled { border-bottom-color: var(--grey-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.header__inner { display: flex; align-items: center; gap: 20px; padding-top: 6px; padding-bottom: 6px; }
.logo { display: block; flex: none; line-height: 0; }
.logo img { height: 76px; width: 76px; display: block; }
.header-search { flex: 1; display: flex; align-items: stretch; max-width: 640px; }
.header-search input[type] {
  flex: 1; min-width: 0; height: 46px; margin: 0; border: 1.5px solid var(--border); border-right: 0; border-radius: 12px 0 0 12px;
  padding: 0 16px; font: inherit; background: var(--grey);
}
.header-search input[type]:focus { outline: none; border-color: var(--red-line); background: var(--field); }
.header-search button {
  width: 54px; height: 46px; margin: 0; padding: 0; border: 1.5px solid var(--red); background: var(--red); color: #fff; border-radius: 0 12px 12px 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.header-search button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.header-search--mobile { display: none; max-width: none; padding: 0 16px 12px; }
.header__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.cart-link { position: relative; display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; color: var(--black); border-radius: 12px; }
.cart-link:hover { background: var(--grey); color: var(--black); }
.cart-link__count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center;
}
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--border); background: var(--grey); border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--black); }

/* ---------- Навигация (десктоп) ---------- */
.nav { background: transparent; border: 0; }
.nav__inner { display: flex; align-items: center; gap: 4px; padding-top: 6px; padding-bottom: 6px; }
.nav__link { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; color: var(--ink); font-weight: 600; font-size: .95rem; border-radius: 10px; text-decoration: none !important; }
.nav__link { transition: background-color .2s ease, color .2s ease; }
.nav__link:hover { background: var(--red-soft); color: var(--red-text); }
.nav__link--catalog { background: var(--red); color: #fff; }
.nav__link--catalog:hover { background: var(--red-dark); color: #fff; }
.nav__dropdown { position: relative; }
.nav__dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.nav__panel {
  display: grid; visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  position: absolute; left: 0; top: 100%; z-index: 120; width: min(760px, 92vw);
  background: var(--surface); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); padding: 20px;
  grid-template-columns: 1fr 1fr; gap: 24px; border: 1px solid var(--grey-2); margin-top: 6px;
}
.nav__dropdown:hover .nav__panel, .nav__dropdown:focus-within .nav__panel { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav__panel-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.nav__panel-col > a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--black); font-weight: 600; font-size: .95rem; }
.nav__group > a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--black); font-weight: 600; font-size: .95rem; }
.nav__group > a:hover { background: var(--red-soft); color: var(--red-text); text-decoration: none; }
.nav__group-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 8px 4px; font-weight: 700; }
.nav__panel-col--cats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-content: start; }
.nav__panel-col--cats > .nav__panel-title { grid-column: 1 / -1; }
.nav__panel-col > a:hover { background: var(--red-soft); color: var(--red-text); text-decoration: none; }
.nav__brands { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.nav__brands a { padding: 7px 8px; border-radius: 6px; color: var(--black); font-weight: 600; font-size: .95rem; }
.nav__brands a:hover { background: var(--red-soft); color: var(--red-text); text-decoration: none; }

/* ---------- Мобильное меню ---------- */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 200; background: var(--surface); flex-direction: column; }
.mobile-menu.is-open { display: flex; }
.mobile-menu__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--surface); color: var(--black); border-bottom: 1px solid var(--grey-2); }
.mobile-menu__close { width: 44px; height: 44px; border: 0; background: var(--grey); border-radius: 12px; color: var(--black); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.mobile-menu__body { overflow-y: auto; padding: 8px 16px 40px; }
.mobile-menu__body a { display: block; padding: 13px 0; border-bottom: 1px solid var(--grey-2); color: var(--black); font-weight: 600; }
.mobile-menu__main { color: var(--red-text) !important; font-weight: 700 !important; }
.mobile-menu__title { margin: 22px 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mobile-menu__brands { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }

/* ---------- Фон «живой Китай» (слои рисует tools/china-bg.js) ----------
   Неподвижный слой позади страницы: горы и город внизу экрана, фонарики и облака.
   Двигаются только transform/opacity, поэтому прокрутка и анимация не грузят процессор. */
.cbg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: var(--cbg-sky); }
.cbg__far, .cbg__near { position: absolute; left: -120px; right: -120px; bottom: 0; background-repeat: repeat-x; background-position: center bottom; will-change: transform; }
.cbg__far { height: 38vh; background-image: url(../images/bg/far-dark.svg); background-size: auto 100%; opacity: .95; }
.cbg__near { height: 30vh; background-image: url(../images/bg/near-dark.svg); background-size: auto 100%; }
:root[data-theme="light"] .cbg__far { background-image: url(../images/bg/far.svg); opacity: .9; }
:root[data-theme="light"] .cbg__near { background-image: url(../images/bg/near.svg); }
.cbg__cloud { position: absolute; left: 0; width: 220px; height: 70px; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 70'%3E%3Cpath fill='%23ebe0dc' d='M20 58c-14 0-14-20 2-20 0-14 22-20 30-8 6-16 34-18 40 0 8-12 30-10 30 6 10-6 26 2 22 14 16-2 22 18 6 18H20z'/%3E%3Cpath fill='none' stroke='%23e8d6d4' stroke-width='3' stroke-linecap='round' d='M60 48c0-8 12-8 12 0s-8 6-8 2M120 50c0-7 10-7 10 0'/%3E%3C/svg%3E") no-repeat center / contain;
  animation: cbg-drift 140s linear infinite; filter: brightness(.28) saturate(.6); }
:root[data-theme="light"] .cbg__cloud { filter: none; }
.cbg__cloud--1 { top: 14vh; animation-delay: -30s; }
.cbg__cloud--2 { top: 30vh; width: 160px; height: 52px; animation-duration: 180s; animation-delay: -110s; opacity: .45; }
.cbg__cloud--3 { top: 8vh; width: 260px; height: 82px; animation-duration: 210s; animation-delay: -160s; opacity: .4; }
@keyframes cbg-drift { from { transform: translateX(-280px); } to { transform: translateX(calc(100vw + 40px)); } }
.cbg__lantern { position: absolute; bottom: -60px; width: 22px; height: 28px; border-radius: 45%; opacity: .7;
  background: radial-gradient(circle at 50% 40%, #f7b46a 0%, #e0484d 45%, #b92f35 100%); box-shadow: 0 0 14px rgba(240, 120, 70, .45);
  animation: cbg-rise 34s linear infinite; }
.cbg__lantern::before, .cbg__lantern::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); background: #d9a441; }
.cbg__lantern::before { top: -2px; width: 10px; height: 3px; border-radius: 2px; }
.cbg__lantern::after { bottom: -8px; width: 2px; height: 8px; }
.cbg__lantern--1 { left: 7%; animation-delay: -4s; }
.cbg__lantern--2 { left: 22%; animation-duration: 42s; animation-delay: -21s; transform: scale(.8); }
.cbg__lantern--3 { left: 46%; animation-duration: 38s; animation-delay: -12s; }
.cbg__lantern--4 { left: 63%; animation-duration: 46s; animation-delay: -30s; }
.cbg__lantern--5 { left: 80%; animation-duration: 36s; animation-delay: -8s; }
.cbg__lantern--6 { left: 92%; animation-duration: 50s; animation-delay: -38s; }
@keyframes cbg-rise {
  0% { transform: translate3d(0, 0, 0) rotate(-4deg); opacity: 0; }
  8% { opacity: .75; }
  50% { transform: translate3d(26px, -60vh, 0) rotate(4deg); }
  85% { opacity: .65; }
  100% { transform: translate3d(-10px, -118vh, 0) rotate(-3deg); opacity: 0; }
}
/* Поверхности поверх фона — полупрозрачные, карточки остаются белыми */

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--ink);
  background:
    radial-gradient(600px 360px at 88% 20%, rgba(204, 42, 48, .10), transparent 70%),
    radial-gradient(520px 320px at 0% 100%, rgba(128, 134, 142, .06), transparent 70%),
    linear-gradient(180deg, var(--hero-a) 0%, var(--hero-b) 100%);
  border-bottom: 1px solid var(--grey-2);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; color: var(--red-text); background: var(--red-soft); border-radius: 999px; padding: 6px 12px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: .35em; }
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: .95rem; }
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts .icon { color: var(--red-text); }
.hero__picker { background: rgba(20, 22, 26, .78); backdrop-filter: blur(10px); color: var(--ink); border-radius: 20px; padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1); }
/* Фон первого экрана: фото поднято на всю верхнюю часть страницы, под шапку, меню и ленту */
.home-bg { position: absolute; top: 0; left: 0; right: 0; height: 1020px; z-index: -1; pointer-events: none; overflow: hidden; }
.home-bg__img { position: absolute; top: 0; right: 0; width: 100%; height: 100%; object-fit: cover; object-position: 100% bottom; filter: blur(4px); transform: scale(1.04);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%), linear-gradient(180deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .66) 120px, rgba(0, 0, 0, .74) 260px, rgba(0, 0, 0, .87) 400px, #000 520px, #000 calc(100% - 320px), rgba(0, 0, 0, .5) calc(100% - 150px), transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 30%), linear-gradient(180deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .66) 120px, rgba(0, 0, 0, .74) 260px, rgba(0, 0, 0, .87) 400px, #000 520px, #000 calc(100% - 320px), rgba(0, 0, 0, .5) calc(100% - 150px), transparent 100%); mask-composite: intersect; }
.home-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 12, 14, .8) 0%, rgba(11, 12, 14, .4) 55%, rgba(11, 12, 14, .12) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .66) 120px, rgba(0, 0, 0, .74) 260px, rgba(0, 0, 0, .87) 400px, #000 520px, #000 calc(100% - 320px), rgba(0, 0, 0, .5) calc(100% - 150px), transparent 100%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .66) 120px, rgba(0, 0, 0, .74) 260px, rgba(0, 0, 0, .87) 400px, #000 520px, #000 calc(100% - 320px), rgba(0, 0, 0, .5) calc(100% - 150px), transparent 100%); }
:root[data-theme="light"] .home-bg { -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 250px, #000 480px); mask-image: linear-gradient(180deg, transparent 0, transparent 250px, #000 480px); }
.hero__inner { position: relative; z-index: 1; }
/* Hero всегда тёмный (фото), поэтому внутри берём палитру тёмной темы */
.hero { --red-text: #ff7378; --red-soft: #2b1d20; --red-line: #4d2a2e; --black: #f2f3f5; --ink: #d6d9de; --muted: #aab0b8; --grey: #1b1e23; --grey-2: #2b2f36;
  --surface: #1e2126; --surface-hover: #262a31; --field: #181b1f; --field-border: #3a3f47; background: transparent; border-bottom: 0; padding-bottom: 56px; }
.hero .btn-outline { background: rgba(20, 22, 26, .55); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.hero .btn .icon { margin-left: 4px; }

/* ---------- Фото-плитки категорий ---------- */
.section--tiles { padding: 32px 0 8px; }
.photo-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.photo-tile { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--grey-2); background: #0b0c0e; color: #fff; isolation: isolate; transition: transform .2s, border-color .2s, box-shadow .2s; }
.photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.photo-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 35%, rgba(0, 0, 0, .85) 100%); }
.photo-tile:hover { transform: translateY(-3px); border-color: var(--red); box-shadow: 0 12px 34px rgba(204, 42, 48, .25); color: #fff; }
.photo-tile:hover img { transform: scale(1.06); }
.photo-tile__text { position: absolute; left: 16px; right: 56px; bottom: 14px; display: grid; gap: 2px; }
.photo-tile__text strong { font-size: 1.1rem; }
.photo-tile__text span { font-size: .85rem; color: #c9cdd3; }
.photo-tile__go { position: absolute; right: 14px; bottom: 14px; width: 32px; height: 32px; border-radius: 8px; background: var(--red); display: inline-flex; align-items: center; justify-content: center; }


/* ---------- Баннер «Ноускаты и бамперы» ---------- */
.wh-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--grey-2); background: var(--surface); }
.wh-banner img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; }
.wh-banner__text { padding: 32px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
.wh-banner__text p { color: var(--muted); }

/* ---------- Баннер «Владивосток» ---------- */
.vl-banner { position: relative; overflow: hidden; color: #fff; isolation: isolate; }
.vl-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: -2; filter: blur(4px); transform: scale(1.04); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.vl-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 12, 14, .92) 0%, rgba(11, 12, 14, .55) 55%, rgba(11, 12, 14, .15) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.vl-banner__inner { padding-top: 72px; padding-bottom: 72px; max-width: 760px; margin-left: max(16px, calc((100vw - var(--container)) / 2)); margin-right: auto; }
.vl-banner h2 { color: #fff; }
.vl-banner p { color: #d3d6db; }
.vl-banner .eyebrow { color: #ff7378; background: rgba(43, 29, 32, .8); }
.contact-block__cta--photo { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-color: var(--red-line); }
.contact-block__cta--photo::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 12, 14, .88), rgba(11, 12, 14, .72)), var(--cta-img) center / cover; }
.contact-block__cta--photo h3 { color: #fff; }
.contact-block__cta--photo p { color: #d3d6db; }
.hero__picker h2 { font-size: 1.25rem; }
.picker-form { display: grid; gap: 12px; }
.picker-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.picker-form__note { font-size: .82rem; color: var(--muted); margin: 0; }

/* ---------- Формы ---------- */
label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); }
input[type=text], input[type=search], input[type=number], input[type=tel], select, textarea {
  display: block; width: 100%; margin-top: 5px; min-height: 46px; padding: 10px 12px; font: inherit; font-weight: 400;
  color: var(--ink); background: var(--field); border: 1.5px solid var(--field-border); border-radius: 10px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(204, 42, 48, .18); }
select:disabled { background: var(--grey); color: var(--muted); opacity: .7; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--red); }
.field-error { display: block; color: var(--red-text); font-size: .82rem; min-height: 0; margin-top: 3px; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .88rem; font-weight: 600; padding: 0; margin-bottom: 5px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range legend { grid-column: 1 / -1; }
.price-range input { margin-top: 0; }
.form-result { scroll-margin-top: 160px; padding: 16px; border-radius: var(--radius); margin: 18px 0; }
.form-result.is-ok { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.form-result.is-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.lead-text { max-width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; margin: 8px 0; }

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section--grey, .section--soft { background: linear-gradient(180deg, transparent 0, var(--section-tint) 90px, var(--section-tint) calc(100% - 90px), transparent 100%); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head--light h2 { color: #fff; }
.section-lead { color: var(--muted); max-width: 46em; margin-bottom: 24px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card {
  display: block; background: var(--surface); border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 22px;
  color: var(--ink); text-decoration: none !important; transition: border-color .2s, box-shadow .2s, transform .2s; position: relative;
}
.cat-card:hover { border-color: var(--red-line); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.cat-card__icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; background: var(--red-soft); color: var(--red-text); border-radius: 16px; margin-bottom: 14px; }
.cat-card h3 { margin-bottom: 4px; }
.cat-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.brand-tile { display: block; background: var(--surface); border: 1px solid var(--grey-2); border-radius: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.brand-tile:hover { border-color: var(--red-line); box-shadow: var(--shadow-sm); color: var(--ink); }
.brand-tile:hover strong { color: var(--red-text); }
.brand-tile strong { display: block; font-size: 1.1rem; color: var(--black); }
.brand-tile span { color: var(--muted); font-size: .85rem; }

.letter-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.letter-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--grey-2); color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.letter-nav a:hover { background: var(--red-soft); border-color: var(--red-line); color: var(--red-text); }
.all-brands-link { display: inline-block; margin-top: 10px; padding: 7px 8px; font-weight: 700; }
.brands-index__search { max-width: 520px; }
.brands-index .letter-nav { margin: 16px 0 8px; }
.brand-group { scroll-margin-top: 170px; margin-top: 28px; }
.brand-group h2 { font-size: 1.3rem; color: var(--red-text); margin-bottom: 12px; }
.brands-index .brand-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.brands-index .brand-tile { padding: 12px 14px; }

.priority-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.priority-card { background: var(--surface); border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 20px; }
.priority-card h3 a { color: var(--black); }
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--grey); border: 1px solid var(--grey-2); color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none !important; transition: background .15s, color .15s, border-color .15s; }
.chip:hover { background: var(--red-soft); border-color: var(--red-line); color: var(--red-text); }

.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.adv { background: var(--surface); border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 22px; }
.adv__num { display: inline-block; color: var(--red-text); background: var(--red-soft); border-radius: 8px; padding: 2px 8px; font-weight: 700; font-size: .8rem; }
.adv h3 { margin-top: 12px; }
.adv p { color: var(--muted); margin: 0; font-size: .95rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { position: relative; }
.steps__num { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--red-soft); color: var(--red-text); font-weight: 700; align-items: center; justify-content: center; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: .95rem; }

.contact-block { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
.contact-block__cta { background: linear-gradient(135deg, var(--surface) 0%, var(--red-soft) 100%); border: 1px solid var(--red-line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-sm); }
.contact-block__cta p { color: var(--muted); }
.contact-list { display: grid; gap: 16px; margin-bottom: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item__icon { display: inline-flex; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--red-soft); color: var(--red-text); align-items: center; justify-content: center; }
.contact-item p { margin: 2px 0 0; }
.map-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.map-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--black); font-size: .85rem; font-weight: 600; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease;
}
.map-link:hover, .footer .map-link:hover {
  border-color: var(--muted); background: var(--surface-hover); color: var(--black); text-decoration: none;
}
.map-link img { display: block; width: 22px; height: 22px; flex: none; border-radius: 5px; }

/* ---------- Внутренние страницы ---------- */
.page-head { background: transparent; padding: 22px 0 30px; }
.page-head h1 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); margin-bottom: .3em; }
.page-head__lead { color: var(--muted); max-width: 50em; margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; padding: 0; }
.page-head .breadcrumbs { padding: 0; }
.breadcrumbs a { color: var(--muted); }
.category-page, .prose, .form-page, .contacts-page, .todo-grid { padding-top: 32px; padding-bottom: 56px; }
.prose { max-width: 820px; }
.category-page > .chip-list, .category-page > .priority-list { margin-bottom: 32px; }
.notice { background: var(--red-soft); border: 1px solid var(--red-line); padding: 14px 18px; border-radius: 12px; }
.priority-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.priority-list > li { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--grey-2); }
.priority-list__brand { min-width: 120px; font-weight: 800; color: var(--black); }
.todo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.todo-card { border: 1.5px dashed var(--field-border); border-radius: var(--radius); padding: 20px; }
.todo-card h2 { font-size: 1.15rem; }
.contacts-page { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--grey-2); border-radius: 18px; padding: 24px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.15rem; margin: 6px 0 0; }
.form-page .form-card { max-width: 820px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Каталог ---------- */
.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 56px; align-items: start; }
.filters { background: var(--grey); border-radius: var(--radius); padding: 18px; position: sticky; top: 156px; }
.filters summary { font-weight: 800; cursor: pointer; margin-bottom: 14px; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters form { display: grid; gap: 14px; }
.filters__reset { text-align: center; color: var(--muted); font-size: .9rem; }
.catalog-count { color: var(--muted); margin: 0 0 12px; min-height: 1.5em; }
.more-wrap { text-align: center; margin: 20px 0 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--grey-2); transition: box-shadow .2s; border-radius: var(--radius); overflow: hidden; }
.product-card:hover { box-shadow: var(--shadow); }
.product-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--grey); color: var(--muted); font-size: .85rem; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px; flex: 1; }
.product-card__cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--black); }
.product-card__car, .product-card__sku { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.sku-more { white-space: nowrap; }
.product-card__price { font-size: 1.3rem; font-weight: 700; color: var(--red-text); margin-top: auto; padding-top: 8px; }
.product-card__price.is-request { font-size: 1rem; color: var(--ink); }
.request-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; color: var(--muted); font-weight: 600; font-size: .9rem;
  background: repeating-linear-gradient(135deg, var(--grey) 0 12px, var(--grey-2) 12px 24px); }
.request-photo svg { color: var(--muted); }
.product-card__cta { font-size: .84rem; line-height: 1.4; color: var(--ink); background: var(--red-soft, #fbeeee); border-radius: 10px; padding: 8px 10px; margin: 6px 0 0; }
.product-card--request .product-card__price { margin-top: auto; }
.product-card--request .product-card__cta { order: 2; }
.product-card--request .product-card__actions { order: 3; }
.product-page__media .request-photo { min-height: 280px; font-size: 1.05rem; }
.gallery { width: 100%; }
.gallery__main { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--grey); }
.gallery__thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; background: transparent; }
.gallery__thumb { flex: none; width: 68px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--grey); }
.gallery__thumb.is-active { border-color: var(--red); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-page__media:has(.gallery) { display: block; min-height: 0; }
.request-cta { background: var(--red-soft, #fbeeee); border-radius: var(--radius); padding: 16px 18px; margin: 4px 0 14px; }
.request-cta p { margin: 0 0 12px; font-weight: 600; color: var(--ink); }
.product-card__actions { display: flex; gap: 8px; margin-top: 8px; }
.product-card__actions .btn { flex: 1; padding: 0 8px; }
.badge { align-self: flex-start; display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-muted { background: var(--grey); color: var(--muted); }
.empty-state { background: var(--grey); border-radius: var(--radius); padding: 32px 24px; text-align: center; }
.empty-state h2, .empty-state h3 { margin-bottom: .4em; }
.empty-state p { max-width: 40em; margin-left: auto; margin-right: auto; }
.empty-state__sections { margin-top: 24px; }
.empty-state .chip-list { justify-content: center; }
.error-code { font-size: 6rem; font-weight: 700; color: var(--red-line); line-height: 1; margin: 0; }
.error-page { margin-top: 48px; margin-bottom: 48px; }

/* ---------- Товар ---------- */
.product-wrap { padding-top: 20px; padding-bottom: 56px; }
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; margin-bottom: 32px; }
.product-page__media { background: var(--grey); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; min-height: 280px; overflow: hidden; }
.product-page__media img { width: 100%; height: auto; display: block; }
.product-page__noimg { color: var(--muted); }
.product-page__car { color: var(--muted); font-size: 1.05rem; }
.product-page__price { font-size: 2.1rem; font-weight: 700; color: var(--red-text); margin: 14px 0; }
.product-page__price.is-request { font-size: 1.3rem; color: var(--ink); }
.product-page__buy { display: flex; gap: 12px; margin-bottom: 14px; }
.qty input { width: 84px; margin: 0; min-height: 54px; text-align: center; font-weight: 700; }
.spec-table { width: 100%; border-collapse: collapse; max-width: 720px; margin-bottom: 28px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--grey-2); vertical-align: top; }
.spec-table th { width: 40%; color: var(--muted); font-weight: 600; }
.compat-list { padding-left: 1.2em; }

/* ---------- Корзина ---------- */
.cart { padding-top: 28px; padding-bottom: 56px; }
.cart__layout > * { min-width: 0; }
.cart__layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.cart-items { list-style: none; padding: 0; margin: 0 0 8px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto auto 36px; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--grey-2); }
.cart-item__img { width: 96px; height: 72px; background: var(--grey); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--muted); }
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info a { font-weight: 700; color: var(--black); }
.cart-item__qty { display: inline-flex; align-items: center; }
.cart-item__qty input { width: 54px; margin: 0; min-height: 40px; text-align: center; border-radius: 0; padding: 0; }
.qty-btn { width: 40px; height: 40px; border: 1.5px solid var(--field-border); background: var(--field); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.qty-btn:first-child { border-radius: 10px 0 0 10px; border-right: 0; }
.qty-btn:last-child { border-radius: 0 10px 10px 0; border-left: 0; }
.cart-item__sum { font-weight: 800; min-width: 96px; text-align: right; }
.cart-item__remove { width: 36px; height: 36px; border: 0; background: var(--grey); border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.cart-item__remove:hover { background: var(--red-soft); color: var(--red-text); }
.cart__summary { background: var(--grey); border: 1px solid var(--grey-2); border-radius: 18px; padding: 22px; position: sticky; top: 156px; }
.cart__summary form { display: grid; gap: 12px; margin-top: 12px; }
.cart__total { font-size: 2rem; font-weight: 700; color: var(--red-text); margin-bottom: 6px; }

/* ---------- Подвал: навигация, контакты и реквизиты ---------- */
.footer { background: var(--surface); color: var(--muted); border-top: 1px solid var(--border); padding: 30px 0 18px; }
.footer__grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 36px; }
.footer__grid--compact { grid-template-columns: 1fr 2fr; }
.footer__grid > * { min-width: 0; }
.footer h2 { color: var(--black); font-size: .8rem; font-weight: 600; margin: 0 0 12px; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--red-text); }
.footer :is(a, summary):focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 4px; }
.footer__identity { display: flex; align-items: center; gap: 12px; }
.footer__identity img { display: block; width: 52px; height: 52px; flex: none; }
.footer__identity strong { display: block; font-size: 1rem; color: var(--black); }
.footer__identity span span { display: block; font-size: .78rem; line-height: 1.5; color: var(--muted); margin-top: 4px; max-width: 220px; }
.footer__address { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; font-size: .78rem; line-height: 1.6; max-width: 320px; color: var(--ink); }
.footer__address .icon { flex: none; margin-top: 2px; color: var(--muted); }
.footer__nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; padding: 0; margin: 0; list-style: none; }
.footer__nav a { display: flex; align-items: center; min-height: 38px; padding: 6px 0; font-size: .8rem; line-height: 1.4; }
.footer__contact p { margin: 0; }
.footer__phone a { display: inline-flex; align-items: center; min-height: 32px; font-size: 1.1rem; font-weight: 600; white-space: nowrap; color: var(--black); }
.footer__email a { display: inline-flex; align-items: center; min-height: 32px; font-size: .8rem; overflow-wrap: anywhere; }
.footer__messengers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.footer__messengers a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .78rem; }
.footer__messengers a:hover { border-color: var(--muted); background: var(--surface-hover); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 24px; font-size: .72rem; }
.footer__bottom p { margin: 0; }
.footer__bottom > a { margin-left: auto; }
.footer__legal summary { cursor: pointer; padding: 4px 0; width: fit-content; color: var(--ink); }
.footer__legal p { max-width: 400px; margin-top: 8px; line-height: 1.6; }
.footer__bottom .footer__rate, .footer__notice { flex-basis: 100%; }
.footer__notice { line-height: 1.6; }
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer__brand { grid-column: 1 / -1; display: flex; gap: 32px; align-items: center; justify-content: space-between; }
  .footer__grid--compact .footer__brand { grid-column: auto; }
  .footer__address { margin-top: 0; max-width: 340px; }
}
@media (max-width: 540px) {
  .footer { padding-top: 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .footer__brand { display: block; }
  .footer__address { margin-top: 14px; max-width: none; }
  .footer__nav { padding-block: 16px; border-block: 1px solid var(--border); }
  .footer__nav h2 { margin-bottom: 6px; }
  .footer__nav a { min-height: 40px; }
  .footer__contact h2 { margin-bottom: 4px; }
  .footer__phone a, .footer__email a { min-height: 40px; }
  .footer__messengers { margin-top: 8px; }
  .footer__messengers a { min-height: 40px; }
  .footer__bottom { margin-top: 20px; gap: 10px 18px; }
  .footer__bottom > a { margin-left: 0; }
}

/* ---------- Уведомление ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--inverse); color: var(--inverse-ink); padding: 12px 20px; border-radius: 12px; z-index: 400; transition: opacity .2s, transform .2s; max-width: 90vw; box-shadow: var(--shadow);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============ Планшеты ============ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .home-bg__img { opacity: .55; object-position: 85% bottom; }
  .photo-tiles { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .adv-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .cart__layout { grid-template-columns: minmax(0, 1fr); }
  .cart__summary { position: static; }
  .catalog-layout { grid-template-columns: 240px 1fr; }
}

/* ============ Смартфоны ============ */
@media (max-width: 800px) {
  .topbar__right { display: none; }
  .topbar__inner { font-size: .8rem; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header__vin { display: none; }
  .header__inner { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .header__inner > .header-search { display: none; }
  .header-search--mobile { display: flex; }
  .logo img { height: 56px; width: 56px; }
  .section { padding: 40px 0; }
  .hero__buttons .btn { flex: 1 1 100%; }
  .picker-form__row, .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-card__body { padding: 10px; }
  .product-card h3 { font-size: .92rem; }
  .product-card__actions { flex-wrap: wrap; }
  .product-card__cta { font-size: .76rem; padding: 7px 8px; }
  .request-photo { font-size: .78rem; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .photo-tiles { gap: 10px; }
  .wh-banner { grid-template-columns: 1fr; }
  .wh-banner__text { padding: 22px; }
  .photo-tile__text { left: 10px; right: 10px; bottom: 10px; }
  .photo-tile__text strong { font-size: .95rem; }
  .photo-tile__text span { display: none; }
  .photo-tile__go { display: none; }
  .vl-banner__inner { padding-top: 44px; padding-bottom: 44px; margin-left: 16px; margin-right: 16px; }
  .cat-card { padding: 16px; }
  .cat-card__icon { width: 52px; height: 52px; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
  .priority-grid, .todo-grid, .contact-block, .contacts-page, .product-page { grid-template-columns: 1fr; }
  .adv-grid, .steps { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; padding-top: 16px; }
  .filters { position: static; max-height: none; overflow: visible; padding: 0; }
  .filters summary { margin: 0; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
  .filters summary::after { content: '▾'; color: var(--red-text); transition: transform .2s; }
  .filters details[open] summary::after { transform: rotate(180deg); }
  .filters form { padding: 0 16px 16px; }
  .chip { padding: 6px 11px; font-size: .84rem; }
  .letter-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .letter-nav a { flex: none; }
  .brands-index .brand-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cart-item { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "qty qty sum"; gap: 10px 12px; }
  .cart-item__img { grid-area: img; width: 72px; height: 56px; }
  .cart-item__info { grid-area: info; }
  .cart-item__remove { grid-area: rm; }
  .cart-item__qty { grid-area: qty; }
  .cart-item__sum { grid-area: sum; min-width: 0; }
  .form-card { padding: 18px; }
  .product-page__buy .btn { flex: 1; }
}
@media (max-width: 400px) {
  .cat-card { padding: 12px; }
  .cat-card__icon { width: 44px; height: 44px; margin-bottom: 10px; }
  .cat-card h3 { font-size: 1rem; }
  .cat-card p { font-size: .82rem; }
}
@media (max-width: 800px) {
  .cbg__far { height: 30vh; }
  .cbg__near { height: 20vh; }
  .cbg__cloud--2, .cbg__cloud--3, .cbg__lantern--2, .cbg__lantern--4, .cbg__lantern--6 { display: none; }
}

/* ---------- Живая лента свежих фото под меню ---------- */
.live-strip { position: relative; z-index: 2; background: transparent; border: 0; }
.live-strip__inner { display: flex; align-items: center; gap: 14px; padding-top: 8px; padding-bottom: 8px; }
.live-strip__label { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--black); white-space: nowrap; }
.live-strip__label i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(204, 42, 48, .6); animation: live-dot 1.8s infinite; }
@keyframes live-dot { 70% { box-shadow: 0 0 0 7px rgba(204, 42, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 42, 48, 0); } }
.live-strip__viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
.live-strip__track { display: flex; width: max-content; animation: live-scroll calc(var(--n) * 3.5s) linear infinite; }
.live-strip__track:hover, .live-strip__track:focus-within { animation-play-state: paused; }
.live-strip__copy { display: flex; }
@keyframes live-scroll { to { transform: translateX(-50%); } }
.live-strip__item { position: relative; flex: none; display: block; width: 96px; height: 72px; margin-right: 10px; border-radius: 10px; overflow: hidden; background: transparent; border: 0; transition: transform .2s; }
.live-strip__item:hover, .live-strip__item:focus-visible { transform: translateY(-2px); }
.live-strip__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-strip__price { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.5; }
@media (max-width: 640px) {
  .live-strip__label { font-size: 0; gap: 0; }
  .live-strip__item { width: 80px; height: 60px; margin-right: 8px; }
}

/* ---------- Плавные переходы между страницами ---------- */
@view-transition { navigation: auto; }
.header { view-transition-name: site-header; }
::view-transition-old(root) { animation: 220ms ease both vt-out; }
::view-transition-new(root) { animation: 320ms ease both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
main { animation: page-in .45s ease both; }
@keyframes page-in { from { opacity: 0; } }

/* Блок «Не нашли что искали?» */
.notfound { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 24px; padding: 24px 28px; background: linear-gradient(135deg, var(--surface) 0%, var(--red-soft) 100%); border: 1px solid var(--red-line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.notfound__text { flex: 1 1 320px; }
.notfound h2 { margin: 0 0 .3em; font-size: 1.25rem; }
.notfound p { margin: 0; color: var(--muted); }
.notfound__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-block__cta--photo .notfound__actions { margin-top: 12px; }
.contact-block__cta--photo .btn-outline { background: rgba(20, 22, 26, .55); border-color: rgba(255, 255, 255, .28); color: #fff; }

/* Цена: сдержанный золотой акцент и значок-подсказка */
.price-pre { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.price-val { font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.price-from { font-size: .6em; font-weight: 600; color: var(--muted); }
.price-note { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price-info { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; font: italic 700 .64rem/1 Georgia, serif; color: var(--gold); border: 1px solid var(--gold-line); border-radius: 50%; cursor: help; }
.price-info:hover, .price-info:focus { background: var(--gold-soft); outline: none; }
.price-info:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.az-tip { position: fixed; z-index: 1000; width: max-content; max-width: min(260px, calc(100vw - 16px)); font: 500 .78rem/1.35 var(--font); color: #f2f3f5; background: #1e2126; border: 1px solid var(--gold-line); padding: 8px 11px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.45); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s; }
.az-tip.is-on { opacity: 1; visibility: visible; }
.product-page__price .price-pre { font-size: .8rem; }
.product-page__info .request-cta { background: transparent; border: 1px solid var(--border); border-radius: 12px; }
.product-page__info .request-cta p { font-weight: 500; color: var(--muted); }
.product-card__price { display: block; }
.product-card__price .price-row { flex-wrap: nowrap; justify-content: flex-start; column-gap: 6px; }
.product-card__price .price-val { white-space: nowrap; }
.product-page__price .price-info { width: 1.15rem; height: 1.15rem; font-size: .74rem; }

/* Премиальные карточки */
.product-card { border-color: var(--border); box-shadow: var(--shadow-sm); transition: box-shadow .25s, border-color .25s; }
.product-card:hover { box-shadow: var(--shadow); border-color: var(--gold-line); }
.product-card__cat { color: var(--gold); letter-spacing: .1em; }
.product-card__price { color: var(--gold-text); border-top: 1px solid var(--border); margin-top: auto; padding-top: 10px; }
.product-card__price.is-request { color: var(--ink); }
.product-page__price { color: var(--gold-text); }
.product-page__price.is-request { color: var(--ink); }

/* ============ Premium Automotive: каталог и внутренние страницы ============ */
/* Фон: на внутренних страницах — однотонный графит, без фонарей, облаков и силуэта города (на главной остаётся фото) */
body:not(:has(.home-bg)) .cbg { display: none; }

/* Компактная шапка: не съедает заголовок страницы */
.topbar__inner { padding-top: 4px; padding-bottom: 4px; font-size: .8rem; }
.header__inner { gap: 16px; padding-top: 4px; padding-bottom: 4px; }
.logo img { height: 56px; width: 56px; }
.header-search input[type], .header-search button { height: 42px; }
.nav__link { padding-top: 8px; padding-bottom: 8px; }
.page-head { padding: 14px 0 18px; }

/* Кнопки ниже, красная заливка — только у главного действия */
.btn { min-height: 40px; border-radius: 10px; font-size: .92rem; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .86rem; }
.btn-large { min-height: 48px; }
.btn-primary { box-shadow: none; }
.header-search input[type], .header-search button { height: 42px; }

/* Фильтры: легче, без плотной заливки, параметры сгруппированы */
.filters { background: transparent; border: 1px solid var(--border); padding: 16px; position: static; max-height: none; overflow: visible; }
.filters summary { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.filters form { gap: 12px; }
.filters select, .filters input[type=search], .filters input[type=number] { min-height: 40px; background: transparent; border-color: var(--border); font-size: .92rem; }
select option, select optgroup { background-color: var(--surface); color: var(--ink); }
.filters label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.filter-group { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.filter-group legend { float: left; width: 100%; padding: 0 0 8px; margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.filter-group legend + * { clear: both; }
.price-range.filter-group { grid-template-columns: 1fr 1fr; }
.price-range.filter-group .check { grid-column: 1 / -1; color: var(--ink); font-size: .88rem; }
.filters .btn-block { min-height: 40px; }

/* Карточки: одинаковая высота, одинаковая область фото, тонкая рамка. Само фото не обрабатывается: только object-fit внутри рамки */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: stretch; }
.product-card { height: 100%; box-shadow: none; border-color: var(--border); border-radius: 12px; }
.product-card__img { aspect-ratio: 4 / 3; flex: none; background: var(--field); border-bottom: 1px solid var(--border); overflow: hidden; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { gap: 3px; padding: 12px 14px 14px; }
.product-card__cat { font-size: .68rem; }
.product-card h3 { font-size: .98rem; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__car { font-size: .82rem; }
.product-card__sku { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; }
.product-card__sku > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sku-copy { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.sku-copy:hover, .sku-copy:focus-visible { color: var(--black); border-color: var(--muted); }
.product-card .badge { font-size: .7rem; padding: 2px 8px; }

/* Цена: светлая, красный — только для акцентов */
.product-card__price { color: var(--black); font-size: 1.2rem; }
.product-card__price .price-pre { color: var(--muted); }
.product-card__price.is-request { color: var(--ink); font-size: .95rem; }
.product-page__price { color: var(--black); }
.product-card__cta { background: transparent; border: 1px solid var(--border); color: var(--muted); font-size: .78rem; padding: 6px 9px; }

/* Кнопки в карточках: «Подробнее» спокойная, красная только «В корзину» / «Оставить заявку» */
.product-card__actions .btn-primary { background: var(--red); }

/* Мягкий блик при взаимодействии с основной кнопкой. */
@media (hover: hover) {
  .btn-primary:not(.mx-key) { position: relative; overflow: hidden; }
  .btn-primary:not(.mx-key)::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .2) 50%, transparent 70%);
    transform: translateX(-150%); transition: transform .7s ease;
  }
  .btn-primary:not(.mx-key):hover::after,
  .btn-primary:not(.mx-key):focus-visible::after { transform: translateX(150%); }
}

/* Мобильная версия: фильтры отдельной панелью, две карточки в ряд, одна — на самых узких экранах */
@media (max-width: 800px) {
  .logo img { height: 44px; width: 44px; }
  .page-head { padding: 10px 0 12px; }
  .filters { border: 0; padding: 0; }
  .filters__details > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; margin: 0; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); font-size: .9rem; letter-spacing: .04em; }
  .filters summary::after { content: none; }
  body:has(.filters__details[open]) .header { visibility: hidden; }
  .filters__details[open] { position: fixed; inset: 0; z-index: 400; overflow-y: auto; background: var(--bg); padding: 12px 16px 24px; }
  .filters__details[open] > summary { position: sticky; top: 0; z-index: 1; margin-bottom: 14px; background: var(--bg); }
  .filters__details[open] > summary::before { content: '✕'; font-size: 1rem; }
  .filters form { padding: 0; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-card__body { padding: 10px; }
  .product-card h3 { font-size: .88rem; }
  .product-card__actions { gap: 6px; }
  .product-card__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}
