/* ============================================================================
   complectations-dir.css — справочник комплектаций: «Марки» (/complectations/) и «Модели марки»
   (/complectations/МАРКА/), меню хлебных крошек раздела. Разметка — include/complectations/marks.php,
   models.php, breadcrumbs.php; поведение — js/complectations-dir.js. Подключается в include/head.php
   на страницах раздела ($view === 'complectations'). Файл общий для desktop и mobile (правится в desktop
   и копируется); мобильный шаблон помечает корень классом .cx-m. Тёмная тема — html[data-theme="dark"].
   Ритм 8px: между блоками 48px (на телефоне 32px), радиусы 20 / 14 / 10.
   ============================================================================ */

.cx, .cx-crumb-pop {
    --cx-ink: #0b1220;
    --cx-text: #1d2433;
    --cx-sub: #5b6472;
    --cx-faint: #8b93a5;
    --cx-line: #e4e8ef;
    --cx-line-soft: #eef1f5;
    --cx-card: #ffffff;
    --cx-soft: #f4f6fa;
    --cx-soft-2: #eceff5;
    --cx-accent: #1e4fe0;
    --cx-accent-bg: rgba(30, 79, 224, .08);
    --cx-ok: #15803d;
    --cx-ok-bg: rgba(22, 163, 74, .1);
    --cx-sale: #c2410c;
    --cx-sale-bg: rgba(234, 88, 12, .1);
    --cx-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px -18px rgba(16, 24, 40, .22);
    --cx-shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, .35);
    --cx-head: 'Unbounded', 'Manrope', sans-serif;
    --cx-top: var(--hdr-height, 78px);
    --cx-gap: 48px;
    color: var(--cx-text);
    font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html[data-theme="dark"] .cx, html[data-theme="dark"] .cx-crumb-pop {
    --cx-ink: #eef1f6;
    --cx-text: #dfe4ec;
    --cx-sub: #9aa4b2;
    --cx-faint: #6b7482;
    --cx-line: #262b36;
    --cx-line-soft: #1f2430;
    --cx-card: #151922;
    --cx-soft: #1b202a;
    --cx-soft-2: #222835;
    --cx-accent: #6f9bff;
    --cx-accent-bg: rgba(91, 140, 255, .15);
    --cx-ok: #4ade80;
    --cx-ok-bg: rgba(74, 222, 128, .12);
    --cx-sale: #fb923c;
    --cx-sale-bg: rgba(251, 146, 60, .14);
    --cx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -18px rgba(0, 0, 0, .7);
    --cx-shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .8);
}
.cx { margin: 16px 0 64px; }
.cx *, .cx *::before, .cx *::after { box-sizing: border-box; }
.cx [hidden] { display: none !important; }
.cx button { font-family: inherit; }
.cx-scroll-x { display: flex; overflow-x: auto; scrollbar-width: none; }
.cx-scroll-x::-webkit-scrollbar { display: none; }
.cx-eyebrow { display: block; margin-bottom: 8px; color: var(--cx-accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cx-title { margin: 0; font-family: var(--cx-head); font-size: 34px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--cx-ink); }
.cx-sub { margin: 10px 0 0; color: var(--cx-sub); font-size: 15px; line-height: 1.5; }
.cx-h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--cx-head); font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--cx-ink); }
.cx-count { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--cx-accent-bg); color: var(--cx-accent); font-family: 'Manrope', sans-serif; font-size: 13.5px; font-weight: 800; letter-spacing: 0; }
.cx-sec { margin-top: var(--cx-gap); }
.cx-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cx-sec > .cx-h2 { margin-bottom: 16px; }
.cx-empty { margin: 16px 0 0; padding: 24px; border-radius: 16px; background: var(--cx-soft); color: var(--cx-sub); font-size: 14.5px; text-align: center; }
.cx .cx-link-btn { padding: 0; border: 0; background: none; color: var(--cx-accent); font-size: inherit; font-weight: 700; cursor: pointer; }
.cx .cx-link-btn:hover { text-decoration: underline; }
.cx-mono { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--cx-sub); font-family: var(--cx-head); font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.cx mark { padding: 0 1px; border-radius: 3px; background: rgba(255, 196, 0, .35); color: inherit; }
html[data-theme="dark"] .cx mark { background: rgba(255, 196, 0, .28); }

/* ---------- обложка и общий поиск ---------- */
.cx-hero { display: grid; gap: 20px; padding: 32px; border-radius: 24px; background: radial-gradient(700px 260px at 100% 0%, var(--cx-accent-bg), transparent 70%), var(--cx-card); border: 1px solid var(--cx-line); box-shadow: var(--cx-shadow); }
.cx-search { position: relative; display: flex; align-items: center; margin: 0; }
.cx-search-ico { position: absolute; left: 20px; color: var(--cx-faint); font-size: 16px; pointer-events: none; }
.cx-search input { width: 100%; height: 58px; padding: 0 56px 0 52px; border-radius: 16px; border: 1.5px solid #d6d9e0; background: var(--cx-card); color: var(--cx-ink); font: inherit; font-size: 16.5px; font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s; }
.cx-search input::placeholder { color: #8b93a5; font-weight: 500; }
.cx-search input:focus { border-color: var(--cx-accent); box-shadow: 0 0 0 4px var(--cx-accent-bg); }
.cx-kbd { position: absolute; right: 16px; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--cx-line); background: var(--cx-soft); color: var(--cx-sub); font-family: inherit; font-size: 13px; font-weight: 800; pointer-events: none; }
.cx-search input:focus ~ .cx-kbd, .cx-search input:not(:placeholder-shown) ~ .cx-kbd { display: none; }
.cx-search-sm .cx-search-ico { left: 14px; font-size: 13px; }
.cx-search-sm input { height: 44px; padding: 0 14px 0 38px; border-radius: 12px; font-size: 14.5px; }
.cx-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; border-radius: 16px; background: var(--cx-card); box-shadow: 0 24px 60px -20px rgba(20, 25, 40, .45), 0 0 0 1px rgba(20, 25, 40, .06); animation: cxFade .12s ease; }
@keyframes cxFade { from { opacity: 0; transform: translateY(-4px); } }
.cx-sg-group { padding: 8px 10px 4px; color: #9aa2b1; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cx .cx-sg-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--cx-ink); text-decoration: none; }
.cx .cx-sg-item:hover, .cx .cx-sg-item.is-active { background: var(--cx-accent-bg); color: var(--cx-ink); }
.cx-sg-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--cx-soft); overflow: hidden; }
.cx-sg-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.cx-sg-logo .cx-mono { font-size: 11px; }
.cx-sg-logo i { color: var(--cx-faint); font-size: 13px; }
.cx-sg-text { flex: 1; min-width: 0; }
.cx-sg-text b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-sg-text small { display: block; color: var(--cx-faint); font-size: 12.5px; font-weight: 600; }
.cx-sg-empty { padding: 16px 12px; color: var(--cx-sub); font-size: 14px; text-align: center; }
.cx-recent { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.cx-recent-label { display: inline-flex; align-items: center; gap: 8px; color: var(--cx-sub); font-size: 13px; font-weight: 700; }
.cx-recent-list { display: flex; gap: 8px; flex-wrap: wrap; }
.cx .cx-recent-item { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--cx-soft); color: var(--cx-ink); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: background .15s; }
.cx .cx-recent-item:hover { background: var(--cx-accent-bg); color: var(--cx-accent); }
.cx-recent-item .cx-sg-logo { width: 24px; height: 24px; border-radius: 6px; background: var(--cx-card); }

/* ---------- популярные марки ---------- */
.cx-popular { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.cx .cx-pop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: 18px; background: var(--cx-card); border: 1px solid var(--cx-line); color: var(--cx-ink); text-align: center; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cx .cx-pop:hover { transform: scale(1.02); box-shadow: var(--cx-shadow-lg); border-color: transparent; color: var(--cx-ink); }
.cx-pop-logo { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 4px; }
.cx-pop-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cx-pop-logo .cx-mono { border-radius: 14px; background: var(--cx-soft); font-size: 18px; }
.cx-pop b { font-size: 14.5px; font-weight: 800; line-height: 1.2; }
.cx-pop small { color: var(--cx-faint); font-size: 12px; font-weight: 600; }
html[data-theme="dark"] .cx-pop-logo img, html[data-theme="dark"] .cx-logo img, html[data-theme="dark"] .cx-brand-logo img { filter: brightness(1.6) contrast(.9); }

/* ---------- фильтры списка марок ---------- */
.cx-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-chips.cx-scroll-x { flex-wrap: wrap; }
.cx .cx-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--cx-line); background: var(--cx-card); color: var(--cx-text); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.cx .cx-chip small { color: var(--cx-faint); font-size: 11.5px; font-weight: 800; }
.cx .cx-chip:hover { border-color: #a9b1c2; }
.cx .cx-chip.is-active, .cx .cx-chip[aria-pressed="true"] { border-color: var(--cx-accent); background: var(--cx-accent); color: #fff; }
.cx .cx-chip.is-active small, .cx .cx-chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .75); }
.cx .cx-chip.is-zero { opacity: .45; }
.cx-seg, .cx-view { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--cx-soft); }
.cx-seg button, .cx-view button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--cx-sub); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cx-seg button small { color: var(--cx-faint); font-size: 11.5px; font-weight: 800; }
.cx-seg button:hover:not(:disabled), .cx-view button:hover { color: var(--cx-ink); }
.cx-seg button:disabled { opacity: .5; cursor: progress; }
.cx-seg button.is-active, .cx-view button.is-active { background: var(--cx-card); color: var(--cx-accent); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

/* алфавитный указатель — прилипает под шапкой сайта */
.cx-alpha { position: sticky; top: var(--cx-top); z-index: 15; display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 16px; padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, .9); border: 1px solid var(--cx-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
html[data-theme="dark"] .cx-alpha { background: rgba(21, 25, 34, .9); }
.cx .cx-alpha a { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; color: var(--cx-text); font-size: 13.5px; font-weight: 800; text-decoration: none; }
.cx .cx-alpha a:hover { background: var(--cx-accent-bg); color: var(--cx-accent); }
.cx .cx-alpha a.is-off { opacity: .3; pointer-events: none; }
.cx .cx-alpha a.is-current { background: var(--cx-accent); color: #fff; }

/* ---------- марки по буквам ---------- */
.cx-letter { scroll-margin-top: calc(var(--cx-top) + 72px); }
.cx-letter + .cx-letter { margin-top: 24px; }
.cx-letter-head { margin: 0 0 12px; font-family: var(--cx-head); font-size: 20px; font-weight: 700; color: var(--cx-ink); }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.cx .cx-mark { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--cx-card); border: 1px solid var(--cx-line); color: var(--cx-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cx .cx-mark:hover { border-color: var(--cx-accent); box-shadow: var(--cx-shadow); color: var(--cx-ink); }
.cx .cx-mark.is-selected { border-color: var(--cx-accent); background: var(--cx-accent-bg); }
.cx-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cx-soft); overflow: hidden; }
.cx-logo img { max-width: 78%; max-height: 78%; object-fit: contain; }
.cx-mark-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-mark-name { font-size: 15px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-mark-meta { color: var(--cx-faint); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-mark-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.cx-mark-badges:empty { display: none; }
.cx-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.cx-badge.is-cur { background: var(--cx-ok-bg); color: var(--cx-ok); }
.cx-badge.is-sale { background: var(--cx-sale-bg); color: var(--cx-sale); }

/* модели марки при наведении на карточку */
.cx-hover { position: absolute; z-index: 30; width: 340px; padding: 12px; border-radius: 16px; background: var(--cx-card); box-shadow: 0 24px 60px -20px rgba(20, 25, 40, .5), 0 0 0 1px rgba(20, 25, 40, .06); animation: cxFade .12s ease; }
.cx-hover-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 4px 8px; }
.cx-hover-head b { color: var(--cx-ink); font-size: 14px; font-weight: 800; }
.cx-hover-head span { color: var(--cx-faint); font-size: 12px; font-weight: 700; }
.cx-hover-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cx .cx-hover-list a, .cx .cx-md-list a { display: flex; flex-direction: column; min-width: 0; padding: 7px 8px; border-radius: 9px; color: var(--cx-ink); text-decoration: none; }
.cx .cx-hover-list a:hover, .cx .cx-md-list a:hover { background: var(--cx-accent-bg); color: var(--cx-accent); }
.cx-hover-list b, .cx-md-list b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-hover-list small, .cx-md-list small { color: var(--cx-faint); font-size: 11.5px; font-weight: 600; }
.cx .cx-hover-all { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding: 9px; border-radius: 10px; background: var(--cx-soft); color: var(--cx-accent); font-size: 13px; font-weight: 800; text-decoration: none; }
.cx .cx-hover-all:hover { background: var(--cx-accent-bg); }

/* вид «Марка → модели»: слева марки, справа модели выбранной */
.cx.is-md .cx-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.cx.is-md .cx-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.cx.is-md .cx-mark { padding: 8px 10px; border-radius: 12px; }
.cx.is-md .cx-logo { width: 34px; height: 34px; border-radius: 9px; }
.cx.is-md .cx-mark-badges { display: none; }
.cx.is-md .cx-letter + .cx-letter { margin-top: 12px; }
.cx.is-md .cx-letter-head { font-size: 15px; margin-bottom: 6px; }
.cx-md-pane { position: sticky; top: calc(var(--cx-top) + 64px); max-height: calc(100vh - var(--cx-top) - 88px); overflow-y: auto; padding: 24px; border-radius: 20px; background: var(--cx-card); border: 1px solid var(--cx-line); box-shadow: var(--cx-shadow); }
.cx-md-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cx-md-head .cx-logo { width: 52px; height: 52px; }
.cx-md-head b { display: block; color: var(--cx-ink); font-family: var(--cx-head); font-size: 20px; font-weight: 700; }
.cx-md-head small { color: var(--cx-faint); font-size: 13px; font-weight: 600; }
.cx .cx-md-open { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--cx-accent-bg); color: var(--cx-accent); font-size: 13.5px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.cx .cx-md-open:hover { background: var(--cx-accent); color: #fff; }
.cx-md-sec + .cx-md-sec { margin-top: 16px; }
.cx-md-sec h4 { margin: 0 0 6px 8px; color: var(--cx-sub); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.cx-md-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px; }

/* ---------- страница марки ---------- */
.cx-brand { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 28px 32px; border-radius: 24px; background: radial-gradient(700px 260px at 100% 0%, var(--cx-accent-bg), transparent 70%), var(--cx-card); border: 1px solid var(--cx-line); box-shadow: var(--cx-shadow); }
.cx-brand-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 22px; background: var(--cx-soft); overflow: hidden; }
.cx-brand-logo img { max-width: 76%; max-height: 76%; object-fit: contain; }
.cx-brand-logo .cx-mono { font-size: 26px; }
.cx-brand-text { flex: 1; min-width: 260px; }
.cx-brand-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cx .cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 14px; border: 0; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.cx .cx-btn:hover { transform: scale(1.01); }
.cx .cx-btn-primary { background: linear-gradient(135deg, #1e4fe0, #3e7bff); color: #fff; box-shadow: 0 14px 30px -12px rgba(30, 79, 224, .7); }
.cx .cx-btn-ghost { background: transparent; color: var(--cx-ink); box-shadow: inset 0 0 0 1.5px var(--cx-line); }
.cx .cx-btn-ghost:hover { color: var(--cx-accent); box-shadow: inset 0 0 0 1.5px var(--cx-accent); }
.cx-btn-count { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 12.5px; font-weight: 800; }

.cx-mtools { position: relative; margin-top: 24px; padding: 20px 24px; border-radius: 20px; background: var(--cx-card); border: 1px solid var(--cx-line); box-shadow: var(--cx-shadow); display: grid; gap: 12px; }
.cx-mtools-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.cx-mtools-row .cx-search { flex: 1 1 320px; max-width: 560px; }
.cx-mtools-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cx-select { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--cx-sub); font-size: 13.5px; font-weight: 600; }
.cx-select select { height: 40px; padding: 0 34px 0 12px; border-radius: 12px; border: 1px solid var(--cx-line); background: var(--cx-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238b93a5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--cx-ink); font: inherit; font-weight: 700; appearance: none; -webkit-appearance: none; cursor: pointer; }
.cx-frow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cx-flabel { flex: none; width: 64px; color: #6b7280; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
html[data-theme="dark"] .cx-flabel { color: #9aa4b2; }
.cx-frow .cx-chips { flex: 1; min-width: 0; gap: 6px; }
.cx-frow .cx-chip { height: 32px; padding: 0 12px; font-size: 13px; }
.cx-frow-foot { flex-wrap: wrap; gap: 10px 20px; padding-top: 4px; }
.cx-switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--cx-ink); font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; }
.cx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cx-switch-ui { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--cx-soft-2); transition: background .2s; }
.cx-switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.cx-switch input:checked + .cx-switch-ui { background: var(--cx-accent); }
.cx-switch input:checked + .cx-switch-ui::after { transform: translateX(16px); }
.cx-switch input:disabled + .cx-switch-ui { opacity: .5; }
.cx-switch input:focus-visible + .cx-switch-ui { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
.cx-found { color: var(--cx-sub); font-size: 14px; font-weight: 600; margin-left: auto; }
.cx-found b { color: var(--cx-ink); font-weight: 800; }
.cx .cx-reset { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--cx-line); background: none; color: var(--cx-sub); font-size: 13px; font-weight: 700; cursor: pointer; }
.cx .cx-reset:hover { border-color: #e11d48; color: #e11d48; }

.cx-msec { margin-top: 40px; }
.cx-msec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.cx .cx-archive-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--cx-line); background: var(--cx-card); color: var(--cx-accent); font-size: 14px; font-weight: 800; cursor: pointer; }
.cx .cx-archive-btn i { transition: transform .2s; }
.cx .cx-archive-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.cx-msec.is-archive .cx-model-photo img { filter: saturate(.75); }
.cx-fam + .cx-fam { margin-top: 24px; }
.cx-fam-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px 2px; }
.cx-fam-head b { color: var(--cx-ink); font-size: 16px; font-weight: 800; }
.cx-fam-head span { color: var(--cx-faint); font-size: 13px; font-weight: 700; }
.cx-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
/* без семейств (переключатель или поиск) — карточки одной сеткой, порядок задаёт style.order */
.cx-mp.no-fam .cx-msec-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.cx-mp.no-fam .cx-fam, .cx-mp.no-fam .cx-mgrid { display: contents; }
.cx-mp.no-fam .cx-fam-head { display: none; }

.cx-model { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 12px 14px; border-radius: 18px; background: var(--cx-card); border: 1px solid var(--cx-line); transition: box-shadow .2s, transform .2s, border-color .2s; }
.cx-model:hover { box-shadow: var(--cx-shadow-lg); transform: scale(1.02); border-color: transparent; }
.cx .cx-model-link { display: flex; flex-direction: column; gap: 10px; color: var(--cx-ink); text-decoration: none; }
.cx .cx-model-link::after { content: ""; position: absolute; inset: 0; border-radius: 18px; z-index: 1; }
.cx-model-photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--cx-soft); color: var(--cx-faint); font-size: 32px; }
.cx-model-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-model-name { padding: 0 2px; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.cx-model-meta { padding: 0 2px; color: var(--cx-sub); font-size: 13px; font-weight: 600; }
.cx-model-tags { padding: 0 2px; color: var(--cx-faint); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.cx-model-sale { padding: 0 2px; }
.cx .cx-model-sale a { position: relative; z-index: 2; display: inline-flex; align-items: flex-start; gap: 6px; min-height: 26px; padding: 5px 10px; border-radius: 8px; background: var(--cx-sale-bg); color: var(--cx-sale); font-size: 12.5px; font-weight: 800; line-height: 1.3; text-decoration: none; }
.cx .cx-model-sale a i { flex: none; margin-top: 2px; }
.cx .cx-model-sale a:hover { text-decoration: underline; }
.cx-model-gens { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 4px 2px 0; }
.cx .cx-model-gens a { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--cx-soft); color: var(--cx-text); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cx .cx-model-gens a:hover { background: var(--cx-accent); color: #fff; }
.cx-model.is-flash { animation: cxFlash 1.6s ease; }
@keyframes cxFlash { 0%, 30% { box-shadow: 0 0 0 3px var(--cx-accent); } }

/* вид «Список»: строка — фото слева, данные справа */
.cx-mp.is-list .cx-mgrid, .cx-mp.is-list.no-fam .cx-msec-body { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cx-mp.is-list .cx-model { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 2px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 14px; }
.cx-mp.is-list .cx-model:hover { transform: none; }
.cx-mp.is-list .cx-model-link { display: contents; }
.cx-mp.is-list .cx-model-photo { grid-row: 1 / 4; grid-column: 1; width: 112px; aspect-ratio: 4 / 3; border-radius: 10px; font-size: 22px; }
.cx-mp.is-list .cx-model-name { grid-column: 2; grid-row: 1; font-size: 15.5px; }
.cx-mp.is-list .cx-model-meta { grid-column: 2; grid-row: 2; }
.cx-mp.is-list .cx-model-tags { grid-column: 2; grid-row: 3; }
.cx-mp.is-list .cx-model-sale { grid-column: 3; grid-row: 1; justify-self: end; }
.cx-mp.is-list .cx-model-gens { grid-column: 3; grid-row: 2 / 4; justify-content: flex-end; margin: 0; padding: 0; max-width: 380px; }

/* лента «Модели по годам» */
.cx-timeline { margin-top: 48px; border-radius: 20px; background: var(--cx-card); border: 1px solid var(--cx-line); box-shadow: var(--cx-shadow); }
.cx-timeline summary { display: flex; align-items: center; gap: 12px; padding: 20px 24px; cursor: pointer; list-style: none; color: var(--cx-ink); font-family: var(--cx-head); font-size: 18px; font-weight: 700; }
.cx-timeline summary::-webkit-details-marker { display: none; }
.cx-timeline summary i { color: var(--cx-accent); font-size: 16px; }
.cx-timeline summary span { color: var(--cx-faint); font-family: 'Manrope', sans-serif; font-size: 13.5px; font-weight: 600; }
.cx-timeline summary::after { content: ""; width: 9px; height: 9px; margin-left: auto; border: solid var(--cx-faint); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.cx-timeline[open] summary::after { transform: rotate(-135deg); }
.cx-tl { padding: 0 24px 24px; overflow-x: auto; }
.cx-tl-axis { position: relative; height: 22px; margin-left: 180px; border-bottom: 1px solid var(--cx-line); min-width: 560px; }
.cx-tl-axis span { position: absolute; bottom: 4px; transform: translateX(-50%); color: var(--cx-faint); font-size: 11.5px; font-weight: 700; }
.cx .cx-tl-row { display: grid; grid-template-columns: 180px minmax(560px, 1fr); align-items: center; height: 30px; color: var(--cx-text); text-decoration: none; border-radius: 8px; }
.cx .cx-tl-row:hover { background: var(--cx-soft); color: var(--cx-accent); }
.cx-tl-name { padding: 0 12px 0 8px; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-tl-track { position: relative; height: 18px; }
.cx-tl-bar { position: absolute; top: 0; height: 18px; border-radius: 6px; background: #b8c3d9; overflow: hidden; }
.cx-tl-bar.is-cur { background: linear-gradient(90deg, #1e4fe0, #3e7bff); }
.cx-tl-bar em { position: absolute; left: 6px; top: 0; color: #fff; font-size: 10.5px; font-style: normal; font-weight: 800; line-height: 18px; white-space: nowrap; }
html[data-theme="dark"] .cx-tl-bar { background: #3a4357; }

/* ---------- меню хлебных крошек: соседние марки / модели ---------- */

/* ---------- адаптив ---------- */
@media (max-width: 991.98px) {
    .cx.is-md .cx-layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
    .cx-mp.is-list .cx-model { grid-template-columns: 96px minmax(0, 1fr); }
    .cx-mp.is-list .cx-model-sale, .cx-mp.is-list .cx-model-gens { grid-column: 2; grid-row: auto; justify-self: start; justify-content: flex-start; }
    .cx-mp.is-list .cx-model-photo { grid-row: 1 / 6; width: 96px; }
}
@media (max-width: 767.98px) {
    .cx { --cx-gap: 32px; --cx-top: var(--hdr-height, 64px); margin-top: 12px; }
    .cx-title { font-size: 25px; }
    .cx-sub { font-size: 14px; }
    .cx-h2 { font-size: 19px; }
    .cx-hero, .cx-brand { padding: 20px 16px; border-radius: 20px; gap: 16px; }
    .cx-search input { height: 52px; font-size: 16px; padding-right: 16px; }
    .cx-kbd { display: none; }
    .cx-popular { display: flex; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
    .cx-popular::-webkit-scrollbar { display: none; }
    .cx .cx-pop { flex: 0 0 104px; padding: 12px 8px; }
    .cx-pop-logo { width: 44px; height: 44px; }
    .cx-chips.cx-scroll-x { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; }
    .cx-toolbar { gap: 10px; }
    .cx-seg { width: 100%; overflow-x: auto; scrollbar-width: none; }
    .cx-seg::-webkit-scrollbar { display: none; }
    .cx-view[aria-label="Вид списка марок"] { display: none; }
    .cx-alpha { position: fixed; top: 50%; right: 2px; z-index: 1015; flex-direction: column; flex-wrap: nowrap; gap: 0; margin: 0; padding: 4px 2px; max-height: 70vh; overflow-y: auto; transform: translateY(-50%); border-radius: 12px; scrollbar-width: none; }
    .cx-alpha::-webkit-scrollbar { display: none; }
    /* вертикальные буквы — только пока на экране список марок, иначе закрывали бы обложку */
    .cx-alpha { opacity: 0; pointer-events: none; transition: opacity .2s; }
    .cx-alpha.is-visible { opacity: 1; pointer-events: auto; }
    .cx .cx-alpha a { min-width: 22px; height: auto; padding: 1px 3px; font-size: 10.5px; border-radius: 5px; }
    .cx-marks { padding-right: 22px; }
    .cx-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .cx .cx-mark { padding: 10px 12px; border-radius: 14px; }
    .cx-logo { width: 40px; height: 40px; }
    .cx-brand-logo { width: 64px; height: 64px; border-radius: 16px; }
    .cx-brand-actions, .cx-brand-actions .cx-btn { width: 100%; }
    .cx-mtools { padding: 16px; border-radius: 18px; }
    .cx-mtools-row .cx-search { max-width: none; flex-basis: 100%; }
    .cx-mtools-right { width: 100%; margin-left: 0; justify-content: space-between; }
    .cx-select span { display: none; }
    .cx-view button { padding: 0 12px; }
    .cx-view button span { display: none; }
    .cx-frow { flex-direction: column; align-items: stretch; gap: 6px; }
    .cx-frow .cx-chips.cx-scroll-x { margin: 0 -16px; padding: 0 16px; }
    .cx-frow-foot { flex-direction: row; flex-wrap: wrap; }
    .cx-found { margin-left: 0; width: 100%; }
    .cx-mgrid, .cx-mp.no-fam .cx-msec-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cx-model { padding: 8px 8px 10px; border-radius: 14px; }
    .cx .cx-model-link::after { border-radius: 14px; }
    .cx-model-name { font-size: 14.5px; }
    .cx-model-gens { display: none; }
    .cx-mp.is-list .cx-mgrid, .cx-mp.is-list.no-fam .cx-msec-body { grid-template-columns: minmax(0, 1fr); }
    .cx-mp.is-list .cx-model { grid-template-columns: 88px minmax(0, 1fr); column-gap: 12px; }
    .cx-mp.is-list .cx-model-photo { width: 88px; }
    .cx-timeline summary { padding: 16px; font-size: 16px; flex-wrap: wrap; }
    .cx-timeline summary span { width: 100%; order: 3; }
    .cx-tl { padding: 0 8px 16px; }
    .cx-tl-axis { margin-left: 120px; }
    .cx .cx-tl-row { grid-template-columns: 120px minmax(560px, 1fr); }
}
@media (hover: none) { .cx-hover { display: none !important; } }

/* шаблон mobile (корень .cx.cx-m): системный шрифт и палитра мобильной версии */
.cx.cx-m {
    --cx-head: var(--m-font, -apple-system, 'Segoe UI', Roboto, sans-serif);
    --cx-ink: var(--m-text, #0b0b0c);
    --cx-sub: var(--m-sub, #8e8e93);
    --cx-line: var(--m-border, #e2e2e6);
    --cx-soft: var(--m-row, #f2f2f4);
    --cx-soft-2: var(--m-row-2, #e9e9ec);
    --cx-card: var(--m-card, #fff);
    --cx-accent: var(--m-blue, #3478f7);
    --cx-accent-bg: var(--m-blue-bg, #eaf1fe);
    font-family: var(--m-font, -apple-system, 'Segoe UI', Roboto, sans-serif);
}
html[data-theme="dark"] .cx.cx-m { --cx-accent: #6f9bff; }
.cx-m .cx-title, .cx-m .cx-h2, .cx-m .cx-letter-head { font-weight: 800; letter-spacing: -.01em; }
.cx-m h1.cx-title { font-size: 25px !important; }
.cx-m h2.cx-h2 { font-size: 19px !important; } /* mobile.css: h2 { font-size: 20px !important } */
