:root {
  --bg: #F6F5F0;
  --surface: #FFFFFF;
  --panel: #FBFAF6;
  --ink: #1C2541;
  --ink-soft: #5B6178;
  --nav-bg: #1C2541;
  --nav-ink: #F6F5F0;
  --accent: #C1442D;
  --accent-hover: #9E3620;
  /* акцент на тёмно-синем фоне шапки (.RS в логотипе) — светлее, для контраста */
  --accent-on-nav: #E35A43;
  --gold: #E3A857;
  --gold-hover: #D4953F;
  --border: #E4E1D6;
  --photo-bg: #EDEBE3;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 37, 65, 0.06), 0 8px 24px rgba(28, 37, 65, 0.06);
  --shadow-hover: 0 4px 8px rgba(28, 37, 65, 0.08), 0 16px 32px rgba(28, 37, 65, 0.1);
  /* контент — 95% ширины окна (раньше фиксированные 1200px оставляли
     пустые поля по бокам); потолок — для очень широких мониторов */
  --wrap-width: 95%;
  --wrap-max: 2400px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

/* иконки Lucide (inline SVG, цвет — currentColor) */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.8;
}

/* ---------- layout ---------- */

/* подвал прижат к низу и на короткой странице */
main.wrap { flex: 1 0 auto; }

.wrap {
  width: var(--wrap-width);
  max-width: var(--wrap-max);
  margin: 0 auto;
}

.page-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0 40px;
  align-items: start;
}

.content { min-width: 0; }

.content-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------- шапка ---------- */

.top-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
}

.test-mode-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
}

.topnav {
  position: relative;
  background: var(--nav-bg);
  color: var(--nav-ink);
  /* место под полосу узора пиротского ковра (::after) */
  padding-bottom: 14px;
}

.topnav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: url("../icons/brand/kilim.e22a0ea85ea5.svg") repeat-x left center / 28px 14px;
}

.topnav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: var(--wrap-width);
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 18px 0 16px;
}

.nav-spacer { flex: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--nav-ink);
  white-space: nowrap;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  /* иконка того же цвета, что шапка, — тонкая обводка отделяет её от фона */
  box-shadow: 0 0 0 1px rgba(246, 245, 240, 0.22);
  flex-shrink: 0;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.brand-word {
  display: inline-flex;
  align-items: flex-end;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-tld { color: var(--accent-on-nav); }

/* слива (шљива) вместо точки в «.RS» */
.brand-plum {
  width: 0.62em;
  height: 0.78em;
  margin: 0 0.03em -0.02em 0.05em;
}

/* две полоски под надписью — красная и белая, как во флаге */
.brand-rule {
  display: block;
  height: 6px;
  background:
    linear-gradient(#C6363C, #C6363C) top / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) bottom / 100% 2px no-repeat;
}

.brand-tagline {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #C9CDD8;
  white-space: nowrap;
}

.btn-post {
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(193, 68, 45, 0.35);
  transition: background 0.15s ease;
}

.btn-post:hover { background: var(--accent-hover); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-link {
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 1.45rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.lang-link:hover { opacity: 1; }

.lang-link.active {
  opacity: 1;
  background: rgba(246, 245, 240, 0.14);
}

/* строка поиска */

.topnav-search {
  width: var(--wrap-width);
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 0 20px;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr) auto;
  gap: 10px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink-soft);
  cursor: text;
}

.search-field:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.search-field input,
.search-field select {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.search-field input::placeholder { color: var(--ink-soft); opacity: 0.85; }

.search-field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.search-field--city { position: relative; }
.search-field--city .lucide-chevron-down,
.search-field--city .icon:last-child { pointer-events: none; }

.search-submit {
  height: 50px;
  padding: 0 34px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: var(--nav-bg);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-submit:hover { background: var(--gold-hover); }

/* ---------- категории (левая панель) ---------- */

.cat-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 12px 14px;
}

.panel-title {
  font-size: 1.1rem;
  margin: 0 10px 12px;
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.cat-link .icon { width: 22px; height: 22px; }

.cat-name { line-height: 1.3; }

.cat-count {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.cat-link:hover { background: rgba(28, 37, 65, 0.05); }

.cat-link.active {
  background: var(--ink);
  color: #fff;
}

.cat-link.active .cat-count { color: rgba(255, 255, 255, 0.7); }

/* ---------- заголовок раздела, подкатегории ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.6rem;
  margin: 0;
}

.subcat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.subcat {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.88rem;
  white-space: nowrap;
}

.subcat:hover { border-color: var(--ink); color: var(--ink); }
.subcat.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- подписка на поиск (бот присылает новые объявления) ---------- */

.section-head { align-items: center; flex-wrap: wrap; }
.subscribe-form { margin: 0; }
.subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.subscribe-btn:hover { background: var(--ink); color: #fff; }
.subscribe-form--big { margin-top: 20px; }
.subscribe-form--big .subscribe-btn {
  padding: 12px 22px;
  border-color: var(--gold);
  background: var(--gold);
  font-size: 0.98rem;
}
.subscribe-form--big .subscribe-btn:hover { background: var(--gold-hover); color: var(--ink); }
.subscribe-hint { max-width: 420px; margin: 10px auto 0; font-size: 0.88rem; }

/* ---------- рекламный блок AdSense ---------- */

.adsense-block {
  width: 100%;
  margin: 0 0 16px;
}

.adsense-block--bounded {
  margin-left: auto;
  margin-right: auto;
}

.adsense-block amp-ad {
  display: block;
  min-height: 320px;
  background: rgba(28, 37, 65, 0.03);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ---------- VIP-объявления (платные; пока блок скрыт) ---------- */

.vip-block {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(227, 168, 87, 0.12);
  border: 1px solid rgba(227, 168, 87, 0.45);
}

.vip-title { font-size: 1.1rem; margin-bottom: 12px; }

.vip-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--gold);
  color: var(--nav-bg);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- карточки объявлений ---------- */

.listing-grid {
  display: grid;
  /* столько колонок, сколько влезает: на широком экране — больше объявлений,
     а не крупнее карточки */
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(28, 37, 65, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.listing-card--vip { border-color: rgba(227, 168, 87, 0.8); }

.listing-card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--photo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-card-photo .placeholder {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.listing-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 6px 6px;
}

.listing-card-title {
  font-weight: 500;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 1.6em;
}

.listing-card-price {
  font-weight: 700;
  font-size: 1.12rem;
  white-space: nowrap;
}

/* языки, на которых продавец готов общаться */
.card-langs {
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
}

.contact-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 12px;
  font-size: 0.92rem;
}

.contact-langs-label { color: var(--ink-soft); }

.contact-lang {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.listing-card-meta {
  color: var(--ink-soft);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-card-meta .dot { margin: 0 6px; }

/* ---------- страницы списка, пусто ---------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 28px 0 4px;
  flex-wrap: wrap;
}

.pagination a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
}

.pagination a:hover { border-color: var(--ink); }
.pagination-current { color: var(--ink-soft); font-size: 0.92rem; }

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-soft);
}

.empty-state h3 { color: var(--ink); margin-bottom: 8px; }

/* ---------- фильтры транспорта ---------- */

.vehicle-filter {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 18px;
}

.vehicle-filter select,
.vehicle-filter input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  min-width: 0;
}

.vehicle-filter .filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vehicle-filter button {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.vehicle-filter button:hover { background: var(--accent); }
.vehicle-filter .filter-reset { color: var(--ink-soft); font-size: 0.88rem; text-decoration: underline; }

/* ---------- страница объявления ---------- */

.listing-detail {
  margin: 24px 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
}

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--photo-bg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-main .placeholder { color: var(--ink-soft); }

/* объявление без фото: картинка раздела + пометка «Без фото» */
.listing-card-photo, .gallery-main { position: relative; }
.no-photo {
  position: absolute;
  /* снизу по центру, над полосой-орнаментом: там на всех картинках разделов пусто */
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
}
.gallery-main .no-photo { font-size: 0.85rem; }
@media (max-width: 600px) {
  .listing-card-photo .no-photo { font-size: 0.66rem; padding: 3px 8px; bottom: 8%; }
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.gallery-thumbs a { display: block; flex-shrink: 0; }

.gallery-thumbs img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  display: block;
}

.gallery-thumbs a:hover img { border-color: var(--border); }
.gallery-thumbs img.active { border-color: var(--accent); }

.listing-detail-title { font-size: 1.8rem; margin-bottom: 10px; }
.listing-detail-delivery { margin: -6px 0 14px; font-weight: 500; color: var(--ink); }

.listing-detail-price-city {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.listing-detail-price {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--ink);
}

.listing-detail-city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
}

.listing-detail-desc {
  white-space: pre-line;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hashtag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* «хлебные крошки» над объявлением: Главная › Авто › Легковые */
.ad-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 20px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.ad-crumbs + .listing-detail { margin-top: 12px; }
.ad-crumbs a { color: var(--ink-soft); }
.ad-crumbs a:hover { color: var(--accent); text-decoration: underline; }
.ad-crumbs a:last-child { color: var(--ink); font-weight: 600; }
.meta-line a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.meta-line a:hover { color: var(--accent); }
a.hashtag { text-decoration: none; transition: background 0.15s ease; }
a.hashtag:hover { background: rgba(193, 68, 45, 0.16); }

.hashtag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(193, 68, 45, 0.08);
  border: 1px solid rgba(193, 68, 45, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* язык, на котором написано объявление (не путать с языками связи) */
.ad-lang {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
  margin-left: 4px;
}

.specs-box,
.contact-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.specs-box .label { font-weight: 600; margin-bottom: 8px; }

.specs-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 0.93rem;
}

.specs-list dt { color: var(--ink-soft); }
.specs-list dd { margin: 0; font-weight: 500; }

.contact-box .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.contact-box .value { font-weight: 600; font-size: 1.05rem; }

.btn-contact {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: background 0.15s ease;
}

.btn-contact:hover { background: var(--accent-hover); }

.contact-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.meta-line {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- объявление снято ---------- */

.gone { margin: 24px 0 40px; }
.gone-head { margin-bottom: 24px; }
.gone-title { font-weight: 600; margin: 4px 0; }
.gone-text { color: var(--ink-soft); margin: 4px 0 0; }
.gone-similar-title { font-size: 1.2rem; margin-bottom: 14px; }
.gone-more { margin: 28px 0 0; text-align: center; }
.gone-more .btn-post { display: inline-block; }

/* ---------- текстовые страницы (подвал) ---------- */

.text-page {
  max-width: 820px;
  margin: 24px auto 40px;
}

.text-page .section-title { margin-bottom: 16px; }

/* ---------- гайды ---------- */
.guides-lead, .guide-summary { color: var(--ink-soft); font-size: 1.05rem; margin: -6px 0 22px; max-width: 65ch; }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.guide-card { display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); transition: border-color 0.15s ease; }
.guide-card:hover { border-color: var(--ink); }
.guide-card h2 { font-size: 1.2rem; margin: 0 0 6px; text-wrap: balance; }
.guide-card p { color: var(--ink-soft); margin: 0 0 8px; }
.guide-more { color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.guide-crumbs { margin-bottom: 10px; font-size: 0.9rem; }
.guide-crumbs a { color: var(--ink-soft); }
.guide-related { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.guide-related h2, .related-guides h2 { font-size: 1.05rem; margin: 0 0 10px; }
.guide-sources { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.guide-sources ul { margin: 0; padding-left: 1.2em; font-size: 0.92rem; }
.guide-sources li { margin-bottom: 4px; }
.guide-sources a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.guide-updated { margin-top: 22px; font-size: 0.85rem; color: var(--ink-soft); }
.related-guides { margin-top: 24px; padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.related-guides a { font-weight: 600; }
.related-guides a:hover { color: var(--accent); }
.text-page-body { line-height: 1.7; }
.text-page-body p { margin: 0 0 1em; }
.text-page-body h2 { font-size: 1.15rem; margin: 1.4em 0 0.5em; }
.text-page-body h2:first-child { margin-top: 0; }
.text-page-body ul { margin: 0 0 1em; padding-left: 1.3em; }
.text-page-body li { margin-bottom: 0.35em; }
.text-page-body li::marker { color: var(--accent); }
.text-page-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.text-page-body a:hover { color: var(--accent-hover); }

.draft-note {
  background: rgba(227, 168, 87, 0.18);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.88rem;
  margin: 0 0 16px;
}

/* ---------- «Факт о Сербии» — полоса над подвалом ---------- */

.fact-strip {
  position: relative;
  background: var(--panel);
  border-top: 1px solid var(--border);
}

/* кромка из узора пиротского ковра, как под шапкой */
.fact-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: #C6363C url("../icons/brand/kilim.e22a0ea85ea5.svg") repeat-y center / 7px 14px;
}

.fact-strip-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 16px;
}

.fact-head {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.fact-text { margin: 0; font-size: 0.93rem; line-height: 1.5; }

.fact-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.fact-foot a { text-decoration: underline; }

.fact-more {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.fact-more:hover { border-color: var(--ink); }

/* ---------- подвал ---------- */

.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.9rem;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 22px;
}

.site-footer-copy { font-weight: 600; }

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.site-footer-links a { color: var(--ink-soft); }
.site-footer-links a:hover { color: var(--ink); text-decoration: underline; }
.site-footer-links a + a::before {
  content: "·";
  margin: 0 10px;
  color: var(--ink-soft);
}

/* ---------- доступность ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- планшет ---------- */

@media (max-width: 1080px) {
  .search-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 0.7fr) auto; }
}

/* ---------- телефон ---------- */

@media (max-width: 860px) {
  .wrap,
  .topnav-inner,
  .topnav-search { width: 100%; padding-left: 16px; padding-right: 16px; }

  .topnav-inner { flex-wrap: wrap; gap: 10px 12px; padding-top: 12px; padding-bottom: 12px; }
  .nav-spacer { display: none; }
  .brand-mark { width: 42px; height: 42px; border-radius: 10px; }
  .brand-word { font-size: 1.6rem; }
  .brand-text { gap: 6px; }
  /* подпись на телефоне не помещается рядом с флагами — прячем */
  .brand-tagline { display: none; }
  .lang-switch { order: 1; margin-left: auto; }
  .btn-post { order: 2; flex: 1 1 100%; text-align: center; padding: 11px 16px; }

  .topnav-search { padding-bottom: 14px; }
  .search-bar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .search-field--query,
  .search-field--city,
  .search-submit { grid-column: 1 / -1; }
  .search-field, .search-submit { height: 46px; }

  .page-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; }

  /* Категорий 20+ — на телефоне одна лента с горизонтальной прокруткой,
     иначе список занимает целый экран до объявлений. */
  .cat-panel { background: transparent; border: 0; padding: 0; }
  .cat-panel .panel-title { display: none; }
  .cat-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .cat-link {
    grid-template-columns: 18px auto auto;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    white-space: nowrap;
  }
  .cat-link .icon { width: 18px; height: 18px; }

  .content-panel { padding: 16px; border-radius: var(--radius); }
  .section-title { font-size: 1.3rem; }

  .listing-detail { grid-template-columns: 1fr; gap: 20px; margin-top: 12px; }
}

@media (max-width: 860px) {
  .fact-strip-inner { grid-template-columns: 1fr; gap: 8px; }
  .fact-foot { justify-content: space-between; }
}

@media (max-width: 600px) {
  /* шапка с поиском на телефоне — почти полэкрана: не держим её прилипшей */
  .top-sticky { position: static; }
  .listing-card-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
  }
  .listing-card-meta { white-space: normal; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .listing-card { padding: 6px; }
  .listing-card-body { padding: 8px 4px 4px; }
  .listing-card-title { font-size: 0.9rem; }
  .listing-card-price { font-size: 1rem; }
  .vehicle-filter { grid-template-columns: 1fr 1fr; }
  .vehicle-filter select { grid-column: 1 / -1; }
}

/* ---------- партнёры (макеты: branding/mockups/partners) ---------- */

.partner-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.partner-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
}
.partner-logo--small { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; }

/* полоса над подвалом */
.partner-strip { border-top: 1px solid var(--border); background: var(--surface); padding: 16px 0; }
.partner-strip-inner { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; }
.partner-strip-list { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0; }
.partner-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.partner-chip:hover { border-color: var(--ink); }
.partner-all { margin-left: auto; font-weight: 600; font-size: 0.85rem; color: var(--accent); white-space: nowrap; }

/* карточка (колонка, страница «Партнёры») */
.partner-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.partner-card-head { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.partner-card-head b { font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif; font-size: 1rem; color: var(--ink); }
.partner-card p { margin: 0 0 12px; font-size: 0.88rem; line-height: 1.45; color: var(--ink-soft); }
.partner-card-btn {
  display: block;
  text-align: center;
  padding: 9px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
}
.partner-card-btn:hover { background: var(--accent); }
.partner-card--mobile { display: none; }
.partner-chip span { white-space: nowrap; }
@media (max-width: 860px) {
  .partner-card--desktop { display: none; }
  .partner-card--mobile { display: block; margin-top: 20px; }
  /* полоса: подпись и «Все партнёры» сверху, партнёры — одной лентой с прокруткой */
  .partner-strip-inner { justify-content: space-between; }
  .partner-strip-list {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .partner-strip-list::-webkit-scrollbar { display: none; }
  .partner-chip { flex: none; }
  .partner-all { margin-left: 0; }
}

/* страница «Партнёры» */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.partners-grid .partner-card { margin-top: 0; }
.partners-join { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.partners-join h2 { font-size: 1.1rem; margin: 0 0 8px; }
.partners-join a { color: var(--accent); text-decoration: underline; }


/* ---------- бесплатная доставка: плашка на фото карточки и пометка в объявлении ---------- */

.free-delivery-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #2F7D4F;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(28, 37, 65, 0.25);
  pointer-events: none;
}
.free-delivery-badge .icon { width: 14px; height: 14px; }
.free-delivery-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(47, 125, 79, 0.1);
  border: 1px solid rgba(47, 125, 79, 0.25);
  color: #2F7D4F;
  font-size: 0.88rem;
  font-weight: 600;
}
.free-delivery-chip .icon { width: 16px; height: 16px; }
@media (max-width: 600px) {
  .free-delivery-badge { font-size: 0.62rem; padding: 4px 8px; top: 7px; left: 7px; gap: 4px; }
  .free-delivery-badge .icon { width: 11px; height: 11px; }
}

/* ---------- наши каналы: значки в шапке, строка в подвале, карточка ---------- */

.brand-icon { width: 20px; height: 20px; flex: none; }

/* шапка — после флажков языков */
.channel-icons { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(246, 245, 240, 0.1);
  border: 1px solid rgba(246, 245, 240, 0.22);
  transition: background 0.15s ease;
}
.channel-icon:hover { background: rgba(246, 245, 240, 0.2); }
.channel-icon--tg { color: #229ED9; }
.channel-icon--vb { color: #7360F2; }

/* подвал */
.footer-channels { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-channels-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.footer-channels-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.footer-channel:hover { border-color: var(--ink); }
.footer-channel .brand-icon { width: 18px; height: 18px; }
.footer-channel--tg .brand-icon { color: #229ED9; }
.footer-channel--vb .brand-icon { color: #7360F2; }

/* карточка «Новые объявления каждый день» */
.channels-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #1C2541;
  color: #F6F5F0;
}
.channels-card b { display: block; font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif; font-size: 1rem; margin-bottom: 4px; }
.channels-card p { margin: 0 0 12px; font-size: 0.86rem; line-height: 1.45; color: #C9CDD8; }
.channels-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  border-radius: 10px;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}
.channels-card-btn .brand-icon { width: 18px; height: 18px; }
.channels-card-btn--tg { background: #229ED9; }
.channels-card-btn--vb { background: #7360F2; }
.channels-card-btn:hover { filter: brightness(1.08); }
.channels-card--mobile { display: none; }

@media (max-width: 860px) {
  .channels-card--desktop { display: none; }
  .channels-card--mobile { display: block; margin-top: 20px; }
  /* шапка: значки сразу после флажков, в той же строке */
  .channel-icons { order: 1; margin-left: -4px; gap: 5px; }
  .channel-icon { width: 31px; height: 31px; }
  .channel-icon .brand-icon { width: 16px; height: 16px; }
  /* флажки чуть плотнее, чтобы значки каналов встали в ту же строку */
  .lang-switch { gap: 2px; }
  .lang-link { padding: 4px; font-size: 1.25rem; }
}
@media (max-width: 440px) {
  /* логотип чуть меньше — флажки и значки каналов умещаются в строку с ним */
  .topnav-inner { gap: 10px 8px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-word { font-size: 1.4rem; }
  /* подвал: подпись — первой строкой, кнопки — второй */
  .footer-channels { flex-direction: column; align-items: flex-start; gap: 8px; }
}
