/* Раздел «Китай»: оформление сайта carbazar54.ru (тёмная тема, те же шрифты, цвета и кнопки) */
:root { --ink: #0b0b0d; --ink-soft: #17171a; --ink-card: #131316; --paper: #f4f2ee; --line-dark: rgba(244,242,238,.14); --text-dark: #f4f2ee; --text-dark-dim: #9c9ca3;
  --ember: #c5432c; --ember-strong: #a3341f; --ember-text: #e2593f; --cur-cny: #8fb2e6; --good-text: #58a56e;
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif; --font-body: 'Hanken Grotesk', system-ui, sans-serif; --font-mono: 'IBM Plex Mono', ui-monospace, monospace; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text-dark); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 720px) { .wrap { padding-inline: 16px; } }
.eyebrow { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; color: var(--text-dark); }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--ember); border-radius: 50%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 14.5px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s; }
.btn-fill { background: var(--ember); color: #fff; }
.btn-fill:hover, .btn-fill:focus-visible { background: var(--ember-strong); }
.btn-ghost-dark { border-color: var(--line-dark); color: var(--text-dark); background: transparent; }
.btn-ghost-dark:hover, .btn-ghost-dark:focus-visible { border-color: var(--text-dark); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
:focus-visible { outline: 2px solid #ff9d78; outline-offset: 3px; }

/* шапка */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(11,11,13,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-dark); }
.nav-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-decoration: none; font-size: 17px; }
.wordmark img { width: 30px; height: auto; }
.wordmark b { color: var(--ember); font-weight: 700; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { text-decoration: none; font-size: 14.5px; color: var(--text-dark-dim); transition: color .2s; }
.nav-links a:hover, .nav-links a.is-on { color: var(--text-dark); }
@media (max-width: 900px) { .nav-links { display: none; } .nav-row { justify-content: space-between; } }

/* заголовок раздела */
.ch-hero { padding: clamp(40px, 7vw, 84px) 0 clamp(22px, 3.5vw, 40px); background: radial-gradient(900px 420px at 85% -10%, rgba(197,67,44,.16), transparent 70%); }
.ch-hero h1 { font-size: clamp(32px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -.02em; margin: 18px 0 16px; max-width: 18ch; }
.ch-hero .lead { max-width: 62ch; color: var(--text-dark-dim); font-size: clamp(16px, 1.5vw, 18px); }
.ch-facts { display: flex; flex-wrap: wrap; gap: 12px 34px; list-style: none; padding: 0; margin: 26px 0 0; }
.ch-facts li { display: grid; gap: 2px; }
.ch-facts b { font: 500 clamp(22px, 2.6vw, 30px)/1.1 var(--font-mono); color: var(--text-dark); }
.ch-facts span { font-size: 13.5px; color: var(--text-dark-dim); }

/* фильтры */
.ch-filters { position: sticky; top: 64px; z-index: 20; margin: 0 0 24px; padding: 14px 0 12px; background: rgba(11,11,13,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); }
.f-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.f-row + .f-row { margin-top: 10px; }
.ch-filters label { display: grid; gap: 5px; font-size: 12.5px; color: var(--text-dark-dim); min-width: 150px; flex: 1 1 150px; }
.ch-filters select { appearance: none; min-height: 42px; padding: 0 34px 0 14px; border-radius: 12px; border: 1px solid var(--line-dark); background: var(--ink-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239c9ca3' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--text-dark); font: 500 15px var(--font-body); }
.ch-filters select:disabled { opacity: .5; }
.f-price { align-items: center; }
.f-label { font-size: 12.5px; color: var(--text-dark-dim); margin-right: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-filters .chip { display: inline-flex; min-width: 0; flex: none; gap: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-dark); font-size: 14px; color: var(--text-dark); cursor: pointer; transition: border-color .2s, background .2s; }
.chip span em { font: 500 12px var(--font-mono); font-style: normal; color: var(--text-dark-dim); margin-left: 9px; padding-left: 9px; border-left: 1px solid var(--line-dark); line-height: 1; }
.chip:has(input:checked) span em { color: #ff9d78; border-left-color: rgba(197,67,44,.5); }
.chip:has(input:checked) span { border-color: var(--ember); background: rgba(197,67,44,.16); }
.chip:has(input:focus-visible) span { outline: 2px solid #ff9d78; outline-offset: 2px; }
.f-reset { margin-left: auto; }
.f-count { width: 100%; font-size: 13.5px; color: var(--text-dark-dim); }
@media (max-width: 720px) { .ch-filters { position: static; } .ch-filters label { min-width: 46%; } }

/* карточки */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 22px; }
.cc { display: flex; flex-direction: column; background: var(--ink-card); border: 1px solid var(--line-dark); border-radius: 20px; overflow: hidden; transition: border-color .25s, transform .25s; }
.cc:hover { border-color: rgba(244,242,238,.3); }
.cc[hidden] { display: none; }
.cc-gal, .cd-gal { position: relative; aspect-ratio: 4 / 3; background: #1d1d21; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.g-img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.g-img.is-loading { opacity: .45; }
.g-none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-dark-dim); font-size: 14px; }
.g-nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(244,242,238,.3); background: rgba(11,11,13,.62); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); transition: opacity .2s, background .2s; }
.g-nav:hover { background: rgba(11,11,13,.85); }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
@media (hover: hover) { .cc-gal .g-nav { opacity: 0; } .cc-gal:hover .g-nav, .cc-gal:focus-within .g-nav { opacity: 1; } }
.g-count { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(11,11,13,.72); font: 500 12.5px var(--font-mono); color: var(--text-dark-dim); }
.g-count b { color: var(--text-dark); font-weight: 500; }
.cc-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 20px; flex: 1; }
.cc-title { font-size: 20px; line-height: 1.2; letter-spacing: -.01em; font-weight: 600; }
.cc-title a { text-decoration: none; }
.cc-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; list-style: none; margin: 0; padding: 0; }
.cc-specs li { display: grid; gap: 1px; }
.cc-specs span { font-size: 12px; color: var(--text-dark-dim); }
.cc-specs b { font-weight: 600; font-size: 14.5px; }
.cc-cond { font-size: 13.5px; color: var(--text-dark-dim); }
.cc-cond span { color: var(--text-dark-dim); opacity: .8; }
.cc-price { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-dark); display: grid; gap: 6px; }
.cc-total { display: grid; gap: 2px; }
.cc-total b { font: 500 clamp(24px, 2.4vw, 30px)/1.1 var(--font-mono); letter-spacing: -.01em; }
.cc-total b.soft { font: 600 18px/1.25 var(--font-body); }
.cc-total span { font-size: 13.5px; color: var(--text-dark-dim); }
.cc-sub2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; font-size: 13px; color: var(--text-dark-dim); }
.cny { color: var(--cur-cny); font-family: var(--font-mono); font-size: 12.5px; }
.cc-more { border: 1px solid var(--line-dark); border-radius: 12px; background: rgba(244,242,238,.025); }
.cc-more > summary { list-style: none; cursor: pointer; padding: 11px 14px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cc-more > summary::-webkit-details-marker { display: none; }
.cc-more > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--text-dark-dim); border-bottom: 2px solid var(--text-dark-dim); rotate: 45deg; translate: 0 -2px; transition: rotate .2s; }
.cc-more[open] > summary::after { rotate: 225deg; translate: 0 2px; }
.cc-more summary em { font: 500 12px var(--font-mono); font-style: normal; color: var(--text-dark-dim); margin-left: 8px; }
.cc-more > :not(summary) { margin: 0 14px 14px; }
.calc { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cc-more > .calc { width: calc(100% - 28px); }       /* внутри раскрывающегося блока у таблицы боковые поля 14 px: без этого она вылезала за рамку */
.calc td { padding: 7px 0; border-bottom: 1px solid var(--line-dark); vertical-align: top; }
.calc td:last-child { text-align: right; font-family: var(--font-mono); white-space: nowrap; padding-left: 12px; }
.calc small { display: block; font-size: 11.5px; }
.calc tr.sub td { font-weight: 600; border-bottom-color: rgba(244,242,238,.3); }
.calc tr.tot td { font-weight: 700; font-size: 15px; border-bottom: 0; color: #fff; }
.calc-note { margin-top: 10px !important; font-size: 12px; color: var(--text-dark-dim); }
.opts { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.opts li { position: relative; padding-left: 18px; }
.opts li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-empty { padding: 40px 0; color: var(--text-dark-dim); text-align: center; }
.ch-note { margin: 56px 0 72px; padding: 28px 30px; border-radius: 20px; border: 1px solid var(--line-dark); background: linear-gradient(120deg, rgba(197,67,44,.14), rgba(197,67,44,.03) 60%); display: grid; gap: 12px; justify-items: start; }
.ch-note h2 { font-size: clamp(20px, 2.3vw, 26px); }
.ch-note p { color: var(--text-dark-dim); max-width: 78ch; }

/* страница машины */
.cd { padding: 22px 0 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text-dark-dim); margin-bottom: 18px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text-dark); }
.cd-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(22px, 3.4vw, 52px); align-items: start; }
@media (max-width: 960px) { .cd-grid { grid-template-columns: 1fr; } }
.cd-gal { border-radius: 20px; border: 1px solid var(--line-dark); }
.cd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.cd-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #1d1d21; cursor: pointer; aspect-ratio: 4 / 3; }
.cd-thumbs button.on { border-color: var(--ember); }
.cd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.cd-side { display: grid; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 960px) { .cd-side { position: static; } }
.cd-side h1 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.cd-year { color: var(--text-dark-dim); }
.cd-price { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line-dark); background: var(--ink-card); display: grid; gap: 6px; }
.cd-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cd-specs { margin: 0; display: grid; }
.cd-specs div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line-dark); }
.cd-specs dt { color: var(--text-dark-dim); font-size: 14px; }
.cd-specs dd { margin: 0; font-weight: 600; text-align: right; }
.cd-sections { display: grid; gap: 28px; margin-top: 40px; max-width: 820px; }
.cd-block h2 { font-size: clamp(21px, 2.4vw, 28px); margin-bottom: 14px; }
.cd-block p { color: var(--text-dark-dim); max-width: 74ch; }
.cd-block p + p { margin-top: 10px; }
.opts.cols { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 22px; }
.cd-similar { margin-top: 56px; }
.cd-similar h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 18px; }

/* подвал */
.footer { border-top: 1px solid var(--line-dark); padding: 36px 0 40px; margin-top: 24px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { text-decoration: none; font-size: 14.5px; color: var(--text-dark-dim); } .foot-links a:hover { color: var(--text-dark); }
.foot-fine { margin-top: 18px; font-size: 13px; color: var(--text-dark-dim); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* окно заявки на машину */
.lead-dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--ink-soft); color: var(--text-dark); overflow: auto; }
.lead-dlg::backdrop { background: rgba(5,5,7,.72); backdrop-filter: blur(4px); }
.lead-form { position: relative; display: grid; padding: 26px 26px 28px; }
#leadMain, #leadDone { display: grid; gap: 14px; }
#leadMain[hidden], #leadDone[hidden] { display: none; }
.lead-form h2 { font-size: clamp(22px, 3vw, 28px); line-height: 1.15; }
.lead-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-dark); background: transparent; color: var(--text-dark); font-size: 22px; line-height: 1; cursor: pointer; }
.lead-x:hover { border-color: var(--text-dark); }
.lead-car { padding: 10px 14px; border-radius: 12px; background: rgba(244,242,238,.05); border-left: 2px solid var(--ember); font-weight: 600; font-size: 15px; }
.lead-car:empty { display: none; }
.lead-car small { display: block; font-weight: 400; color: var(--text-dark-dim); font-size: 13px; }
.lead-hint { color: var(--text-dark-dim); font-size: 14.5px; }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lf { display: grid; gap: 6px; font-size: 13.5px; color: var(--text-dark-dim); border: 0; padding: 0; margin: 0; }
.lf-t { display: block; }
.lf-t b { color: var(--ember-text); }
.lf-t em { font-style: normal; opacity: .7; }
.lf input[type=text], .lf input[type=tel], .lf textarea { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-dark); background: var(--ink); color: var(--text-dark); font: 500 16px var(--font-body); }
.lf textarea { resize: vertical; min-height: 84px; }
.lf input:focus-visible, .lf textarea:focus-visible { outline: 2px solid #ff9d78; outline-offset: 1px; }
.lf input.bad { border-color: var(--ember-text); }
.lf-via legend { padding: 0; margin-bottom: 6px; }
.lead-form .chip { min-width: 0; }
.lf-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dark-dim); cursor: pointer; }
.lf-consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ember); flex: none; }
.lf-err { color: var(--ember-text); font-size: 13px; }
.lf-err[hidden] { display: none; }
@media (max-width: 480px) { .lead-form { padding: 22px 18px 24px; } }

.cc-foot { margin-top: 2px; font-size: 12.5px; color: var(--text-dark-dim); }
.cc-foot::before { content: "* "; color: var(--ember-text); }
