/* AutoTrader UI: тема, нижнее меню, кабинет, избранное */
:root {
  --at-orange: #f57800;
  --at-red: #e0301e;
  --at-ui-bg: rgba(22, 23, 27, .86);
  --at-ui-fg: #f3f4f6;
  --at-ui-muted: rgba(243, 244, 246, .6);
  --at-ui-border: rgba(255, 255, 255, .1);
  --at-ui-card: #1b1c20;
  --at-ui-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  --at-ui-font: Montserrat, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* строгая палитра интерфейса (шапка, меню, нижняя панель, связь) */
  /* фирменный оранжевый сайта (как у кнопок услуг на главной) */
  --at-accent: #f57800;
  --at-accent-2: #e06c00;
  --at-c-bg: #111214;
  --at-c-bar: #131416;
  --at-c-surface: #1a1b1e;
  --at-c-fg: #f2f3f5;
  --at-c-muted: #979ba3;
  --at-c-line: rgba(255, 255, 255, .09);
  --at-c-soft: rgba(255, 255, 255, .06);
  --at-c-btn: rgba(255, 255, 255, .08);
}
html[data-at-theme="light"] {
  --at-ui-bg: rgba(255, 255, 255, .9);
  --at-ui-fg: #16181d;
  --at-ui-muted: rgba(22, 24, 29, .55);
  --at-ui-border: rgba(16, 24, 40, .1);
  --at-ui-card: #ffffff;
  --at-ui-shadow: 0 12px 40px rgba(16, 24, 40, .14);
  --at-c-bg: #ffffff;
  --at-c-bar: #ffffff;
  --at-c-surface: #ffffff;
  --at-c-fg: #111317;
  --at-c-muted: #6b7079;
  --at-c-line: #e5e7eb;
  --at-c-soft: #f3f4f6;
  --at-c-btn: #f1f2f4;
}

/* ---------- Светлая тема ---------- */
/* :not(#at-…) поднимает вес правил выше стилей лендингов вида «#nioet7 #main {…!important}» */
html[data-at-theme="light"] body.theme_dark {
  --theme-color: #16181d;
  --theme-color-secondary: #16181d;
  --theme-secondary-color: #6b7280;
  --theme-bg-color: #f3f4f6;
  --theme-bg-color-secondary: #ffffff;
}
html[data-at-theme="light"],
html[data-at-theme="light"] body { background-color: #f3f4f6 !important; }
html[data-at-theme="light"] .at-lt-surface:not(#at-0):not(#at-1):not(#at-2) { background-color: #ffffff !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06); }
html[data-at-theme="light"] .at-lt-page:not(#at-0):not(#at-1):not(#at-2) { background-color: #f3f4f6 !important; }
html[data-at-theme="light"] .at-lt-text:not(#at-0):not(#at-1):not(#at-2) { color: #16181d !important; }
html[data-at-theme="light"] .at-lt-muted:not(#at-0):not(#at-1):not(#at-2) { color: #5b616e !important; }
html[data-at-theme="light"] .at-lt-border:not(#at-0):not(#at-1):not(#at-2) { border-color: #e2e5ea !important; }
html[data-at-theme="light"] .at-lt-input:not(#at-0):not(#at-1):not(#at-2) { background-color: #ffffff !important; color: #16181d !important; border-color: #d5d9e0 !important; }
html[data-at-theme="light"] .at-lt-input::placeholder { color: #9aa1ad !important; }
html[data-at-theme="light"] .at-lt-logo { filter: brightness(0); opacity: .9; }
html[data-at-theme="light"] .at-lt-icon { filter: brightness(0) saturate(100%) invert(9%) sepia(6%) saturate(1060%) hue-rotate(185deg); }
html[data-at-theme="light"] .section-bgtitle, html[data-at-theme="light"] .section-bgtitle span { color: rgba(16, 24, 40, .06) !important; -webkit-text-stroke: 0 !important; }
html.at-theme-anim, html.at-theme-anim * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }

/* ---------- Переключатель темы и кнопка кабинета ---------- */
.at-ui, .at-ui * { box-sizing: border-box; font-family: var(--at-ui-font); }
.at-hdr { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 10px; }
.at-icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--at-c-line);
  background: var(--at-c-btn); color: var(--at-c-fg); display: inline-grid; place-items: center; cursor: pointer;
  transition: border-color .15s; text-decoration: none; padding: 0;
}
.at-icon-btn:hover { border-color: var(--at-c-muted); color: var(--at-c-fg); }
.at-icon-btn svg { width: 20px; height: 20px; }
.at-icon-btn .at-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--at-accent); color: #fff; font: 700 11px/18px var(--at-ui-font); }
.at-theme-btn .at-sun { display: none; }
html[data-at-theme="dark"] .at-theme-btn .at-sun, html:not([data-at-theme]) .at-theme-btn .at-sun { display: block; }
html[data-at-theme="dark"] .at-theme-btn .at-moon, html:not([data-at-theme]) .at-theme-btn .at-moon { display: none; }
.at-float {
  position: fixed; left: 20px; bottom: 20px; z-index: 1040; display: flex; gap: 8px; padding: 6px; border-radius: 30px;
  background: var(--at-ui-bg); border: 1px solid var(--at-ui-border); box-shadow: var(--at-ui-shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.at-float .at-icon-btn { width: 40px; height: 40px; border: 0; background: transparent; }
.at-login-pill { height: 40px; padding: 0 16px 0 12px; border-radius: 20px; border: 0; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
  background: var(--at-accent, #e0301e); color: #fff !important; font: 600 13px/1 var(--at-ui-font); white-space: nowrap; }
.at-login-pill svg { width: 18px; height: 18px; }
.at-avatar { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; }

.at-desk-only { display: none !important; }
@media (min-width: 992px) { .at-desk-only { display: inline-grid !important; } }

/* пункт темы в бургер-меню */
.at-menu-theme { display: inline-flex; gap: 2px; margin: 24px 0 8px; padding: 3px; border-radius: 12px; background: var(--at-c-soft); border: 1px solid var(--at-c-line); }
.at-menu-theme button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--at-c-muted); border-radius: 9px; padding: 9px 16px; font: 600 13px/1 var(--at-ui-font); cursor: pointer; }
.at-menu-theme button svg { width: 16px; height: 16px; }
.at-menu-theme button.on { background: var(--at-c-surface); color: var(--at-c-fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
html[data-at-theme="light"] .at-menu-theme button.on { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

/* ---------- Нижнее меню (телефон): строгая панель во всю ширину, как в приложениях ---------- */
.at-bnav { display: none; }
@media (max-width: 991.98px) {
  .at-bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch;
    height: calc(58px + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px);
    background: var(--at-c-bar); border-top: 1px solid var(--at-c-line);
  }
  .at-bnav a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding-top: 1px;
    color: var(--at-c-muted) !important; text-decoration: none !important; font: 500 10.5px/1.15 var(--at-ui-font); letter-spacing: 0;
    -webkit-tap-highlight-color: transparent; transition: color .15s;
  }
  .at-bnav a svg { width: 24px; height: 24px; stroke-width: 1.6; }
  .at-bnav a.active { color: var(--at-c-fg) !important; font-weight: 600; }
  .at-bnav a.active svg { color: var(--at-accent); stroke-width: 1.9; }
  .at-bnav a.at-bnav-cta svg { color: var(--at-accent); }
  .at-bnav a:active { opacity: .6; }
  .at-bnav .at-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
    background: var(--at-accent); color: #fff; font: 700 10px/17px var(--at-ui-font); box-shadow: 0 0 0 2px var(--at-c-bar); }
  body.at-has-bnav { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important; }
  .at-float { display: none; }
}

/* ---------- Избранное ---------- */
.at-fav {
  position: absolute; top: 10px; right: 10px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .15s, background .2s;
}
.at-fav:hover { transform: scale(1.08); }
.at-fav svg { width: 19px; height: 19px; }
.at-fav.on { background: #fff; color: var(--at-red); }
.at-fav.at-fav-inline { position: static; width: auto; height: 44px; padding: 0 18px; border-radius: 22px; gap: 8px; display: inline-flex; align-items: center;
  background: transparent; border: 1px solid currentColor; color: inherit; font: 600 13px/1 var(--at-ui-font); margin: 10px 0 0; }
.at-fav.at-fav-inline.on { background: var(--at-red); border-color: var(--at-red); color: #fff; }

/* ---------- Всплывающие уведомления ---------- */
.at-toast { position: fixed; left: 50%; bottom: 100px; z-index: 2000; transform: translate(-50%, 20px); opacity: 0; transition: .3s; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: #16181d; color: #fff; font: 500 14px/1.3 var(--at-ui-font); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); max-width: 90vw; text-align: center; }
.at-toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (min-width: 992px) { .at-toast { bottom: 40px; } }

/* ---------- Шапки лендингов и блога ---------- */
.at-hdr-inline { display: inline-flex; margin: 0 0 0 14px; vertical-align: middle; }
.at-hdr-inline .at-icon-btn { width: 38px; height: 38px; }
.at-hdr-porto { margin-left: 12px; }
.at-hdr-porto .at-icon-btn { width: 38px; height: 38px; background: #f1f2f4; border-color: #e5e7eb; color: #111317; }

/* ---------- Связаться с нами (плавающая кнопка и панель) ---------- */
.at-as { position: fixed; right: 24px; bottom: 24px; z-index: 1050; }
.at-as-fab {
  position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; padding: 0;
  background: var(--at-accent); box-shadow: 0 6px 18px rgba(0, 0, 0, .24); display: grid; place-items: center; transition: background-color .15s, box-shadow .15s;
}
.at-as-fab:hover { background: var(--at-accent-2); box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
.at-as-fab:focus-visible { outline: 2px solid var(--at-c-fg); outline-offset: 3px; }
.at-as-fab span { display: grid; place-items: center; grid-area: 1 / 1; transition: opacity .15s, transform .2s; }
.at-as-fab svg { width: 26px; height: 26px; }
.at-as-i-close { opacity: 0; transform: rotate(-45deg); }
.at-as.open .at-as-i-open { opacity: 0; transform: rotate(45deg); }
.at-as.open .at-as-i-close { opacity: 1; transform: none; }
.at-as-panel {
  position: absolute; right: 0; bottom: 70px; width: 360px; max-height: min(620px, calc(100vh - 120px)); display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden; background: var(--at-c-surface); color: var(--at-c-fg); border: 1px solid var(--at-c-line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
html[data-at-theme="light"] .at-as-panel { box-shadow: 0 18px 50px rgba(16, 24, 40, .16); }
.at-as.open .at-as-panel { opacity: 1; transform: none; pointer-events: auto; }
.at-as-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 14px 14px 20px; border-bottom: 1px solid var(--at-c-line); }
.at-as-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.at-as-ht b { font: 700 16px/1.25 var(--at-ui-font); color: var(--at-c-fg); }
.at-as-ht span { font: 500 12.5px/1.3 var(--at-ui-font); color: var(--at-c-muted); }
.at-as-x { width: 32px; height: 32px; margin: -4px 0 0; border-radius: 8px; border: 0; background: transparent; color: var(--at-c-muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.at-as-x:hover { background: var(--at-c-soft); color: var(--at-c-fg); }
.at-as-x svg { width: 18px; height: 18px; }
.at-as-body { padding: 14px 20px 6px; overflow: auto; flex: 1; }
.at-as-greet { margin: 0 0 10px; font: 400 14px/1.5 var(--at-ui-font); color: var(--at-c-muted); }
.at-as-list { display: flex; flex-direction: column; margin: 0 -8px 8px; }
.at-as-list > a, .at-as-list > button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent;
  color: var(--at-c-fg) !important; text-decoration: none !important; font: 500 14px/1.3 var(--at-ui-font); cursor: pointer; text-align: left; transition: background-color .15s;
}
.at-as-list > a, .at-as-list > button { position: relative; }
.at-as-list > * + *::before { content: ""; position: absolute; left: 40px; right: 8px; top: 0; height: 1px; background: var(--at-c-line); }
.at-as-list > *:hover::before, .at-as-list > *:hover + *::before { opacity: 0; }
.at-as-list > a:hover, .at-as-list > button:hover { background: var(--at-c-soft); }
.at-as-list svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--at-c-muted); stroke-width: 1.7; }
.at-as-list span { flex: 1; }
.at-as-list .at-as-chev { width: 16px; height: 16px; flex: 0 0 16px; opacity: .6; }
.at-as-msg { background: var(--at-c-soft); padding: 10px 12px; border-radius: 12px; font: 400 14px/1.45 var(--at-ui-font); margin-bottom: 8px; max-width: 92%; color: var(--at-c-fg); }
.at-as-msg.mine { margin-left: auto; background: var(--at-c-fg); color: var(--at-c-surface); width: fit-content; }
.at-as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.at-as-chips > a, .at-as-chips > button {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--at-c-line); background: transparent; color: var(--at-c-fg) !important;
  text-decoration: none !important; font: 500 13px/1.2 var(--at-ui-font); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.at-as-chips > a:hover, .at-as-chips > button:hover { border-color: var(--at-c-fg); }
.at-as-contacts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 12px 20px 0; border-top: 1px solid var(--at-c-line); }
.at-as-c { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 10px; border-radius: 10px; text-decoration: none !important;
  font: 600 13px/1 var(--at-ui-font); border: 1px solid var(--at-c-line); color: var(--at-c-fg) !important; background: transparent; transition: border-color .15s, background-color .15s; white-space: nowrap; }
.at-as-c:hover { border-color: var(--at-c-fg); }
.at-as-c svg { width: 18px; height: 18px; flex: 0 0 18px; }
.at-as-call { background: var(--at-c-fg); border-color: var(--at-c-fg); color: var(--at-c-surface) !important; }
.at-as-call:hover { opacity: .9; }
.at-as-wa svg { color: #1fa855; }
.at-as-tg svg { color: #2a9ed8; }
.at-as-cb { display: flex; gap: 8px; padding: 10px 20px 14px; }
.at-as-cb input { flex: 1; min-width: 0; height: 44px; border-radius: 10px; border: 1px solid var(--at-c-line); background: var(--at-c-soft); color: var(--at-c-fg); padding: 0 12px; font: 500 14px var(--at-ui-font); outline: none; }
.at-as-cb input::placeholder { color: var(--at-c-muted); }
.at-as-cb input:focus { border-color: var(--at-c-fg); background: transparent; }
.at-as-cb input.err { border-color: #e5484d; }
.at-as-cb button { height: 44px; border-radius: 10px; border: 0; padding: 0 16px; cursor: pointer; color: #fff; background: var(--at-accent); font: 600 13px var(--at-ui-font); white-space: nowrap; transition: background-color .15s; }
.at-as-cb button:hover { background: var(--at-accent-2); }
.at-as-cb button:disabled { opacity: .6; }
.at-as-cb-in { padding: 0 0 10px; }
.at-as-ok { flex: 1; padding: 12px; border-radius: 10px; background: rgba(31, 168, 85, .12); color: #1a9a4c; font: 600 13px/1.35 var(--at-ui-font); text-align: center; }
.at-as-ok.err { background: rgba(229, 72, 77, .1); color: #d93036; }
.at-as-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 20px 12px; border-top: 1px solid var(--at-c-line); font: 500 12px var(--at-ui-font); color: var(--at-c-muted); }
.at-as-foot a { color: var(--at-c-fg) !important; text-decoration: none !important; font-weight: 600; }
@media (max-width: 991.98px) {
  .at-as { right: 16px; bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 16px); }
  .at-as-fab { width: 52px; height: 52px; }
  .at-as-fab svg { width: 24px; height: 24px; }
  .at-as-panel { position: fixed; left: 12px; right: 12px; bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 80px); width: auto; max-height: calc(100vh - 170px); }
}

/* Новые страницы (кабинет, калькулятор, КП, страницы из конструктора): отступ под шапку */
.at-account-section, .at-page-section { padding-top: calc(var(--header-height, 122px) + 12px); }
@media (max-width: 991.98px) { .at-account-section, .at-page-section { padding-top: 96px; } }

/* H1, назначенные для SEO существующим заголовкам: без изменения вида */
h1.at-h1 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }

/* ===== Блоки конструктора страниц (atb-*) — обе темы ===== */
.atb-page { --atb-fg: #f3f4f6; --atb-muted: rgba(243, 244, 246, .66); --atb-card: #1b1c20; --atb-card2: #222329; --atb-line: rgba(255, 255, 255, .09); --atb-bg2: #131417;
  color: var(--atb-fg); font-family: var(--at-ui-font); display: block; }
html[data-at-theme="light"] .atb-page { --atb-fg: #16181d; --atb-muted: #5b616e; --atb-card: #ffffff; --atb-card2: #f7f8fa; --atb-line: #e3e6eb; --atb-bg2: #eceef2; }
.atb { padding: 56px 0; }
.atb.atb-alt { background: var(--atb-bg2); }
.atb-in { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.atb-narrow { width: min(860px, calc(100% - 32px)); }
.atb-title, .atb-page h2.atb-title, .atb-page h1.atb-title { font: 800 clamp(24px, 3.2vw, 38px)/1.15 var(--at-ui-font); letter-spacing: -.01em; text-transform: uppercase; margin: 0 0 22px; color: var(--atb-fg); }
.atb-sub { color: var(--atb-muted); font-size: 16px; line-height: 1.55; margin: -8px 0 26px; max-width: 760px; }
.atb-muted { color: var(--atb-muted); }
.atb-prose { font-size: 16px; line-height: 1.7; color: var(--atb-fg); }
.atb-prose p { margin: 0 0 14px; }
.atb-prose h2, .atb-prose h3 { font-weight: 800; margin: 28px 0 12px; color: var(--atb-fg); line-height: 1.25; }
.atb-prose h2 { font-size: 24px; } .atb-prose h3 { font-size: 19px; }
.atb-prose ul, .atb-prose ol { padding-left: 22px; margin: 0 0 14px; }
.atb-prose li { margin: 6px 0; }
.atb-prose a { color: var(--at-orange); text-decoration: underline; text-underline-offset: 3px; }
.atb-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.atb-prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; }
.atb-prose th, .atb-prose td { border-bottom: 1px solid var(--atb-line); padding: 10px 8px; text-align: left; }
.atb-prose blockquote { margin: 0 0 16px; padding: 14px 18px; border-left: 3px solid var(--at-orange); background: var(--atb-card); border-radius: 0 12px 12px 0; }
.atb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.atb-actions:empty { display: none; }
.atb-center { justify-content: center; }
.atb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 14px; font: 700 14px var(--at-ui-font); text-transform: uppercase; letter-spacing: .02em;
  color: #fff !important; text-decoration: none !important; background: var(--at-accent, #e0301e); transition: transform .15s, box-shadow .15s; }
.atb-btn:hover { transform: translateY(-1px); }
.atb-btn-ghost { background: transparent; color: var(--atb-fg) !important; border: 1.5px solid var(--atb-line); box-shadow: none; }
.atb-btn-ghost:hover { border-color: var(--at-orange); box-shadow: none; }
/* первый экран */
.atb-hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.atb-hero.has-bg { min-height: min(78vh, 680px); display: flex; align-items: flex-end; background: #0d0e10 var(--atb-bg) center / cover no-repeat; }
.atb-hero.has-bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .82) 100%); }
.atb-hero.has-bg .atb-in { position: relative; color: #fff; }
.atb-hero.has-bg .atb-hero-title, .atb-hero.has-bg .atb-lead { color: #fff; }
.atb-hero.has-bg .atb-btn-ghost { color: #fff !important; border-color: rgba(255, 255, 255, .45); }
.atb-kicker { display: inline-block; padding: 7px 14px; border-radius: 999px; background: rgba(245, 120, 0, .14); color: var(--at-orange); font: 700 12px var(--at-ui-font); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.atb-hero-title { font: 800 clamp(30px, 5vw, 60px)/1.05 var(--at-ui-font); text-transform: uppercase; letter-spacing: -.015em; margin: 0 0 18px; color: var(--atb-fg); max-width: 920px; }
.atb-lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--atb-muted); max-width: 680px; margin: 0; }
/* картинка + текст */
.atb-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.atb-media-right .atb-media-img { order: 2; }
.atb-media-img img { width: 100%; height: auto; border-radius: 22px; display: block; object-fit: cover; aspect-ratio: 4 / 3; }
/* карточки: преимущества и шаги */
.atb-grid { display: grid; gap: 16px; }
.atb-cols-2 { grid-template-columns: repeat(2, 1fr); } .atb-cols-3 { grid-template-columns: repeat(3, 1fr); } .atb-cols-4 { grid-template-columns: repeat(4, 1fr); }
.atb-card { background: var(--atb-card); border: 1px solid var(--atb-line); border-radius: 20px; padding: 24px 22px; transition: transform .2s, border-color .2s; }
.atb-card:hover { transform: translateY(-2px); border-color: rgba(245, 120, 0, .45); }
.atb-card h3 { font: 800 17px/1.3 var(--at-ui-font); margin: 0 0 8px; color: var(--atb-fg); }
.atb-card p { margin: 0; color: var(--atb-muted); font-size: 14.5px; line-height: 1.55; }
.atb-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(245, 120, 0, .12); font-size: 24px; margin-bottom: 16px; flex: 0 0 48px; }
.atb-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--at-accent, #e0301e); color: #fff; font: 800 16px var(--at-ui-font); margin-bottom: 16px; }
/* вопросы-ответы */
.atb-qa { background: var(--atb-card); border: 1px solid var(--atb-line); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.atb-qa summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 20px; font: 700 16px/1.4 var(--at-ui-font); position: relative; color: var(--atb-fg); }
.atb-qa summary::-webkit-details-marker { display: none; }
.atb-qa summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(245, 120, 0, .14); color: var(--at-orange); font-weight: 700; transition: transform .2s; }
.atb-qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.atb-qa .atb-prose { padding: 0 20px 6px; color: var(--atb-muted); font-size: 15px; }
/* призыв */
.atb-cta-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 36px 40px; border-radius: 26px; color: #fff;
  background: var(--at-accent, #e0301e); }
.atb-cta-box .atb-title { color: #fff; margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 32px); }
.atb-cta-box p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 16px; max-width: 620px; }
.atb-cta-box .atb-actions { margin: 0; }
.atb-cta-box .atb-btn { background: #fff; color: #16181d !important; box-shadow: none; }
.atb-cta-box .atb-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .55); }
/* авто */
.atb-cars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.atb-car { display: flex; flex-direction: column; background: var(--atb-card); border: 1px solid var(--atb-line); border-radius: 20px; overflow: hidden; color: var(--atb-fg) !important; text-decoration: none !important; transition: transform .2s, border-color .2s; }
.atb-car:hover { transform: translateY(-3px); border-color: rgba(245, 120, 0, .5); }
.atb-car-img { aspect-ratio: 4 / 3; background: var(--atb-card2); overflow: hidden; display: block; }
.atb-car-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.atb-car:hover .atb-car-img img { transform: scale(1.04); }
.atb-car-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.atb-car-body b { font: 800 16px/1.3 var(--at-ui-font); text-transform: uppercase; }
.atb-car-lines { display: flex; flex-direction: column; gap: 2px; color: var(--atb-muted); font-size: 13px; }
.atb-car-price { margin-top: auto; font: 800 19px var(--at-ui-font); color: var(--at-orange); }
/* галерея */
.atb-gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.atb-gal-item { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--atb-card2); }
.atb-gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.atb-gal-item:hover img { transform: scale(1.05); }
/* контакты */
.atb-contacts-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: stretch; }
.atb-contact { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--atb-card); border: 1px solid var(--atb-line); border-radius: 16px; margin-bottom: 10px; }
.atb-contact .atb-ico { margin: 0; }
.atb-contact small { display: block; color: var(--atb-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.atb-contact b { font: 700 16px/1.35 var(--at-ui-font); color: var(--atb-fg); }
.atb-contact a { color: inherit !important; text-decoration: none !important; }
.atb-map { border-radius: 20px; overflow: hidden; min-height: 360px; border: 1px solid var(--atb-line); }
.atb-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
@media (max-width: 991.98px) {
  .atb { padding: 40px 0; }
  .atb-media-grid, .atb-contacts-grid { grid-template-columns: 1fr; gap: 24px; }
  .atb-media-right .atb-media-img { order: 0; }
  .atb-cols-3, .atb-cols-4, .atb-cars-grid { grid-template-columns: repeat(2, 1fr); }
  .atb-gal { grid-template-columns: repeat(3, 1fr); }
  .atb-cta-box { padding: 28px 24px; }
}
@media (max-width: 575.98px) {
  .atb-cols-2, .atb-cols-3, .atb-cols-4, .atb-cars-grid { grid-template-columns: 1fr; }
  .atb-gal { grid-template-columns: repeat(2, 1fr); }
  .atb-hero { padding: 48px 0 40px; }
  .atb-btn { width: 100%; }
}

/* Панель редактирования для администратора */
.at-ebar { position: fixed; left: 16px; bottom: 16px; z-index: 10050; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 16px;
  background: rgba(18, 19, 23, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 34px rgba(0, 0, 0, .4); font: 600 12.5px var(--at-ui-font); }
.at-ebar a, .at-ebar button { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 11px; color: #f3f4f6 !important; text-decoration: none !important; background: none; border: 0; cursor: pointer; font: inherit; white-space: nowrap; }
.at-ebar a:hover { background: rgba(255, 255, 255, .1); }
.at-ebar svg { width: 16px; height: 16px; flex: 0 0 16px; }
.at-ebar-u { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; margin-right: 4px; background: var(--at-accent, #e0301e); color: #fff; font-size: 11px; letter-spacing: .03em; }
.at-ebar .at-ebar-x { padding: 0 9px; color: rgba(243, 244, 246, .5) !important; }
.at-ebar .at-ebar-x:hover { color: #fff !important; }
@media (max-width: 991.98px) {
  .at-ebar { left: 10px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .at-ebar a span { display: none; }
  .at-ebar a { padding: 0 9px; }
}
@media print { .at-ebar { display: none !important; } }


/* ===================== Шапка нового дизайна ===================== */
/* стекло — на отдельном слое: иначе размытие шапки ломает фон бургер-меню внутри неё */
.header-mp-section.section.section { background-color: transparent !important; }
.header-mp-section.at-autohide, .header-wrapper.at-autohide { transition: transform .28s ease, padding .25s; }
.header-mp-section.at-hdr-hidden, .header-wrapper.at-hdr-hidden { transform: translateY(-110%); }
.header-wrapper.at-sticky { position: sticky !important; top: 0; z-index: 1030; }
.header-wrapper.at-sticky #header { background-color: #fff; }
.header-mp-section::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-bottom: 1px solid transparent; transition: background-color .25s, border-color .25s; }
html.at-scrolled .header-mp-section::before, .scrolled .header-mp-section::before {
  background: rgba(17, 18, 20, .9); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: rgba(255, 255, 255, .06);
}
html[data-at-theme="light"] .header-mp-section::before {
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: #e6e8ec;
}
body.menu-show .header-mp-section::before { background: var(--at-c-bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-bottom-color: transparent !important; }
/* логотип: в светлой теме — тёмный вариант (без мигания, переключается вместе с темой) */
.at-logo-d { display: none !important; }
html[data-at-theme="light"] .header-mp-section .at-logo-w { display: none !important; }
html[data-at-theme="light"] .header-mp-section .at-logo-d { display: inline-block !important; }
/* телефон и кнопки шапки в светлой теме */
html[data-at-theme="light"] .header-mp-contacts__tel { color: #111317 !important; }
.header-mp-section .header-mp-social { display: flex; align-items: center; }
.header-mp-social__link.at-icon-btn svg { width: 21px; height: 21px; }
/* ряд шапки поверх открытого меню */
body.menu-show .header-mp-row { position: relative; z-index: 1102; }

/* кнопка меню: круглая, как остальные кнопки шапки */
.header-mp-section .menu-mp-toggler { width: 44px !important; height: 44px !important; border-radius: 50% !important; background: var(--at-c-btn) !important; border: 1px solid var(--at-c-line); overflow: hidden; transition: border-color .15s; }
.header-mp-section .menu-mp-toggler:hover { border-color: var(--at-c-muted); }
.header-mp-section .menu-mp-toggler::before { display: none !important; }
.header-mp-section .menu-mp-toggler__btn, body.menu-show .header-mp-section .menu-mp-toggler__btn { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 50% !important; background: transparent !important; }
.header-mp-section .menu-mp-toggler__btn > div { width: 18px !important; height: 2px !important; border-radius: 2px; background-color: var(--at-c-fg) !important; }
.header-mp-section .menu-mp-toggler__btn > div:first-child { top: 15px !important; }
.header-mp-section .menu-mp-toggler__btn > div:last-child { bottom: 15px !important; }
body.menu-show .header-mp-section .menu-mp-toggler__btn > div:first-child { top: calc(50% - 1px) !important; bottom: auto !important; transform: rotate(45deg) !important; }
body.menu-show .header-mp-section .menu-mp-toggler__btn > div:nth-child(2) { opacity: 0 !important; }
body.menu-show .header-mp-section .menu-mp-toggler__btn > div:last-child { bottom: calc(50% - 1px) !important; top: auto !important; transform: rotate(-45deg) !important; }

@media (max-width: 991.98px) {
  .header-mp-section .header-mp-row { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 8px; }
  .header-mp-section .header-mp-row > .col-auto:first-child { margin-right: auto; }
  .header-mp-section .header-mp-row .logo img { max-width: 150px; height: auto; }
  .header-mp-section .menu-mp-toggler, .header-mp-section .at-icon-btn, .header-mp-section .header-mp-social__link { width: 40px !important; height: 40px !important; }
  .header-mp-section .menu-mp-toggler__btn > div:first-child { top: 13px !important; }
  .header-mp-section .menu-mp-toggler__btn > div:last-child { bottom: 13px !important; }
  .header-mp-section .at-hdr { margin: 0; gap: 8px; }
}

/* ===================== Бургер-меню ===================== */
.header-mp-section .menu-wrapper { background: var(--at-c-bg); }
.header-mp-section .menu-wrapper.show { top: 0 !important; height: 100vh !important; height: 100dvh !important; max-height: none !important; }
.header-mp-section .menu-wrapper > .container-fluid { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: calc(var(--header-height, 90px) + 16px); padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 40px); }
.header-mp-section .menu-wrapper .menu-inner { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; color: var(--at-c-fg) !important; min-height: 0; }
.header-mp-section .menu-wrapper .menu-main { max-width: 860px; }
.header-mp-section .menu-main__items { margin: 0; padding: 0; }
.header-mp-section .menu-wrapper .menu-main__item { margin: 0 !important; line-height: normal !important; border-bottom: 1px solid var(--at-c-line); }
.header-mp-section .menu-wrapper .menu-main__item > a,
.header-mp-section .menu-wrapper .menu-main__link,
.header-mp-section .menu-wrapper .menu-main__item > .menu > li > button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 0; border: 0; background: none;
  color: var(--at-c-fg) !important; font: 600 17px/1.3 var(--at-ui-font) !important; text-transform: uppercase; letter-spacing: .01em;
  text-decoration: none !important; text-align: left; cursor: pointer; transition: color .15s;
}
.header-mp-section .menu-wrapper .menu-main__link:hover, .header-mp-section .menu-wrapper .menu-main__item > a:hover { font-size: 17px !important; font-weight: 600 !important; color: var(--at-accent) !important; }
.header-mp-section .menu-wrapper .current_page_item { color: var(--at-accent) !important; }
/* группы со вложенными пунктами */
.header-mp-section .menu-wrapper .menu { display: block !important; margin: 0; padding: 0; list-style: none; }
.header-mp-section .menu-wrapper .menu-item-has-children > button::after,
.header-mp-section .menu-wrapper .sub-menu > .menu-item-has-children > a::after {
  content: ""; width: 9px; height: 9px; flex: 0 0 9px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg); opacity: .55; transition: transform .2s; display: block !important; position: static !important;
}
.header-mp-section .menu-wrapper .menu-item-has-children.show > button::after,
.header-mp-section .menu-wrapper .sub-menu > .menu-item-has-children.show > a::after { transform: translateY(2px) rotate(225deg); }
.header-mp-section .menu-wrapper .sub-menu { padding: 0 0 8px !important; margin: 0 !important; list-style: none; }
.header-mp-section .menu-wrapper .sub-menu .menu-main__link { padding: 10px 0 !important; font: 600 13px/1.3 var(--at-ui-font) !important; color: var(--at-c-muted) !important; letter-spacing: .06em; }
.header-mp-section .menu-wrapper .sub-menu .menu-main__link:hover { font-size: 13px !important; color: var(--at-c-fg) !important; }
.header-mp-section .menu-wrapper .sub-menu .sub-menu { padding: 0 0 6px !important; }
.header-mp-section .menu-wrapper .menu-item-child a { display: block; padding: 8px 0 8px 14px; border-left: 2px solid var(--at-c-line); color: var(--at-c-fg) !important; font: 500 15px/1.3 var(--at-ui-font); text-decoration: none !important; transition: border-color .15s, color .15s; }
.header-mp-section .menu-wrapper .menu-item-child a:hover { border-left-color: var(--at-accent); color: var(--at-accent) !important; }
/* контакты в конце меню */
.header-mp-section .menu-wrapper .menu-main__item > a[href^="tel:"] { padding-top: 22px; font: 700 22px/1.2 var(--at-ui-font) !important; letter-spacing: 0; text-transform: none; }
.header-mp-section .menu-wrapper .menu-main__item > a[href*="maps"] { display: block; padding: 4px 0 18px; font: 500 14px/1.45 var(--at-ui-font) !important; color: var(--at-c-muted) !important; text-transform: none; letter-spacing: 0; }
.header-mp-section .menu-wrapper .menu-main__item:has(> a[href^="tel:"]) { border-bottom: 0; }
.header-mp-section .menu-wrapper .menu-social { margin-top: 8px; }
.header-mp-section .menu-wrapper .menu-social__link { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 12px; border-radius: 10px; border: 1px solid var(--at-c-line); color: var(--at-c-fg) !important; text-decoration: none !important; font: 600 14px var(--at-ui-font); }
.header-mp-section .menu-wrapper .menu-social__link::after { content: "Написать в WhatsApp"; }
.header-mp-section .menu-wrapper .menu-social__link img { width: 22px; height: 22px; }
html[data-at-theme="light"] .header-mp-section .menu-wrapper .menu-social__link img { filter: brightness(0) saturate(100%); }
@media (min-width: 992px) {
  .header-mp-section .menu-wrapper > .container-fluid { padding-top: calc(var(--header-height, 110px) + 32px); }
  .header-mp-section .menu-wrapper .menu-main__item > a,
  .header-mp-section .menu-wrapper .menu-main__link,
  .header-mp-section .menu-wrapper .menu-main__item > .menu > li > button { padding: 18px 0; font-size: 26px !important; }
  .header-mp-section .menu-wrapper .menu-main__link:hover, .header-mp-section .menu-wrapper .menu-main__item > a:hover { font-size: 26px !important; }
  .header-mp-section .menu-wrapper .sub-menu .menu-main__link, .header-mp-section .menu-wrapper .sub-menu .menu-main__link:hover { font-size: 13px !important; }
  .header-mp-section .menu-wrapper .menu-item-child a { font-size: 16px; }
}

/* ===================== Шапка блога и каталога (Porto) ===================== */
.at-hdr-porto { display: inline-flex; align-items: center; gap: 8px; margin: 0 12px 0 8px; }
.at-hdr-porto .at-icon-btn { width: 38px; height: 38px; }
@media (max-width: 991.98px) {
  #header .header-main { flex-wrap: nowrap !important; align-items: center; }
  #header .header-main > .col { flex: 1 1 auto; min-width: 0; }
  #header .header-main > .col-6 { flex: 0 0 auto; width: auto; max-width: none; }
  #header .header-main .logo img { max-width: 140px !important; height: auto; }
  #header .header-main .col-flex-end .wpb_wrapper { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 4px; }
  #header .header-main .share-links { display: none; }
}
/* кнопка WhatsApp в шапке: как остальные круглые кнопки (старое правило темы красило её в чёрный) */
.header-mp-section .header-mp-social__link.at-icon-btn { background: var(--at-c-btn) !important; border: 1px solid var(--at-c-line) !important; color: var(--at-c-fg) !important; }
/* кнопка меню в шапке блога */
#header .mobile-toggle { width: 40px; height: 40px; border-radius: 50% !important; display: inline-grid !important; place-items: center; padding: 0 !important; margin: 0 !important;
  background: var(--at-c-btn) !important; border: 1px solid var(--at-c-line) !important; color: var(--at-c-fg) !important; font-size: 16px !important; }


/* Карточка авто: «В избранное» и «Скачать КП» — как соседние кнопки «Мне интересно» / «Запросить видео» */
.at-fav.at-fav-inline { position: static; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(50% - 24px); height: auto; min-height: 40px; margin: 14px 24px 0 0; padding: 10px; border-radius: 10px;
  border: 2px solid #111; background: transparent; color: #111; font: 700 12px/1.2 var(--at-ui-font); -webkit-backdrop-filter: none; backdrop-filter: none; vertical-align: top; }
.at-fav.at-fav-inline:hover { transform: none; background: #111; color: #fff; }
.at-fav.at-fav-inline svg { width: 16px; height: 16px; }
.at-fav.at-fav-inline.on { background: var(--at-accent); border-color: var(--at-accent); color: #fff; }
@media (max-width: 575.98px) { .at-fav.at-fav-inline { width: calc(50% - 6px); margin-right: 6px; font-size: 11px; } }

/* строки описания в карточках (часть карточек хранит их без переносов) */
.product-grid-item__text p, .product-grid-item__descr p { margin: 0; }
.product-grid-item__text p > span, .product-grid-item__descr p > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* «Показать ещё» на светлом фоне */
html[data-at-theme="light"] .product-grid-pagination__toggler { border-color: #c4c8cf !important; }
html[data-at-theme="light"] .product-grid-pagination__toggler::before, html[data-at-theme="light"] .product-grid-pagination__toggler::after { background-color: #111317 !important; }
html[data-at-theme="light"] .product-grid-pagination__toggler:hover { background-color: #111317 !important; }
html[data-at-theme="light"] .product-grid-pagination__toggler:hover::before, html[data-at-theme="light"] .product-grid-pagination__toggler:hover::after { background-color: #fff !important; }
html[data-at-theme="light"] .row.product-grid-pagination .prod-nav-more { border-color: #c4c8cf !important; color: #111317 !important; }
html[data-at-theme="light"] .row.product-grid-pagination .prod-nav-more:hover { background: #111317 !important; color: #fff !important; }

/* ===================== Тёмная тема для страниц старого дизайна (блог, статьи, каталог) ===================== */
/* базовые цвета — сразу стилями (без белой вспышки), остальное — проход darkPass в ui.js */
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) {
  --porto-body-bg: #111214; --porto-body-color: #d5d8de; --porto-heading-color: #f2f3f5; --porto-color-dark: #f2f3f5;
  --porto-primary-color: #f2f3f5; --porto-primary-color-inverse: #111214; --porto-input-bc: rgba(255, 255, 255, .14);
  background-color: #111214 !important; color: #d5d8de;
}
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-wrapper, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #main, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .main-content, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-top, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .main-content-wrap { background-color: #111214 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) h1, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) h2, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) h3, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) h4, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) h5, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) h6, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .entry-title, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .entry-title a, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .post-title a { color: #f2f3f5 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .header-main, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .porto-block, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .container-fluid { background-color: #111214 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header { border-bottom: 1px solid rgba(255, 255, 255, .07); }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .main-menu > li.menu-item > a, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .porto-sicon-title, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .porto-sicon-header p, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .porto-icon { color: #e6e8ec !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .separator { border-left-color: rgba(255, 255, 255, .1) !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .popup .inner, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .sub-menu { background-color: #1a1b1e !important; border-color: rgba(255, 255, 255, .08) !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .sub-menu a { color: #d5d8de !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .sub-menu a:hover { color: #fff !important; background-color: rgba(255, 255, 255, .05) !important; }
/* логотип: белый вариант того же размера */
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .logo a { display: inline-block; background: url("/wp-content/uploads/AutoTrader-logo-white.svg") left center / contain no-repeat; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .logo img { visibility: hidden; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-top, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .breadcrumbs-wrap { border-color: rgba(255, 255, 255, .07) !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-top .breadcrumb, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-top .breadcrumb a, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .breadcrumbs-wrap a { color: #b8bcc4 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #side-nav-panel, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .mobile-sidebar { background-color: #16171a !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .mobile-toggle { background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .09) !important; color: #f2f3f5 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .at-hdr-porto .at-icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .09); color: #f2f3f5; }
/* то, что проход нашёл на странице */
html:not([data-at-theme="light"]) body.at-dk .at-dk-page { background-color: #111214 !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-surface { background-color: #1a1b1e !important; box-shadow: none !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-chip { background-color: #24262a !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-text { color: #eceef1 !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-muted { color: #a9adb5 !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-border { border-color: rgba(255, 255, 255, .1) !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-input { background-color: #1a1b1e !important; color: #eceef1 !important; border-color: rgba(255, 255, 255, .14) !important; }
html:not([data-at-theme="light"]) body.at-dk .at-dk-icon { filter: invert(1) brightness(1.4); }
/* кнопки «читать далее», пагинация, теги */
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .btn-default, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-numbers a, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-numbers span, html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .tagcloud a { background-color: #1a1b1e !important; color: #e6e8ec !important; border-color: rgba(255, 255, 255, .12) !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .page-numbers .current { background-color: #f2f3f5 !important; color: #111214 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .main-menu > li.menu-item > a { background: transparent !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .main-menu > li.menu-item > a:hover { color: #fff !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) #header .share-links a { background-color: rgba(255, 255, 255, .1) !important; color: #f2f3f5 !important; }
html:not([data-at-theme="light"]) body.theme-porto:not(.page-template-autotrader-landing-template) .header-wrapper.at-sticky #header { background-color: #111214 !important; }

/* ---------- Подвал: реквизиты на телефоне (в стилях темы элементы шли вплотную, без отступов) ---------- */
@media (max-width: 991px) {
  .footer-contacts__row { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .footer-contacts__row + .footer-contacts__row { margin-top: 14px; }
  .footer-contacts__row > span:empty { display: none; }
  /* тема прятала строку с ИНН и политикой конфиденциальности на телефонах */
  .footer-contacts .footer-contacts__row:last-child { display: flex; }
}

/* ---------- Кнопка «наверх» (Porto): над кнопкой «Связаться», в том же стиле ---------- */
#topcontrol {
  right: 30px !important; bottom: 92px !important; width: 44px; height: 44px; border-radius: 50%;
  text-align: center; padding: 0; background: var(--at-c-surface) !important; color: var(--at-c-fg) !important;
  border: 1px solid var(--at-c-line); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); font-size: 14px; line-height: 42px;
}
#topcontrol:hover { border-color: var(--at-c-muted); }
#topcontrol i { color: inherit !important; }

/* ---------- Лендинги в светлой теме ---------- */
/* фигура за блоком YouTube — полупрозрачная тёмная картинка: на светлом фоне делаем её едва заметной */
html[data-at-theme="light"] body.page-template-autotrader-landing-template .social-block::before { opacity: .12; }
/* значок «×» мобильной панели Porto виден в углу, когда панель закрыта (на лендингах нет стилей темы, которые его прячут) */
html:not(.panel-opened) .side-nav-panel-close { opacity: 0 !important; visibility: hidden !important; }

/* ---------- Главная: форма «Подбор авто из Германии» (рамка /searchformframe.html, высота — по содержимому) ---------- */
body .title-mp-section .title-mp-item_title {
  height: auto; min-height: 0; overflow: hidden; background: var(--at-c-surface); border: 1px solid var(--at-c-line); box-shadow: none;
}
body .title-mp-section .title-mp-item_title iframe { display: block; width: 100%; height: 100%; min-height: 470px; border: 0; background: transparent; }
@media (min-width: 992px) {
  body .title-mp-section .title-mp-col_title { width: min(32%, 360px) !important; max-width: none; }
  body .title-mp-section .title-mp-col_picture { width: calc(100% - min(32%, 360px)) !important; }
  body .title-mp-section .title-mp-item_picture { height: auto; }
  body .title-mp-section .title-mp-item_title iframe { min-height: 540px; }
}
@media (max-width: 991px) {
  body .title-mp-section .title-mp-item_title { width: 100%; max-width: none; margin: 0; border-radius: 20px; }
}

/* строка «Сайт разработан…» в подвале блога и каталога не уходит под кнопку «наверх» */
@media (min-width: 992px) {
  body.theme-porto:not(.page-template-autotrader-landing-template) .footer .copyright__text { padding-right: 76px; }
  /* блог и каталог: один размер реквизитов (в блоге было 12.6px, в каталоге 18px) */
  body.theme-porto:not(.page-template-autotrader-landing-template) .footer .footer-contacts a,
  body.theme-porto:not(.page-template-autotrader-landing-template) .footer .footer-contacts span { font-size: 15px; line-height: 1.6; }
  body.theme-porto:not(.page-template-autotrader-landing-template) .footer .footer-contacts a > br { display: none; }
}

/* ---------- Главная: услуги (кредит, лизинг, трейд-ин, комиссия, тест-драйв, КАСКО) — ровная сетка плиток ---------- */
/* блок — продолжение первого экрана: ближе к нему, ниже — обычный отступ следующей секции */
body .section.at-svc-section { padding: 0 !important; margin-top: -48px; margin-bottom: 0; }
@media (max-width: 991px) { body .section.at-svc-section { margin-top: -36px; } }
.at-svc { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.at-svc__item {
  display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 10px 12px;
  border-radius: 6px; border: 1px solid var(--at-accent); background: var(--at-accent); color: #fff !important; text-decoration: none !important; text-align: center;
  font: 600 15px/1.25 var(--at-ui-font); letter-spacing: .01em; transition: background-color .15s, border-color .15s;
}
.at-svc__item:hover, .at-svc__item:focus-visible { background: var(--at-accent-2); border-color: var(--at-accent-2); color: #fff !important; }
.at-svc__item:focus-visible { outline: 2px solid var(--at-c-fg); outline-offset: 2px; }
@media (max-width: 1199px) { .at-svc { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) {
  .at-svc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .at-svc__item { min-height: 54px; padding: 8px 10px; font-size: 14px; }
}

/* ---------- Светлая тема: логотипы и мелочи по итогам проверки всех страниц ---------- */
/* двойной логотип (белый/тёмный) есть и в подвале — в светлой теме везде показываем тёмный */
html[data-at-theme="light"] .at-logo-w { display: none !important; }
html[data-at-theme="light"] .at-logo-d { display: inline-block !important; }
/* шапка тест-драйвов на светлом фоне: иконка меню тёмная */
html[data-at-theme="light"] .at-lt-hdr .menu-toggler > div { background-color: #16181d !important; }
/* заглушка вместо отсутствующих рендеров конфигуратора */
html[data-at-theme="light"] .at-render-ph { background: #eceef1 !important; border-color: #e2e5ea !important; }
html[data-at-theme="light"] .at-render-ph__t { color: #5b616e !important; }
html[data-at-theme="light"] .at-render-ph__s { color: #8a909b !important; }
/* источник курсов в калькуляторе: зелёный темнее на белом */
html[data-at-theme="light"] .cl-src { color: #15803d !important; }

/* хлебные крошки на лендингах и тест-драйвах (стили темы Porto там не подключены — строка шла сплошным текстом) */
body.page-template-autotrader-landing-template .page-top { padding: 10px 0 0; background: transparent; border: 0; }
body.page-template-autotrader-landing-template .page-top .breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none; background: none;
  font: 500 12.5px/1.4 var(--at-ui-font); color: var(--at-c-muted);
}
body.page-template-autotrader-landing-template .page-top .breadcrumb li { display: inline-flex; align-items: center; color: inherit; }
body.page-template-autotrader-landing-template .page-top .breadcrumb li::before,
body.page-template-autotrader-landing-template .page-top .breadcrumb li > a::before,
body.page-template-autotrader-landing-template .page-top .breadcrumb .delimiter::before { content: none !important; display: none !important; }
body.page-template-autotrader-landing-template .page-top .breadcrumb a { color: inherit !important; text-decoration: none; }
body.page-template-autotrader-landing-template .page-top .breadcrumb a:hover { color: var(--at-c-fg) !important; }
body.page-template-autotrader-landing-template .page-top .breadcrumb .delimiter { display: inline-block; width: auto; height: auto; margin: 0 8px; font-style: normal; background: none; border: 0; }
body.page-template-autotrader-landing-template .page-top .breadcrumb .delimiter::after { content: "/"; opacity: .6; }
body.page-template-autotrader-landing-template .page-top .breadcrumb li:last-child { color: var(--at-c-fg); }

/* ничего не уезжает за край экрана по горизонтали (ряды Bootstrap с отрицательными отступами на лендингах) */
html { overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } }
body.page-template-autotrader-landing-template .page-top .breadcrumb li > a::after { content: none !important; display: none !important; }
body.page-template-autotrader-landing-template .page-top .breadcrumb li.home span {
  position: static !important; display: inline !important; text-indent: 0 !important; font-size: inherit !important;
  width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; opacity: 1 !important;
}

/* кнопки марок в блоке «Автомобили в наличии»: вместо чёрных «таблеток» — спокойные карточки в цвет темы, активная — фирменная */
body .product-grid-nav-button .lbl.lbl-nav {
  background: var(--at-c-surface) !important; color: var(--at-c-fg) !important; border: 1px solid var(--at-c-line) !important;
  box-shadow: none !important; transition: background-color .15s, border-color .15s, color .15s;
  height: auto !important; min-height: 38px; padding: 8px 14px !important; line-height: 1.25 !important; white-space: normal; text-align: center;
}
body .product-grid-nav-button .lbl.lbl-nav:hover { border-color: var(--at-c-muted) !important; }
body .product-grid-nav-button .lbl.lbl-nav.active { background: var(--at-accent) !important; border-color: var(--at-accent) !important; color: #fff !important; }
body .prod-catgrid .prod-catgrid-item {
  background: var(--at-c-surface) !important; color: var(--at-c-fg) !important; border: 1px solid var(--at-c-line) !important;
  box-shadow: none !important; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
body .prod-catgrid .prod-catgrid-item:hover { border-color: var(--at-c-muted) !important; }
body .prod-catgrid .prod-catgrid-item.acctive { background: var(--at-accent) !important; border-color: var(--at-accent) !important; color: #fff !important; }

/* ---------- Главная: доводка блоков (по итогам просмотра всей страницы на телефоне, планшете и компьютере) ---------- */
/* «Каталог автомобилей» в сетке карточек: нормальная карточка с кнопкой вместо пустого поля */
.prod-load-grid .product-grid-end {
  height: auto !important; min-height: 0; flex-direction: column; justify-content: flex-start; gap: 6px;
  padding: 26px 24px !important; border-radius: 16px; background: var(--at-c-surface); border: 1px solid var(--at-c-line);
}
.prod-load-grid .product-grid-end .section__title { margin: 0 !important; }
.prod-load-grid .product-grid-end .section__text { margin: 0 0 14px !important; color: var(--at-c-muted); }
.prod-load-grid .product-grid-end .btn.btn-product:not(#at-0):not(#at-1):not(#at-2) {
  align-self: flex-start; width: auto !important; height: 48px; margin-top: auto !important; padding: 0 28px !important;
  display: inline-flex; align-items: center; border-radius: 6px !important; border: 1px solid var(--at-accent) !important;
  background: var(--at-accent) !important; color: #fff !important; font: 600 15px var(--at-ui-font) !important; text-transform: none;
}
.prod-load-grid .product-grid-end .btn.btn-product:not(#at-0):not(#at-1):not(#at-2):hover { background: var(--at-accent-2) !important; border-color: var(--at-accent-2) !important; }

/* слайдер СТО: стрелки вместо слов Previous / Next */
.slick-sto, .js-slider-product { position: relative; }
.slick-sto .slick-arrow, .js-slider-product > .slick-arrow {
  position: absolute !important; top: 50%; z-index: 3; width: 42px !important; height: 42px !important; margin-top: -21px; padding: 0;
  display: grid !important; place-items: center; border-radius: 50%; border: 1px solid var(--at-c-line); background: var(--at-c-surface);
  color: var(--at-c-fg); font-size: 0 !important; line-height: 0; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.slick-sto .slick-prev, .js-slider-product > .slick-prev { left: 12px; }
.slick-sto .slick-next, .js-slider-product > .slick-next { right: 12px; }
.slick-sto .slick-arrow::before, .js-slider-product > .slick-arrow::before { content: ""; display: block; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.slick-sto .slick-prev::before, .js-slider-product > .slick-prev::before { transform: translateX(2px) rotate(135deg); }
.slick-sto .slick-next::before, .js-slider-product > .slick-next::before { transform: translateX(-2px) rotate(-45deg); }

/* лизинг на планшете: карточка была зажата по высоте фото, форма вылезала */
@media (min-width: 576px) and (max-width: 991px) {
  .form-section__row > [class*="col-"] {
    flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; height: auto !important; aspect-ratio: auto !important; margin-top: 0 !important;
  }
  .form-section__row > .order-sm-last { order: -1 !important; margin-bottom: 12px !important; }
  .form-section__row .form-section__img, .form-section__row .form-section__inner { position: relative !important; inset: auto !important; height: auto !important; min-height: 0 !important; }
  .form-section__row .form-section__img { overflow: hidden; max-height: 380px; }
  .form-section__row .form-section__img img { width: 100%; height: auto; max-height: 380px; object-fit: cover; object-position: top center; display: block; }
}

/* светлая тема: «+» (заявка на тест-драйв), подпись руководителя */
html[data-at-theme="light"] .test-mp-section .nav-toggler:not(#at-0):not(#at-1):not(#at-2) { border-color: var(--at-accent) !important; }
html[data-at-theme="light"] .test-mp-section .nav-toggler::before,
html[data-at-theme="light"] .test-mp-section .nav-toggler::after { background-color: var(--at-accent) !important; border-color: var(--at-accent) !important; }
html[data-at-theme="light"] .partner-card__text {
  color: #16181d !important; background: rgba(255, 255, 255, .94); padding: 10px 14px; border-radius: 12px; box-shadow: 0 4px 16px rgba(16, 24, 40, .1);
}
html[data-at-theme="light"] .partner-card__text * { color: inherit !important; }
html[data-at-theme="light"] .partner-card__photo::after { border-color: rgba(16, 24, 40, .16); border-top-color: transparent; }
/* светлая тема: форма «Нужен лизинг?» — заметная кнопка и линия поля */
html[data-at-theme="light"] .form-section .form-section__btn:not(#at-0):not(#at-1):not(#at-2) { background: var(--at-accent) !important; border-color: var(--at-accent) !important; color: #fff !important; }
html[data-at-theme="light"] .form-section .form-section__btn:not(#at-0):not(#at-1):not(#at-2):hover { background: var(--at-accent-2) !important; border-color: var(--at-accent-2) !important; }
html[data-at-theme="light"] .form-section .form-section__input input:not(#at-0):not(#at-1):not(#at-2) { background: transparent !important; border: 0 !important; border-bottom: 1px solid rgba(16, 24, 40, .28) !important; border-radius: 0 !important; color: #16181d !important; }
html[data-at-theme="light"] .form-section .form-section__magic { border-left-color: rgba(16, 24, 40, .25) !important; }
/* светлая тема: стрелки слайдеров нарисованы белой картинкой — на светлом фоне делаем её тёмной */
html[data-at-theme="light"] .nav-arrow.at-lt-border::after { filter: brightness(0) opacity(.72); }
html[data-at-theme="light"] .nav-arrow.at-lt-border:not(#at-0):not(#at-1):not(#at-2) { border-color: rgba(16, 24, 40, .22) !important; }
/* карточка авто: фото заполняет слайдер целиком (раньше под ним оставалась пустая полоса);
   на телефоне и планшете слайдер в пропорции фото 3:2, на компьютере — по высоте блока с ценой */
.js-slider-product .slick-slide > div,
.js-slider-product .product-card-slider__img,
.js-slider-product .product-card-slider__img img { height: 100% !important; }
.js-slider-product .product-card-slider__img img { width: 100%; object-fit: cover; }
@media (max-width: 991px) { .product-card-row > .js-slider-product { height: auto !important; aspect-ratio: 3 / 2; } }
/* точки фото в карточке авто: в теме не было значков — рисуем аккуратные точки */
.js-slider-product .slick-dots { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 12px 0 2px; list-style: none; }
.js-slider-product .slick-dots li { width: auto !important; height: auto !important; margin: 0 !important; }
.js-slider-product .slick-dots button { width: 8px !important; height: 8px !important; padding: 0 !important; border: 0; border-radius: 50%; font-size: 0; background: var(--at-c-line) !important; cursor: pointer; }
html[data-at-theme="light"] .js-slider-product .slick-dots button { background: #d5d9e0 !important; }
.js-slider-product .slick-dots button::before { display: none !important; }
.js-slider-product .slick-dots .slick-active button { background: var(--at-accent) !important; width: 20px !important; border-radius: 4px; }
