﻿/* ================================================================
   СпецАвто.ру — Design System 4.0
   Clean & Professional · Orange accent · No blue
   ================================================================ */

/* Inter — self-hosted, no external DNS lookup */
@font-face { font-family:'Inter'; font-style:normal; font-weight:300 800; font-display:swap;
  src:url('../fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:300 800; font-display:swap;
  src:url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:300 800; font-display:swap;
  src:url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Inter'; font-style:normal; font-weight:300 800; font-display:swap;
  src:url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Brand — yellow-orange */
  --orange:       #fcc02d;
  --orange-h:     #e3ad28;
  --orange-d:     #c99923;
  --orange-soft:  #fffbea;
  --orange-mid:   #ffe082;

  /* Grayscale */
  --bg:           #F4F5F7;
  --bg2:          #ECEEF2;
  --surface:      #FFFFFF;
  --border:       #E2E5EB;
  --border-light: #ECEEF2;

  --text:         #0F1117;
  --text-2:       #4B5563;
  --text-3:       #9CA3AF;
  --text-inv:     #FFFFFF;

  /* Status */
  --green:        #16A34A;
  --green-soft:   #DCFCE7;
  --red:          #DC2626;
  --red-soft:     #FEE2E2;
  --yellow:       #D97706;
  --yellow-soft:  #FEF3C7;
  --purple:       #7C3AED;
  --purple-soft:  #EDE9FE;
  --teal:         #0891B2;
  --teal-soft:    #E0F2FE;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.07), 0 0 1px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.14);
  --shadow-hdr: 0 1px 0 rgba(0,0,0,.06), 0 2px 12px rgba(0,0,0,.06);

  /* Radii */
  --r-xs:  4px;  --r-sm: 8px;  --r-md: 12px;
  --r-lg:  16px; --r-xl: 20px; --r-full: 9999px;

  /* Layout */
  --hdr:  66px;
  --max:  1440px;
  --t:    .15s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, textarea, select, button { font: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 768px) { .container { padding: 0 12px; } }

/* ================================================================
   HEADER — white, clean
   ================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 300;
  height: var(--hdr);
  background: var(--surface);
  box-shadow: var(--shadow-hdr);
}
/* Container inside header must fill full height for flex centering */
.site-header > .container {
  height: 100%;
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
}

/* Logo */
.logo {
  font-size: 20px; font-weight: 800; letter-spacing: -.5px;
  color: var(--text); white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.logo-img {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  object-fit: cover; flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  background: var(--orange); color: #111;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 18px; height: 18px; }
.logo-brand { color: var(--text); }
.logo-brand span { color: var(--orange); }

/* ================================================================
   3-LEVEL CASCADING MEGA-MENU
   ================================================================ */

/* ── Categories dropdown button ── */
.cat-btn-wrap { position: relative; flex-shrink: 0; }

.cat-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 0 14px; height: 38px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  background: var(--bg); border: 1.5px solid var(--border);
  cursor: pointer; white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.cat-btn:hover, .cat-btn.open {
  background: var(--orange-soft); border-color: var(--orange); color: var(--orange);
}
.cat-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.cat-btn .chevron {
  width: 14px; height: 14px; margin-left: 2px;
  transition: transform .2s;
}
.cat-btn.open .chevron { transform: rotate(180deg); }

/* ── Mega cascading dropdown ── */
.cat-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  z-index: 400;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97);
  transform-origin: top left;
  transition: opacity .18s, transform .18s, visibility .18s;
  overflow: hidden;
  display: flex;
  min-width: 720px;
  max-height: 520px;
}
.cat-dropdown.open {
  opacity: 1; visibility: visible; transform: none;
}

/* Column 1: Groups */
.cat-col-1 {
  width: 220px; flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  overflow-y: auto; padding: 8px;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cat-col-1::-webkit-scrollbar { width: 3px; }
.cat-col-1::-webkit-scrollbar-thumb { background: var(--border); }

/* Column 2: Categories */
.cat-col-2 {
  width: 230px; flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  overflow-y: auto; padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cat-col-2::-webkit-scrollbar { width: 3px; }
.cat-col-2::-webkit-scrollbar-thumb { background: var(--border); }

/* Column 3: Sub-categories */
.cat-col-3 {
  flex: 1; overflow-y: auto; padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cat-col-3::-webkit-scrollbar { width: 3px; }
.cat-col-3::-webkit-scrollbar-thumb { background: var(--border); }

/* Column header */
.cat-col-hdr {
  font-size: 10px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px;
}

/* "Все категории" all item */
.cat-dd-all-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; color: var(--orange);
  cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px; padding-bottom: 11px;
  transition: background .12s;
}
.cat-dd-all-row:hover { background: var(--orange-soft); border-radius: var(--r-sm); }
.cat-dd-all-row svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Group item (level 1) */
.cat-group-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer; border: none; background: none;
  text-align: left; width: 100%; line-height: 1.3;
  transition: background .12s, color .12s;
  position: relative;
}
.cat-group-item:hover { background: var(--surface); color: var(--text); }
.cat-group-item.active { background: var(--surface); color: var(--orange); }
.cat-group-item .grp-arrow {
  margin-left: auto; width: 14px; height: 14px; flex-shrink: 0;
  color: var(--text-3); opacity: 0;
  transition: opacity .12s;
}
.cat-group-item:hover .grp-arrow,
.cat-group-item.active .grp-arrow { opacity: 1; }
.cat-group-icon {
  width: 30px; height: 30px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--bg2);
  transition: background .12s;
}
.cat-group-icon svg { width: 16px; height: 16px; color: var(--text-3); }
.cat-group-item.active .cat-group-icon { background: var(--orange-soft); }
.cat-group-item.active .cat-group-icon svg,
.cat-group-item:hover .cat-group-icon svg { color: var(--orange); }

/* Category item (level 2) */
.cat-cat-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  cursor: pointer; border: none; background: none;
  text-align: left; width: 100%; line-height: 1.35;
  transition: background .12s, color .12s;
}
.cat-cat-item:hover { background: var(--orange-soft); color: var(--orange); }
.cat-cat-item.active { background: var(--orange-soft); color: var(--orange); font-weight: 600; }
.cat-cat-item .cat-arrow {
  margin-left: auto; flex-shrink: 0; color: var(--text-3);
  opacity: 0; width: 12px; height: 12px;
  transition: opacity .12s;
}
.cat-cat-item:hover .cat-arrow,
.cat-cat-item.active .cat-arrow { opacity: 1; }

/* Sub-category item (level 3) */
.cat-sub-item {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 7px 10px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 400; color: var(--text-2);
  cursor: pointer; border: none; background: none;
  text-align: left; width: 100%; line-height: 1.4;
  transition: background .12s, color .12s;
}
.cat-sub-item:before {
  content: '•'; color: var(--border); flex-shrink: 0;
  margin-top: 1px; font-size: 12px;
}
.cat-sub-item:hover { background: var(--orange-soft); color: var(--orange); }
.cat-sub-item:hover:before { color: var(--orange); }

/* Empty column hint */
.cat-col-hint {
  padding: 20px 10px; text-align: center;
  font-size: 12px; color: var(--text-3); line-height: 1.5;
}
.cat-col-hint svg { width: 28px; height: 28px; margin: 0 auto 8px; opacity: .3; display: block; }

/* OLD dropdown compatibility – keep for fallback */
.cat-dd-all {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px; padding-bottom: 10px; padding-left: 11px;
  color: var(--orange); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; border: none; background: none; width: 100%;
}
.cat-dd-all:hover { background: var(--orange-soft); }

/* Header search */
.hdr-search {
  flex: 1; max-width: 560px;
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-full); overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.hdr-search:focus-within {
  border-color: var(--orange); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(252,192,45,.12);
}
.hdr-search svg { margin: 0 8px 0 14px; flex-shrink: 0; color: var(--text-3); width: 16px; height: 16px; }
.hdr-search input {
  flex: 1; padding: 10px 4px; border: none; outline: none;
  background: transparent; font-size: 14px; color: var(--text);
}
.hdr-search input::placeholder { color: var(--text-3); }
/* Search button — compact icon-only, rounded right */
.hdr-search-btn {
  width: 44px; height: 44px; margin: 0; padding: 0; flex-shrink: 0;
  background: var(--orange); color: #111; border-radius: 0 var(--r-full) var(--r-full) 0;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.hdr-search-btn:hover { background: var(--orange-h); }
.hdr-search-btn svg { width: 16px; height: 16px; margin: 0; }

/* Header right area */
.header-right {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
}
.hdr-btn {
  height: 38px; padding: 0 16px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t), color var(--t), border-color var(--t);
  text-decoration: none; cursor: pointer;
}
.hdr-btn-ghost {
  color: var(--text-2); background: transparent;
  border: 1.5px solid var(--border);
}
.hdr-btn-ghost:hover { background: var(--bg); border-color: var(--text-3); color: var(--text); }
.hdr-btn-post {
  background: var(--orange); color: #111; border: none;
  box-shadow: 0 2px 10px rgba(252,192,45,.3);
  letter-spacing: .1px;
}
.hdr-btn-post:hover { background: var(--orange-h); box-shadow: 0 3px 14px rgba(252,192,45,.4); }
.hdr-btn-post svg { width: 13px; height: 13px; }

/* Icon buttons */
.btn-icon {
  width: 38px; height: 38px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: background var(--t), color var(--t);
  position: relative;
}
.btn-icon:hover { background: var(--bg); color: var(--text-2); }
.btn-icon svg { width: 20px; height: 20px; }
.badge-count {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface); line-height: 1;
}
.badge-count.badge-orange { background: var(--orange); }
/* Messages button: desktop only, hidden on mobile even with !important btn-icon rule */
.hdr-messages-btn { display: flex; }
@media (max-width: 768px) { .header-right .hdr-messages-btn { display: none !important; } }

/* Avatar (legacy) */
.avatar {
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--orange); color: #111;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow var(--t);
}
.avatar:hover { box-shadow: 0 0 0 3px var(--orange-soft); }

/* Profile button — avatar + name + chevron */
.profile-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-full);
  background: transparent; border: 1.5px solid var(--border);
  cursor: pointer; transition: all var(--t);
}
.profile-btn:hover {
  background: var(--bg); border-color: var(--text-3);
}
.profile-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: #111;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-name {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-chevron {
  width: 14px; height: 14px; color: var(--text-3);
  transition: transform .2s; flex-shrink: 0;
}
.header-dropdown:has(.dropdown-menu.open) .profile-chevron { transform: rotate(180deg); }
@media (max-width: 900px) { .profile-name, .profile-chevron { display: none; } }

/* Dropdown */
.header-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px; background: var(--surface);
  border: 1px solid var(--border-light); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl); padding: 6px; z-index: 400;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition: opacity .16s, transform .16s, visibility .16s;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: none; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--text-2); cursor: pointer;
  transition: background var(--t);
}
.dropdown-item:hover { background: var(--bg); color: var(--text); }
.dropdown-item.danger:hover { background: var(--red-soft); color: var(--red); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* Mobile search btn */
.mobile-search-btn {
  display: none;
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--bg); color: var(--text-3);
  border: 1.5px solid var(--border);
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color var(--t);
}
.mobile-search-btn:hover { border-color: var(--orange); color: var(--orange); }
@media (max-width: 768px) { .mobile-search-btn { display: flex; } }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.4);
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-bar {
  background: var(--surface);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-md);
}
.search-overlay-bar input {
  flex: 1; border: none; outline: none; font-size: 16px;
  background: transparent; color: var(--text); padding: 8px 0;
}
.search-overlay-bar input::placeholder { color: var(--text-3); }
.search-overlay-close {
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--bg); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}

/* ================================================================
   FILTER STRIP — slim and clean
   ================================================================ */
.filter-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}
.filter-strip-inner {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 0; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-strip-inner::-webkit-scrollbar { display: none; }
@media (max-width: 768px) {
  .filter-strip-inner { padding: 8px 0; gap: 5px; }
}

/* Type + deal chips */
.fchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; flex-shrink: 0;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.fchip:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.fchip.active { background: var(--orange); border-color: var(--orange); color: #111; }
.fchip.deal-sale.active  { background: var(--green);  border-color: var(--green); }
.fchip.deal-rent.active  { background: var(--purple); border-color: var(--purple); }
.fchip.deal-parts.active { background: var(--yellow); border-color: var(--yellow); }

.fchip-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dot-sale  { background: var(--green); }
.dot-rent  { background: var(--purple); }
.dot-parts { background: var(--yellow); }

.fsep { width: 1px; height: 20px; background: var(--border-light); flex-shrink: 0; }

/* Filter inputs (desktop only with sidebar) */
.fselect {
  padding: 6px 28px 6px 12px; border-radius: var(--r-full);
  border: 1.5px solid var(--border); font-size: 13px; font-weight: 500;
  color: var(--text); background: var(--surface); appearance: none; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5 7L0 2h10z' fill='%239CA3AF'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  cursor: pointer; transition: border-color var(--t); flex-shrink: 0;
}
.fselect:focus { border-color: var(--orange); }

.fprice { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fprice input {
  width: 100px; padding: 6px 10px; border-radius: var(--r-full);
  border: 1.5px solid var(--border); font-size: 13px; outline: none;
  background: var(--surface); transition: border-color var(--t);
}
.fprice input:focus { border-color: var(--orange); }
.fprice span { color: var(--text-3); font-size: 14px; }

/* Sort */
.fsort { margin-left: auto; display: flex; gap: 2px; flex-shrink: 0; }
.fsort-btn {
  padding: 5px 11px; border-radius: var(--r-full); font-size: 12px; font-weight: 500;
  color: var(--text-3); background: transparent; border: none; cursor: pointer;
  transition: color var(--t), background var(--t);
}
.fsort-btn:hover { color: var(--text); background: var(--bg); }
.fsort-btn.active { color: var(--orange); background: var(--orange-soft); }

/* Mobile filter btn */
.fmobile-btn {
  display: none; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: var(--r-full); flex-shrink: 0;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2);
}
.fmobile-btn.active { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }

.freset-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: var(--r-full); flex-shrink: 0;
  font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-3);
  cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t);
}
.freset-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* Desktop: hide machine/city/price from strip (sidebar has them) */
@media (min-width: 1061px) {
  .filter-strip.has-sidebar .fselect,
  .filter-strip.has-sidebar .fprice,
  .filter-strip.has-sidebar .fmobile-btn { display: none !important; }
}
@media (max-width: 768px) {
  .fmobile-btn { display: flex; }
  .fprice, .fselect { display: none; }
}

/* ================================================================
   LISTING LAYOUT (sidebar + content)
   ================================================================ */
.listing-layout {
  display: block;
  padding: 20px 0 56px;
}
.filter-panel { display: none !important; }

/* ── Filter Panel (sidebar) ── */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: sticky;
  top: calc(var(--hdr) + 12px);
  max-height: calc(100vh - var(--hdr) - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.filter-panel::-webkit-scrollbar { width: 3px; }
.filter-panel::-webkit-scrollbar-track { background: transparent; }
.filter-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.fp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.fp-head-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 7px;
}
.fp-head-title svg { color: var(--text-3); width: 15px; height: 15px; }
.fp-reset {
  font-size: 12px; color: var(--red);
  background: none; border: none; cursor: pointer; font-weight: 600; padding: 0;
  display: none; transition: opacity .15s;
}
.fp-reset.visible { display: block; }
.fp-reset:hover { text-decoration: underline; }

.fp-section { padding: 13px 16px; border-bottom: 1px solid var(--border-light); }
.fp-section:last-child { border-bottom: none; }
.fp-title {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 9px;
}

/* Deal options */
.fp-deal-list { display: flex; flex-direction: column; gap: 2px; }
.fp-deal-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; transition: background .12s, color .12s;
}
.fp-deal-btn:hover { background: var(--bg); color: var(--text); }
.fp-deal-btn.active { background: var(--orange-soft); color: var(--orange); font-weight: 600; }
.fp-deal-btn.active.d-sale  { background: var(--green-soft); color: var(--green); }
.fp-deal-btn.active.d-rent  { background: var(--purple-soft); color: var(--purple); }
.fp-deal-btn.active.d-parts { background: var(--yellow-soft); color: var(--yellow); }

.fp-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.fp-dot.all    { background: var(--text-3); }
.fp-dot.sale   { background: var(--green); }
.fp-dot.rent   { background: var(--purple); }
.fp-dot.parts  { background: var(--yellow); }
.fp-dot.demand { background: var(--orange); }

/* Type buttons */
.fp-type-list { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-type-btn {
  padding: 6px 12px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 600; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: all .12s;
}
.fp-type-btn:hover { border-color: var(--orange); color: var(--orange); }
.fp-type-btn.active { background: var(--orange); border-color: var(--orange); color: #111; }

/* Inputs */
.fp-select, .fp-input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; background: var(--surface); color: var(--text); outline: none;
  transition: border-color .15s;
}
.fp-select {
  padding-right: 30px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5 7L0 2h10z' fill='%239CA3AF'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  background-color: var(--surface);
  cursor: pointer;
}
.fp-select:focus, .fp-input:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px rgba(252,192,45,.10);
}
.fp-input::placeholder { color: var(--text-3); }

.fp-price-row {
  display: grid; grid-template-columns: 1fr 14px 1fr;
  align-items: center; gap: 4px;
}
.fp-price-row span { text-align: center; color: var(--text-3); font-size: 12px; }

.fp-apply-wrap { padding: 10px 16px 16px; }
.fp-apply {
  width: 100%; padding: 11px;
  background: var(--orange); color: #111;
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; border-radius: var(--r-sm);
  transition: background .13s;
}
.fp-apply:hover { background: var(--orange-h); }

/* ================================================================
   LISTING GRID
   ================================================================ */
.listing-content { min-width: 0; }
.listing-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: var(--text-3);
}
.listing-header strong { color: var(--text); font-size: 15px; font-weight: 700; }
.listing-header .btn-post {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-full);
  background: var(--orange); color: #111; font-size: 13px; font-weight: 700;
  transition: background var(--t);
}
.listing-header .btn-post:hover { background: var(--orange-h); }
.listing-header .btn-post svg { width: 13px; height: 13px; }

.pub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px; padding-bottom: 16px;
}
/* Grid without sidebar — full width */
.listing-layout .pub-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1440px) { .listing-layout .pub-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .listing-layout .pub-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 768px)  { .listing-layout .pub-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 480px)  { .listing-layout .pub-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ================================================================
   PUBLICATION CARD
   ================================================================ */
.pub-card {
  background: var(--surface); border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  position: relative;
}
.pub-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border);
}

.pub-card__img {
  position: relative; aspect-ratio: 4/3;
  background: var(--bg); overflow: hidden;
}
.pub-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.pub-card:hover .pub-card__img img { transform: scale(1.05); }
.no-photo {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--text-3);
}
.no-photo svg { opacity: .3; }
.no-photo span { font-size: 11px; }

.card-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.cbadge {
  padding: 3px 7px; border-radius: var(--r-xs);
  font-size: 10px; font-weight: 700; line-height: 1.4;
  letter-spacing: .3px; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.cbadge-sale   { background: rgba(22,163,74,.9);  color: #fff; }
.cbadge-rent   { background: rgba(124,58,237,.9); color: #fff; }
.cbadge-parts  { background: rgba(217,119,6,.9);  color: #fff; }
.cbadge-demand { background: rgba(252,192,45,.9);   color: #fff; }

.card-views {
  position: absolute; bottom: 6px; right: 8px;
  font-size: 10px; color: rgba(255,255,255,.95);
  display: flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,.35); border-radius: var(--r-full);
  padding: 2px 7px; backdrop-filter: blur(4px);
}
.card-views svg { width: 11px; height: 11px; }

.btn-fav {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: var(--r-full);
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-3); transition: all .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.btn-fav:hover { background: #fff; color: var(--red); transform: scale(1.12); }
.btn-fav.active { color: var(--red); }
.btn-fav svg { width: 14px; height: 14px; }

.pub-card__body {
  padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column;
}
.pub-card__title {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; transition: color var(--t);
}
.pub-card:hover .pub-card__title { color: var(--orange); }
.pub-card__cat {
  font-size: 11px; color: var(--text-3); margin-bottom: 4px;
  display: flex; align-items: center; gap: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pub-card__cat svg { width: 11px; height: 11px; flex-shrink: 0; }
.pub-card__meta {
  font-size: 11px; color: var(--text-3); margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}
.pub-card__meta svg { width: 11px; height: 11px; flex-shrink: 0; }
.pub-card__price {
  font-size: 16px; font-weight: 800; color: var(--orange);
  margin-top: auto; line-height: 1.2;
}
.pub-card__price.neg {
  font-size: 13px; color: var(--text-3); font-weight: 400;
}
.pub-card__price-unit { font-size: 11px; color: var(--text-3); font-weight: 400; }

@media (max-width: 480px) {
  .pub-card__body { padding: 8px 9px 10px; }
  .pub-card__title { font-size: 12px; }
  .pub-card__price { font-size: 14px; }
  .pub-card__cat, .pub-card__meta { display: none; }
}

/* Skeleton */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}

/* Loader */
#scroll-sentinel { text-align: center; padding: 32px 0 48px; }
#scroll-loader { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 14px; }
.loader-dots { display: flex; gap: 5px; }
.loader-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); animation: ldot 1.1s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: .18s; }
.loader-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes ldot {
  0%,80%,100% { transform: scale(.7); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}
#scroll-end p { font-size: 13px; color: var(--text-3); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
  border-radius: var(--r-sm); padding: 10px 20px; cursor: pointer; border: none;
  transition: background var(--t), box-shadow var(--t), transform var(--t);
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-sm  { padding: 7px 14px; font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-round { border-radius: var(--r-full) !important; }

.btn-primary  { background: var(--orange); color: #111; }
.btn-primary:hover  { background: var(--orange-h); }
.btn-orange   { background: var(--orange); color: #111; }
.btn-orange:hover   { background: var(--orange-h); }
.btn-green    { background: var(--green); color: #fff; }
.btn-green:hover    { background: #157A3E; }
.btn-outline  { background: var(--surface); color: var(--orange); border: 1.5px solid var(--orange); }
.btn-outline:hover  { background: var(--orange-soft); }
.btn-ghost    { background: var(--surface); color: var(--text-2); border: 1.5px solid var(--border); }
.btn-ghost:hover    { background: var(--bg); border-color: var(--text-3); color: var(--text); }
.btn-danger   { background: var(--red-soft); color: var(--red); border: 1.5px solid #FECACA; }
.btn-danger:hover   { background: #FCDBD8; }
.btn-secondary { background: var(--bg); color: var(--text-2); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--bg2); }

/* Compat without .btn prefix */
.btn-primary:not(.btn) {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; line-height: 1;
  border-radius: var(--r-sm); padding: 10px 20px; cursor: pointer; border: none;
  background: var(--orange); color: #111; text-decoration: none; transition: background var(--t);
}
.btn-primary:not(.btn):hover { background: var(--orange-h); }
.btn-secondary:not(.btn) {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; line-height: 1;
  border-radius: var(--r-sm); padding: 9px 18px; cursor: pointer;
  background: var(--bg); color: var(--text-2); border: 1.5px solid var(--border); text-decoration: none;
}
.btn-ghost:not(.btn) {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; line-height: 1;
  border-radius: var(--r-sm); padding: 9px 18px; cursor: pointer;
  background: transparent; color: var(--text-2); border: 1.5px solid var(--border); text-decoration: none;
}
.btn-ghost:not(.btn):hover { background: var(--bg); }
.btn-danger:not(.btn) {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-weight: 600; font-size: 14px; line-height: 1;
  border-radius: var(--r-sm); padding: 9px 18px; cursor: pointer;
  background: var(--red-soft); color: var(--red); border: 1.5px solid #FECACA; text-decoration: none;
}
.btn-loading::after {
  content: ''; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .6s linear infinite; margin-left: 4px; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   FORMS
   ================================================================ */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-label .req { color: var(--orange); }
.form-hint   { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.form-error  { font-size: 12px; color: var(--red); margin-top: 4px; }
.hint        { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.req         { color: var(--orange); margin-left: 2px; }

.form-control, .form-input {
  width: 100%; padding: 10px 14px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  outline: none; transition: border-color var(--t), box-shadow var(--t);
}
.form-control::placeholder, .form-input::placeholder { color: var(--text-3); }
.form-control:focus, .form-input:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px rgba(252,192,45,.10);
}
textarea.form-control, .form-textarea {
  width: 100%; padding: 10px 14px; resize: vertical; min-height: 90px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  outline: none; line-height: 1.5; transition: border-color var(--t), box-shadow var(--t);
}
textarea.form-control:focus, .form-textarea:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px rgba(252,192,45,.10);
}
.select-custom, .form-select {
  width: 100%; padding: 10px 36px 10px 14px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  appearance: none; outline: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%239CA3AF'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-color: var(--surface);
  transition: border-color var(--t);
}
.select-custom:focus, .form-select:focus { border-color: var(--orange); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-option {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); cursor: pointer; font-size: 14px;
  background: var(--surface); transition: border-color var(--t), background var(--t);
}
.radio-option:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.radio-option input { accent-color: var(--orange); }
.check-option {
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; padding: 4px 0;
}
.check-option input { width: 18px; height: 18px; accent-color: var(--orange); cursor: pointer; }

/* ================================================================
   BANNERS CAROUSEL
   ================================================================ */

/* ── Обёртка-карусель: обрезает слайды ── */
.banners-carousel {
  position: relative;
  overflow: hidden;          /* <-- ключевое: слайды не вылезают за пределы */
  width: 100%;
}

/* ── Трек: горизонтальная лента слайдов ── */
.banners-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* ── Слайд: мобиль = 100%, десктоп = 50% (2 в ряд) ── */
.banner-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 16px 0 4px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}
/* Десктоп: 2 баннера одновременно */
@media (min-width: 769px) {
  .banner-slide {
    flex: 0 0 50%;
    min-width: 50%;
    padding-top: 16px;
    padding-bottom: 4px;
  }
  /* Внутренний зазор 12px между парой, внешние края без отступа */
  .banner-slide:nth-child(odd)  { padding-left: 0;  padding-right: 6px; }
  .banner-slide:nth-child(even) { padding-left: 6px; padding-right: 0;  }
}

/* ── Точки-индикаторы ── */
.banners-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 0 2px;
}
.banners-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  background: #d5d5d5;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, width 0.25s;
  /* анимация прогресса для активной точки */
  animation: none;
}
.banners-dot.active {
  width: 28px;
  background: linear-gradient(90deg, var(--clr-primary, #ff6200) 0%, var(--clr-primary, #ff6200) 100%);
  animation: banner-dot-fill 8s linear forwards;
}
@keyframes banner-dot-fill {
  from { background: linear-gradient(90deg, var(--clr-primary,#ff6200) 0%, #d5d5d5 0%); }
  to   { background: linear-gradient(90deg, var(--clr-primary,#ff6200) 100%, #d5d5d5 100%); }
}

/* ── Текстовый баннер внутри слайда ── */
.banner-card {
  flex-shrink: 0; width: 100%; max-width: 800px;
  border-radius: var(--r-lg); padding: 20px 24px;
  display: flex; align-items: center; text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s; min-height: 90px;
}
.banner-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.banner-body { position: relative; z-index: 2; }
.banner-title { font-size: 17px; font-weight: 800; line-height: 1.3; margin-bottom: 5px; }
.banner-desc { font-size: 13px; opacity: .85; line-height: 1.4; margin-bottom: 12px; max-width: 280px; }
.banner-btn {
  display: inline-flex; align-items: center; padding: 7px 16px;
  border: 1.5px solid rgba(255,255,255,.55); border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; transition: background .15s;
}
.banner-btn:hover { background: rgba(255,255,255,.18); }

/* ── Фото-баннер: соотношение 970×250 (leaderboard) ── */
.banner-photo {
  display: block; width: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.banner-photo img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 970 / 250;
  object-fit: cover;
}
.banner-photo:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ================================================================
   MOBILE CATEGORIES SHEET
   ================================================================ */
.mob-cats-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 700; opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.mob-cats-overlay.open { opacity: 1; visibility: visible; }
.mob-cats-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-radius: 20px 20px 0 0;
  max-height: 85vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.mob-cats-overlay.open .mob-cats-sheet { transform: translateY(0); }
.mob-cats-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 12px auto 0; }

.mob-cats-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border-light);
}
.mob-cats-header h3 { font-size: 18px; font-weight: 700; }
.mob-cats-close {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: var(--bg); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

/* List-style items for level 2/3 categories */
.mob-cat-list-item {
  display: block; width: 100%; text-align: left;
  padding: 13px 16px; border-radius: var(--r-md);
  background: var(--bg); border: 1.5px solid transparent;
  font-size: 15px; font-weight: 500; color: var(--text);
  cursor: pointer; transition: all .12s;
}
.mob-cat-list-item:hover { background: var(--orange-soft); border-color: var(--orange-mid); color: var(--orange); }
.mob-cat-list-all { font-weight: 700; color: var(--orange); border-style: dashed; border-color: var(--orange-mid); }
.mob-cat-arrow {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); border: 1.5px solid var(--border);
  font-size: 18px; color: var(--text-3); display: flex; align-items: center;
  justify-content: center; cursor: pointer; padding-bottom: 1px;
}
.mob-cat-arrow:hover { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); }

.mob-cats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 16px 16px 24px;
}
.mob-cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px 12px; border-radius: var(--r-lg);
  background: var(--bg); border: 2px solid transparent;
  cursor: pointer; text-align: center;
  transition: all .15s; text-decoration: none;
}
.mob-cat-item:hover, .mob-cat-item.active {
  background: var(--orange-soft); border-color: var(--orange-mid);
}
.mob-cat-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow-sm);
  transition: background .15s;
}
.mob-cat-item:hover .mob-cat-icon, .mob-cat-item.active .mob-cat-icon {
  background: var(--orange);
}
.mob-cat-item:hover .mob-cat-icon svg,
.mob-cat-item.active .mob-cat-icon svg { color: #fff; }
.mob-cat-icon svg { width: 24px; height: 24px; color: var(--text-3); }
.mob-cat-label {
  font-size: 11px; font-weight: 600; color: var(--text-2);
  line-height: 1.3; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.mob-cat-item:hover .mob-cat-label,
.mob-cat-item.active .mob-cat-label { color: var(--orange); }

/* All categories item spans full row */
.mob-cat-item-all {
  grid-column: 1 / -1;
  flex-direction: row; justify-content: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-full);
  background: var(--orange); border-color: var(--orange);
  margin-bottom: 4px;
}
.mob-cat-item-all .mob-cat-label { color: #fff; font-size: 13px; }
.mob-cat-item-all .mob-cat-icon { background: rgba(255,255,255,.2); box-shadow: none; }
.mob-cat-item-all .mob-cat-icon svg { color: #fff; }

/* ================================================================
   PUBLICATION DETAIL
   ================================================================ */
/* ── Detail page: 4-area CSS grid ── */
.pub-detail { padding: 0 0 64px; }
.pub-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3); margin-bottom: 14px; padding-top: 14px;
}
.pub-breadcrumb a { color: var(--text-3); transition: color var(--t); }
.pub-breadcrumb a:hover { color: var(--orange); }
@media (max-width: 768px) { .pub-breadcrumb { display: none; } }

.pd-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-areas: "gallery info" "content info" "similar similar";
  gap: 20px 28px; align-items: start;
}
.pd-gallery { grid-area: gallery; }
.pd-info    { grid-area: info; position: sticky; top: calc(var(--hdr) + 14px); }
.pd-content { grid-area: content; }
.pd-similar { grid-area: similar; }

/* Mobile: stacked flex with order */
@media (max-width: 1024px) {
  .pd-wrap { display: flex; flex-direction: column; gap: 0; }
  .pd-gallery  { order: 1; }
  .pd-info     { order: 2; position: static; }
  .pd-content  { order: 3; }
  .pd-similar  { order: 4; }
}
@media (max-width: 768px) {
  .pd-info { border-bottom: 6px solid var(--bg2); }
}

/* pd-block: content cards */
.pd-block {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px;
}
@media (max-width: 768px) {
  .pd-block { border-radius: 0; border-left: none; border-right: none; margin-bottom: 8px; }
}
.pd-block-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.pub-photo-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; background: var(--surface);
  border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-3);
}
.pub-gallery-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 220px; background: var(--bg); border-radius: var(--r-lg);
  border: 1px solid var(--border-light); color: var(--text-3); gap: 10px;
}
.pub-gallery-empty p { font-size: 14px; }

.pub-meta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--text-3);
  margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.pub-meta-item { display: flex; align-items: center; gap: 4px; }
.pub-price-neg { font-size: 18px; color: var(--text-3); font-weight: 500; }
.pub-price-unit { font-size: 16px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.pub-phone-row  { margin-bottom: 10px; }
.pub-action-row { display: flex; gap: 8px; }
.pub-fav-btn.fav-active { color: var(--red); border-color: var(--red); background: var(--red-soft); }

/* New pill-style favorites button */
.pub-fav-idle {
  border: 2px solid var(--border); color: var(--text-2);
  background: var(--surface);
  font-weight: 600; font-size: 14px;
  padding: 11px 20px; gap: 8px;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.pub-fav-idle:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.pub-fav-active {
  border: 2px solid var(--red); color: var(--red);
  background: var(--red-soft);
  font-weight: 600; font-size: 14px;
  padding: 11px 20px; gap: 8px;
}
.pub-review-form { margin-top: 16px; padding: 16px; background: var(--green-soft); border-radius: var(--r-lg); border: 1px solid #A7F3C0; }
.pub-review-form-title { font-weight: 700; font-size: 14px; color: var(--green); margin-bottom: 10px; }
.pub-review-done { margin-top: 12px; padding: 12px 14px; background: var(--green-soft); border-radius: var(--r-md); font-size: 13px; color: var(--green); display: flex; align-items: center; gap: 8px; }
.pub-grid-3 { grid-template-columns: repeat(3,1fr) !important; }
@media (max-width: 900px) { .pub-grid-3 { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 500px) { .pub-grid-3 { grid-template-columns: 1fr !important; } }

/* Gallery photo counter overlay */
.gallery-counter {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  pointer-events: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  letter-spacing: .2px;
}

/* Mobile sticky action bar — hidden on desktop */
.mob-action-bar { display: none; }

/* pub-panel (info card) */
.pub-panel {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-xl); padding: 24px;
}
.pub-title {
  font-size: clamp(18px, 2.5vw, 24px); font-weight: 700;
  line-height: 1.3; margin-bottom: 10px; letter-spacing: -.3px;
}
.pub-price {
  font-size: 28px; font-weight: 800; color: var(--orange); margin-bottom: 6px; line-height: 1;
}
.pub-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pub-contacts { background: var(--bg); border-radius: var(--r-lg); padding: 14px; margin-top: 14px; }
.pub-author { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: var(--r-md); margin-top: 10px; }
.pub-author-avatar { width: 42px; height: 42px; border-radius: var(--r-full); background: var(--orange); color: #111; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pub-author-name   { font-size: 14px; font-weight: 600; }
.pub-author-rating { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border-light); border-radius: var(--r-md); overflow: hidden; }
.spec-item  { background: var(--surface); padding: 10px 14px; }
.spec-label { font-size: 11px; color: var(--text-3); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .3px; }
.spec-value { font-size: 14px; font-weight: 600; }
.pub-map { height: 240px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-light); }

.pub-gallery { border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.pub-gallery-main { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.pub-gallery-main img { width: 100%; height: 100%; object-fit: cover; }

/* Gallery nav arrows */
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; width: 40px; height: 40px; border-radius: var(--r-full);
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--t), opacity var(--t), transform var(--t);
  opacity: 1;
}
.gallery-nav:hover { background: rgba(0,0,0,.72); transform: translateY(-50%) scale(1.08); }
.gallery-nav:disabled { opacity: 0 !important; pointer-events: none; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.pub-gallery-thumbs {
  display: flex; gap: 8px; padding: 10px;
  overflow-x: auto; background: var(--surface); border-top: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pub-gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 72px; height: 52px; border-radius: var(--r-xs); overflow: hidden;
  flex-shrink: 0; cursor: pointer; border: 2px solid transparent;
  transition: border-color var(--t);
}
.gallery-thumb.active { border-color: var(--orange); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pub-info { position: sticky; top: calc(var(--hdr) + 16px); }
.pub-panel {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-xl); padding: 24px;
}
.pub-title {
  font-size: clamp(18px, 2.5vw, 24px); font-weight: 700;
  line-height: 1.3; color: var(--text); margin-bottom: 10px; letter-spacing: -.3px;
}
.pub-price {
  font-size: 28px; font-weight: 800; color: var(--orange);
  margin-bottom: 6px; line-height: 1;
}
.pub-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.badge-type {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--r-xs);
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}
.badge-type.badge-offer  { background: var(--orange-soft); color: var(--orange); }
.badge-type.badge-demand { background: var(--purple-soft); color: var(--purple); }
.badge-type.badge-sale   { background: var(--green-soft); color: var(--green); }
.badge-type.badge-rent   { background: var(--purple-soft); color: var(--purple); }
.badge-type.badge-parts  { background: var(--yellow-soft); color: var(--yellow); }
.badge-verified {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-xs);
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFF0E0 100%);
  color: var(--orange); border: 1px solid var(--orange-mid);
}

.pub-contacts {
  background: var(--bg); border-radius: var(--r-lg); padding: 16px; margin-top: 16px;
}
.contact-phone { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; }
.pub-author {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg); border-radius: var(--r-md); margin-top: 12px;
}
.pub-author-avatar {
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: var(--orange); color: #111; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pub-author-name   { font-size: 14px; font-weight: 600; }
.pub-author-rating { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.specs-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border-light);
  border-radius: var(--r-md); overflow: hidden; margin: 20px 0;
}
.spec-item  { background: var(--surface); padding: 10px 14px; }
.spec-label { font-size: 11px; color: var(--text-3); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .3px; }
.spec-value { font-size: 14px; font-weight: 600; }

.pub-map { height: 240px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-light); }
.map-container { height: 280px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-light); }

/* pub-sticky-bar: hidden, kept for compatibility */
.pub-sticky-bar { display: none; }

/* ================================================================
   MOBILE PUBLICATION DETAIL — полный редизайн с нуля
   Этот блок ПОСЛЕ всех desktop-стилей, чтобы побеждать по каскаду
   ================================================================ */
@media (max-width: 768px) {

  /* ── Контейнер и страница ── */
  .pub-detail.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 80px !important; /* под mobile nav */
  }
  .pub-breadcrumb { display: none !important; }

  /* ── ГАЛЕРЕЯ ── */
  .pd-gallery { padding: 0; background: #111; }
  .pub-gallery {
    border-radius: 0 !important; margin: 0 !important;
    width: 100%; overflow: hidden; background: #111;
  }
  .pub-gallery-main {
    aspect-ratio: 4/3; overflow: hidden; position: relative;
  }
  .pub-gallery-main img {
    width: 100%; height: 100%; object-fit: cover; display: block; cursor: default !important;
  }
  /* Скрываем миниатюры и нижнюю строку — свайп + счётчик */
  .pub-gallery-thumbs { display: none !important; }
  .pub-photo-bar      { display: none !important; }

  /* ── ИНФО-ПАНЕЛЬ ── */
  .pd-info { padding: 0 !important; background: var(--surface); }
  .pub-panel {
    background: var(--surface) !important;
    border: none !important; border-radius: 0 !important;
    box-shadow: none !important; padding: 16px 16px 0 !important;
  }
  .pub-badges { margin-bottom: 10px; }

  .pub-title {
    font-size: 18px !important; line-height: 1.35 !important; margin-bottom: 6px !important;
  }
  .pub-price {
    font-size: 26px !important; margin-bottom: 10px !important;
  }
  .pub-meta-row {
    font-size: 12px; gap: 8px;
    margin-bottom: 12px; padding-bottom: 12px;
  }

  /* ── Контакты ── */
  .pub-contacts {
    background: var(--bg) !important; border-radius: 0 !important;
    padding: 12px 16px !important; margin: 0 -16px !important;
    border-top: 1px solid var(--border-light) !important;
    border-bottom: none !important;
  }
  .pub-phone-row { margin-bottom: 10px; }
  .pub-action-row { gap: 8px; flex-wrap: wrap; }
  .pub-action-row .btn { flex: 1; min-width: 120px; }

  /* ── Автор ── */
  .pub-author {
    background: var(--surface) !important; border-radius: 0 !important;
    margin: 0 -16px !important; padding: 12px 16px !important;
    border-top: 1px solid var(--border-light) !important;
  }

  /* ── Кнопка "В избранное" ── */
  .pub-fav-btn {
    margin: 0 -16px !important; border-radius: 0 !important;
    border-left: none !important; border-right: none !important;
    border-top: 1px solid var(--border-light) !important;
    border-bottom: 1px solid var(--border-light) !important;
    padding: 11px 16px !important; font-size: 13px !important;
  }

  /* Форма отзыва */
  .pub-review-form {
    margin: 0 -16px !important; border-radius: 0 !important;
    border-left: none !important; border-right: none !important;
    border-top: none !important;
  }

  /* Разделитель под инфо */
  .pd-info { border-bottom: 8px solid var(--bg) !important; }

  /* ── КОНТЕНТНЫЕ БЛОКИ ── */
  .pd-content { padding: 0 !important; background: var(--bg); }
  .pd-block {
    border-radius: 0 !important; border-left: none !important; border-right: none !important;
    margin-bottom: 8px !important; padding: 16px !important;
  }
  .pd-block-title { font-size: 15px !important; margin-bottom: 12px !important; }

  /* Описание */
  .pd-block p { font-size: 14px !important; line-height: 1.75 !important; }

  /* ── Характеристики: строчный формат ── */
  .specs-grid {
    display: block !important; background: none !important;
    border-radius: 0 !important; overflow: visible !important; margin: 0 !important;
  }
  .spec-item {
    background: transparent !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--border-light) !important;
    display: flex !important; align-items: baseline !important; gap: 8px !important;
  }
  .spec-item:last-child { border-bottom: none !important; }
  .spec-label {
    flex: 0 0 130px !important; font-size: 12px !important; color: var(--text-3) !important;
    text-transform: none !important; letter-spacing: 0 !important; margin-bottom: 0 !important;
  }
  .spec-value { font-size: 14px !important; font-weight: 600 !important; flex: 1 !important; }

  /* ── Карта ── */
  .pub-map {
    height: 220px !important; border-radius: 12px !important;
    border: none !important; overflow: hidden !important;
    margin: 0 0 10px !important;
  }

  /* ── ПОХОЖИЕ ОБЪЯВЛЕНИЯ ── */
  .pd-similar {
    background: var(--surface); border-top: 1px solid var(--border-light);
    padding: 16px 0 24px;
  }
  .pd-similar > h3 {
    padding: 0 16px !important; font-size: 16px !important; margin-bottom: 12px !important;
  }
  /* Похожие: 2 столбца в сетке, без горизонтального скролла */
  .pd-similar .pub-grid,
  .pd-similar .pub-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    flex-direction: unset !important;
    overflow: visible !important;
    overflow-x: visible !important;
    scroll-snap-type: unset !important;
    gap: 10px !important;
    padding: 0 16px 8px !important;
    width: auto !important;
  }
  .pd-similar .pub-card {
    flex: unset !important;
    min-width: 0 !important;
    scroll-snap-align: unset !important;
    width: 100% !important;
    overflow: hidden;
  }
  .pd-similar .pub-card__title { font-size: 12px !important; line-height: 1.3 !important; }
  .pd-similar .pub-card__price { font-size: 13px !important; }
  .pd-similar .pub-card__img { aspect-ratio: 4/3; }

}

/* ================================================================
   CLOSED PUBLICATION BANNER
   ================================================================ */
.pub-closed-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: #f8f8f8; border: 1.5px solid #e0e0e0;
  border-left: 4px solid #9e9e9e;
  border-radius: var(--r-md); padding: 16px 18px;
  margin-bottom: 20px; color: var(--text-2);
}
.pub-closed-banner svg { flex-shrink: 0; margin-top: 1px; color: #9e9e9e; }
.pub-closed-banner strong { display: block; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pub-closed-banner p { font-size: 13px; color: var(--text-3); margin: 0; line-height: 1.5; }

.pub-closed-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #eeeeee; color: #616161;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 3px 9px;
  border-radius: var(--r-full);
}

/* На мобилке баннер растягивается на всю ширину */
@media (max-width: 768px) {
  .pub-closed-banner {
    border-radius: 0; border-left: none; border-right: none;
    margin: 0 0 0 0; padding: 14px 16px;
  }
}

/* ================================================================
   PROFILE / CABINET
   ================================================================ */
.profile-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 24px 0 64px; align-items: start;
}
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; gap: 0; padding: 12px 0 48px; } }

.profile-nav {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-xl); padding: 8px;
  position: sticky; top: calc(var(--hdr) + 12px);
}
.profile-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  text-decoration: none; transition: all var(--t);
}
.profile-nav a:hover { background: var(--bg); color: var(--text); }
.profile-nav a.active { background: var(--orange-soft); color: var(--orange); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--r-full); display: flex; align-items: center; justify-content: center;
  line-height: 1; flex-shrink: 0;
}
.nav-badge.nav-badge-orange { background: var(--orange); }
.profile-main { min-width: 0; }
@media (max-width: 900px) {
  .profile-nav {
    position: static; display: flex; flex-wrap: nowrap;
    overflow-x: auto; gap: 4px; padding: 10px 12px; margin-bottom: 12px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: var(--r-lg);
  }
  .profile-nav::-webkit-scrollbar { display: none; }
  .profile-nav a { white-space: nowrap; }
  .profile-nav a svg { display: none; }
}

/* Status chips */
.status-chip {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: var(--r-full); font-size: 11px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase;
}
.status-chip.status-active     { background: var(--green-soft); color: var(--green); }
.status-chip.status-moderation { background: var(--yellow-soft); color: var(--yellow); }
.status-chip.status-blocked    { background: var(--red-soft); color: var(--red); }
.status-chip.status-closed     { background: var(--bg); color: var(--text-3); }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }

.card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--r-xl); padding: 24px; }
.form-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-xl); padding: 32px;
  max-width: 820px; margin: 0 auto;
}
.form-page { padding: 28px 0 64px; }
.form-title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 24px; }
@media (max-width: 640px) {
  .form-card { padding: 20px 16px; border-radius: var(--r-lg); }
  .form-title { font-size: 18px; }
  .form-page  { padding: 16px 0 48px; }
  input, textarea, select,
  .form-control, .form-input, .form-select, .form-textarea { font-size: 16px !important; }
}

.photo-upload-area, .photo-upload-zone {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all var(--t); background: var(--surface);
}
.photo-upload-area:hover, .photo-upload-zone:hover { border-color: var(--orange); background: var(--orange-soft); }
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photo-preview { width: 90px; height: 70px; border-radius: var(--r-sm); overflow: hidden; position: relative; border: 1px solid var(--border-light); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview__del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: var(--r-full); background: rgba(220,38,38,.9); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; }

/* ================================================================
   MESSAGES / CHAT
   ================================================================ */
/* ================================================================
   MESSENGER (chat page)
   ================================================================ */
.chat-layout {
  display: grid; grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--hdr) - 16px);
  margin: 8px 0 0; border-radius: var(--r-xl);
  overflow: hidden; border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}
/* ── Sidebar ── */
.chat-sidebar {
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border-light);
  overflow-y: auto;
}
.chat-sidebar-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; font-size: 16px; font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.chat-back-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  color: var(--text-2); border: 1px solid var(--border);
}
.chat-back-btn:hover { border-color: var(--orange); color: var(--orange); }
.chat-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, #FF8C42 100%);
  color: #111; font-size: 18px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chat-partner-card { display: flex; align-items: center; gap: 12px; }

/* ── Chat pane ── */
.chat-pane {
  display: flex; flex-direction: column;
  background: #F8F9FB; min-width: 0;
}
.chat-pane-hdr {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  flex-shrink: 0;
}
.chat-back-mob {
  display: none; width: 34px; height: 34px; border-radius: 50%;
  align-items: center; justify-content: center;
  background: var(--bg); color: var(--text-2); flex-shrink: 0;
}

/* ── Messages area ── */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
  scroll-behavior: smooth;
}
.chat-date-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 8px; font-size: 11px; color: var(--text-3);
}
.chat-date-sep::before, .chat-date-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--border-light);
}
.chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; color: var(--text-3); text-align: center;
  padding: 40px 20px;
}
.chat-empty p { font-size: 14px; max-width: 220px; line-height: 1.5; }

/* Message bubbles */
.msg-bubble {
  display: flex; flex-direction: column; max-width: 70%;
  animation: bubbleIn .18s ease;
}
@keyframes bubbleIn { from { opacity:0; transform:translateY(6px) scale(.97); } }
.msg-bubble.mine   { align-self: flex-end; align-items: flex-end; margin-bottom: 2px; }
.msg-bubble.theirs { align-self: flex-start; align-items: flex-start; margin-bottom: 2px; }

.msg-text {
  padding: 10px 14px; font-size: 14px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.msg-bubble.mine   .msg-text {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A28 100%);
  color: #111; border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 8px rgba(252,192,45,.25);
}
.msg-bubble.theirs .msg-text {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.msg-time { font-size: 10px; color: var(--text-3); margin: 3px 4px 6px; }

/* Message images */
.msg-image-wrap { display: block; max-width: 260px; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.msg-image { width: 100%; height: auto; display: block; }
.msg-bubble.mine  .msg-image-wrap { border-radius: 14px 14px 4px 14px; }
.msg-bubble.theirs .msg-image-wrap { border-radius: 14px 14px 14px 4px; }

/* ── Input bar ── */
.chat-input-bar {
  flex-shrink: 0; background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.chat-img-preview {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0 8px; border-bottom: 1px solid var(--border-light); margin-bottom: 8px;
}
.chat-img-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--border); }
.chat-img-clear { width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }
.chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-attach-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-3);
  transition: all .15s;
}
.chat-attach-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.chat-input {
  flex: 1; padding: 9px 14px; border: 1.5px solid var(--border);
  border-radius: 22px; resize: none; max-height: 120px;
  line-height: 1.4; outline: none; font-size: 14px;
  background: var(--bg); transition: border-color var(--t), background var(--t);
}
.chat-input:focus { border-color: var(--orange); background: var(--surface); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #111; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, transform .12s;
  box-shadow: 0 3px 10px rgba(252,192,45,.35);
}
.chat-send-btn:hover { background: var(--orange-h); }
.chat-send-btn:active { transform: scale(.88); }
.chat-send-btn:disabled { opacity: .5; box-shadow: none; }

/* ── Dialogs list ── */
.dialogs-layout {
  max-width: 680px; margin: 20px auto; padding: 0 16px 40px;
}
.dialogs-list { background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--border-light); overflow: hidden; box-shadow: var(--shadow-sm); }
.dialog-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; transition: background var(--t); border-bottom: 1px solid var(--border-light); position: relative; }
.dialog-item:last-child { border-bottom: none; }
.dialog-item:hover { background: var(--bg); }
.dialog-item.unread { background: var(--orange-soft); }
.dialog-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg,var(--orange),#FF8C42); color: #111; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dialog-info { flex: 1; min-width: 0; }
.dialog-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.dialog-preview { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; margin-left: auto; }
.dialog-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .chat-layout {
    grid-template-columns: 1fr;
    margin: 0; border-radius: 0; border: none;
    height: calc(100vh - var(--hdr) - 58px);
  }
  .chat-sidebar { display: none; }
  .chat-back-mob { display: flex; }
  .chat-messages { padding: 12px 12px 8px; }
  .msg-bubble { max-width: 82%; }
}

/* ================================================================
   AUTH
   ================================================================ */
.auth-page {
  min-height: calc(100vh - var(--hdr));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px; background: var(--bg);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 24px; padding: 36px 40px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-xl);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-logo-img { width: 42px; height: 42px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.logo-mark { width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--orange); color: #111; font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.logo-text { font-size: 18px; font-weight: 800; color: var(--text); }
.logo-text span { color: var(--orange); }
.auth-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-card .subtitle { font-size: 14px; color: var(--text-3); margin-bottom: 24px; line-height: 1.5; }
.phone-field { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--r-sm); overflow: hidden; transition: border-color var(--t), box-shadow var(--t); }
.phone-field:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(252,192,45,.10); }
.phone-prefix { padding: 10px 12px; background: var(--bg); font-size: 14px; font-weight: 600; color: var(--text-2); border-right: 1.5px solid var(--border); }
.phone-field input { flex: 1; padding: 10px 14px; border: none; outline: none; font-size: 15px; background: var(--surface); color: var(--text); }
.call-number { font-size: 26px; font-weight: 800; color: var(--orange); text-align: center; margin: 12px 0 4px; letter-spacing: .5px; }
.call-number a { color: inherit; }
.timer-bar-wrap { background: var(--bg); border-radius: var(--r-full); height: 4px; overflow: hidden; margin-bottom: 20px; }
.timer-fill { height: 100%; background: var(--orange); border-radius: var(--r-full); transition: width .9s linear; }
.timer-fill.urgent { background: var(--red); }
.auth-steps { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.auth-step { display: flex; align-items: flex-start; gap: 12px; }
.step-num { width: 26px; height: 26px; border-radius: var(--r-full); background: var(--orange-soft); color: var(--orange); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-text { font-size: 13px; color: var(--text-2); line-height: 1.4; padding-top: 3px; }
.status-box { padding: 12px 16px; border-radius: var(--r-md); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.status-box.waiting { background: var(--orange-soft); color: var(--orange); }
.status-box.success { background: var(--green-soft); color: var(--green); }
.status-box.error   { background: var(--red-soft); color: var(--red); }
.status-spinner { width: 15px; height: 15px; border-radius: var(--r-full); border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; flex-shrink: 0; }
@media (max-width: 480px) {
  .auth-page { align-items: flex-end; padding: 0; }
  .auth-card { border-radius: 20px 20px 0 0; padding: 28px 20px; border: none; border-top: 1px solid var(--border-light); }
}

/* ================================================================
   ADMIN
   ================================================================ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card  { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--r-lg); padding: 18px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-title  { font-size: 22px; font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border-light); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.table-wrap table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border-light); white-space: nowrap; background: var(--bg); }
.table-wrap table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); color: var(--text-2); vertical-align: middle; }
.table-wrap table tr:last-child td { border-bottom: none; }
.table-wrap table tr:hover td { background: var(--bg); }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr !important; } .admin-sidebar { display: none; } .stat-cards { grid-template-columns: repeat(2,1fr); } }

/* ================================================================
   ALERTS / FLASH
   ================================================================ */
.flash, .alert {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.flash-success, .alert-success { background: var(--green-soft); color: var(--green); }
.flash-error,   .alert-error, .alert-danger { background: var(--red-soft); color: var(--red); }
.flash-info,    .alert-info    { background: var(--orange-soft); color: var(--orange); }
.flash-warning, .alert-warning { background: var(--yellow-soft); color: var(--yellow); }

/* ================================================================
   TOAST
   ================================================================ */
.toast-container { position: fixed; bottom: 80px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; background: var(--surface); box-shadow: var(--shadow-xl); pointer-events: all; animation: toastIn .22s ease; max-width: 340px; border: 1px solid var(--border-light); }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }
.toast.success { background: var(--green-soft); border-color: #A7F3C0; color: var(--green); }
.toast.error   { background: var(--red-soft);   border-color: #FECACA; color: var(--red); }
.toast.info    { background: var(--orange-soft); border-color: var(--orange-mid); color: var(--orange); }
@media (max-width: 640px) { .toast-container { right: 12px; left: 12px; bottom: 76px; } .toast { max-width: 100%; } }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state svg { width: 64px; height: 64px; color: var(--text-3); margin: 0 auto 16px; opacity: .4; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }

/* ================================================================
   MOBILE BOTTOM NAV
   ================================================================ */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: rgba(255,255,255,.98); backdrop-filter: blur(20px) saturate(1.8);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
  height: calc(58px + env(safe-area-inset-bottom, 0px));
}
.mobile-nav-inner {
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: 58px; align-items: center;
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0; height: 100%;
  font-size: 0; font-weight: 600; color: var(--text-3);
  text-decoration: none; border: none; background: none; cursor: pointer;
  position: relative; transition: color .15s;
}
.mobile-nav-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.mobile-nav-item.active { color: var(--orange); }
.mobile-nav-item.active svg { filter: drop-shadow(0 0 4px rgba(252,192,45,.3)); }
/* Active indicator dot */
.mobile-nav-item.active::after {
  content: ''; position: absolute; bottom: 6px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--orange);
}
.mobile-nav-post { background: none; padding-top: 0; }
.mobile-nav-post-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-h) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(252,192,45,.5);
  transform: translateY(-4px);
  transition: transform .15s, box-shadow .15s;
}
.mobile-nav-post:active .mobile-nav-post-icon {
  transform: translateY(-2px); box-shadow: 0 2px 8px rgba(252,192,45,.4);
}
.mobile-nav-post::after { display: none; }
.mobile-nav-badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full);
  background: var(--orange); color: #111; font-size: 10px !important; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(252,192,45,.4); z-index: 2;
  line-height: 1;
}
@media (max-width: 768px) {
  .mobile-nav { display: block; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .site-footer { margin-bottom: 58px; }
  :root { --hdr: 54px; }

  /* Mobile header: logo + brand only on left, bell on right */
  .logo-brand { font-size: 17px; }
  .main-nav    { display: none !important; }
  .hdr-search  { display: none; }          /* no search in header */
  .cat-btn-wrap { display: none; }
  .mobile-search-btn { display: none; }    /* no search icon in header */
  .header-right .hdr-btn-ghost { display: none; }
  .header-right .hdr-btn-post  { display: none; }
  .header-right .header-dropdown { display: none; } /* no profile in header */
  .header-right .btn-icon { display: flex !important; }  /* show bell only */
  .header-right { margin-left: auto; gap: 4px; }

  /* Mobile bottom nav — icons only, clean */
  .mobile-nav-badge { top: 8px; }
}

/* ── Mobile sticky search (slides in below header on scroll) ── */
.mob-sticky-search {
  display: none;
  position: fixed; top: var(--hdr); left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 12px;
  z-index: 295;
  transform: translateY(-110%);
  transition: transform .22s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.mob-sticky-search.visible { transform: translateY(0); }
.mob-sticky-form {
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-full); overflow: hidden; height: 40px;
}
.mob-sticky-form svg { margin: 0 8px 0 12px; color: var(--text-3); flex-shrink: 0; }
.mob-sticky-form input {
  flex: 1; padding: 0 4px; border: none; outline: none;
  background: transparent; font-size: 14px; color: var(--text);
}
.mob-sticky-form input::placeholder { color: var(--text-3); }
.mob-sticky-form button {
  width: 40px; height: 40px; background: var(--orange);
  border-radius: 0 var(--r-full) var(--r-full) 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mob-sticky-form button svg { margin: 0; color: #fff; }
@media (max-width: 768px) { .mob-sticky-search { display: block; } }

/* ================================================================
   FILTER DRAWER (mobile)
   ================================================================ */
.fmobile-btn { display: none; }
@media (max-width: 768px) {
  .fmobile-btn { display: flex; }
  .filter-strip-inner { padding: 8px 0; gap: 5px; }
}
.filter-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 600; opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.filter-drawer-overlay.open { opacity: 1; visibility: visible; }
.filter-drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-radius: 20px 20px 0 0;
  z-index: 601; max-height: 90vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.filter-drawer-overlay.open .filter-drawer { transform: translateY(0); }
.filter-drawer-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 12px auto 20px; }
.filter-drawer-content { padding: 0 20px 24px; }
.filter-drawer h3 { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 20px; }

/* ================================================================
   STARS / REVIEWS
   ================================================================ */
.stars { color: var(--orange); font-size: 15px; letter-spacing: 2px; }
.star-rating { display: flex; gap: 4px; cursor: pointer; }
.star-rating .star { font-size: 28px; color: var(--text-3); transition: color var(--t); cursor: pointer; line-height: 1; }
.star-rating .star:hover, .star-rating .star.active { color: var(--orange); }

/* ================================================================
   MISC
   ================================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.create-type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
@media (max-width: 500px) { .create-type-cards { grid-template-columns: 1fr; } }
.create-type-card {
  background: var(--surface); border: 2px solid var(--border-light);
  border-radius: var(--r-xl); padding: 28px 20px; text-align: center;
  cursor: pointer; transition: all .2s; text-decoration: none; display: block;
}
.create-type-card:hover { border-color: var(--orange); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.sep   { height: 1px; background: var(--border-light); margin: 6px 0; }
.divider { height: 1px; background: var(--border-light); margin: 20px 0; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-full); background: var(--orange); color: #111; font-size: 11px; font-weight: 700; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }

/* Scroll to top */
#scroll-top { position: fixed; bottom: 76px; right: 16px; z-index: 400; width: 42px; height: 42px; border-radius: var(--r-full); background: var(--surface); border: 1.5px solid var(--border); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); transition: all var(--t); opacity: 0; pointer-events: none; }
#scroll-top.visible { opacity: 1; pointer-events: all; }
#scroll-top:hover { background: var(--orange); color: #111; border-color: var(--orange); }
@media (max-width: 768px) { #scroll-top { bottom: 70px; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 700; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--surface); border-radius: var(--r-xl); padding: 28px; max-width: 440px; width: 100%; box-shadow: var(--shadow-xl); position: relative; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: var(--r-full); background: var(--bg); color: var(--text-2); display: flex; align-items: center; justify-content: center; }

/* Autocomplete */
.autocomplete-list { border-radius: var(--r-md) !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow-lg) !important; background: var(--surface); }
.ac-item { font-size: 14px; padding: 11px 16px !important; cursor: pointer; min-height: 44px; display: flex; align-items: center; transition: background var(--t); }
.ac-item:hover { background: var(--bg); }

/* ================================================================
   NEWS STRIP (under banner)
   ================================================================ */
.news-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}
.news-strip-inner {
  display: flex; align-items: center; gap: 12px;
  overflow-x: auto; scrollbar-width: none;
}
.news-strip-inner::-webkit-scrollbar { display: none; }
.news-strip-label {
  display: flex; align-items: center; gap-5px; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; flex-shrink: 0;
}
.news-strip-cards {
  display: flex; gap: 8px; flex: 1; min-width: 0;
}
.news-strip-card {
  flex: 1; min-width: 0; max-width: 360px;
  padding: 8px 12px;
  background: var(--bg); border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  transition: border-color var(--t), background var(--t);
}
.news-strip-card:hover { border-color: var(--orange); background: var(--orange-soft); }
.news-strip-date { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.news-strip-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.35; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-strip-all {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: var(--orange);
  white-space: nowrap; padding: 6px 10px;
  border-radius: var(--r-full); border: 1.5px solid var(--orange);
  transition: background var(--t);
}
.news-strip-all:hover { background: var(--orange-soft); }
@media (max-width: 768px) {
  .news-strip-inner { flex-wrap: nowrap; gap: 8px; }
  .news-strip-cards { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .news-strip-cards::-webkit-scrollbar { display: none; }
  .news-strip-card { min-width: 200px; flex-shrink: 0; }
  .news-strip-label { display: none; }
  /* "Все новости" stays right, never overlaps */
  .news-strip-all { flex-shrink: 0; font-size: 12px; padding: 5px 8px; white-space: nowrap; }
}

/* ================================================================
   MOBILE SEARCH BAR (under banner/news, index page only)
   ================================================================ */
.mob-search-bar { display: none; padding: 10px 0 0; }
.mob-search-form {
  display: flex; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-full); overflow: hidden;
  box-shadow: var(--shadow-sm); height: 48px;
}
.mob-search-form svg { margin: 0 8px 0 14px; color: var(--text-3); width: 16px; height: 16px; flex-shrink: 0; }
.mob-search-form input {
  flex: 1; padding: 0 4px; border: none; outline: none;
  background: transparent; font-size: 15px; color: var(--text);
}
.mob-search-form input::placeholder { color: var(--text-3); }
.mob-search-form button {
  width: 48px; height: 48px; background: var(--orange);
  border-radius: 0 var(--r-full) var(--r-full) 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mob-search-form button svg { margin: 0; color: #fff; }
@media (max-width: 768px) { .mob-search-bar { display: block; } }

/* ================================================================
   QUICK CATEGORY CHIPS BAR
   ================================================================ */
.qcat-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}
.qcat-scroll {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.qcat-scroll::-webkit-scrollbar { display: none; }

.qcat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--bg); border: 1.5px solid var(--border);
  white-space: nowrap; flex-shrink: 0;
  transition: all .15s; cursor: pointer;
}
.qcat-chip svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.qcat-chip:hover {
  background: var(--orange-soft); border-color: var(--orange);
  color: var(--orange);
}
.qcat-chip:hover svg { opacity: 1; }
.qcat-chip.active {
  background: var(--orange); border-color: var(--orange);
  color: #111; font-weight: 600;
}
.qcat-chip.active svg { opacity: 1; stroke: #111; }
.qcat-all { gap: 6px; }

/* ================================================================
   BANNER CARD — decorative elements
   ================================================================ */
.banner-deco {
  position: absolute; right: -20px; top: -20px;
  width: 320px; height: 120px; pointer-events: none;
}
.banner-icon {
  position: absolute; right: 24px; bottom: 0;
  width: 120px; height: 75px; pointer-events: none;
}
.banner-body { position: relative; z-index: 2; }

/* Better no-photo */
.no-photo {
  background: linear-gradient(135deg, var(--bg2) 0%, #E0E3EA 100%);
}
.no-photo svg { opacity: .2; }
.no-photo span { font-size: 11px; font-weight: 500; color: var(--text-3); }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { background: #1A1A1A; color: #888; margin-top: 64px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 48px 0 40px; }
@media (max-width: 900px)  { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px)  { .footer-top { grid-template-columns: 1fr; gap: 28px; } }
.footer-logo { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: var(--orange); }
.footer-desc { font-size: 13px; line-height: 1.6; color: #555; max-width: 220px; }
.footer-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 14px;
  padding: 6px 12px; border-radius: var(--r-full);
  background: rgba(255,255,255,.06); color: #888; font-size: 11px; font-weight: 500;
}
.footer-col h4 { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: #555; margin-bottom: 9px; transition: color var(--t); }
.footer-col a:hover { color: #aaa; }
.footer-bottom { border-top: 1px solid #2A2A2A; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12px; gap: 12px; }
@media (max-width: 500px) { .footer-bottom { flex-direction: column; gap: 6px; text-align: center; } }

/* ================================================================
   ACCESSIBILITY / SAFE AREA
   ================================================================ */
.site-header { padding-top: env(safe-area-inset-top, 0); }
@media (hover: none) and (pointer: coarse) {
  .btn, .btn-primary, .btn-secondary, .btn-ghost, .hdr-btn,
  .fchip, .fsort-btn { min-height: 44px; }
  .btn-icon, .send-btn { width: 44px; height: 44px; }
  .pub-card:hover { transform: none; box-shadow: none; }
  .pub-card:active { opacity: .92; }
}
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

/* ================================================================
   NOTIFICATIONS PAGE
   ================================================================ */
.notif-list { display: flex; flex-direction: column; gap: 6px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border-light);
  transition: border-color var(--t), background var(--t);
}
.notif-item.notif-unread { background: #FFFBF7; border-color: var(--orange-mid); }
.notif-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.notif-icon svg { width: 18px; height: 18px; color: #fff; }
.notif-icon-login     { background: #6366F1; }
.notif-icon-message   { background: var(--orange); }
.notif-icon-response  { background: var(--teal); }
.notif-icon-review    { background: var(--yellow); }
.notif-icon-moderation { background: var(--green); }
.notif-icon-info      { background: #6B7280; }
.notif-body   { flex: 1; min-width: 0; }
.notif-title  { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.notif-dot    { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.notif-msg    { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.notif-ip     { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; color: #6366F1; background: #EEF2FF; padding: 3px 8px; border-radius: var(--r-full); }
.notif-time   { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.notif-read-btn {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .12s; margin-top: 2px;
}
.notif-read-btn:hover { background: var(--green-soft); border-color: var(--green); color: var(--green); }
@media (max-width: 600px) {
  .notif-item { padding: 12px 14px; gap: 10px; }
  .notif-icon { width: 34px; height: 34px; }
  .notif-icon svg { width: 15px; height: 15px; }
}

/* ================================================================
   CASCADING MACHINE TYPE SELECTOR
   ================================================================ */
.mcat-cascade { width: 100%; }
.mcat-step { margin-bottom: 6px; }
.mcat-step-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.mcat-back {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2); flex-shrink: 0;
  line-height: 1; padding-bottom: 1px;
}
.mcat-back:hover { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); }
.mcat-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 140px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.mcat-pill {
  padding: 6px 12px; border-radius: var(--r-full);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.mcat-pill:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.mcat-pill.active { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.mcat-pill-all { border-style: dashed; font-weight: 600; }
.mcat-selected {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--green-soft); border: 1.5px solid #A7F3C0;
  font-size: 14px; font-weight: 600; color: var(--green);
}
.mcat-clear {
  margin-left: auto; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; cursor: pointer; color: var(--green); border: none;
}

/* ================================================================
   NEWS PAGES
   ================================================================ */
.news-page-header { text-align:center; padding:32px 0 28px; }
.news-page-header h1 { font-size:28px; font-weight:800; }
.news-page-header p  { color:var(--text-3); margin-top:6px; font-size:15px; }

.news-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:20px; margin-bottom:32px;
}
@media (max-width:900px)  { .news-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px)  { .news-grid { grid-template-columns:1fr; gap:12px; } }

.news-card {
  display:flex; flex-direction:column;
  background:var(--surface); border-radius:var(--r-lg);
  border:1px solid var(--border-light);
  overflow:hidden; transition:box-shadow var(--t), transform var(--t);
}
.news-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.news-card__body { padding:20px; flex:1; display:flex; flex-direction:column; gap:8px; }
.news-card__meta { display:flex; align-items:center; gap:12px; }
.news-card__date, .news-card__views {
  display:flex; align-items:center; gap:4px;
  font-size:12px; color:var(--text-3);
}
.news-card__title {
  font-size:15px; font-weight:700; line-height:1.4;
  color:var(--text); flex:1;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.news-card__preview { font-size:13px; color:var(--text-2); line-height:1.5; }
.news-card__link { font-size:13px; color:var(--orange); font-weight:600; margin-top:auto; }

.news-pagination {
  display:flex; align-items:center; justify-content:center;
  gap:16px; padding:24px 0;
}

/* News detail */
.news-detail-layout {
  display:grid;
  grid-template-columns:1fr 320px;
  gap:28px; align-items:start;
}
@media (max-width:900px) { .news-detail-layout { grid-template-columns:1fr; } }

.news-article { background:var(--surface); border-radius:var(--r-xl); padding:32px; }
@media (max-width:600px) { .news-article { padding:20px 16px; } }

.news-breadcrumb { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-3); margin-bottom:16px; flex-wrap:wrap; }
.news-breadcrumb a:hover { color:var(--orange); }

.news-title { font-size:26px; font-weight:800; line-height:1.3; margin-bottom:14px; }
@media (max-width:600px) { .news-title { font-size:20px; } }

.news-meta-row { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.news-meta-item { display:flex; align-items:center; gap:5px; font-size:13px; color:var(--text-3); }

.news-preview-text {
  font-size:16px; font-weight:500; color:var(--text-2);
  line-height:1.6; border-left:3px solid var(--orange);
  padding-left:14px; margin-bottom:20px;
}
.news-content { font-size:15px; line-height:1.7; color:var(--text); }
.news-content h2 { font-size:19px; font-weight:700; margin:24px 0 10px; }
.news-content h3 { font-size:16px; font-weight:600; margin:18px 0 8px; }
.news-content p  { margin-bottom:14px; }
.news-content img { border-radius:var(--r-md); max-width:100%; margin:16px 0; }

.news-sidebar { position:sticky; top:calc(var(--hdr) + 12px); }
.news-sidebar-title { font-size:13px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.5px; margin-bottom:12px; }
.news-related-item {
  display:block; padding:12px; border-radius:var(--r-md);
  border:1px solid var(--border-light); margin-bottom:8px;
  transition:border-color var(--t), box-shadow var(--t);
}
.news-related-item:hover { border-color:var(--orange); box-shadow:var(--shadow-xs); }
.news-related-title { font-size:13px; font-weight:600; line-height:1.4; margin-bottom:4px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.news-related-date { font-size:11px; color:var(--text-3); }

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .mobile-nav, .pub-sticky-bar, #scroll-top, .site-header, .site-footer,
  .filter-strip, .toast-container, .filter-drawer-overlay,
  .cat-btn-wrap, .filter-panel, .mob-cats-overlay { display: none !important; }
}

/* ── SEO heading on listing page ─────────────────────────────────── */
.listing-h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  line-height: 1.3;
}
@media (max-width: 768px) {
  .listing-h1 { font-size: 17px; margin-bottom: 10px; }
}

/* ── SEO text block at page bottom ───────────────────────────────── */
.seo-text-block {
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
  padding: 28px 0 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.seo-text-block h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.seo-text-block h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.seo-text-block p { margin: 0 0 12px; }
.seo-text-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

/* ── Sidebar h2/h3 reset (keep visual style) ─────────────────────── */
h2.fp-head-title {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}
h3.fp-title {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

/* ══ CITY PICKER BUTTON (header) ════════════════════════════════ */
.hdr-city-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 11px; border: 1px solid var(--border);
  border-radius: var(--r-full); font-size: 13px; font-weight: 500;
  color: var(--text-2); background: transparent; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap; max-width: 150px;
}
.hdr-city-btn:hover { border-color: var(--orange); color: var(--orange); }
.hdr-city-btn.active { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); }
.hdr-city-btn svg { flex-shrink: 0; }
#hdr-city-label { overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
@media (max-width: 768px) {
  .hdr-city-btn { padding: 6px 8px; font-size: 12px; max-width: 90px; }
  #hdr-city-label { max-width: 55px; }
}

/* ══ CITY SELECTION MODAL ════════════════════════════════════════ */
.city-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.52); z-index: 820;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.city-modal-overlay.open { opacity: 1; visibility: visible; }
.city-modal-box {
  background: var(--surface); border-radius: var(--r-xl);
  padding: 32px 26px 24px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow-xl); position: relative; text-align: center;
}
.city-modal-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border-radius: var(--r-full); background: var(--bg); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.city-modal-close:hover { background: var(--border-light); color: var(--text); }
.city-modal-ico {
  width: 54px; height: 54px; background: var(--orange-soft);
  border-radius: var(--r-full); display: flex; align-items: center;
  justify-content: center; margin: 0 auto 14px;
}
.city-modal-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.city-modal-sub   { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }
.city-modal-input-wrap { position: relative; margin-bottom: 10px; text-align: left; }
.city-modal-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--r-md); font-size: 14px; background: var(--bg);
  color: var(--text); outline: none; box-sizing: border-box;
}
.city-modal-input:focus { border-color: var(--orange); }
.city-sugg-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 10;
  overflow: hidden; max-height: 200px; overflow-y: auto;
}
.city-sugg-item {
  padding: 9px 13px; font-size: 14px; color: var(--text);
  cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.city-sugg-item:hover { background: var(--orange-soft); color: var(--orange); }
.city-modal-geo {
  width: 100%; padding: 9px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: 13px; color: var(--text-2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 7px; margin-bottom: 10px; transition: border-color .15s, color .15s;
}
.city-modal-geo:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.city-modal-geo:disabled { opacity: .6; cursor: default; }
.city-modal-skip {
  background: none; border: none; font-size: 13px; color: var(--text-3);
  cursor: pointer; text-decoration: underline;
}
.city-modal-skip:hover { color: var(--text-2); }

/* ══ MOBILE FILTER PANEL (index page) ═══════════════════════════ */
@keyframes mobFpSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mob-fp-panel {
  display: none; background: var(--surface);
  border-bottom: 2px solid var(--border-light);
  box-shadow: 0 6px 16px rgba(0,0,0,.07);
}
@media (max-width: 768px) {
  .mob-fp-panel.open {
    display: block;
    animation: mobFpSlideDown .18s ease;
  }
}
.mob-fp-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; padding: 16px 0 8px;
}
.mob-fp-full { grid-column: 1 / -1; }
.mob-fp-section { display: flex; flex-direction: column; gap: 8px; }
.mob-fp-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .05em;
}
.mob-fp-actions {
  display: flex; gap: 10px; padding: 8px 0 16px;
}
.mob-fp-actions .fp-apply { flex: 1; }

/* Touch targets inside mob-fp-panel */
@media (max-width: 768px) {
  .mob-fp-panel .fp-deal-btn { min-height: 44px; }
  .mob-fp-panel .fp-type-btn { min-height: 40px; }
  .mob-fp-panel .fp-deal-list { gap: 4px; }
}

/* ================================================================
   FILTERS PANEL — inline, directly above listing grid
   ================================================================ */
.filters-panel {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.fpl-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.fpl-row + .fpl-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  align-items: flex-end;
  gap: 10px;
}
.fpl-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.fpl-sep {
  width: 1px; height: 26px;
  background: var(--border-light);
  margin: 0 14px;
  flex-shrink: 0;
}
.fpl-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
/* Make chips flex so fp-dot aligns with text */
.filters-panel .fp-type-btn {
  display: inline-flex; align-items: center; gap: 6px;
}
/* Deal chips — color-coded active states */
.filters-panel .fp-type-btn.d-sale.active  { background: var(--green-soft);   border-color: var(--green);   color: var(--green); }
.filters-panel .fp-type-btn.d-rent.active  { background: var(--purple-soft);  border-color: var(--purple);  color: var(--purple); }
.filters-panel .fp-type-btn.d-parts.active { background: var(--yellow-soft);  border-color: var(--yellow);  color: var(--yellow); }
/* Inputs row */
.fpl-inputs-row { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.fpl-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fpl-machine-field { flex: 0 0 195px; }
.fpl-city-field    { flex: 0 0 155px; }
.fpl-price-field   { flex: 0 0 205px; }
.fpl-sort-field    { flex: 1; min-width: 190px; }
.fpl-sort-field .fsort { margin-left: 0; }
/* Reset button in panel */
.fpl-reset-btn {
  align-self: flex-end;
  padding: 8px 14px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 600;
  color: var(--text-3); background: var(--bg);
  border: 1.5px solid var(--border);
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
  display: none;
}
.fpl-reset-btn.visible,
.fpl-reset-btn:hover {
  color: var(--orange); border-color: var(--orange); background: var(--orange-soft);
}
.fpl-reset-btn.visible { display: block; }
/* Mobile */
@media (max-width: 768px) {
  .filters-panel { border-radius: var(--r-lg); padding: 12px 12px 14px; margin-bottom: 12px; }
  .fpl-sep { display: none; }
  .fpl-row { gap: 8px; }
  .fpl-row:first-child { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fpl-group { flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; }
  .fpl-inputs-row {
    display: grid; grid-template-columns: 1fr 1fr;
    align-items: start; gap: 10px;
  }
  .fpl-machine-field, .fpl-city-field { flex: none; }
  .fpl-price-field, .fpl-sort-field { grid-column: 1 / -1; }
  .fpl-sort-field .fsort { flex-wrap: wrap; }
  .fpl-reset-btn { grid-column: 1 / -1; display: block; }
  .fpl-reset-btn:not(.visible) { color: var(--text-3); border-color: var(--border); background: var(--bg); }
}

/* ══ SORT BUTTON — NEARBY ════════════════════════════════════════ */
.fsort-near { display: flex; align-items: center; gap: 4px; }
.fsort-near svg { flex-shrink: 0; }
