/*
Theme Name: Спецтехника
Theme URI: https://excavator.kg
Author: Spektehnika Dev
Description: Тема публичной части платформы поиска экскаваторов «Спецтехника».
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.1
Text Domain: spektehnika
*/

:root {
  --st-primary: #f5a623;
  --st-primary-dark: #e08e0b;
  --st-bg: #0b0e11;
  --st-bg-2: #11161d;
  --st-card: #161b22;
  --st-card-2: #1c232d;
  --st-text: #e7ecf3;
  --st-muted: #8b98a9;
  --st-border: #232c38;
  --st-green: #22c55e;
  --st-radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--st-bg);
  color: var(--st-text);
  line-height: 1.55;
}

a { color: var(--st-primary); text-decoration: none; }
a:hover { color: var(--st-primary-dark); }

/* мобильная база: iOS не раздувает текст, тапы без серой подсветки, картинки не вылезают */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a, button, input, .wt-tile, .wseg { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--st-primary); outline-offset: 2px; }

.st-wrap { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  background: rgba(11, 14, 17, 0.92);
  border-bottom: 1px solid var(--st-border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header .st-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 18px; }
.site-branding { font-weight: 800; font-size: 20px; letter-spacing: 0.5px; }
.site-branding a { color: #fff; }
.brand-mark { margin-right: 4px; }
.brand-kg { color: var(--st-primary); }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--st-muted); font-weight: 600; }
.main-nav a.active, .main-nav a:hover { color: #fff; }
.btn-telegram {
  background: #fff; color: #0b0e11; font-weight: 700;
  padding: 9px 16px; border-radius: 10px; white-space: nowrap;
}
.btn-telegram:hover { background: var(--st-primary); color: #0b0e11; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 700; border: none; cursor: pointer; font-size: 15px; }
.btn-primary { background: var(--st-primary); color: #0b0e11; }
.btn-primary:hover { background: var(--st-primary-dark); color: #0b0e11; }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-block { display: flex; width: 100%; margin-top: 8px; }

/* Hero */
.hero { position: relative; min-height: 620px; overflow: hidden;
  background: radial-gradient(1200px 600px at 75% 20%, rgba(245,166,35,0.10), transparent 60%),
              linear-gradient(180deg, #0b0e11 0%, #0e141b 100%); }
.hero-overlay { position: relative; z-index: 1; padding: 48px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--st-border); color: #cbd5e1; padding: 6px 14px; border-radius: 999px; font-size: 13px; }
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-green); }
.hero h1 { font-size: 52px; line-height: 1.05; margin: 18px 0 14px; font-weight: 800; color: #fff; }
.hero h1 .accent { color: var(--st-primary); }
.hero-sub { color: #cbd5e1; font-size: 17px; max-width: 460px; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-geo-status { margin: 10px 0 0; font-size: 14px; color: var(--st-green); min-height: 20px; }
.hero-trust { display: flex; align-items: center; gap: 12px; margin-top: 26px; color: #cbd5e1; font-size: 14px; }
.hero-trust .accent { color: var(--st-primary); }
.avatars { display: flex; }
.avatars span { width: 38px; height: 38px; border-radius: 50%; background: var(--st-card-2);
  border: 2px solid var(--st-bg); display: grid; place-items: center; font-size: 18px; margin-left: -8px; }
.avatars span:first-child { margin-left: 0; }

/* Hero machine card */
.hero-card { background: var(--st-card); border: 1px solid var(--st-border); border-radius: var(--st-radius);
  overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.hero-card-head { padding: 12px 14px 0; }
.hero-card-photo { display: block; height: 200px; background-size: cover; background-position: center; margin: 10px 14px 0; border-radius: 10px; }
.hero-card-photo.no-photo { display: grid; place-items: center; background: var(--st-card-2); color: var(--st-muted); }
.hero-card-body { padding: 14px 16px 18px; }
.rating-line { color: var(--st-primary); font-size: 14px; margin-bottom: 6px; }
.rating-line b { color: #fff; }
.hero-card h3 { margin: 4px 0 12px; font-size: 20px; }
.hero-card h3 a { color: #fff; }
.price-row { display: flex; justify-content: space-between; align-items: center; color: var(--st-muted);
  font-size: 14px; padding: 10px 0; border-top: 1px solid var(--st-border); border-bottom: 1px solid var(--st-border); margin-bottom: 12px; }
.price-row b { color: var(--st-primary); font-size: 18px; }

/* Stats */
.stats-row { background: var(--st-bg-2); border-top: 1px solid var(--st-border); border-bottom: 1px solid var(--st-border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 26px 18px; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat-ico { font-size: 28px; }
.stat b { display: block; font-size: 26px; color: #fff; }
.stat span { color: var(--st-muted); font-size: 13px; }

/* Sections */
.section { padding: 40px 0; }
.section-title { font-size: 28px; margin: 0 0 20px; color: #fff; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-free { background: rgba(34,197,94,0.15); color: var(--st-green); }
.status-busy { background: rgba(245,158,11,0.15); color: var(--st-primary); }
.status-weekend { background: rgba(56,189,248,0.15); color: #38bdf8; }
.status-repair { background: rgba(168,85,247,0.15); color: #a855f7; }
.status-offline { background: rgba(100,116,139,0.15); color: var(--st-muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.tags .badge { background: var(--st-card-2); color: #cbd5e1; }

/* Machine grid + cards */
.machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.machine-card { position: relative; background: var(--st-card); border: 1px solid var(--st-border);
  border-radius: var(--st-radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.machine-card:hover { transform: translateY(-3px); border-color: var(--st-primary); }
.machine-card .thumb { position: relative; display: block; height: 132px; background-size: cover;
  background-position: center; background-color: var(--st-card-2); }
.machine-card .thumb.no-photo { display: grid; place-items: center; color: var(--st-muted); }
.machine-card .thumb .badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.machine-card .thumb-empty { position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--st-muted); font-size: 13px; }
.machine-card .thumb-dist { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 9px 7px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.78) 72%);
  color: #fff; font-size: 12px; font-weight: 600; }
.machine-card .body { padding: 10px 12px 12px; }
.machine-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.machine-card h3 a { color: #fff; }
.machine-card h3 a:hover { color: var(--st-primary); }
.machine-card .card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.machine-card .price { color: #fff; font-weight: 800; font-size: 15px; white-space: nowrap; }
.machine-card .price i { font-style: normal; color: var(--st-muted); font-weight: 600; font-size: 12px; }
.machine-card .rating { color: var(--st-primary); font-weight: 700; font-size: 14px; white-space: nowrap; }
.machine-card .meta { display: flex; gap: 10px; color: var(--st-muted); font-size: 13px; flex-wrap: wrap; }

/* Catalog map — фоном на всю ширину/высоту секции (Б11) */
.catalog-map { position: absolute; inset: 0; height: auto; min-height: 0; border: 0;
  border-radius: 0; margin: 0; z-index: 1; }
.st-grid-item { cursor: pointer; }

/* Leaflet markers */
/* маркеры машин: тёмный кружок, обводка = статус, внутри жёлтый экскаватор (Б11) */
.st-marker-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 13, 17, 0.92); border: 2.5px solid var(--mk, #22c55e);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), 0 0 7px color-mix(in srgb, var(--mk, #22c55e) 35%, transparent); }
.st-marker-dot svg { width: 20px; height: 20px; display: block; }
.st-marker-dot.is-free { --mk: #22c55e; }
.st-marker-dot.is-busy { --mk: #f59e0b; }
.st-marker-dot.is-weekend { --mk: #38bdf8; }
.st-marker-dot.is-repair { --mk: #a855f7; }
.st-marker-dot.is-offline { --mk: #64748b; }
.st-marker-user { width: 24px; height: 24px; border-radius: 50%; background: #3b82f6;
  border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(59,130,246,0.3); }
.st-pop { display: block; text-align: center; min-width: 140px; color: #0b0e11; }
.st-pop img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.st-pop b { display: block; color: #0b0e11; }
.st-pop span { color: #b45309; font-weight: 700; }
.leaflet-container { background: #0e141b; font-family: inherit; }
/* затемнение светлых тайлов OSM под тёмную тему (без API-ключей) */
.leaflet-tile-pane { filter: brightness(0.5) invert(1) contrast(2.8) hue-rotate(200deg) saturate(0.35) brightness(0.6); }

/* ===== Б11: каталог — полнокадровая карта с панелями поверх ===== */
body.post-type-archive-st_machine main.st-wrap { max-width: none; padding: 0; }
.section.catalog-page { padding: 0; }

.st-catalog-form { --cat-panel-w: 312px;
  position: relative; height: calc(100vh - 64px); min-height: 720px; overflow: hidden; }

/* оверлей-сетка поверх карты: указатели — карте, панелям — клики */
.cat-overlay { position: absolute; inset: 16px; z-index: 2;
  display: grid; grid-template-columns: var(--cat-panel-w) 1fr var(--cat-panel-w);
  grid-template-rows: auto 1fr; gap: 14px; pointer-events: none; }
.cat-overlay > * { pointer-events: auto; min-width: 0; }
.cat-filters { grid-column: 1; grid-row: 1 / 3; }
.cat-detail  { grid-column: 3; grid-row: 1 / 3; }
.cat-live-pill { grid-column: 2; grid-row: 1; justify-self: center; align-self: start; }

/* zoom-контролы Leaflet не должны прятаться под правой панелью */
.st-catalog-form .leaflet-right { right: calc(var(--cat-panel-w) + 34px); }

/* --- панели --- */
.cat-panel { display: flex; flex-direction: column; overflow: hidden; min-height: 0;
  background: rgba(17, 22, 29, 0.94); border: 1px solid var(--st-border);
  border-radius: var(--st-radius); backdrop-filter: blur(10px); }
.cat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--st-border); flex: 0 0 auto; }
.cat-panel-head h2 { font-size: 17px; margin: 0; color: #fff; }
.cat-panel-head-actions { display: flex; align-items: center; gap: 12px; }
.cat-reset-link { color: var(--st-muted); font-size: 13px; }
.cat-reset-link:hover { color: var(--st-primary); }
.cat-reset-x { background: none; border: 1px solid var(--st-border); color: var(--st-muted);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1; }
.cat-reset-x:hover { color: var(--st-primary); border-color: var(--st-primary); }
.cat-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 16px; }
.cat-panel-body::-webkit-scrollbar { width: 8px; }
.cat-panel-body::-webkit-scrollbar-thumb { background: var(--st-border); border-radius: 999px; }
/* кнопка сворачивания панели — только на телефонах (≤660px), ниже включается */
.cat-panel-toggle { display: none; }

/* --- гео и радиус внутри панели фильтров (блок «Найдено» убран: счётчик
       дублируется в кнопке «Показать N», контекст — в сортировке/выборе) --- */
.cat-chip--block { display: flex; width: 100%; justify-content: center; margin-bottom: 8px; }
.cat-chip { background: var(--st-card-2); border: 1px solid var(--st-border); color: #fff;
  border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.cat-chip:hover { border-color: var(--st-primary); color: var(--st-primary); }
.cat-chip--primary { background: var(--st-primary); color: #0b0e11; border-color: var(--st-primary); font-weight: 700; }
.cat-chip--primary:hover { background: var(--st-primary-dark); color: #0b0e11; }
.cat-radius-box { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cat-radius-box .cat-label { margin: 0; white-space: nowrap; }
.cat-radius-box input { flex: 1 1 auto; min-width: 56px; background: var(--st-card-2);
  border: 1px solid var(--st-border); color: var(--st-text); border-radius: 8px; padding: 7px 9px; font: inherit; }
.cat-radius-box .cat-chip { flex: 0 0 auto; padding: 7px 12px; }
.cat-geo-note { display: block; color: var(--st-muted); font-size: 12px; margin-bottom: 8px; }
.cat-geo-note:empty { display: none; }

/* --- статус-пилюля (декоративная) --- */
.cat-live-pill { display: inline-flex; align-items: center; gap: 8px;
  background: rgba(17, 22, 29, 0.94); border: 1px solid var(--st-border);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; color: #cbd5e1; backdrop-filter: blur(10px); }
.cat-live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-green);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }

/* --- элементы фильтров --- */
.cat-field { display: block; margin-bottom: 12px; }
.cat-label { display: block; font-size: 12px; color: var(--st-muted); margin-bottom: 6px;
  font-weight: 600; letter-spacing: 0.02em; }
.cat-group { margin-bottom: 14px; }
.cat-field input[type="search"], .cat-field input[type="number"], .cat-field input[type="text"],
.cat-field select, .cat-radius-box input {
  width: 100%; background: var(--st-card-2); border: 1px solid var(--st-border);
  color: var(--st-text); border-radius: 8px; padding: 9px 11px; font: inherit; }
.cat-field input:focus, .cat-field select:focus, .cat-radius-box input:focus {
  outline: none; border-color: var(--st-primary); }

/* плитки «Тип техники» */
.wt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wt-tile { position: relative; cursor: pointer; }
.wt-tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.wt-tile-in { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center; min-height: 76px; padding: 10px 4px;
  background: var(--st-card-2); border: 1px solid var(--st-border); border-radius: 10px;
  font-size: 11px; line-height: 1.25; color: #cbd5e1; transition: 0.15s; }
.wt-ico { font-size: 19px; line-height: 1; }
.wt-name { display: block; }
.wt-tile:hover .wt-tile-in { border-color: rgba(245, 166, 35, 0.5); color: #fff; }
.wt-tile input:checked + .wt-tile-in { border-color: var(--st-primary);
  background: rgba(245, 166, 35, 0.13); color: #fff; box-shadow: inset 0 0 0 1px var(--st-primary); }
.wt-tile input:focus-visible + .wt-tile-in { outline: 2px solid var(--st-primary); outline-offset: 2px; }

/* сегменты «Вес / объём ковша» */
.w-segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wseg { position: relative; cursor: pointer; }
.wseg input { position: absolute; opacity: 0; width: 0; height: 0; }
.wseg span { display: block; text-align: center; padding: 8px 2px; white-space: nowrap;
  background: var(--st-card-2); border: 1px solid var(--st-border); border-radius: 8px;
  font-size: 11px; color: #cbd5e1; transition: 0.15s; }
.wseg input:checked + span { border-color: var(--st-primary); background: rgba(245, 166, 35, 0.14);
  color: #fff; font-weight: 700; }
.wseg input:focus-visible + span { outline: 2px solid var(--st-primary); outline-offset: 2px; }

/* двойной слайдер цены */
.range { position: relative; height: 28px; }
.range-track { position: absolute; left: 0; right: 0; top: 12px; height: 4px;
  background: var(--st-card-2); border: 1px solid var(--st-border); border-radius: 999px; }
.range-fill { position: absolute; top: -1px; bottom: -1px; left: 0; right: 0;
  background: var(--st-primary); border-radius: 999px; }
.range input[type="range"] { position: absolute; left: 0; top: 0; width: 100%; height: 28px;
  margin: 0; padding: 0; background: none; border: none; pointer-events: none;
  -webkit-appearance: none; appearance: none; }
.range input[type="range"]::-webkit-slider-runnable-track { background: none; border: none; height: 28px; }
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 16px; height: 16px; margin-top: 6px; border-radius: 50%;
  background: var(--st-primary); border: 2px solid #0b0e11; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.range input[type="range"]::-moz-range-track { background: none; border: none; height: 28px; }
.range input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 16px; height: 16px; border-radius: 50%;
  background: var(--st-primary); border: 2px solid #0b0e11; cursor: pointer; }
.range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--st-primary); outline-offset: 2px; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px;
  color: var(--st-muted); margin-top: 2px; }
.range-labels b { color: #fff; font-weight: 700; }

/* выключатель «Только свободные» */
.cat-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 16px; }
.cat-toggle .cat-label { margin: 0; font-size: 13px; color: var(--st-text); }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #2a3341; border-radius: 999px; transition: 0.15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: 0.15s; }
.switch input:checked + i { background: var(--st-primary); }
.switch input:checked + i::after { transform: translateX(20px); }

/* --- карточка выбранной техники (справа) --- */
.st-detail-pane[hidden] { display: none; }
.md-card { display: flex; flex-direction: column; }
.md-photo { position: relative; height: 172px; border-radius: 12px; background-size: cover;
  background-position: center; background-color: var(--st-card-2); margin-bottom: 12px; }
.md-photo.no-photo { display: grid; place-items: center; }
.md-photo .badge { position: absolute; top: 10px; left: 10px; }
.md-photo-empty { color: var(--st-muted); font-size: 13px; }
.md-title { display: flex; align-items: center; gap: 7px; margin: 0 0 6px;
  font-size: 19px; line-height: 1.3; }
.md-title a { color: #fff; }
.md-title a:hover { color: var(--st-primary); }
.md-verified { color: #3b82f6; font-size: 14px; }
.md-rating { display: flex; align-items: baseline; gap: 6px; font-size: 14px;
  color: var(--st-muted); margin-bottom: 12px; }
.md-star { color: var(--st-primary); }
.md-rating b { color: #fff; }
.md-specs { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--st-border); }
.md-specs li { display: flex; align-items: center; gap: 8px; padding: 9px 0;
  border-bottom: 1px solid var(--st-border); font-size: 13px; color: var(--st-muted); }
.md-spec-ico { width: 18px; text-align: center; flex: 0 0 auto; }
.md-spec-name { flex: 1 1 auto; }
.md-specs b { color: #fff; font-weight: 700; white-space: nowrap; }
.md-where { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--st-muted); padding-bottom: 12px; }
.md-loc b { color: #fff; }
.md-eta { color: var(--st-green); font-weight: 700; font-size: 13px; white-space: nowrap; }
.md-price-label { font-size: 12px; color: var(--st-muted); }
.md-price { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 14px; }
.md-price span { font-size: 14px; font-weight: 600; color: var(--st-muted); }
.md-actions { display: flex; flex-direction: column; gap: 10px; }
.md-no-contact { font-size: 13px; margin: 0; }

/* --- правая панель: список ближайших (на старте) + карточка поверх списка (Б11) --- */
.cat-panel-count { background: var(--st-card-2); border: 1px solid var(--st-border); color: var(--st-muted);
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.cat-detail .cat-detail-body { position: relative; padding: 0; overflow: hidden; }
.cat-detail-list { height: 100%; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--st-border) transparent; }
.cat-detail-list::-webkit-scrollbar { width: 8px; }
.cat-detail-list::-webkit-scrollbar-thumb { background: var(--st-border); border-radius: 999px; }
.cat-detail-list .st-empty { padding: 26px 16px; }
.cat-list-item { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--st-border); transition: background .15s; }
.cat-list-item:hover { background: rgba(255, 255, 255, 0.05); }
.cat-list-item.is-active { background: rgba(245, 166, 35, 0.12); box-shadow: inset 3px 0 0 var(--st-primary); }
.cli-thumb { width: 46px; height: 46px; border-radius: 10px; background-size: cover; background-position: center;
  background-color: var(--st-card-2); display: grid; place-items: center; overflow: hidden;
  color: var(--st-muted); font-size: 17px; }
.cli-main { min-width: 0; }
.cli-title { display: block; color: #fff; font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-meta { display: block; color: var(--st-muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-price { color: #fff; font-weight: 800; font-size: 14px; text-align: right; white-space: nowrap; }
.cli-price i { display: block; font-style: normal; font-weight: 600; font-size: 10px; color: var(--st-muted); }

/* карточка выбранной техники — поверх списка (список остаётся позади) */
.cat-detail-view { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  background: var(--st-card); }
.cat-detail-view[hidden] { display: none; }
.cat-detail-view-bar { flex: 0 0 auto; padding: 10px 14px; border-bottom: 1px solid var(--st-border); }
.cat-back { background: none; border: 1px solid var(--st-border); color: #cbd5e1; border-radius: 8px;
  padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cat-back:hover { border-color: var(--st-primary); color: var(--st-primary); }
.cat-detail-view-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 16px;
  scrollbar-width: thin; scrollbar-color: var(--st-border) transparent; }
.cat-detail-view-body::-webkit-scrollbar { width: 8px; }
.cat-detail-view-body::-webkit-scrollbar-thumb { background: var(--st-border); border-radius: 999px; }

/* Reviews */
.reviews { margin-top: 22px; }
.review { background: var(--st-card); border: 1px solid var(--st-border); border-radius: var(--st-radius);
  padding: 14px 16px; margin-bottom: 12px; }
.review-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.review-head .rating { color: var(--st-primary); }
.review-reply { margin-top: 10px; padding: 10px 12px; background: var(--st-card-2);
  border-left: 3px solid var(--st-primary); border-radius: 4px; }
.review-form { margin-top: 24px; background: var(--st-card); border: 1px solid var(--st-border);
  border-radius: var(--st-radius); padding: 18px; }
.review-form input[type="text"], .review-form select, .review-form textarea {
  width: 100%; max-width: 460px; padding: 9px 12px; border: 1px solid var(--st-border);
  border-radius: 8px; font: inherit; background: var(--st-card-2); color: var(--st-text); }
.review-form .notice { background: rgba(34,197,94,0.12); border: 1px solid var(--st-green);
  border-radius: 8px; padding: 10px 14px; color: var(--st-green); }

/* Single machine */
.card-single { display: grid; grid-template-columns: 1fr 340px; gap: 26px; }
.card-single h1 { font-size: 32px; line-height: 1.15; font-weight: 800; color: #fff;
  margin: 14px 0 8px; overflow-wrap: break-word; }
.card-main, .card-side { min-width: 0; }
.card-photo { height: 320px; border-radius: var(--st-radius); background-size: cover; background-position: center;
  background-color: var(--st-card-2); display: grid; place-items: center; color: var(--st-muted); margin-bottom: 16px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--st-border); }
.spec-table th { color: var(--st-muted); font-weight: 600; width: 45%; }
/* мини-кнопка геолокации в строке «Расстояние» карточки машины */
.st-geo-mini { margin-left: 8px; font: inherit; font-size: 12px; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--st-border); background: var(--st-card-2);
  color: var(--st-primary); cursor: pointer; }
.st-geo-mini:hover { border-color: var(--st-primary); }

/* превью карты в «Характеристиках» карточки + модалка с большой картой (Б11) */
.st-loc-cell { position: relative; }
.st-map-preview { position: relative; display: block; width: 100%; height: 170px; padding: 0;
  background: #0e141b; border: 1px solid var(--st-border); border-radius: var(--st-radius, 12px);
  overflow: hidden; cursor: pointer; }
.st-map-preview .leaflet-container { pointer-events: none; background: #0e141b; }
.st-map-preview:hover { border-color: var(--st-primary); }
.st-map-preview:focus-visible { outline: 2px solid var(--st-primary); outline-offset: 2px; }
.st-map-hint { position: absolute; right: 8px; bottom: 8px; z-index: 500; pointer-events: none;
  background: rgba(10, 13, 17, 0.85); border: 1px solid var(--st-border); color: #fff;
  font-size: 11px; padding: 4px 9px; border-radius: 999px; }
.st-loc-coords { display: block; margin-top: 6px; color: var(--st-muted); font-size: 12px; }

.st-map-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center;
  justify-content: center; padding: 24px; background: rgba(4, 6, 9, 0.78); backdrop-filter: blur(3px); }
.st-map-modal[hidden] { display: none; }
.st-map-modal-card { display: flex; flex-direction: column; width: min(960px, 100%);
  height: min(76vh, 640px); background: var(--st-card); border: 1px solid var(--st-border);
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.st-map-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--st-border); color: #fff; font-size: 14px; }
.st-map-close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--st-border);
  background: var(--st-card-2); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.st-map-close:hover { border-color: var(--st-primary); color: var(--st-primary); }
.st-map-full { flex: 1 1 auto; min-height: 0; }
.st-map-full .leaflet-container { background: #0e141b; }
.price { color: var(--st-primary); font-weight: 700; }
.card-side .actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.btn-call { background: var(--st-green); color: #06210f; }
.btn-call:hover { background: #16a34a; color: #06210f; }
.btn-whatsapp { background: #22c55e; color: #06210f; }
.btn-review { background: var(--st-primary); color: #0b0e11; }
.btn-reserve { background: var(--st-card-2); color: var(--st-muted); border: 1px dashed var(--st-border); cursor: not-allowed; }
.driver-box { background: var(--st-card); border: 1px solid var(--st-border); border-radius: var(--st-radius); padding: 14px 16px; }
.driver-box .name { font-weight: 700; color: #fff; margin-bottom: 4px; }
.driver-box .meta { color: var(--st-muted); font-size: 13px; }
.driver-box .rating { color: var(--st-primary); }
.meta { color: var(--st-muted); }

/* Footer */
.site-footer { background: var(--st-bg-2); border-top: 1px solid var(--st-border); padding: 24px 0; margin-top: 30px; color: var(--st-muted); font-size: 14px; }

/* Vacancies (Б8) */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 32px; color: #fff; margin: 0 0 6px; }
.page-sub { color: var(--st-muted); margin: 0; }
.st-empty { color: var(--st-muted); padding: 40px 0; text-align: center; }
.vacancy-list { display: flex; flex-direction: column; gap: 16px; padding-bottom: 30px; }
.vacancy-card { background: var(--st-card); border: 1px solid var(--st-border); border-radius: var(--st-radius); padding: 18px 20px; transition: border-color .15s; }
.vacancy-card:hover { border-color: var(--st-primary); }
.vacancy-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.vacancy-card__title { font-size: 20px; margin: 0; }
.vacancy-card__title a { color: #fff; text-decoration: none; }
.vacancy-card__title a:hover { color: var(--st-primary); }
.vacancy-card__date { color: var(--st-muted); font-size: 13px; white-space: nowrap; }
.vacancy-card__meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.vacancy-meta-item { color: var(--st-muted); font-size: 14px; }
.vacancy-card__excerpt { color: var(--st-muted); margin: 0 0 12px; }
.btn-vacancy { display: inline-block; color: var(--st-primary); font-weight: 600; text-decoration: none; }
.btn-vacancy:hover { text-decoration: underline; }
.vacancy-single { padding-bottom: 30px; max-width: 760px; }
.vacancy-single__meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.vacancy-single__lead { font-size: 17px; color: #fff; margin: 0 0 22px; }
.vacancy-section { background: var(--st-card); border: 1px solid var(--st-border); border-radius: var(--st-radius); padding: 18px 20px; margin-bottom: 16px; }
.vacancy-section h2 { font-size: 18px; color: var(--st-primary); margin: 0 0 10px; }
.vacancy-section__body { color: var(--st-text); }
.vacancy-section__body p { margin: 0 0 8px; }
.vacancy-section__body p:last-child { margin-bottom: 0; }
.vacancy-contacts .vacancy-section__body { color: #fff; font-weight: 600; }
.btn-back { display: inline-block; color: var(--st-muted); text-decoration: none; margin-top: 8px; }
.btn-back:hover { color: #fff; }

/* ====================================================================
   Адаптив — контрольные ширины:
   1200 → 998 → 767 → 660 → 515 → 480 → 380
   (структура, размеры текста, жирность, интерлиньяж, паддинги/марджины)
   ==================================================================== */

@media (max-width: 1200px) {
  /* контейнер и раскладка каталога под уже */
  .st-wrap { padding: 0 16px; }
  .hero h1 { font-size: 46px; }
  .card-single { grid-template-columns: 1fr 300px; gap: 20px; }
  .stats-grid { padding: 22px 16px; gap: 16px; }

  .st-catalog-form { --cat-panel-w: 284px; }
  .cat-overlay { inset: 12px; gap: 10px; }
}

@media (max-width: 998px) {
  /* узкий десктоп/планшет: одна колонка + каталог переходит в поток */
  .hero-grid, .card-single { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero-sub { max-width: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { max-width: 560px; }

  /* карта сверху, панели и служебные блоки потоком под ней */
  .st-catalog-form { height: auto; min-height: 0; overflow: visible; }
  .catalog-map { position: relative; inset: auto; height: 50vh; min-height: 320px;
    border-bottom: 1px solid var(--st-border); }
  .cat-overlay { position: static; display: block; inset: auto; padding: 14px; pointer-events: auto; }
  .cat-overlay > * { max-width: none; margin-bottom: 14px; }
  .cat-overlay > *:last-child { margin-bottom: 0; }
  .cat-live-pill { display: none; }
  .cat-panel { max-height: none; }
  .cat-panel-body { overflow: visible; }
  .st-catalog-form .leaflet-right { right: 8px; }
  /* карточка поверх списка: даём панели высоту под карточку */
  .cat-detail-body:has(.cat-detail-view:not([hidden])) { min-height: 68vh; }
}

@media (max-width: 767px) {
  /* первая телефонная ступень: типографика и воздух */
  .st-wrap { padding: 0 14px; }
  .section { padding: 30px 0; }
  .section-title { font-size: 24px; margin-bottom: 16px; }
  .page-header h1 { font-size: 26px; }
  .card-single h1 { font-size: 26px; }
  .page-sub { font-size: 14px; }

  .site-branding { font-size: 19px; }
  .main-nav { gap: 16px; }

  .hero { min-height: 0; }
  .hero-overlay { padding: 30px 0; }
  .hero h1 { font-size: 34px; margin: 14px 0 12px; }
  .hero-sub { font-size: 15px; }
  .hero-pill { font-size: 12px; }
  .hero-trust { margin-top: 18px; font-size: 13px; }
  .hero-card-photo { height: 180px; }
  .hero-card h3 { font-size: 18px; }

  .stats-grid { padding: 16px 14px; gap: 14px; }
  .stat { gap: 10px; }
  .stat-ico { font-size: 24px; }
  .stat b { font-size: 21px; }
  .stat span { font-size: 12px; }

  .machine-card .thumb { height: 120px; }
  .machine-card h3 { font-size: 14px; }
  .card-photo { height: 240px; }

  .cat-overlay { padding: 12px; }
  .cat-panel-head { padding: 12px 14px; }
  .cat-panel-head h2 { font-size: 16px; }
  .cat-panel-body { padding: 12px 14px 14px; }
  .md-photo { height: 156px; }
  .md-title { font-size: 18px; }
  .md-price { font-size: 24px; }
  .md-specs li { padding: 8px 0; }

  .vacancy-card { padding: 16px; }
  .vacancy-card__title { font-size: 18px; }
  .vacancy-section { padding: 16px; }
  .vacancy-single { max-width: none; }

  /* iOS зумит поле при фокусе, если шрифт < 16px */
  .cat-field input, .cat-field select, .cat-radius-box input,
  .review-form input, .review-form select, .review-form textarea { font-size: 16px; }
}

@media (max-width: 660px) {
  /* компактный телефон: шапка в узкий режим, плотность выше */
  body { line-height: 1.5; }
  .st-wrap { padding: 0 12px; }

  .site-header .st-wrap { min-height: 56px; }
  .site-branding { font-size: 18px; }
  .main-nav { display: none; }
  .btn-telegram { padding: 8px 12px; font-size: 13px; border-radius: 8px; }

  .section { padding: 26px 0; }
  .section-title { font-size: 22px; }
  .page-header h1 { font-size: 24px; }
  .card-single h1 { font-size: 24px; }

  .hero-overlay { padding: 24px 0; }
  .hero h1 { font-size: 30px; }
  .hero-card-photo { height: 168px; }

  .stats-grid { padding: 14px 12px; gap: 12px; }
  .stat b { font-size: 19px; }

  .cat-overlay { padding: 10px; }
  .cat-overlay > * { margin-bottom: 10px; }
  .cat-list-item { grid-template-columns: 42px 1fr auto; gap: 9px; padding: 8px 12px; }
  .md-photo { height: 148px; }
  .md-title { font-size: 17px; }
  .md-price { font-size: 22px; }

  .machine-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .vacancy-card { padding: 14px; }
  .vacancy-card__meta { gap: 10px; }
  .vacancy-section { padding: 14px; }
  .review { padding: 12px 14px; }
  .review-form { padding: 14px; }
  .spec-table th, .spec-table td { padding: 8px; }

  /* панели каталога: «Фильтры» свёрнуты по составу — видны первые блоки
     ЦЕЛИКОМ (поиск, сортировка, гео, радиус), хвост скрыт до разворота;
     «Ближайшие к вам» — по высоте 30vh (список обрезается естественно) */
  .cat-panel { transition: max-height .25s ease; }
  .cat-panel:not(.is-open) { max-height: 30vh; }
  .cat-panel.is-open { max-height: none; }
  .cat-filters:not(.is-open) { max-height: none; }
  .cat-filters:not(.is-open) .cat-radius-box ~ * { display: none; }
  /* открытая карточка внутри свёрнутой панели: не ломаем обрез иначе кнопка уедет */
  .cat-panel:not(.is-open) .cat-detail-body:has(.cat-detail-view:not([hidden])) { min-height: 0; }
  .cat-panel-toggle { display: flex; align-items: center; justify-content: center; gap: 6px;
    flex: 0 0 auto; width: 100%; padding: 11px 10px; font: inherit; font-size: 13px; font-weight: 700;
    color: var(--st-primary); background: var(--st-card); border: 0;
    border-top: 1px dashed var(--st-border); cursor: pointer; }
  .cat-panel-toggle::after { content: '↓'; font-size: 12px; }
  .cat-panel.is-open .cat-panel-toggle { border-top-style: solid; }
  .cat-panel.is-open .cat-panel-toggle::after { content: '↑'; }
  .cat-panel-toggle:hover { color: var(--st-primary-dark); }
}

@media (max-width: 515px) {
  /* типовой телефон: 1 колонка контента, крупные тапы, широкие кнопки */
  .hero h1 { font-size: 28px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { display: none; }

  .machine-grid { grid-template-columns: 1fr; }
  .wt-tiles { grid-template-columns: repeat(2, 1fr); }
  .w-segs { grid-template-columns: repeat(2, 1fr); }

  .vacancy-card__head { flex-wrap: wrap; gap: 4px 10px; }
  .site-footer { padding: 20px 0; margin-top: 24px; font-size: 13px; }
}

@media (max-width: 480px) {
  /* узкий телефон: минимальные размеры текста, плотные карточки */
  body { line-height: 1.45; }
  .st-wrap { padding: 0 10px; }

  .site-header .st-wrap { min-height: 52px; }
  .site-branding { font-size: 17px; }
  .btn-telegram { padding: 7px 10px; font-size: 12px; }

  .section { padding: 22px 0; }
  .section-title { font-size: 20px; }
  .page-header h1 { font-size: 22px; }
  .card-single h1 { font-size: 22px; }
  .page-sub { font-size: 13px; }

  .hero-overlay { padding: 20px 0; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 14px; margin-bottom: 18px; }
  .hero-pill { font-size: 12px; padding: 5px 12px; }
  .hero-card-photo { height: 158px; }
  .hero-card h3 { font-size: 17px; }

  .stats-grid { padding: 14px 10px; gap: 10px; }
  .stat b { font-size: 18px; }

  .badge { font-size: 11px; padding: 3px 8px; }
  .machine-card .thumb { height: 110px; }
  .machine-card h3 { font-size: 14px; }
  .card-photo { height: 200px; margin-bottom: 12px; }

  .cat-panel-head { padding: 11px 12px; }
  .cat-panel-head h2 { font-size: 15px; }
  .cat-panel-body { padding: 11px 12px 12px; }
  .cat-chip { padding: 7px 10px; font-size: 12px; }
  .cat-list-item { grid-template-columns: 40px 1fr auto; padding: 8px 10px; }
  .cli-title { font-size: 13px; }
  .cli-price { font-size: 13px; }
  .md-photo { height: 140px; }
  .md-title { font-size: 16px; }
  .md-price { font-size: 20px; }
  .md-rating { margin-bottom: 10px; }

  .spec-table th, .spec-table td { font-size: 13px; padding: 7px 6px; }
  .btn { padding: 11px 16px; font-size: 14px; }
  .vacancy-card { padding: 13px; }
  .vacancy-card__title { font-size: 17px; }
  .vacancy-section { padding: 13px; }
  .vacancy-section h2 { font-size: 16px; }
  .vacancy-single__lead { font-size: 15px; }
  .st-empty { padding: 30px 0; }
}

@media (max-width: 380px) {
  /* минимальные экраны (320–380) */
  .st-wrap { padding: 0 8px; }
  .site-branding { font-size: 16px; }
  .btn-telegram { padding: 7px 9px; }

  .section { padding: 20px 0; }
  .section-title { font-size: 19px; }
  .page-header h1 { font-size: 20px; }
  .card-single h1 { font-size: 20px; }

  .hero h1 { font-size: 24px; }
  .hero-sub { font-size: 13px; }
  .stats-grid { grid-template-columns: 1fr; padding: 14px 8px; }
  .stat b { font-size: 18px; }

  .catalog-map { height: 40vh; min-height: 260px; }
  .cat-overlay { padding: 8px; }
  .cat-overlay > * { margin-bottom: 8px; }
  .cat-list-item { grid-template-columns: 38px 1fr auto; gap: 8px; }
  .cli-thumb { width: 38px; height: 38px; }
  .wt-tile-in { min-height: 68px; font-size: 10px; }
  .wt-ico { font-size: 17px; }
  .md-photo { height: 130px; }
  .machine-card .thumb { height: 100px; }
  .card-photo { height: 170px; }
  .hero-card-photo { height: 150px; }
  .btn { padding: 10px 14px; }
}
#st-radius-input{

      padding: 4px 11px;
}

.cat-radius-box{
    margin-top:15px;
}