/* Фирменные цвета из логотипа Altum Trans */
:root {
  --bg: #F1F4F6;
  --surface: #FFFFFF;
  --ink: #0D2A46;
  --muted: #5E6F80;
  --line: #D9E0E6;
  --teal: #3E788B;
  --teal-dark: #2F6274;
  --teal-soft: #E2EEF1;
  --grey: #90908F;
  --solid: #0D2A46;            /* тёмная заливка выбранного: меню, плашки, тёмный блок */
  --glass: rgba(241,244,246,.8);
  --blob-1: #C9E0E6;
  --blob-2: #DCE3EC;
  --img-a: #E6EEF1;
  --img-b: #D5E2E7;
  --field: #FFFFFF;
  --field-line: #B8C5CF;
  color-scheme: light;
  --display: 'Unbounded', system-ui, sans-serif;
  --text: 'Golos Text', system-ui, sans-serif;
  --wrap: 1200px;
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 32px;
  --shadow: 0 1px 2px rgba(13,42,70,.06), 0 8px 24px rgba(13,42,70,.06);
  --shadow-hover: 0 2px 4px rgba(13,42,70,.08), 0 18px 40px rgba(13,42,70,.14);
  --ease: cubic-bezier(.22,.8,.3,1);
}

/* Тёмная тема: data-theme ставит скрипт в <head> (системная тема или выбор посетителя) */
:root[data-theme="dark"] {
  --bg: #0C1723;
  --surface: #142334;
  --ink: #E6EDF3;
  --muted: #95A6B6;
  --line: #24384C;
  --teal: #5A9DB2;
  --teal-dark: #7DB6C8;
  --teal-soft: #1B3444;
  --solid: #234A63;
  --glass: rgba(12,23,35,.78);
  --blob-1: #1C4454;
  --blob-2: #1A2D45;
  --img-a: #1A2C3E;
  --img-b: #142334;
  --field: #0F1C2A;
  --field-line: #34506A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}
html[data-theme="dark"] .ico, html[data-theme="dark"] .route-truck { filter: brightness(1.55) saturate(.9); }
html[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23E6EDF3' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); }
html[data-theme="dark"] .chip span { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .dark { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.logo-d, html[data-theme="dark"] .logo-l { display: none !important; }
html[data-theme="dark"] .logo-d { display: block !important; }
body, .top, .item, .form-card, .lang, .cat, .filters { transition: background-color .4s var(--ease), color .4s var(--ease); }

/* Кнопка темы */
.theme { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: background .25s, transform .4s var(--ease); }
.theme:hover { background: var(--teal-soft); transform: rotate(-25deg) scale(1.06); }
.theme svg { width: 20px; height: 20px; }
.theme .moon, html[data-theme="dark"] .theme .sun { display: none; }
html[data-theme="dark"] .theme .moon { display: block; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
/* Якоря: блок останавливается ниже шапки, а не у самого верха */
[id] { scroll-margin-top: 140px; }
#yak { scroll-margin-top: max(140px, calc(50vh - 170px)); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 32px; max-width: 22ch; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.top.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(13,42,70,.06); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 76px; }
.logo { display: block; transition: transform .3s var(--ease); }
.logo img { height: 50px; width: auto; }
.logo:hover { transform: scale(1.04); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; transition: background .25s, color .25s;
}
.nav a:hover { background: var(--teal-soft); color: var(--ink); }
.nav a[aria-current] { background: var(--solid); color: #fff; }

.lang { position: relative; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; color: var(--muted);
  transition: color .3s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: #fff; }
.lang-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 999px; background: var(--teal);
  transition: transform .4s var(--ease), width .4s var(--ease);
}

/* ---------- Кнопки ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--teal); color: #fff; font-weight: 600; font-size: 16px; padding: 15px 28px;
  box-shadow: 0 6px 18px rgba(62,120,139,.3);
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn::after { /* блик при наведении */
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--teal-dark); box-shadow: 0 12px 28px rgba(62,120,139,.38); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--solid); color: #fff; box-shadow: 0 12px 28px rgba(13,42,70,.25); }
.btn-light { background: #fff; color: #0D2A46; box-shadow: none; }
.btn-light:hover { background: var(--teal-soft); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; pointer-events: none; }
.blob-1 { width: 520px; height: 520px; background: var(--blob-1); top: -160px; right: -120px; }
.blob-2 { width: 380px; height: 380px; background: var(--blob-2); top: 220px; left: -160px; }
.hero h1 { font-size: clamp(34px, 5.6vw, 72px); max-width: 15ch; }
.hero h1 .w { display: inline-block; }
.hero-lead { font-size: 19px; color: var(--muted); max-width: 54ch; margin: 24px 0 36px; }
.search {
  display: flex; max-width: 660px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px; box-shadow: var(--shadow); transition: box-shadow .3s, border-color .3s;
}
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 400 17px var(--text); padding: 10px 18px; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(62,120,139,.15), var(--shadow); }
.search .btn { padding: 12px 26px; box-shadow: none; }

/* Маршрут ЄС → Київ */
.route { margin-top: 64px; background: var(--surface); border-radius: var(--r-lg); padding: 36px 40px 40px; box-shadow: var(--shadow); }
.route-ends { display: flex; justify-content: space-between; font: 600 15px var(--display); margin-bottom: 14px; }
.route-ends span:last-child { color: var(--teal); }
.route-track { position: relative; height: 56px; }
.route-line, .route-fill { position: absolute; left: 0; right: 0; top: 26px; height: 4px; border-radius: 4px; }
.route-line { background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 18px); }
.route-fill { background: linear-gradient(90deg, var(--grey), var(--teal)); transform-origin: left; }
/* Грузовик стоит колёсами на линии (линия: top 26px). --x и --f задаёт скрипт при наведении на этап */
.route-truck { position: absolute; top: -12px; left: calc(100% - 64px); width: 64px; height: 40px; object-fit: contain; }
.route.done .route-truck { animation: none; left: var(--x, calc(100% - 64px)); transition: left .8s var(--ease); }
.route.done .route-fill, .js .route.in.done .route-fill { animation: none; transform: scaleX(var(--f, 1)); transition: transform .8s var(--ease); }
.stages { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; counter-reset: s; }
.stages li { counter-increment: s; position: relative; padding: 22px 12px 14px; margin: 0 -12px; border-radius: var(--r-sm); transition: background .3s; }
.stages li:hover { background: var(--teal-soft); }
.stages li::before {
  /* центр кружка = центр линии: линия на 28px от верха дорожки, список начинается на 56+8px */
  content: ''; position: absolute; top: -44px; left: 12px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ink); transition: transform .3s var(--ease), background .3s, border-color .3s;
}
.stages li:hover::before { transform: scale(1.35); background: var(--teal); border-color: var(--teal); }
.stages b { display: block; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.stages b::before { content: counter(s) '. '; color: var(--teal); }
.stages span { font-size: 15px; color: var(--muted); }

/* ---------- Категории ---------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat {
  display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; text-decoration: none;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s, background .35s;
}
.cat svg { width: 72px; height: 45px; color: var(--teal); transition: transform .45s var(--ease); }
.cat b { font-weight: 600; line-height: 1.3; }
.cat small { color: var(--muted); font-size: 14px; margin-top: auto; }
.cat:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); background: var(--teal-soft); }
.cat:hover svg { transform: translateX(6px) rotate(-4deg); }

/* ---------- Карточки объявлений ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.item {
  background: var(--surface); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s;
}
.item:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.item-img { aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--img-a), var(--img-b)); display: grid; place-items: center; color: var(--teal); position: relative; overflow: hidden; }
.item-img svg { width: 55%; transition: transform .6s var(--ease); }
.item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.item:hover .item-img svg, .item:hover .item-img img { transform: scale(1.08); }
.badge { position: absolute; left: 12px; top: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); font-size: 13px; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.item-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item p { margin: 0; }
.item h3 { font: 600 17px/1.3 var(--text); }
.item-meta { color: var(--muted); font-size: 15px; }
.item-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font: 600 22px var(--display); }
.price.ask { font: 600 15px var(--text); color: var(--teal); background: var(--teal-soft); padding: 6px 12px; border-radius: 999px; }
.go {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--teal-soft); color: var(--teal); transition: background .3s, color .3s, transform .35s var(--ease);
}
.item:hover .go { background: var(--teal); color: #fff; transform: rotate(-45deg); }

/* ---------- Тёмный блок ---------- */
.dark { background: var(--solid); color: #fff; border-radius: var(--r-lg); padding: 64px; position: relative; overflow: hidden; }
.dark::before { content: ''; position: absolute; width: 480px; height: 480px; right: -140px; top: -180px; border-radius: 50%; background: var(--teal); filter: blur(90px); opacity: .45; }
.cargo { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cargo p { color: #B9C7D3; max-width: 46ch; margin: 0 0 28px; }
.cargo ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cargo li {
  padding: 14px 18px; border-radius: var(--r-sm); background: rgba(255,255,255,.06);
  transition: background .3s, transform .3s var(--ease);
}
.cargo li:hover { background: rgba(255,255,255,.14); transform: translateX(8px); }

/* ---------- Форма ---------- */
.form-card { background: var(--surface); border-radius: var(--r-lg); padding: 48px; box-shadow: var(--shadow); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 780px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 500; }
.form .full { grid-column: 1 / -1; }
.form input:not([type=checkbox]), .form textarea {
  font: 400 17px var(--text); padding: 14px 18px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.form input:not([type=checkbox]):hover, .form textarea:hover { border-color: var(--field-line); }
.form input:not([type=checkbox]):focus, .form textarea:focus { outline: none; border-color: var(--teal); background: var(--field); box-shadow: 0 0 0 5px rgba(62,120,139,.15); }
.form textarea { min-height: 130px; resize: vertical; }
.form .consent { flex-direction: row; align-items: center; gap: 12px; font-weight: 400; color: var(--muted); cursor: pointer; }
input[type=checkbox] {
  appearance: none; width: 22px; height: 22px; flex: none; margin: 0; cursor: pointer;
  border: 1.5px solid var(--field-line); border-radius: 7px; background: var(--field); display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
input[type=checkbox]::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); margin-top: -3px; transition: transform .25s var(--ease); }
input[type=checkbox]:checked { background: var(--teal); border-color: var(--teal); }
input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }
input[type=checkbox]:active { transform: scale(.88); }
.form-note { color: var(--muted); font-size: 15px; margin: 0; }
.form-note.warn { color: var(--teal-dark); font-weight: 500; }
.form-note.ok { color: var(--teal); font-weight: 600; animation: rise .5s var(--ease) backwards; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn:disabled { opacity: .6; pointer-events: none; }

/* ---------- Каталог ---------- */
.page-title { font-size: clamp(28px, 4vw, 44px); margin-bottom: 8px; }
.catalog { display: grid; grid-template-columns: 310px 1fr; gap: 40px; padding-top: 40px; padding-bottom: 88px; }
.filters {
  position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 24px;
  background: var(--surface); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow);
}
.filters .search { box-shadow: none; background: var(--bg); }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.filters legend { font-weight: 600; margin-bottom: 8px; }
/* Меню категорий с выезжающими подкатегориями */
.filters { z-index: 5; }
.legend { font-weight: 600; margin: 0 0 8px; }
.catmenu { list-style: none; margin: 0 -10px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-item { position: relative; }
.cm-main {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  border: 0; background: none; padding: 8px 10px; border-radius: 12px;
  transition: background .25s, color .25s;
}
.cm-ico { width: 46px; height: 29px; flex: none; display: grid; place-items: center; color: var(--teal); }
.cm-ico svg { width: 40px; height: 25px; transition: transform .35s var(--ease); }
.cm-name { flex: 1; font-weight: 500; line-height: 1.25; }
.cm-picked { display: block; width: fit-content; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--teal); color: #fff; font-style: normal; font-size: 12px; font-weight: 500; }
.cm-main small, .cm-sub small { color: var(--muted); font-size: 13px; }
.chev { flex: none; color: var(--muted); transition: transform .3s var(--ease), color .25s; }
.cm-main:hover, .cm-item:hover > .cm-main, .cm-item.open > .cm-main { background: var(--teal-soft); }
.cm-item:hover .cm-ico svg { transform: scale(1.12) rotate(-4deg); }
.cm-item:hover .chev { transform: translateX(3px); color: var(--teal); }
.cm-main[aria-current], .cm-item.open > .cm-main[aria-current] { background: var(--solid); color: #fff; }
.cm-main[aria-current] small, .cm-main[aria-current] .chev, .cm-main[aria-current] .cm-ico { color: #fff; }
.cm-item.active > .cm-main:not([aria-current]) { box-shadow: inset 3px 0 0 var(--teal); }

.cm-fly {
  position: absolute; left: 100%; top: -12px; width: 290px; padding-left: 14px; /* мостик для мыши */
  opacity: 0; visibility: hidden; transform: translateX(-10px);
  transition: opacity .25s, transform .3s var(--ease), visibility .25s;
}
.cm-fly::before {
  content: ''; position: absolute; inset: 0 0 0 14px; background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-hover); z-index: -1;
}
.cm-item:hover > .cm-fly { opacity: 1; visibility: visible; transform: none; transition-delay: .08s; }
.cm-fly-title { font: 600 15px var(--display); margin: 0; padding: 18px 18px 8px; }
.cm-fly { display: flex; flex-direction: column; padding-bottom: 10px; }
.cm-sub {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 0; background: none; padding: 9px 12px; margin: 0 8px; border-radius: 10px; font-size: 15px;
  transition: background .2s, color .2s, padding .25s var(--ease);
}
.cm-sub:hover { background: var(--teal-soft); padding-left: 18px; }
.cm-sub.zero { color: var(--muted); }
.cm-sub[aria-current], .cm-sub[aria-current]:hover { background: var(--teal); color: #fff; }
.cm-sub[aria-current] small { color: #fff; }
.cm-sub-all { font-weight: 600; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font-size: 14px; font-weight: 500;
  background: var(--teal-soft); color: var(--ink); padding: 6px 8px 6px 14px; border-radius: 999px;
  transition: background .2s, color .2s; animation: pop .35s var(--ease);
}
.chip span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,42,70,.08); transition: background .2s; }
.chip:hover { background: var(--solid); color: #fff; }
.chip:hover span { background: rgba(255,255,255,.2); }
.toolbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.check { display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; transition: background .2s; }
.check:hover { background: var(--teal-soft); }
.check small { color: var(--muted); margin-left: auto; }
.range { display: flex; gap: 8px; }
.range input {
  width: 100%; min-width: 0; font: 400 16px var(--text); padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); transition: border-color .25s, box-shadow .25s;
}
.range input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(62,120,139,.15); }
.link-btn { border: 0; background: none; color: var(--teal); font-weight: 600; cursor: pointer; padding: 8px 0; text-align: left; transition: color .2s; }
.link-btn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 24px; flex-wrap: wrap; }
.toolbar p { color: var(--muted); margin: 0; }
.toolbar-right { display: flex; gap: 10px; align-items: center; }

/* Телефон: кнопка «Фільтри», панель снизу, меню-бургер (на компьютере скрыты) */
.btn-filters, .f-head, .f-foot, .f-back, .burger { display: none; }
.btn-filters {
  align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 15px var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: border-color .25s, background .25s;
}
.btn-filters:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn-filters b:not(:empty) { background: var(--teal); color: #fff; font-size: 12px; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }
.f-head { justify-content: space-between; align-items: center; }
.f-title { font: 600 20px var(--display); margin: 0; }
.f-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; transition: background .25s, transform .3s var(--ease); }
.f-close:hover { background: var(--teal-soft); transform: rotate(90deg); }
.burger { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.burger span { width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .35s var(--ease), opacity .25s; }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.select {
  appearance: none; font: 500 15px var(--text); color: var(--ink); cursor: pointer;
  padding: 10px 40px 10px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230D2A46' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
  transition: border-color .25s, box-shadow .25s;
}
.select:hover { border-color: var(--teal); }
.select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(62,120,139,.15); }
.empty { padding: 48px; color: var(--muted); background: var(--surface); border-radius: var(--r); text-align: center; }
.empty .btn { margin-top: 20px; }

/* ---------- Страница объявления ---------- */
.back {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-weight: 500;
  padding: 8px 16px 8px 12px; margin: 32px 0 20px -12px; border-radius: 999px; transition: background .25s, color .25s;
}
.back svg { transition: transform .3s var(--ease); }
.back:hover { background: var(--teal-soft); color: var(--ink); }
.back:hover svg { transform: translateX(-4px); }
.detail { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
.gallery-main {
  aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; position: relative;
  background: linear-gradient(160deg, var(--img-a), var(--img-b)); display: grid; place-items: center; color: var(--teal);
}
.gallery-main svg { width: 50%; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; animation: fadein .5s var(--ease); }
.gallery-main .badge { left: 18px; top: 18px; }
.gallery-note { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 14px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; width: 88px; height: 66px; flex: none; cursor: pointer; transition: border-color .25s, transform .25s var(--ease); }
.thumbs button:hover { transform: translateY(-2px); }
.thumbs button[aria-current] { border-color: var(--teal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { background: var(--surface); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); position: sticky; top: 100px; }
.info h1 { font-size: clamp(24px, 2.6vw, 32px); }
.info .model { color: var(--muted); margin: 6px 0 20px; }
.info .price { font-size: 32px; display: inline-block; margin-bottom: 24px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.fact { background: var(--bg); border-radius: 14px; padding: 12px 14px; transition: background .25s; }
.fact:hover { background: var(--teal-soft); }
.fact small { display: block; color: var(--muted); font-size: 13px; }
.fact b { font-weight: 600; }
.turnkey { border-radius: var(--r); padding: 18px; background: var(--teal-soft); margin-bottom: 24px; }
.turnkey b { display: block; margin-bottom: 4px; }
.turnkey p { margin: 0; font-size: 15px; color: var(--muted); }
.info .btn { width: 100%; }
.specs { margin-top: 40px; background: var(--surface); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); }
.specs h2 { font-size: 24px; margin-bottom: 16px; }
.specs dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.specs dt, .specs dd { margin: 0; padding: 14px 12px; border-bottom: 1px solid var(--line); transition: background .2s; }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 500; }
.specs dl > :nth-last-child(-n+2) { border-bottom: 0; }

/* ---------- Иконки техники (PNG) ---------- */
.ico { display: block; height: auto; aspect-ratio: 16 / 10; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.cat .ico { width: 96px; transition: transform .45s var(--ease); }
.cat:hover .ico { transform: translateX(6px) rotate(-3deg); }
.cm-ico .ico { width: 46px; transition: transform .35s var(--ease); }
.cm-item:hover .cm-ico .ico { transform: scale(1.12) rotate(-4deg); }
.cm-main[aria-current] .ico { filter: brightness(0) invert(1); }
.item-img .ico, .gallery-main .ico { width: 72%; height: auto; object-fit: contain; animation: none; }
.item:hover .item-img .ico { transform: scale(1.08); }

/* ---------- Подвал ---------- */
.foot { padding: 48px 0; color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 32px; }
.foot img { height: 40px; width: auto; opacity: .85; }

/* ---------- Анимации ---------- */
@keyframes fadein { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes word { from { opacity: 0; transform: translateY(.6em) rotate(2deg); filter: blur(6px); } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes drive { from { left: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.25); } }
@keyframes drift { 50% { transform: translate(40px, 30px) scale(1.08); } }
@keyframes slidedown { from { transform: translateY(-100%); } }

@media (prefers-reduced-motion: no-preference) {
  .js .top { animation: slidedown .6s var(--ease) both; }
  .js .hero h1 .w { animation: word .7s var(--ease) both; animation-delay: calc(.15s + var(--i) * .07s); }
  .js .hero-lead { animation: rise .8s var(--ease) .55s both; }
  .js .hero .search { animation: rise .8s var(--ease) .7s both; }
  .blob-1 { animation: drift 14s ease-in-out infinite; }
  .blob-2 { animation: drift 18s ease-in-out -6s infinite reverse; }

  /* Появление при прокрутке */
  .js .reveal:not(.in) { opacity: 0; }
  .js .reveal.in { animation: rise .8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 80ms); }

  /* Маршрут запускается, когда виден */
  .js .route .route-fill { transform: scaleX(0); }
  .js .route.in .route-fill { animation: fill 2.6s cubic-bezier(.6,0,.3,1) .2s both; transform: none; }
  .js .route:not(.done) .route-truck { left: 0; }
  .js .route.in:not(.done) .route-truck { animation: drive 2.6s cubic-bezier(.6,0,.3,1) .2s both; left: calc(100% - 64px); }
  .js .route .stages li { opacity: 0; }
  .js .route.in .stages li { animation: rise .6s var(--ease) both; opacity: 1; }
  .js .route.in .stages li::before { animation: pop .5s var(--ease) both; }
  .js .route.in .stages li:nth-child(1), .js .route.in .stages li:nth-child(1)::before { animation-delay: .35s; }
  .js .route.in .stages li:nth-child(2), .js .route.in .stages li:nth-child(2)::before { animation-delay: .8s; }
  .js .route.in .stages li:nth-child(3), .js .route.in .stages li:nth-child(3)::before { animation-delay: 1.25s; }
  .js .route.in .stages li:nth-child(4), .js .route.in .stages li:nth-child(4)::before { animation-delay: 1.7s; }
  .js .route.in .stages li:nth-child(5), .js .route.in .stages li:nth-child(5)::before { animation-delay: 2.15s; }
  .js .route.in .stages li:nth-child(6), .js .route.in .stages li:nth-child(6)::before { animation-delay: 2.6s; }

  /* Карточки при смене фильтров */
  .grid.anim > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
  .swap { animation: fadein .45s var(--ease); }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .stages { grid-template-columns: repeat(3, 1fr); row-gap: 8px; }
  .stages li::before { display: none; }
  .stages li { padding-top: 14px; }
  .cargo, .detail { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .filters, .info { position: static; }
  /* Подкатегории раскрываются под категорией */
  .cm-fly, .cm-item:hover > .cm-fly { position: static; width: auto; padding: 0 0 6px 34px; display: none; opacity: 1; visibility: visible; transform: none; }
  .cm-fly::before, .cm-fly-title { display: none; }
  .cm-item.open > .cm-fly { display: flex; animation: rise .35s var(--ease); }
  .cm-item.open .chev { transform: rotate(90deg); }
  .dark { padding: 48px 32px; }
}
@media (max-width: 960px) {
  .btn-filters, .f-head, .f-foot { display: flex; }
  .filters {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
    border-radius: 28px 28px 0 0; padding-bottom: 0; transform: translateY(105%); visibility: hidden;
    transition: transform .45s var(--ease), visibility 0s .45s, background-color .4s;
  }
  .f-open .filters { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
  .f-foot { position: sticky; bottom: 0; margin: 0 -22px; padding: 14px 22px 18px; background: var(--surface); border-top: 1px solid var(--line); }
  .f-foot .btn { width: 100%; justify-content: center; }
  .f-back { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5,15,25,.45); opacity: 0; pointer-events: none; transition: opacity .35s; }
  .f-open .f-back { opacity: 1; pointer-events: auto; }
  .f-open { overflow: hidden; }
  .toolbar { position: sticky; top: 76px; z-index: 10; margin-left: -24px; margin-right: -24px; padding: 10px 24px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
@media (max-width: 760px) {
  .top .wrap { gap: 10px; }
  .lang { margin-left: auto; }
  .burger { display: flex; order: 3; }
  .theme { order: 2; }
  .nav {
    position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; flex-direction: column; gap: 4px; margin: 0;
    background: var(--surface); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow-hover);
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top;
    transition: opacity .3s, transform .35s var(--ease), visibility 0s .35s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .35s var(--ease), visibility 0s; }
  .nav a { padding: 14px 18px; font-size: 17px; color: var(--ink); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .toolbar { margin-left: -16px; margin-right: -16px; padding: 10px 16px; }
  .lang button { padding: 6px 10px; }
  section { padding: 64px 0; }
  .logo img { height: 42px; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stages { grid-template-columns: 1fr 1fr; }
  .route { padding: 28px 22px; }
  .form { grid-template-columns: 1fr; }
  .form-card { padding: 28px 20px; }
  .dark { padding: 40px 22px; border-radius: var(--r); }
  .section-head { flex-direction: column; align-items: start; }
  .search .btn { padding: 12px 18px; }
  .specs dl { grid-template-columns: 1fr; }
  .specs dt { border-bottom: 0; padding-bottom: 0; }
}
