/* ============================================================
   SAMAM — публичная часть. Дизайн «Французский шик».
   Крем и слоновая кость + глубокий бордо + античное золото.
   Классическая типографика, тонкие золотые линии, дорогие детали.
   ============================================================ */

:root {
  /* палитра */
  --bg: #f5eee0;
  --bg-2: #fbf6ec;
  --surface: #fffdf7;
  --surface-2: #f7f0e0;
  --ink: #241a11;
  --ink-soft: #57493a;
  --muted: #8f8069;
  --muted-2: #b0a38c;

  --gold: #b18a3d;
  --gold-soft: #d3b468;
  --gold-deep: #8a6a24;
  --gold-pale: #f3e8cb;

  --wine: #7b2430;
  --wine-2: #5c1a26;
  --wine-3: #3e141d;
  --wine-soft: rgba(123, 36, 48, .08);

  --green: #2f7a5c;
  --red: #a63b3b;
  --blue: #45739c;
  --amber: #bd7e33;

  --line: #e6dcc2;
  --line-2: #dacfae;
  --line-gold: rgba(177, 138, 61, .36);

  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 34px 70px -30px rgba(62, 20, 29, .34);
  --shadow-s: 0 10px 26px -14px rgba(62, 20, 29, .2);
  --glow: 0 0 0 1px rgba(177, 138, 61, .26), 0 12px 30px -14px rgba(177, 138, 61, .42);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1240px;
}

/* ---------- Базовые ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 560px at 88% -16%, rgba(177, 138, 61, .16), transparent 62%),
    radial-gradient(980px 540px at -12% 4%, rgba(123, 36, 48, .05), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 42%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

::selection { background: rgba(180, 140, 58, .22); color: #37290d; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s, background-color .18s, filter .18s;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}

.btn-gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e6cf9a, var(--gold) 52%, #8a6a24);
  color: #fffdf7;
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 10px 24px -9px rgba(177, 138, 61, .6);
}
.btn-gold::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
}
.btn-gold:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(177, 138, 61, .65); }
.btn-gold:hover::after { left: 130%; }

.btn-wine {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #8f2b39 0%, var(--wine) 52%, var(--wine-2) 100%);
  color: #fff6e6;
  border-color: rgba(211, 180, 104, .35);
  box-shadow: 0 10px 24px -10px rgba(123, 36, 48, .6);
}
.btn-wine::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
}
.btn-wine:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(123, 36, 48, .7); }
.btn-wine:hover::after { left: 130%; }

.btn-outline-gold {
  border-color: var(--line-gold);
  color: var(--wine);
  background: rgba(255, 253, 247, .55);
}
.btn-outline-gold:hover {
  border-color: var(--gold);
  color: var(--wine-2);
  background: var(--gold-pale);
  box-shadow: var(--glow);
}

.btn-dark {
  background: linear-gradient(135deg, var(--wine), var(--wine-2));
  color: #fff6e6;
  border-color: rgba(211, 180, 104, .3);
  box-shadow: 0 8px 18px -10px rgba(94, 26, 38, .5);
}
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(94, 26, 38, .6); }

.btn-outline {
  border-color: var(--line-gold);
  color: var(--gold-deep);
  background: rgba(180, 140, 58, .06);
}
.btn-outline:hover { background: rgba(180, 140, 58, .12); box-shadow: var(--glow); }

.btn-outline-dark {
  border-color: var(--line-2);
  color: var(--ink-soft);
  background: var(--surface);
}
.btn-outline-dark:hover { border-color: var(--gold); color: var(--wine); background: var(--gold-pale); }

.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 15px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px -20px rgba(41, 46, 66, .25);
}
.site-header::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .55;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  min-height: 74px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.logo-ico {
  width: 38px;
  height: 38px;
  fill: url(#goldGrad), var(--gold);
}
.logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--ink);
  line-height: 1.1;
  font-weight: 700;
}
.logo-text small {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-tab svg { width: 18px; height: 18px; flex: none; stroke-width: 1.8; }
.nav-tab:hover { background: rgba(123, 36, 48, .07); color: var(--wine); }
.nav-tab.active { color: var(--wine-2); }
.nav-tab.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 2px;
}
.region-label { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.region-tab { margin-left: 4px; }

.cabinet-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: all .18s;
}
.cabinet-tab:hover { border-color: var(--gold); color: var(--gold-deep); box-shadow: var(--glow); }
.cabinet-tab.active { border-color: var(--line-gold); color: var(--gold-deep); background: var(--gold-pale); }

.main-nav .nav-msg { position: relative; }
.nav-msg-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e3c589, var(--gold));
  color: #fff; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; box-shadow: 0 0 0 2px var(--surface);
}
.nav-msg-badge[hidden] { display: none; }

/* ---------- Поиск в шапке ---------- */
.top-search {
  background:
    linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0)),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.top-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0 19px;
}
.search-ico {
  width: 20px; height: 20px;
  fill: none; stroke: var(--gold);
  stroke-width: 2; flex: none;
}
.top-search input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 13px 24px;
  color: var(--ink);
  font-size: 14.5px;
  outline: none;
  box-shadow: var(--shadow-s);
  transition: border-color .2s, box-shadow .2s;
}
.top-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(189,154,78,.16), var(--shadow-s); }
.top-search input::placeholder { color: var(--muted-2); }

/* ---------- Основной контент ---------- */
.page { padding: 40px 0 70px; }

.layout3 {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}
.col-left, .col-center, .col-right { min-width: 0; }

/* ---------- Панели ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  padding: 22px 24px;
  margin-bottom: 22px;
  position: relative;
}
.panel-accent {
  border-color: rgba(177,138,61,.34);
  background:
    radial-gradient(360px 180px at 100% -20%, rgba(211,180,104,.26), transparent 70%),
    linear-gradient(150deg, var(--wine), var(--wine-2));
  color: #fff6e6;
}
.panel-accent .panel-title { color: var(--gold-soft); border-bottom-color: rgba(255,255,255,.12); }
.panel-accent .panel-title::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.panel-accent p { color: rgba(255,255,255,.72); }
.panel-accent p a { color: var(--gold-soft); }
.panel-accent .btn-gold { width: 100%; margin-top: 6px; }
.panel { transition: box-shadow .22s ease, transform .22s ease, border-color .22s; }
.panel:hover { box-shadow: var(--shadow); }
.panel p { color: var(--ink-soft); font-size: 14px; }
.panel p a { color: var(--wine); border-bottom: 1px solid transparent; }
.panel p a:hover { border-bottom-color: var(--wine); }

.panel-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
}
.panel-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 46px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---------- Категории ---------- */
.cat-menu { display: flex; flex-direction: column; }
.cat-group + .cat-group { margin-top: 2px; }

.cat-root {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  transition: all .15s;
}
.cat-root:hover { background: var(--surface-2); color: var(--wine); transform: translateX(2px); }
.cat-root.current {
  background: linear-gradient(90deg, rgba(123,36,48,.08), rgba(123,36,48,.02));
  color: var(--wine-2);
  box-shadow: inset 2px 0 0 var(--gold);
}

.cat-sub {
  list-style: none;
  margin: 2px 0 6px;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
}
.cat-sub a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-radius: 9px;
  transition: all .15s;
}
.cat-sub a:hover { background: var(--surface-2); color: var(--wine); }
.cat-sub a.current { color: var(--wine-2); font-weight: 600; }

.cat-count {
  flex-shrink: 0;
  min-width: 26px;
  text-align: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
}
.cat-root.current .cat-count { background: var(--gold-pale); color: var(--gold-deep); border-color: var(--line-gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 60px 56px 54px;
  border-radius: 28px;
  color: var(--ink);
  border: 1px solid rgba(177,138,61,.4);
  background:
    radial-gradient(700px 320px at 90% -26%, rgba(123,36,48,.09), transparent 60%),
    radial-gradient(620px 320px at -8% 128%, rgba(177,138,61,.17), transparent 62%),
    linear-gradient(180deg, #fdf9ef, #f6eeda);
  box-shadow: 0 40px 90px -46px rgba(62,20,29,.5);
  margin-bottom: 40px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(177,138,61,.3);
  border-radius: 20px;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 56px; bottom: 0;
  width: 210px; height: 3px;
  background: linear-gradient(90deg, var(--wine), var(--gold), transparent);
  opacity: .85;
}
.hero-kicker {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--wine);
  font-weight: 700;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-kicker::before,
.hero-kicker::after {
  content: "◆";
  font-size: 9px;
  color: var(--gold);
  line-height: 1;
}
.hero-kicker::after { order: 2; }
.hero h1 {
  margin: 0 0 16px;
  font-size: 42px;
  color: var(--ink);
  max-width: 780px;
  position: relative;
}
.hero h1 em {
  font-style: italic;
  color: var(--wine);
}
.hero-lead { margin: 0 0 30px; max-width: 620px; color: var(--ink-soft); font-size: 16.5px; position: relative; }
.hero-link { color: var(--wine); border-bottom: 1px solid rgba(123,36,48,.4); }
.hero-link:hover { border-bottom-color: var(--wine-2); color: var(--wine-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }
.hero-stats { display: flex; align-items: center; gap: 30px; margin-top: 36px; position: relative; }
.hero-stats i { width: 1px; height: 44px; background: linear-gradient(180deg, var(--gold), rgba(177,138,61,.15)); }
.hero .stat b {
  display: block;
  font-family: var(--serif);
  font-size: 38px;
  color: var(--gold-deep);
  line-height: 1.1;
}
.hero .stat span { font-size: 13px; color: var(--muted); }
.hero .btn-outline-dark {
  background: rgba(255,255,255,.6);
  border-color: rgba(177,138,61,.45);
  color: var(--wine);
}
.hero .btn-outline-dark:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--wine-2);
}

/* ---------- Заголовки ---------- */
.section-title {
  margin: 0 0 24px;
  font-size: 30px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 16px;
  position: relative;
}
.section-title::before {
  content: "";
  width: 4px; height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-soft), var(--wine));
  transform: translateY(2px);
  flex: none;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
.page-title { margin: 4px 0 22px; font-size: 36px; }
.lead { font-size: 16px; color: var(--ink-soft); }

/* ---------- Сетка объявлений ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 20px;
}
.listing-grid-2 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  position: relative;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s;
}
.listing-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold), transparent);
  opacity: 0;
  transition: opacity .24s ease;
  z-index: 2;
}
.listing-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-gold);
  box-shadow: var(--shadow);
}
.listing-card:hover::before { opacity: 1; }
.listing-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(240px 100px at 78% -24%, rgba(189,154,78,.3), transparent),
    linear-gradient(135deg, #f2e8d0, #e6d9b8);
  font-family: var(--serif);
  font-size: 50px;
  color: var(--gold-deep);
  position: relative;
}
.listing-thumb::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
}
.listing-thumb-ph { padding: 0 !important; display: block; overflow: hidden; background: var(--bg-2); }
.listing-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.listing-card:hover .listing-thumb-img { transform: scale(1.06); }

.listing-body { padding: 18px 19px 13px; flex: 1; display: flex; flex-direction: column; }
.listing-title {
  margin: 0 0 9px;
  font-size: 16px;
  line-height: 1.35;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .18s;
}
.listing-card:hover .listing-title { color: var(--wine); }
.listing-price {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--wine);
  margin-bottom: 7px;
}
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: auto;
}
.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 19px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
.listing-footer a { color: var(--wine); }
.listing-footer a:hover { text-decoration: underline; }

.badge {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--gold-deep);
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 11px;
  border: 1px solid var(--line-gold);
  white-space: nowrap;
}

/* ---------- Популярное ---------- */
.popular-list { list-style: none; margin: 0; padding: 0; }
.popular-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.popular-list li:last-child { border-bottom: none; padding-bottom: 0; }
.popular-rank {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  color: var(--gold);
  text-align: center;
  line-height: 1.2;
}
.popular-body { min-width: 0; }
.popular-name { display: block; font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; }
.popular-name:hover { color: var(--wine); }
.popular-body small { color: var(--muted); font-size: 12px; }

/* ---------- Статистика ---------- */
.stats-list { list-style: none; margin: 0; padding: 0; }
.stats-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}
.stats-list li:last-child { border-bottom: none; }
.stats-list b { font-family: var(--serif); font-size: 22px; color: var(--wine); font-weight: 600; }

/* ---------- Как это работает ---------- */
.steps { margin: 46px 0 8px; }
.steps .section-title { margin-bottom: 24px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-s);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.step:hover { transform: translateY(-4px); border-color: rgba(177,138,61,.5); box-shadow: var(--shadow); }
.step::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-soft), var(--wine));
  opacity: .9;
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--wine);
  background: var(--gold-pale);
  line-height: 1;
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.step p { margin: 0; color: var(--ink-soft); font-size: 14px; }
@media (max-width: 760px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a:hover { color: var(--wine); }
.breadcrumbs span { color: var(--line-2); }
.breadcrumbs b { color: var(--ink); font-weight: 600; }

.empty { padding: 20px 0; color: var(--muted); }
.empty a { color: var(--wine); border-bottom: 1px solid var(--line-gold); }
.empty a:hover { border-bottom-color: var(--wine); }

/* ---------- Ошибки ---------- */
.error-page {
  max-width: 560px;
  margin: 40px auto;
  padding: 56px 42px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.error-code {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-title { margin: 16px 0 10px; font-size: 26px; }
.error-text { margin: 0 auto 28px; max-width: 400px; color: var(--muted); }
.error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Узкие страницы / формы ---------- */
.narrow { max-width: 780px; margin: 0 auto; }
.narrow-login { max-width: 440px; }
.cabinet-hello { color: var(--ink-soft); margin-top: -10px; }
.cabinet-hello b { color: var(--gold-deep); }

.form-panel { max-width: 740px; margin: 0 auto; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.login-form input {
  padding: 12px 15px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 15px;
  background: var(--bg-2);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180,140,58,.12); }
.login-form .btn { align-self: flex-start; }

/* ---------- Кабинет ---------- */
.own-list { list-style: none; margin: 0; padding: 0; }
.own-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  transition: border-color .15s, box-shadow .15s;
}
.own-list li:hover { border-color: var(--line-gold); box-shadow: var(--shadow-s); }
.own-list li:last-child { margin-bottom: 0; }
.own-name { display: block; font-weight: 600; color: var(--ink); }
.own-body { flex: 1; min-width: 0; }
.own-body small { color: var(--muted); }
.own-tools { display: flex; gap: 8px; }
.tool { color: var(--blue); font-size: 13px; text-decoration: none; }
.tool:hover { text-decoration: underline; }
.tool.danger { color: var(--red); }

.status {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--line-2);
}
.status.st-active { background: rgba(47,166,112,.12); color: var(--green); border-color: rgba(47,166,112,.3); }
.status.st-draft { background: var(--surface-2); color: var(--muted); }
.status.st-moderation { background: rgba(192,127,46,.12); color: var(--amber); border-color: rgba(192,127,46,.3); }
.status.st-rejected { background: rgba(201,79,79,.12); color: var(--red); border-color: rgba(201,79,79,.3); }
.status.st-archived { background: var(--surface-2); color: var(--muted); }
.status.st-deleted { background: rgba(139,147,166,.12); color: var(--muted); }

.cabinet-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 20px; }
.inline-form { display: contents; }

/* ---------- Подвал ---------- */
.site-footer {
  margin-top: 56px;
  color: rgba(255, 246, 230, .72);
  background:
    radial-gradient(600px 240px at 82% -20%, rgba(211,180,104,.22), transparent 62%),
    linear-gradient(180deg, var(--wine-2), var(--wine-3));
  border-top: 1px solid rgba(211,180,104,.3);
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
  opacity: .7;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 50px 22px 34px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text small { color: var(--gold-soft); }
.footer-brand p { margin: 12px 0 0; font-size: 13.5px; max-width: 320px; color: rgba(255,246,230,.62); }
.footer-col h4 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.footer-col nav { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-col nav a { color: rgba(255,246,230,.72); width: fit-content; transition: color .15s; }
.footer-col nav a:hover { color: var(--gold-soft); }
.footer-nav { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-nav a { color: rgba(255,246,230,.72); width: fit-content; transition: color .15s; }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-bottom {
  border-top: 1px solid rgba(255,246,230,.09);
  padding: 18px 0;
  font-size: 13px;
  color: rgba(255,246,230,.5);
}
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Поиск на странице ---------- */
.search-form { margin-bottom: 22px; }
.search-row { display: flex; gap: 10px; margin-bottom: 12px; }
.search-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180,140,58,.12); }
.search-input.sm { max-width: 150px; }
.search-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.search-select {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.search-select:focus { border-color: var(--gold); }
.search-count { color: var(--ink-soft); margin: 14px 0; }
.search-count b { color: var(--wine); }

/* ---------- Детальная страница объявления ---------- */
.detail { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 30px; margin-bottom: 28px; }
.detail-title { font-size: 30px; margin: 0 0 12px; color: var(--ink); }
.detail-price { font-size: 32px; font-weight: 700; color: var(--wine); margin-bottom: 16px; font-family: var(--serif); }
.detail-contact { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.contact-name { font-size: 16px; color: var(--ink); font-weight: 600; }
.detail-location { color: var(--ink-soft); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; }
.detail-location::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; opacity: .7; }
.detail-subtitle {
  font-size: 20px;
  margin: 26px 0 12px;
  color: var(--ink);
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}
.detail-desc { color: var(--ink-soft); line-height: 1.75; }
.spec-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.spec-list span { color: var(--muted); }
.spec-list b { color: var(--ink); text-align: right; }
.detail-foot {
  display: flex; gap: 18px; align-items: center;
  margin-top: 22px; color: var(--muted); font-size: 13px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.listing-date { color: var(--muted); }
.detail-date, .detail-views { color: var(--muted); }

/* ---------- Формы ---------- */
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row input, .form-row select, .form-row textarea, .form-row .field {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(180,140,58,.12);
}
.form-row .help { color: var(--muted); font-size: 12px; }
.form-help { color: var(--muted); font-size: 12px; }
.form-errors { color: var(--red); margin-bottom: 12px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-panel { padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Фильтры и пагинация ---------- */
.filter-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 22px; align-items: center; }
.pagination { display: flex; gap: 12px; align-items: center; margin: 28px 0; justify-content: center; }
.page-link {
  color: var(--gold-deep);
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  transition: all .15s;
}
.page-link:hover { border-color: var(--gold); background: var(--gold-pale); }
.page-current { color: var(--muted); }

/* ---------- Отзывы ---------- */
.review-list { list-style: none; margin: 12px 0; padding: 0; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.review-head b { color: var(--ink); }
.review-rating { color: var(--gold); font-size: 13px; }
.review-date { color: var(--muted); font-size: 12px; }
.review-text { margin: 6px 0 0; color: var(--ink-soft); }
.review-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-top: 12px; }
.review-form textarea { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; color: var(--ink); font-size: 14px; outline: none; width: 100%; }
.review-form textarea:focus { border-color: var(--gold); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 18px; border-radius: 12px; margin: 16px 0; font-size: 14.5px; border: 1px solid transparent; }
.alert-ok { background: rgba(47,166,112,.1); color: var(--green); border-color: rgba(47,166,112,.3); }

/* ---------- Search chips ---------- */
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--line-2);
  transition: all .15s;
}
.chip:hover { background: var(--surface-2); color: var(--gold-deep); border-color: var(--line-gold); }
.chip.active { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -8px rgba(180,140,58,.6); }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1180px) {
  .layout3 { grid-template-columns: 250px minmax(0, 1fr); }
  .col-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .col-right .panel { margin-bottom: 0; }
}

@media (max-width: 1240px) {
  .nav-tab { padding: 8px 9px; font-size: 12.5px; }
  .nav-tab svg { display: none; }
  .header-tools { gap: 8px; }
  .header-tools .btn { padding: 8px 13px; font-size: 12.5px; }
}

@media (max-width: 980px) {
  .main-nav, .header-tools .region-tab { display: none; }
  .hero h1 { font-size: 32px; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .page { padding: 24px 0 48px; }
  .layout3 { grid-template-columns: 1fr; }
  .col-left { order: 2; }
  .col-center { order: 1; }
  .col-right { order: 3; grid-template-columns: 1fr; }

  .hero { padding: 34px 26px; }
  .hero h1 { font-size: 27px; }
  .hero-stats { gap: 20px; margin-top: 24px; }
  .hero-stats i { display: none; }
  .stat b { font-size: 30px; }

  .page-title { font-size: 28px; }
  .section-title { font-size: 23px; }
  .detail { grid-template-columns: 1fr; gap: 20px; }
  .spec-list { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }

  .top-search-inner { flex-wrap: nowrap; }
  .top-search .btn-sm { padding: 9px 15px; }
  .logo-text { font-size: 19px; }
  .logo-text small { font-size: 8px; letter-spacing: .22em; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; padding: 34px 16px 24px; }
}

/* ===== Автоопределение города ===== */
.geo-item { cursor: pointer; background: none; border: 0; font: inherit; width: 100%; text-align: left; }
.geo-item:hover { background: var(--surface-2); }
.geo-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; margin-right: 7px; color: var(--gold-deep); }
.geo-item:disabled { opacity: .6; cursor: progress; }

.geo-banner {
  position: fixed; z-index: 300;
  left: 50%; bottom: 22px; transform: translateX(-50%);
  max-width: min(720px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  box-shadow: 0 22px 60px -20px rgba(41,46,66,.4);
  color: var(--ink); font-size: 13.5px;
}
.geo-banner b { color: var(--gold-deep); }
.geo-banner-ico { font-size: 18px; }
.geo-banner-close {
  margin-left: auto; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; font-size: 12px;
}
.geo-banner-close:hover { color: var(--gold-deep); background: var(--gold-pale); }
.geo-banner.geo-bar-err { border-color: rgba(192,127,46,.5); }
@media (max-width: 640px) {
  .geo-banner { bottom: 10px; padding: 10px 12px; gap: 8px; font-size: 12.5px; }
  .geo-banner .btn { margin-left: auto; }
}

/* ===== Панель выбора региона / модалка ===== */
.geo-menu {
  display: flex;
  flex-direction: column; gap: 8px;
  padding: 6px;
}
.geo-auto {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-gold);
  background: linear-gradient(135deg, rgba(180,140,58,.14), rgba(180,140,58,.04));
  color: var(--gold-deep); font-size: 13px; font-weight: 700;
  transition: all .15s;
}
.geo-auto:hover { background: linear-gradient(135deg, rgba(180,140,58,.24), rgba(180,140,58,.08)); }
.geo-auto:disabled { opacity: .55; cursor: progress; }
.geo-auto .geo-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.geo-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); border-radius: 12px;
  padding: 9px 12px; background: var(--bg-2);
  color: var(--muted);
  transition: border-color .15s;
}
.geo-search:focus-within { border-color: var(--gold); }
.geo-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.geo-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font-size: 13.5px; }
.geo-search input::placeholder { color: var(--muted); }

.geo-result {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 300px; overflow-y: auto;
}
.geo-gt {
  padding: 8px 4px 3px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); font-weight: 800;
}
.geo-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 9px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-soft);
  text-decoration: none; text-align: left; width: 100%;
  border: 0; background: none; cursor: pointer; font: inherit;
}
.geo-row:hover { background: var(--surface-2); color: var(--gold-deep); }
.geo-row.current { color: var(--gold-deep); font-weight: 600; }
.geo-row-city { font-weight: 600; }
.geo-row-meta { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.geo-drill:hover .geo-row-meta { color: var(--gold-deep); }
.geo-empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 13px; }
.geo-back {
  align-self: flex-start; margin-bottom: 4px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 5px 10px; cursor: pointer; font-size: 12px;
}
.geo-back:hover { color: var(--gold-deep); background: var(--gold-pale); }

.geo-msg {
  padding: 8px 10px; border-radius: 9px; font-size: 12.5px;
  background: rgba(47,166,112,.08); border: 1px solid rgba(47,166,112,.25); color: var(--green);
}
.geo-msg.err { background: rgba(192,127,46,.1); border-color: rgba(192,127,46,.32); color: var(--amber); }

.geo-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(30,38,53,.42); backdrop-filter: blur(6px);
}
.geo-modal[hidden] { display: none; }
.geo-modal-card {
  width: min(420px, 100%); max-height: 88vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 90px -30px rgba(20,25,40,.5);
}
.geo-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 18px; color: var(--ink); font-weight: 600;
}
.geo-modal-close {
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line-2); font-size: 13px;
}
.geo-modal-close:hover { color: var(--gold-deep); background: var(--gold-pale); }
.geo-modal .geo-menu { padding: 16px; gap: 10px; }
.geo-modal .geo-result { max-height: 320px; }

/* ===== Автоподсказки категорий в строке поиска ===== */
.q-suggest {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  z-index: 220;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -24px rgba(41,46,66,.45);
  overflow: hidden;
  padding: 6px;
}
.q-s-head {
  padding: 6px 10px 4px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.q-s-item, .q-s-all {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 11px; border-radius: 9px; cursor: pointer;
}
.q-s-item:hover, .q-s-item.active,
.q-s-all:hover, .q-s-all.active { background: var(--gold-pale); }
.q-s-name { color: var(--ink); font-weight: 600; font-size: 14px; }
.q-s-path { color: var(--muted); font-size: 11.5px; }
.q-s-all { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 9px; color: var(--gold-deep); font-size: 13px; }
.q-suggest[hidden] { display: none; }

/* ===== Галерея фотографий объявления ===== */
.detail-gallery { display: flex; flex-direction: column; gap: 10px; }
.detail-main-img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--line);
  background: var(--bg-2);
}
.detail-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-thumbs .thumb {
  width: 72px; height: 54px; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 10px; border: 2px solid transparent; background: var(--bg-2);
}
.detail-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-thumbs .thumb.active { border-color: var(--gold); }
.detail-thumbs .thumb:hover { border-color: var(--line-gold); }

/* ===== Нижний таб-бар (мобильные) ===== */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 2px; color: var(--muted); font-size: 10px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 0; background: none; position: relative;
}
.tabbar-item svg { width: 22px; height: 22px; }
.tabbar-item.active { color: var(--wine); }
.tabbar-item:hover { color: var(--ink); }
.tab-msg-badge {
  position: absolute; top: 0; right: 50%; transform: translateX(22px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--gold); color: #fff; font-size: 9.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.tab-msg-badge[hidden] { display: none; }

@media (max-width: 900px) {
  .main-nav, .region-tab, .cabinet-tab { display: none; }
  .header-tools .btn { display: none; }
  .tabbar { display: grid; }
  body { padding-bottom: 66px; }
  .header-inner { flex-wrap: nowrap; }
}
@media (max-width: 480px) {
  .logo-text small { display: none; }
}

/* ===== Ошибки полей и уведомления (форма объявления) ===== */
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea { border-color: #d94f4f !important; box-shadow: 0 0 0 2px rgba(217,79,79,.16); }
.field-error {
  display: block; margin-top: 5px; font-size: 12.5px; color: var(--red);
}
.errorlist { color: var(--red); font-size: 12.5px; margin: 4px 0 0; padding: 0; list-style: none; }

.app-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  z-index: 1200; min-width: 260px; max-width: min(520px, 92vw);
  padding: 13px 18px; border-radius: 14px; text-align: center;
  font-size: 14px; font-weight: 600; color: #124a33;
  background: linear-gradient(135deg, #d9f2e4, #c2ead6);
  border: 1px solid rgba(47,166,112,.4);
  box-shadow: 0 20px 60px -20px rgba(41,46,66,.45);
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
}
.app-toast.err {
  color: #7c2222; background: linear-gradient(135deg, #fbe2e2, #f6cfcf);
  border-color: rgba(201,79,79,.4);
}
.app-toast:not(.hide) { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 640px) { .app-toast { bottom: 84px; } }

/* ============================================================
   Детальная страница объявления — премиальная карточка
   ============================================================ */

.dl-status-banner {
  background: rgba(192,127,46,.1);
  border: 1px solid rgba(192,127,46,.3);
  color: var(--amber);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 13.5px;
}

.dl-detail {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr) !important;
  gap: 28px !important;
  padding: 22px;
  background:
    radial-gradient(520px 200px at 100% -10%, rgba(180,140,58,.08), transparent),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px !important;
}

/* ---------- Галерея ---------- */
.dl-gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dl-main-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.dl-main-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-badge-featured {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 8px 18px -8px rgba(180,140,58,.7);
}
.dl-photo {
  aspect-ratio: 4 / 3; border-radius: 16px;
  background:
    radial-gradient(320px 140px at 80% -10%, rgba(180,140,58,.25), transparent),
    linear-gradient(135deg, #f2e8d0, #e9dcbb);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 86px; font-weight: 700; color: var(--gold-deep);
}
.dl-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.dl-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px; overflow: hidden;
  padding: 0; border: 2px solid transparent;
  background: transparent; cursor: pointer;
  transition: border-color .14s, transform .14s;
}
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-thumb:hover { transform: translateY(-1px); }
.dl-thumb.active { border-color: var(--gold); }

/* ---------- Инфо ---------- */
.dl-info { display: flex; flex-direction: column; min-width: 0; }
.dl-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.dl-cat {
  color: var(--gold-deep); font-weight: 700; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .05em;
}
.dl-cat:hover { text-decoration: underline; }
.dl-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); opacity: .8; }
.dl-city { color: var(--ink-soft); }
.dl-id { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.dl-title { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.18; margin: 0 0 14px; color: var(--ink); }
.dl-price {
  font-size: clamp(30px, 3vw, 38px); font-weight: 800;
  color: var(--gold-deep); font-family: var(--serif);
  margin-bottom: 12px;
}
.dl-lead { color: var(--ink-soft); line-height: 1.65; font-size: 14.5px; margin: 0 0 18px; }

.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.dl-btn-chat { display: inline-flex; gap: 8px; align-items: center; padding: 12px 20px !important; font-size: 14.5px; }
.dl-btn-call { display: inline-flex; gap: 8px; align-items: center; }
.dl-btn-fav {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 12px; cursor: pointer;
  color: var(--ink-soft); transition: all .15s;
}
.dl-btn-fav:hover { border-color: var(--line-gold); color: var(--gold-deep); background: var(--gold-pale); }
.dl-btn-fav svg { width: 19px; height: 19px; }
.dl-btn-fav.fav { color: var(--gold); border-color: rgba(180,140,58,.5); background: var(--gold-pale); }

.dl-safety {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.5;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
}
.dl-safety svg { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 1px; }

/* ---------- Блоки контента ---------- */
.dl-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-s);
}
.dl-block-title {
  font-family: var(--serif); font-size: 19px; color: var(--ink);
  margin: 0 0 12px;
  padding-left: 13px;
  border-left: 3px solid var(--gold);
}
.dl-desc { color: var(--ink-soft); line-height: 1.8; font-size: 14.5px; white-space: normal; }
.dl-spec { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dl-spec li { padding: 11px 2px; }
.dl-spec b { font-weight: 600; }

/* ---------- Отзывы ---------- */
.dl-reviews-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; justify-content: space-between; }
.dl-reviews-head .dl-block-title { margin-bottom: 0; }
.dl-avg { display: inline-flex; align-items: center; gap: 8px; }
.dl-avg-num { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--gold-deep); }
.dl-avg-cnt { color: var(--muted); font-size: 12.5px; }
.dl-avg-empty { color: var(--muted); font-size: 13px; }
.dl-stars { position: relative; display: inline-flex; line-height: 1; }
.dl-stars-bg { color: var(--line-2); letter-spacing: 2px; font-size: 16px; }
.dl-stars-fg {
  position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap;
  color: var(--gold); letter-spacing: 2px; font-size: 16px;
}
.dl-review { display: flex; gap: 12px; padding: 14px 0; }
.dl-review-avatar {
  flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--gold-deep);
  background: linear-gradient(135deg, var(--gold-pale), #ecdfc0);
  border: 1px solid var(--line-gold);
}
.dl-review-body { flex: 1; min-width: 0; }
.dl-review-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dl-review-top b { color: var(--ink); }
.dl-review-stars { display: inline-flex; gap: 2px; }
.dl-rev-star { color: var(--line-2); font-size: 13px; }
.dl-rev-star.on { color: var(--gold); }
.review-head { border: 0 !important; }
.dl-review-form { max-width: 620px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 14px; padding: 16px; }
.dl-rate-row { display: flex; align-items: center; gap: 12px; }
.dl-rate-label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.dl-rate-select {
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 14px; outline: none;
}

/* ---------- Подвал объявления ---------- */
.dl-foot {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  padding: 14px 4px 4px;
  color: var(--muted); font-size: 13px;
}
.dl-view-ico { display: inline-flex; gap: 6px; align-items: center; }
.dl-view-ico svg { width: 15px; height: 15px; }

/* ---------- Правая колонка: продавец ---------- */
.dl-seller-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.dl-seller-avatar {
  width: 52px; height: 52px; flex: none; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--gold-deep);
  background:
    radial-gradient(90px 50px at 50% -20%, rgba(180,140,58,.22), transparent),
    linear-gradient(135deg, var(--gold-pale), #ecdfc0);
  border: 1px solid var(--line-gold);
}
.dl-seller-name { display: block; font-size: 16px; color: var(--ink); }
.dl-seller-top small { color: var(--muted); font-size: 12px; }
.dl-seller-rating { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.dl-seller-rating .dl-stars-bg, .dl-seller-rating .dl-stars-fg { font-size: 14px; }
.dl-seller-rating b { color: var(--gold-deep); }
.dl-seller-meta { color: var(--ink-soft); font-size: 13px; margin-bottom: 14px; }
.dl-seller-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-seller-actions .btn { flex: 1; justify-content: center; }

.dl-safe-panel { border-color: rgba(47,166,112,.25); }
.dl-safe-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dl-safe-list li { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.dl-safe-list svg { width: 18px; height: 18px; flex: none; color: var(--green); opacity: .9; }

/* ---------- График цены торгового бота ---------- */
.trader-chart { position: relative; height: 420px; }
.trader-chart.trader-chart-sm { height: 300px; }
.trader-chart.is-loading { opacity: .5; }
.trader-chart-error {
  display: flex; align-items: center; justify-content: center;
  color: #a94442; background: #fdf2f2; border-radius: 8px;
}
.trader-chart-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 8px;
}

/* ---------- Брокеры (торговый бот) ---------- */
.broker-kpi {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-top: 12px;
}
.broker-kpi-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.broker-kpi-card .muted { font-size: 12px; }
.broker-kpi-card b { font-size: 20px; font-variant-numeric: tabular-nums; }
.broker-kpi-card b.debt { color: #a94442; }
.broker-error { color: #a94442; margin-left: 8px; }
.broker-kpi.is-loading { opacity: .6; }

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .dl-detail { grid-template-columns: minmax(0,1fr) 380px !important; }
}
@media (max-width: 1080px) {
  .dl-detail { grid-template-columns: 1fr !important; }
  .dl-info { order: 1; }
  .dl-gallery { order: 2; }
  .dl-main-media { aspect-ratio: 16/10; }
}
@media (max-width: 600px) {
  .dl-detail { padding: 16px; border-radius: 16px; gap: 18px; }
  .dl-id { display: none; }
}