/* Каталог «под заказ» (Корея, Китай): список, фильтры, карточки, страница автомобиля.
   Цвета — токены темы из ui.css (тёмная по умолчанию, светлая через html[data-at-theme="light"]). */
.at-cars { padding: calc(var(--header-height, 122px) + 8px) 0 64px; font-family: var(--at-ui-font); color: var(--at-c-fg); }
@media (max-width: 991.98px) { .at-cars { padding-top: 92px; } }
.at-cars *, .at-cars *::before, .at-cars *::after { box-sizing: border-box; }
.at-cars a { color: inherit; }
.at-cars h1, .at-cars h2 { font-family: var(--at-ui-font); color: var(--at-c-fg); text-transform: none; letter-spacing: -.01em; text-align: left; }
.at-flag { width: 22px; height: 15px; border-radius: 3px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); background: #fff; }

/* хлебные крошки и заголовок */
.cr-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0 0 18px; padding: 0; font-size: 13px; color: var(--at-c-muted); }
.cr-crumbs li { display: inline-flex; align-items: center; }
.cr-crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .6; }
.cr-crumbs a { text-decoration: none; color: var(--at-c-muted) !important; }
.cr-crumbs a:hover { color: var(--at-c-fg) !important; }
.cr-crumbs span[aria-current] { color: var(--at-c-fg); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-head h1 { margin: 0 0 8px; font: 800 clamp(28px, 3.4vw, 42px)/1.12 var(--at-ui-font); }
.cr-lead { margin: 0 0 22px; color: var(--at-c-muted); font-size: 15px; line-height: 1.5; }

/* страна: карточки с флагом и количеством машин */
.cr-tabs { margin-bottom: 18px; }
.cr-cty { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.cr-cty__i {
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 44px 14px 16px; border-radius: 12px;
  background: var(--at-c-surface); border: 1px solid var(--at-c-line); color: var(--at-c-fg) !important; text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cr-cty__i:hover { border-color: var(--at-c-muted); transform: translateY(-1px); }
.cr-cty__i .at-flag { width: 40px; height: 27px; border-radius: 5px; }
.cr-cty__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-cty__t b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.cr-cty__t small { font-size: 12.5px; font-weight: 500; color: var(--at-c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-cty__ok { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid var(--at-c-line); }
.cr-cty__i.is-on { border-color: var(--at-accent); box-shadow: 0 0 0 1px var(--at-accent), 0 8px 24px rgba(var(--at-accent-rgb),  .14); background: linear-gradient(rgba(var(--at-accent-rgb),  .07), rgba(var(--at-accent-rgb),  .07)), var(--at-c-surface); }
.cr-cty__i.is-on .cr-cty__ok { border-color: var(--at-accent); background: var(--at-accent); }
.cr-cty__i.is-on .cr-cty__ok::before { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }

/* поиск и переключатель «до 160 л.с.» */
.cr-tools { display: flex; gap: 12px; margin-bottom: 14px; }
.cr-tools .cr-search { flex: 1; margin: 0; }
.cr-hp {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 14px 0 16px; border-radius: 10px;
  border: 1px solid var(--at-c-line); background: var(--at-c-surface); color: var(--at-c-fg); font-family: var(--at-ui-font); cursor: pointer; text-align: left;
  transition: border-color .15s;
}
.cr-hp:hover { border-color: var(--at-c-muted); }
.cr-hp__t b { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.15; }
.cr-hp__t small { display: block; font-size: 11.5px; color: var(--at-c-muted); font-weight: 500; }
.cr-hp__sw { position: relative; flex: 0 0 auto; width: 44px; height: 26px; border-radius: 13px; background: var(--at-c-soft); border: 1px solid var(--at-c-line); transition: background .2s, border-color .2s; }
.cr-hp__sw i { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.cr-hp[aria-checked="true"] { border-color: var(--at-accent); }
.cr-hp[aria-checked="true"] .cr-hp__sw { background: var(--at-accent); border-color: var(--at-accent); }
.cr-hp[aria-checked="true"] .cr-hp__sw i { transform: translateX(18px); }

/* раскладка: фильтры слева, результаты справа */
.cr-layout { display: grid; grid-template-columns: 316px minmax(0, 1fr); gap: 24px; align-items: start; }
.cr-filters {
  position: sticky; top: 90px; max-height: calc(100vh - 104px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 18px; border-radius: 12px; background: var(--at-c-surface); border: 1px solid var(--at-c-line);
}
.cr-filters__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cr-filters__head b { font-size: 18px; font-weight: 800; margin-right: auto; }
.cr-reset { border: 0; background: none; color: var(--at-accent); font: 600 13.5px var(--at-ui-font); cursor: pointer; padding: 4px 0; }
.cr-close, .cr-filters__foot { display: none; }
.cr-form { display: grid; gap: 12px; }
.cr-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.cr-f > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--at-c-muted); }
.cr-sel { position: relative; display: block; }
.cr-sel::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 1.8px solid var(--at-c-muted); border-bottom: 1.8px solid var(--at-c-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.at-cars select, .at-cars input[type="text"], .at-cars input[type="tel"], .at-cars input[type="search"] {
  width: 100%; height: 44px; margin: 0; padding: 0 12px; border-radius: 10px; border: 1px solid var(--at-c-line); background: var(--at-c-soft);
  color: var(--at-c-fg); font: 600 14px var(--at-ui-font); outline: none; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.at-cars select { padding-right: 32px; text-overflow: ellipsis; cursor: pointer; }
.at-cars select:disabled { opacity: .5; cursor: default; }
.at-cars select option { color: #111317; background: #fff; }
.at-cars input::placeholder { color: var(--at-c-muted); opacity: .85; font-weight: 500; }
.at-cars select:focus, .at-cars input:focus { border-color: var(--at-accent); }
.cr-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; margin: 2px 0 0; }
.cr-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--at-accent); }

/* поиск, типы кузова, строка с количеством */
.cr-search { position: relative; display: block; margin: 0 0 14px; }
.cr-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--at-c-muted); pointer-events: none; }
.at-cars .cr-search input { height: 52px; padding-left: 48px; border-radius: 10px; background: var(--at-c-surface); font-size: 15px; }
.cr-chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cr-chips::-webkit-scrollbar { display: none; }
.cr-chips.is-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.cr-chip { flex: 0 0 auto; white-space: nowrap; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--at-c-line); background: var(--at-c-surface); color: var(--at-c-fg); font: 600 13.5px var(--at-ui-font); cursor: pointer; }
.cr-chip:hover { border-color: var(--at-c-muted); }
.cr-chip:disabled { opacity: .35; cursor: default; }
.cr-chip:disabled:hover { border-color: var(--at-c-line); }
.at-cars select option:disabled { color: #b0b4bb; }
.cr-chip.is-on { background: var(--at-accent); border-color: var(--at-accent); color: #fff; }
.cr-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cr-count { margin-right: auto; color: var(--at-c-muted); font-size: 14.5px; }
.cr-count b { color: var(--at-c-fg); font-weight: 800; }
.cr-sort { position: relative; margin: 0; flex: 0 0 auto; }
.cr-sort > svg { position: absolute; left: 13px; top: 50%; z-index: 1; transform: translateY(-50%); color: var(--at-c-muted); pointer-events: none; }
.at-cars .cr-sort select { width: auto; min-width: 210px; height: 44px; padding-left: 40px; border-radius: var(--at-r-btn, 12px); background: var(--at-c-surface); font-weight: 700; }
.cr-disc, .cp-disc { margin: 18px 0 0; font-size: 12px; line-height: 1.5; color: var(--at-c-muted); }
.cp-disc { margin: -4px 0 0; }
.cp-bar { display: none; }
.cr-ftoggle { display: none; }

/* карточки */
.cr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; transition: opacity .15s; }
.cr-grid.is-busy { opacity: .45; pointer-events: none; }
.cr-grid_4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cc { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 12px; overflow: hidden; background: var(--at-c-surface); border: 1px solid var(--at-c-line); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cc:hover { border-color: rgba(var(--at-accent-rgb),  .55); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.cc__pic { position: relative; }
.cc__media { display: block; aspect-ratio: 4 / 3; background: var(--at-c-soft); overflow: hidden; }
.cc__strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cc__strip::-webkit-scrollbar { display: none; }
.cc__strip > img, .cc__strip > .cc__more { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; display: block; }
.cc__strip > img.is-broken { visibility: hidden; }
.cc__more { display: grid !important; place-items: center; background: rgba(0, 0, 0, .78); color: #fff; font-weight: 700; font-size: 16px; text-align: center; }
.cc__badge, .cc__count { position: absolute; z-index: 2; pointer-events: none; padding: 4px 9px; border-radius: 8px; background: rgba(12, 13, 15, .72); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.cc__badge { top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; }
.cc__badge .at-flag { width: 18px; height: 12px; border-radius: 2px; }
.cc__ph { display: grid !important; place-items: center; flex: 0 0 100%; color: var(--at-c-muted); font-size: 13px; font-weight: 600; }
.cc__count { bottom: 10px; left: 10px; letter-spacing: 0; }
.cc__count b { font-weight: 700; }
.cc__nav { position: absolute; z-index: 2; top: 50%; width: 34px; height: 34px; margin-top: -17px; border: 0; border-radius: 50%; background: rgba(12, 13, 15, .6); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.cc__nav::before { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translate(-30%, -50%) rotate(45deg); }
.cc__nav_next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.cc__nav_prev { left: 8px; }
.cc__nav_next { right: 8px; }
.cc:hover .cc__nav { opacity: 1; }
.cc__nav:hover { background: rgba(12, 13, 15, .85); }
@media (hover: none) { .cc__nav { display: none; } }
.cc__body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 13px 15px 15px; text-decoration: none !important; color: var(--at-c-fg) !important; }
/* каждая строка карточки — ровно одна линия: карточки в ряду одной высоты, без пустых мест */
.cc__title, .cc__trim, .cc__spec, .cc__row { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc__title { font-size: 16.5px; font-weight: 800; line-height: 22px; }
.cc__trim { font-size: 13px; line-height: 18px; color: var(--at-c-muted); margin-top: -2px; }
.cc__spec { font-size: 13.5px; line-height: 19px; color: var(--at-c-muted); }
.cc__row { display: flex; align-items: center; height: 24px; font-size: 13.5px; font-weight: 600; }
.cc__row .cc__tag { flex: 0 0 auto; margin-left: 8px; }
.cc__km2, .cc__okb { display: none; }
.cc__okb { position: absolute; z-index: 2; right: 7px; bottom: 7px; pointer-events: none; padding: 2px 7px; border-radius: 7px; background: #1f9d55; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; }
.cc__tag { padding: 3px 8px; border-radius: 5px; background: var(--at-c-soft); border: 1px solid var(--at-c-line); font-size: 11.5px; font-weight: 700; color: var(--at-c-muted); }
.cc__tag_ok { color: #1f9d55; border-color: rgba(31, 157, 85, .35); background: rgba(31, 157, 85, .1); }
.cc__price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; white-space: nowrap; }
.cc__price small { font-size: 12.5px; color: var(--at-c-muted); font-weight: 600; }
.cc__price b { font-size: 20px; font-weight: 800; white-space: nowrap; }

/* пусто, «ещё», страницы, кнопки */
.cr-empty { padding: 40px 18px; text-align: center; border-radius: 12px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); }
.cr-empty b { display: block; font-size: 20px; margin-bottom: 6px; }
.cr-empty p { color: var(--at-c-muted); margin: 0 auto 18px; max-width: 480px; }
.cr-empty__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cr-more { display: flex; justify-content: center; margin-top: 22px; }
.cr-more[hidden], .cr-empty[hidden], .cr-reset[hidden] { display: none; }
.cr-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.cr-pages a, .cr-pages span { min-width: 40px; height: 40px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--at-c-line); background: var(--at-c-surface); color: var(--at-c-fg) !important; font-weight: 700; font-size: 14px; text-decoration: none !important; }
.cr-pages span:not(.is-on) { border-color: transparent; background: none; color: var(--at-c-muted) !important; }
.cr-pages .is-on { background: var(--at-accent); border-color: var(--at-accent); color: #fff !important; }
.cr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px; border-radius: var(--at-r-btn, 12px); border: 1px solid transparent;
  font: 700 15px var(--at-ui-font); text-decoration: none !important; cursor: pointer; text-align: center; transition: background .15s, border-color .15s;
}
.cr-btn_main { background: var(--at-accent); color: #fff !important; }
.cr-btn_main:hover { background: var(--at-accent-2); }
.cr-btn_line { background: transparent; color: var(--at-c-fg) !important; border-color: var(--at-c-line); }
.cr-btn_line:hover { border-color: var(--at-c-muted); }
.cr-btn_wa { background: var(--at-c-soft); color: var(--at-c-fg) !important; border-color: var(--at-c-line); }
.cr-btn_wa svg { color: #25d366; }
.cr-btn_wa:hover { border-color: #25d366; }

/* как привозим */
.cr-help { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; margin-top: 48px; padding: 26px; border-radius: 12px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); }
.cr-help h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; }
.cr-help ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; counter-reset: s; }
.cr-help li { position: relative; padding-left: 42px; counter-increment: s; }
.cr-help li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; background: var(--at-accent); color: #fff; font-weight: 800; font-size: 14px; }
.cr-help li b { display: block; font-size: 15px; margin-bottom: 3px; }
.cr-help li span { color: var(--at-c-muted); font-size: 13.5px; line-height: 1.45; }
.cr-help__cta { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-left: 24px; border-left: 1px solid var(--at-c-line); }
.cr-help__cta p { margin: 0 0 6px; color: var(--at-c-muted); font-size: 14px; line-height: 1.5; }

/* страница автомобиля */
.cp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cp-main { position: relative; aspect-ratio: 5 / 3; border-radius: 12px; overflow: hidden; background: #0c0d0f; }
.cp-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cp-strip::-webkit-scrollbar { display: none; }
.cp-strip img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; }
.cp-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px; background: rgba(12, 13, 15, .72); color: #fff; font-size: 12.5px; font-weight: 700; pointer-events: none; }
.cp-cnt { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 7px; background: rgba(12, 13, 15, .72); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; }
.cp-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(12, 13, 15, .6); cursor: pointer; z-index: 2; }
.cp-nav::before { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translate(-30%, -50%) rotate(45deg); }
.cp-nav_next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.cp-nav_prev { left: 12px; }
.cp-nav_next { right: 12px; }
.cp-nav:hover { background: rgba(12, 13, 15, .85); }
.cp-zoom { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(12, 13, 15, .72); color: #fff; cursor: pointer; }
.cp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.cp-thumbs button { flex: 0 0 auto; width: 96px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--at-c-soft); cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.cp-thumbs button.is-on, .cp-thumbs button:hover { opacity: 1; }
.cp-thumbs button.is-on { border-color: var(--at-accent); }
.cp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-side { position: sticky; top: 90px; }
.cp-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 12px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); }
.cp-mk { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--at-c-muted); font-weight: 600; }
.cp-card h1 { margin: 0; font: 800 28px/1.15 var(--at-ui-font); }
.cp-trim { margin-top: -6px; color: var(--at-c-muted); font-size: 14.5px; }
.cp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cp-tiles div { padding: 10px; border-radius: 8px; background: var(--at-c-soft); min-width: 0; }
.cp-tiles small { display: block; font-size: 11.5px; color: var(--at-c-muted); margin-bottom: 3px; }
.cp-tiles b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; overflow-wrap: normal; }
.cp-price { padding-top: 4px; }
.cp-price small { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--at-c-muted); font-weight: 700; }
.cp-price b { display: block; font-size: 32px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.cp-price span { display: block; margin-top: 4px; font-size: 13px; color: var(--at-c-muted); }
.cp-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--at-c-muted); }
.cp-card .cr-btn { width: 100%; }
.cp-info { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.cp-box { padding: 22px; border-radius: 12px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); }
.cp-box h2, .cp-lead h2, .cp-similar h2 { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.cp-specs { margin: 0; }
.cp-specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--at-c-line); }
.cp-specs div:last-child { border-bottom: 0; }
.cp-specs dt { color: var(--at-c-muted); font-weight: 500; font-size: 14px; }
.cp-specs dd { margin: 0; font-weight: 700; font-size: 14px; text-align: right; }
.cp-flag { display: inline-block; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; background: var(--at-c-soft); border: 1px solid var(--at-c-line); }
.cp-flag_ok { color: #1f9d55; background: rgba(31, 157, 85, .1); border-color: rgba(31, 157, 85, .35); }
.cp-flag_warn { color: #c77700; background: rgba(var(--at-accent-rgb),  .1); border-color: rgba(var(--at-accent-rgb),  .35); }
.cp-list { margin: 16px 0 0; padding-left: 18px; color: var(--at-c-muted); font-size: 14px; line-height: 1.55; }
.cp-list li + li { margin-top: 6px; }
.cp-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; margin-top: 28px; padding: 26px; border-radius: 12px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); border-left: 4px solid var(--at-accent); scroll-margin-top: 100px; }
.cp-lead p { margin: 0; color: var(--at-c-muted); font-size: 14.5px; line-height: 1.5; }
.cp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.at-cars .cp-form input { height: 48px; }
.cp-form .cr-btn { grid-column: 1 / -1; }
.cp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cp-form__msg { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: 14px; min-height: 0; }
.cp-form__msg.is-ok { color: #1f9d55; }
.cp-form__msg.is-err { color: #e0301e; }
.cp-form__legal { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--at-c-muted); }
.cp-form__legal a { text-decoration: underline; }
.cp-similar { margin-top: 36px; }
.cp-similar__all { margin-top: 18px; }
.cp-lb { position: fixed; inset: 0; z-index: 10060; display: grid; place-items: center; background: rgba(6, 7, 9, .97); }
.cp-lb[hidden] { display: none; }
.cp-lb img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.cp-lb .cp-nav { position: fixed; }
.cp-lb__x { position: fixed; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.cp-lb__cnt { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 600; font-size: 14px; }
html.at-cr-lock, html.at-cr-lock body { overflow: hidden !important; }

/* адаптив */
@media (max-width: 1199.98px) {
  .cr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-cty__sub { display: none; }
  .cr-grid_4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 991.98px) {
  .cr-layout, .cp, .cp-info, .cp-lead, .cr-help { grid-template-columns: minmax(0, 1fr); }
  .cr-help__cta { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--at-c-line); }
  /* страны — компактно: флаг сверху, текст по центру */
  /* страны на телефоне и планшете: ровные плитки одного размера (флаг, название, количество), лентой от края до края;
     помещаются — делят ширину поровну, не помещаются — листаются; подписи всегда в одну строку */
  .cr-tabs { margin-inline: calc(var(--bs-gutter-x, 30px) * -.5); }
  .cr-cty {
    grid-auto-columns: minmax(108px, 1fr); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding: 2px calc(var(--bs-gutter-x, 30px) * .5) 4px; scroll-padding-inline: calc(var(--bs-gutter-x, 30px) * .5);
  }
  .cr-cty::-webkit-scrollbar { display: none; }
  .cr-cty__i {
    flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 112px; padding: 14px 10px 13px;
    border-radius: 16px; text-align: center; scroll-snap-align: start;
  }
  .cr-cty__i:hover { transform: none; }
  .cr-cty__i.is-on { box-shadow: 0 0 0 1px var(--at-accent); }
  .cr-cty__i .at-flag { width: 38px; height: 26px; border-radius: 5px; }
  .cr-cty__t { align-items: center; gap: 3px; max-width: 100%; }
  .cr-cty__t b { font-size: 15.5px; line-height: 1.2; white-space: nowrap; }
  .cr-cty__t small { font-size: 12px; }
  .cr-cty__ok { display: none; }
  .cp-side { position: static; }
  .cr-grid_4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* фильтры — лист снизу, как в приложении */
  .cr-filters {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 10050; max-height: 88vh; max-height: 88dvh; border-radius: 22px 22px 0 0; border: 0; padding: 0;
    display: flex; flex-direction: column; transform: translateY(105%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  }
  .cr-filters.is-open { transform: none; visibility: visible; }
  .cr-filters.is-drag { transition: none; }
  .cr-handle { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: var(--at-c-line); flex: 0 0 auto; }
  .cr-backdrop { position: fixed; inset: 0; z-index: 10049; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s; }
  .cr-backdrop.is-on { opacity: 1; }
  .cr-filters__head { margin: 0; padding: 10px 16px 12px; border-bottom: 1px solid var(--at-c-line); touch-action: none; }
  .cr-filters__head .cr-reset { display: none; }
  .cr-close { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--at-c-soft); color: var(--at-c-fg); cursor: pointer; }
  .cr-form { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 14px 16px 18px; align-content: start; }
  .cr-filters__foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--at-c-line); background: var(--at-c-surface); }
  .cr-foot-reset { height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--at-c-line); background: transparent; color: var(--at-c-fg); font: 700 15px var(--at-ui-font); cursor: pointer; }
  .cr-apply { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--at-accent); color: #fff; font: 800 16px var(--at-ui-font); cursor: pointer; box-shadow: 0 6px 18px rgba(var(--at-accent-rgb),  .35); }
  .cr-ftoggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; padding: 0 13px; border-radius: var(--at-r-btn, 12px);
    border: 1px solid var(--at-c-line); background: var(--at-c-surface); color: var(--at-c-fg); font: 700 14.5px var(--at-ui-font); cursor: pointer;
  }
  .cr-ftoggle b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--at-accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
  .cr-ftoggle b:empty { display: none; }
  .cr-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
  .cr-count { grid-column: 1 / -1; order: 2; margin: 2px 0 0; font-size: 13.5px; }
  .at-cars .cr-sort select { min-width: 0; width: 100%; height: 46px; padding: 0 26px 0 36px; font-size: 13.5px; font-weight: 600; }
  .cr-sort > svg { left: 12px; }
  .cr-sort .cr-sel::after { right: 12px; }
  /* лист фильтров: открывается снизу почти на весь экран, страница под ним стоит на месте */
  .cr-filters { height: 92vh; height: 92dvh; max-height: none; }
  .cr-form { -webkit-overflow-scrolling: touch; }
  html.at-cr-fixed body { position: fixed !important; left: 0; right: 0; width: 100%; }
  /* страница машины: снизу «Подробный расчёт» и «Оставить заявку» (вместо нижнего меню) */
  .cp-bar {
    position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 1046;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 7px; border-radius: 20px;
    background: var(--at-c-bar); border: 1px solid var(--at-c-line); box-shadow: 0 10px 32px rgba(0, 0, 0, .28);
  }
  @supports (backdrop-filter: blur(1px)) {
    .cp-bar { background: color-mix(in srgb, var(--at-c-bar) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
  }
  .cp-bar__btn {
    display: flex; align-items: center; justify-content: center; min-width: 0; height: 48px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--at-c-line);
    background: var(--at-c-soft); color: var(--at-c-fg) !important; font: 700 14px/1.15 var(--at-ui-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; text-decoration: none !important;
    -webkit-tap-highlight-color: transparent; transition: transform .1s;
  }
  .cp-bar__btn:active { transform: scale(.97); }
  .cp-bar__btn_main { background: var(--at-accent); border-color: var(--at-accent); color: #fff !important; box-shadow: 0 6px 16px rgba(var(--at-accent-rgb), .32); }
  html.at-has-cpbar .at-bnav { display: none !important; }
  .cp-card h1 { font-size: 24px; }
}
@media (max-width: 575.98px) {
  /* как в приложении: две машины в ряд, компактные карточки */
  .cr-grid, .cr-grid_4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cc { border-radius: 12px; }
  .cc:hover { transform: none; }
  .cc__badge { top: 7px; left: 7px; padding: 3px 7px; font-size: 10.5px; gap: 4px; }
  .cc__badge .at-flag { width: 15px; height: 10px; }
  .cc__count { bottom: 7px; left: 7px; padding: 2px 6px; font-size: 10.5px; }
  .cc__fav { top: 6px; right: 6px; width: 32px; height: 32px; }
  .cc__fav svg { width: 17px; height: 17px; }
  .cc__body { padding: 9px 10px 11px; gap: 2px; }
  .cc__title { font-size: 13.5px; line-height: 18px; text-transform: uppercase; letter-spacing: .01em; }
  .cc__trim { font-size: 11.5px; line-height: 16px; margin-top: 0; }
  .cc__spec { font-size: 11.5px; line-height: 16px; }
  .cc__row { height: 18px; font-size: 11.5px; }
  .cc__km, .cc__mo, .cc__row .cc__tag { display: none; }
  .cc__km2 { display: inline; white-space: nowrap; }
  .cc__okb { display: block; }
  .cc__price { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 4px; }
  .cc__price small { font-size: 10.5px; }
  .cc__price b { font-size: 15.5px; }
  .cr-cty { grid-auto-columns: minmax(102px, 1fr); gap: 8px; }
  .cr-cty__i { gap: 9px; min-height: 104px; padding: 13px 8px 12px; border-radius: 14px; }
  .cr-cty__i .at-flag { width: 36px; height: 24px; }
  .cr-cty__t b { font-size: 15px; }
  .cr-cty__t small { font-size: 11.5px; }
  .cr-tools { flex-direction: column; gap: 10px; }
  .cr-hp { width: 100%; justify-content: space-between; }
  .cr-help { padding: 18px; }
  .cr-help ol { grid-template-columns: 1fr; }
  .cp-form { grid-template-columns: 1fr; }
  .cp-lead { padding: 18px; }
  .cp-price b { font-size: 28px; }
  .cp-card { padding: 18px 16px; }
  .cp-tiles div { padding: 9px 10px; }
  .cp-tiles b { font-size: 13px; }
  .cp-card .cr-btn { font-size: 14.5px; padding: 0 14px; }
  .cp-hide-m { display: none; }
  .cp-thumbs button { width: 76px; height: 52px; }
  .cp-nav { width: 38px; height: 38px; margin-top: -19px; }
}

/* избранное на карточке */
.cc__fav { position: absolute; z-index: 3; top: 8px; right: 8px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #16181d; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); transition: transform .15s, color .15s; }
.cc__fav:hover { transform: scale(1.06); }
.cc__fav.on { color: var(--at-accent); }
.cc__fav.on svg, .cp-act.on svg { fill: currentColor; }

/* страница авто: действия и подробный расчёт */
.cp-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: var(--at-r-btn, 12px); border: 1px solid var(--at-c-line); background: var(--at-c-soft); color: var(--at-c-fg); font: 700 14px var(--at-ui-font); cursor: pointer; transition: border-color .15s; }
.cp-act:hover { border-color: var(--at-c-muted); }
.cp-act.on { color: var(--at-accent); border-color: rgba(var(--at-accent-rgb), .4); }
.cr-btn_calc { background: transparent; color: var(--at-accent) !important; border-color: var(--at-accent); }
.cr-btn_calc:hover { background: rgba(var(--at-accent-rgb),  .08); }
.cp-calc { margin-top: 28px; scroll-margin-top: 96px; }
.cp-calc__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.cp-calc__head h2 { margin: 0 !important; }
.cp-calc__rates { color: var(--at-c-muted); font-size: 13px; font-weight: 600; }
.cp-calc__wait { padding: 18px 0; color: var(--at-c-muted); font-size: 14.5px; }
.cl-group { padding: 6px 0; border-bottom: 1px solid var(--at-c-line); }
.cl-sub { padding: 10px 0 2px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--at-c-muted); }
.cl-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 9px 0; font-size: 14.5px; }
.cl-row + .cl-row { border-top: 1px dashed var(--at-c-line); }
.cl-l { min-width: 0; }
.cl-l small { display: block; margin-top: 2px; color: var(--at-c-muted); font-size: 12.5px; }
.cl-row b { white-space: nowrap; font-weight: 700; }
.cl-row_mid { padding: 12px 0; border-bottom: 1px solid var(--at-c-line); font-weight: 700; }
.cl-dlv { border-bottom: 0; }
.cl-city { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; max-width: 420px; }
.cl-city > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--at-c-muted); }
.cl-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 8px; padding: 16px 18px; border-radius: 10px; background: rgba(var(--at-accent-rgb),  .1); border: 1px solid rgba(var(--at-accent-rgb),  .35); }
.cl-total span { font-weight: 700; font-size: 15px; }
.cl-total b { font-size: 26px; font-weight: 800; white-space: nowrap; }
.cl-note { margin: 12px 0 0; color: var(--at-c-muted); font-size: 12.5px; line-height: 1.5; }
.cl-btns { margin-top: 14px; }

/* история и состояние по отчёту Encar */
.cp-state > .cp-flag { margin-bottom: 14px; }
.rp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; margin: 14px 0; }
.rp-fact { padding: 10px 12px; border-radius: 8px; background: var(--at-c-soft); border: 1px solid var(--at-c-line); }
.rp-fact small { display: block; font-size: 11.5px; color: var(--at-c-muted); margin-bottom: 3px; }
.rp-fact b { font-size: 14px; }
.rp-fact.is-ok b { color: #1f9d55; }
.rp-fact.is-warn b { color: #c77700; }
.rp-acc { border: 1px solid var(--at-c-line); border-radius: 10px; background: var(--at-c-surface); margin-top: 8px; overflow: hidden; }
.rp-acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.rp-acc summary::-webkit-details-marker { display: none; }
.rp-acc summary b { display: block; font-size: 15px; }
.rp-acc summary small { display: block; margin-top: 2px; color: var(--at-c-muted); font-size: 12.5px; }
.rp-acc summary i { position: relative; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--at-c-soft); }
.rp-acc summary i::before, .rp-acc summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--at-c-fg); transform: translate(-50%, -50%); transition: transform .2s; }
.rp-acc summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.rp-acc[open] summary i::after { transform: translate(-50%, -50%) rotate(0); }
.rp-body { padding: 0 16px 14px; }
.rp-line { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 14px; border-top: 1px dashed var(--at-c-line); }
.rp-line b { white-space: nowrap; }
.rp-line.is-warn b { color: #c77700; }
.rp-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rp-flags span { padding: 5px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 700; background: var(--at-c-soft); }
.rp-flags .is-ok { color: #1f9d55; }
.rp-flags .is-warn { color: #c77700; background: rgba(var(--at-accent-rgb),  .1); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chips span { padding: 6px 10px; border-radius: 6px; background: var(--at-c-soft); border: 1px solid var(--at-c-line); font-size: 13px; font-weight: 600; }
.rp-empty, .rp-meta { margin: 8px 0 0; color: var(--at-c-muted); font-size: 13px; }
.rp-src { margin: 12px 0 0; color: var(--at-c-muted); font-size: 12px; }
@media (max-width: 575.98px) {
  .cl-total b { font-size: 22px; }
  .cl-row { font-size: 14px; }
}
@media (max-width: 575.98px) { .cl-total { flex-direction: column; align-items: flex-start; gap: 2px; } }

/* главная: разделы «Автомобили из Китая / Кореи / в наличии» */
.at-hc-section { margin-top: 64px; font-family: var(--at-ui-font); color: var(--at-c-fg); }
.at-hc__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 18px; }
.at-hc-section .at-hc__head h2 { margin: 0; font: 800 clamp(24px, 2.6vw, 32px)/1.15 var(--at-ui-font); color: var(--at-c-fg); text-transform: none; letter-spacing: -.01em; }
.at-hc__all { color: var(--at-accent) !important; font-weight: 700; font-size: 14.5px; text-decoration: none !important; white-space: nowrap; }
.at-hc__all:hover { text-decoration: underline !important; }
.at-hc__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.at-hc__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 18px; }
.at-hc__foot .cr-btn { min-width: 260px; }
.at-hc__note { margin: 0; color: var(--at-c-muted); font-size: 13px; }
.cc-sk { aspect-ratio: 3 / 4; border-radius: 12px; background: linear-gradient(100deg, var(--at-c-soft) 30%, var(--at-c-line) 50%, var(--at-c-soft) 70%) 0 0 / 300% 100%; animation: ccsk 1.4s linear infinite; }
@keyframes ccsk { to { background-position: -150% 0; } }
@media (max-width: 991.98px) { .at-hc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  .at-hc-section { margin-top: 44px; }
  .at-hc__head { margin-bottom: 14px; }
  .at-hc__foot { flex-direction: column; align-items: stretch; }
  .at-hc__foot .cr-btn { width: 100%; min-width: 0; }
}
.cp-auc { margin-top: 28px; }
.cp-auc .cp-note { margin-top: 12px; }

/* ---------- Главная на телефоне и планшете (как в приложении) ----------
   Включается классом at-mhome у обёртки первого экрана в /index.html: баннер сразу под шапкой, форма поиска скрыта
   (поиск — «Каталог» в нижнем меню и карточки стран), «Выберите страну» — слайдером, под ним кнопки услуг.
   Вернуть прежний вид — убрать класс at-mhome в /index.html (ПК этот блок не затрагивает). */
@media (max-width: 991.98px) {
  .at-mhome { display: flex; flex-direction: column; }
  .at-mhome .container { --at-mh-pad: calc(var(--bs-gutter-x, 30px) * .5); } /* = боковой отступ .container: слайдер стран — от края до края экрана */
  .at-mhome > .title-mp-section { order: 1; margin-bottom: 0; }
  .at-mhome > .at-cty-section { order: 2; }
  .at-mhome > .at-svc-section { order: 3; }
  .at-mhome .title-mp-section .title-mp-col_title { display: none !important; }
  .at-mhome .title-mp-section .title-mp-item_picture { height: 300px; min-height: 0; border-radius: 18px; }

  .at-mhome > .at-cty-section { margin-top: 24px; margin-bottom: 0; }
  .at-mhome .at-cty__head { margin-bottom: 12px; }
  .at-mhome .at-cty__head p { display: none; }
  .at-mhome .at-cty-section .at-cty__title { font-size: 22px; }
  .at-mhome .at-cty {
    display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--at-mh-pad, 15px); margin-inline: calc(-1 * var(--at-mh-pad, 15px));
    padding: 2px var(--at-mh-pad, 15px) 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .at-mhome .at-cty::-webkit-scrollbar { display: none; }
  /* плитка страны — вытянутая: флаг слева, справа название и количество машин */
  .at-mhome .at-cty__item {
    position: relative; flex: 0 0 auto; min-width: 150px; scroll-snap-align: start;
    flex-direction: row; align-items: center; gap: 11px; min-height: 0; padding: 12px 16px 12px 13px; border-radius: 14px;
  }
  .at-mhome .at-cty__item:hover { transform: none; box-shadow: none; }
  .at-mhome .at-cty__item:active { transform: scale(.98); }
  .at-mhome .at-cty__item:last-child { grid-column: auto; }
  .at-mhome .at-cty__flag .at-flag { width: 36px; height: 24px; }
  .at-mhome .at-cty__txt { gap: 1px; }
  .at-mhome .at-cty__txt b { font-size: 15.5px; white-space: nowrap; }
  .at-mhome .at-cty__txt small { font-size: 12.5px; white-space: nowrap; }
  .at-mhome .at-cty__arr { display: none; }

  body .at-mhome > .section.at-svc-section { margin-top: 20px; }
}

/* узкие телефоны: у сортировки без значка, чтобы подпись помещалась */
@media (max-width: 374.98px) {
  .cr-sort > svg { display: none; }
  .at-cars .cr-sort select { padding-left: 13px; }
}

/* страна, выключенная в админке, на главной не показывается */
.at-cty__item[hidden] { display: none !important; }
