/* ============================================================
   Личный каталог недвижимости — демо. Архитектурный
   минимализм: холодный нейтральный холст, графит, глубокий
   морской акцент, гротеск в заголовках.
   ============================================================ */
:root {
  --bg: #f4f5f6;
  --surface: #ffffff;
  --surface-2: #eceef1;
  --ink: #1a1c1e;
  --ink-2: #565b61;
  --ink-3: #8b9198;
  --line: #e4e7ea;
  --line-2: #d4d9dd;
  --accent: #1f4b46;
  --accent-ink: #143733;
  --accent-soft: #e5eeeb;
  --ok: #2f6b52;
  --warn: #9a6a2f;
  --danger: #a83f3f;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20,24,28,.06), 0 1px 1px rgba(20,24,28,.04);
  --shadow: 0 8px 30px rgba(20,28,34,.10);
  --shadow-lg: 0 24px 64px rgba(15,22,28,.22);
  --maxw: 1200px;
  --font-head: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.sm { font-size: 13px; }
/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; white-space: nowrap; line-height: 1;
  background: var(--surface-2); color: var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Badges & chips ---- */
.badge {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; letter-spacing: .2px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
}
.st-active { color: var(--ok); background: #eaf2ec; }
.st-booked { color: var(--warn); background: #f6eeda; }
.st-sold { color: var(--danger); background: #f5e5e4; }
.chip {
  display: inline-flex; font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-2);
}
.media-empty {
  width: 100%; height: 100%; min-height: 180px; display: flex; align-items: center;
  justify-content: center; background: linear-gradient(135deg, #eef1f3, #e0e5e9);
  color: var(--ink-3); font-size: 14px; text-align: center; padding: 12px;
}
.media-empty.sm { min-height: 0; height: 100%; font-size: 11px; }
/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,245,246,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 700; font-size: 17px; letter-spacing: .5px;
  background: var(--ink); color: var(--bg);
}
.brand-mark.has-photo { background: none; overflow: hidden; }
.brand-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-head); font-size: 20px; font-weight: 600; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--ink-2); letter-spacing: .3px; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative; font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 9px 14px; border-radius: 999px; transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--accent); }
.nav-fav .heart { color: var(--accent); }
.nav-admin { border: 1px solid var(--line-2); }
.fav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center;
}
/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.footer-name { font-family: var(--font-head); font-size: 19px; display: block; }
.footer-sub { font-size: 13px; color: var(--ink-2); }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-ig { font-weight: 600; color: var(--accent); }
.footer-note { font-size: 12px; color: var(--ink-3); }
/* ---- Hero (первый экран) — асимметричный редакторский ---- */
.hero { padding: 60px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .84fr); gap: 56px; align-items: center; }
.hero-col { min-width: 0; }
.hero-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(34px, 5vw, 58px); line-height: 1.03; margin: 0 0 20px;
  max-width: 12ch; font-weight: 600; letter-spacing: -.025em;
}
.hero-sub {
  font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-2); max-width: 460px;
  margin: 0 0 28px; line-height: 1.62;
}
.hero-actions { display: flex; justify-content: flex-start; gap: 12px; }
.hero-note { margin: 22px 0 0; font-size: 13px; color: var(--ink-3); max-width: 440px; }
.hero-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Catalog section ---- */
.catalog-section { padding: 20px 0 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title { font-size: clamp(24px, 3vw, 32px); }
.results-count { font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* ---- Toolbar / filters ---- */
.toolbar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.search input {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color .15s ease;
}
.search input:focus { outline: none; border-color: var(--accent); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: center; }
.filters select, .price-in {
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg); cursor: pointer; width: 100%; transition: border-color .15s ease;
}
.filters select:focus, .price-in:focus { outline: none; border-color: var(--accent); }
.price-in { cursor: text; }
.filters #fReset { justify-self: start; }
/* ---- Grid & cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .badge { position: absolute; left: 12px; top: 12px; }
.fav-btn {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px); color: var(--ink-3);
  font-size: 19px; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: all .16s ease;
}
.fav-btn:hover { transform: scale(1.08); color: var(--accent); }
.fav-btn.is-fav { color: #fff; background: var(--accent); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-type { font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--accent-ink); }
.card-title { font-size: 21px; line-height: 1.2; }
.card-title a { transition: color .15s ease; }
.card-title a:hover { color: var(--accent-ink); }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.card-specs span {
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  background: var(--surface-2); padding: 3px 10px; border-radius: 999px;
}
.card-desc {
  font-size: 14px; color: var(--ink-2); margin: 2px 0 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.card-price { font-family: var(--font-head); font-size: 22px; font-weight: 600; color: var(--ink); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center; color: var(--ink-2); padding: 48px 20px; font-size: 15px;
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty-state.big { padding: 72px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state.big h1 { margin-bottom: 8px; }
.empty-state.big p { margin: 0; max-width: 460px; }
.empty-state.big .btn { margin-top: 16px; }
.empty-emoji { font-size: 44px; color: var(--accent); opacity: .5; margin: 0; }
/* ---- Property page ---- */
.pdp { padding: 28px 0 20px; }
.notfound { text-align: center; padding: 80px 20px; }
.notfound h1 { margin-bottom: 12px; }
.notfound p { color: var(--ink-2); margin-bottom: 22px; }
.back-link { display: inline-flex; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 22px; transition: color .15s ease; }
.back-link:hover { color: var(--accent-ink); }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.gallery { position: sticky; top: 92px; }
.gallery-main {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow-sm);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-main .badge { position: absolute; left: 14px; top: 14px; }
.gnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px); color: var(--ink);
  font-size: 26px; line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow-sm);
  transition: background .15s ease;
}
.gnav:hover { background: #fff; }
.gnav.prev { left: 12px; } .gnav.next { right: 12px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
  width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 2px solid transparent; padding: 0; background: var(--surface-2); transition: border-color .15s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--accent); }
.pdp-type { font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.pdp-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; margin-bottom: 12px; }
.pdp-price { font-family: var(--font-head); font-size: 32px; font-weight: 700; color: var(--ink); margin-bottom: 22px; }
.chars { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 0 0 24px; }
.char { background: var(--surface); padding: 12px 14px; }
.char dt { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.char dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.pdp-actions { display: flex; flex-direction: column; gap: 10px; }
.pdp-actions .btn-lg { width: 100%; }
.fav-toggle { width: 100%; }
.fav-toggle.is-fav { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.fav-toggle .h { font-size: 17px; }
.pdp-actions-row { display: flex; gap: 10px; }
.pdp-actions-row .btn { flex: 1; }
/* ---- Property details blocks ---- */
.pdp-details { margin-top: 44px; display: grid; gap: 28px; max-width: 820px; }
.pdp-block h2 { font-size: 24px; margin-bottom: 12px; }
.pdp-block p { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 0; white-space: pre-line; }
.adv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.adv-list li { position: relative; padding-left: 30px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.adv-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.pdp-foot { margin-top: 8px; }

/* ---- Lightbox ---- */
.lightbox { position: relative; display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: 88vw; max-height: 82vh; border-radius: var(--radius-sm); object-fit: contain; box-shadow: var(--shadow-lg); }
.lb-close {
  position: absolute; top: -46px; right: 0; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9); color: var(--ink); font-size: 24px; cursor: pointer;
  display: grid; place-items: center; line-height: 1;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.9); color: var(--ink);
  font-size: 28px; cursor: pointer; display: grid; place-items: center; line-height: 1;
}
.lb-prev { left: -8px; } .lb-next { right: -8px; }
.lb-count { position: absolute; bottom: -38px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 600; }

/* ---- Favorites ---- */
.view-favorites { padding: 40px 0; }
.fav-head { margin-bottom: 28px; }
.fav-head h1 { font-size: clamp(28px, 4vw, 40px); display: flex; align-items: center; gap: 12px; }
.fav-count { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: #fff; background: var(--accent); min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; }
.fav-head .muted { margin: 8px 0 18px; }
.fav-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* ---- Admin panel ---- */
.view-admin { padding: 40px 0 20px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0; }
.admin-sub { color: var(--ink-2); margin: 0; max-width: 520px; }
.admin-note {
  background: var(--accent-soft); border: 1px solid #cfe0db; border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 14px;
}
.admin-note strong { color: var(--accent-ink); }
.admin-hint {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14px; color: var(--ink-2);
  line-height: 1.6; margin-bottom: 22px;
}
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.admin-stats span { font-size: 14px; color: var(--ink-2); }
.admin-stats b { color: var(--ink); font-size: 16px; }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.arow {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow-sm); transition: opacity .15s ease;
}
.arow.is-hidden { opacity: .58; }
.arow-media { width: 92px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.arow-media img { width: 100%; height: 100%; object-fit: cover; }
.arow-main { min-width: 0; }
.arow-title { font-weight: 600; font-size: 16px; color: var(--ink); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow-meta { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.arow-price { font-family: var(--font-head); font-size: 18px; font-weight: 600; }
.arow-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.arow-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
.arow-actions button {
  font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 7px 12px; cursor: pointer; transition: all .14s ease;
}
.arow-actions button:hover { color: var(--ink); background: var(--line); }
.arow-actions button.danger:hover { color: #fff; background: var(--danger); }
.arow-actions .ico { padding: 7px 10px; font-size: 12px; }
/* ---- Object form (add / edit) ---- */
.obj-form { display: flex; flex-direction: column; max-height: 82vh; }
.form-scroll { overflow-y: auto; padding: 4px 4px 8px; margin: 0 -4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld.span2 { grid-column: 1 / -1; }
.fld input, .fld select, .fld textarea {
  font-family: var(--font-body); font-size: 15px; font-weight: 400; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg); width: 100%; transition: border-color .15s ease;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--accent); }
.fld textarea { resize: vertical; line-height: 1.5; }
.photos-block { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.photos-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.photos-head > span { font-size: 15px; font-weight: 600; color: var(--ink); }
.photos-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; }
.photo-url {
  font-family: var(--font-body); font-size: 14px; color: var(--ink); padding: 8px 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg); width: 220px; max-width: 46vw;
}
.photo-url:focus { outline: none; border-color: var(--accent); }
.profile-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pp-preview { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 6px; }
.pp-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pp-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.pcell { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 2px solid transparent; }
.pcell.main { border-color: var(--accent); }
.pcell img { width: 100%; height: 100%; object-fit: cover; }
.pmain { position: absolute; left: 6px; top: 6px; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 999px; letter-spacing: .3px; }
.pctrl { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .15s ease; }
.pcell:hover .pctrl { opacity: 1; }
.pctrl button { width: 26px; height: 26px; border-radius: 6px; border: none; background: rgba(255,255,255,.92); color: var(--ink); font-size: 13px; cursor: pointer; display: grid; place-items: center; line-height: 1; }
.pctrl button:hover { background: #fff; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
/* ---- Preview (админ) ---- */
.preview-wrap, .contacts-form { max-width: 100%; }
.preview-card { max-width: 340px; margin: 14px auto 4px; }
.preview-card .card:hover { transform: none; }
.preview-details { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.preview-details p { margin: 0 0 6px; font-size: 15px; }
.preview-details .muted { font-size: 13px; }

/* ---- Modal / overlay ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(16,20,24,.55); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .22s ease;
}
.modal-overlay.show { opacity: 1; }
.modal-box {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; padding: 26px;
  transform: translateY(14px) scale(.98); transition: transform .22s ease;
}
.modal-overlay.show .modal-box { transform: translateY(0) scale(1); }
.modal-box:has(.lightbox) { background: transparent; box-shadow: none; max-width: none; width: auto; padding: 0; overflow: visible; }
.modal-box:has(.obj-form) { max-width: 720px; }

/* ---- Confirm / discuss ---- */
.confirm-title { font-size: 24px; margin-bottom: 10px; }
.confirm-text { color: var(--ink-2); margin: 0 0 22px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.discuss-hint, .discuss-demo { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.discuss-hint { margin: 0 0 14px; }
.discuss-text {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--ink); line-height: 1.55;
  padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg);
  resize: vertical; margin-bottom: 14px;
}
.discuss-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.discuss-demo { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin: 4px 0 12px; }
.discuss-close { align-self: flex-start; }

/* ---- Toast ---- */
.toast-root { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; padding: 12px 20px;
  border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-err { background: var(--danger); }
/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero { padding: 32px 0 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-media { aspect-ratio: 16 / 10; order: -1; }
  .hero-title { max-width: none; }
  .pdp-grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery { position: static; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-inner { height: 62px; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; font-size: 15px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .header-nav { gap: 2px; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .nav-fav-text { display: none; }
  .hero { padding: 48px 0 28px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 20px; border-radius: var(--radius-sm); }
  .chars { grid-template-columns: 1fr; }
  .pdp-price { font-size: 27px; }
  .arow { grid-template-columns: 68px 1fr; }
  .arow-media { width: 68px; height: 56px; }
  .arow-status { grid-column: 2; flex-direction: row; align-items: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-meta { align-items: flex-start; }
  .lb-close { top: 8px; right: 8px; }
  .lb-prev { left: 4px; } .lb-next { right: 4px; }
}
@media (max-width: 460px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .fav-actions .btn, .admin-toolbar .btn { flex: 1; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
  .card:hover .card-media img { transform: none; }
}

/* ---- Trust strip — редакторская строка цифр (без «3 равных карточек») ---- */
.hero-actions { flex-wrap: wrap; }
.trust { padding: 10px 0 30px; }
.trust-strip {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.trust-item { padding: 20px 30px; text-align: left; border-left: 1px solid var(--line); flex: 1 1 180px; }
.trust-item:first-child { border-left: none; padding-left: 0; }
.trust-val { font-family: var(--font-head); font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.trust-lbl { display: block; margin-top: 9px; font-size: 13px; color: var(--ink-2); letter-spacing: .2px; }

/* ---- About / как проходит сделка ---- */
.about { padding: 16px 0 8px; }
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 34px; }
.about-kicker { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 10px; }
.about-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.about-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.about-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--surface); box-shadow: var(--shadow); background: var(--surface-2); }
.about-photo[hidden] { display: none; }
.about-head-txt { min-width: 0; }
.about-head-txt .about-kicker { margin: 0 0 6px; }
.about-head-txt .about-title { margin: 0; }
.about-text { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 0 0 18px; }
.about-marks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.about-marks li { position: relative; padding-left: 28px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.about-marks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.about-contacts { display: flex; flex-wrap: wrap; gap: 10px; }
.about-steps { border-left: 1px solid var(--line); padding-left: 34px; }
.about-steps-title { font-size: 20px; margin-bottom: 18px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-head); font-weight: 700; font-size: 16px; display: grid; place-items: center; }
.step-body b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.step-t { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 0; }

/* ---- Trust / about — адаптив ---- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 26px; padding: 26px; }
  .about-steps { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
}
@media (max-width: 560px) {
  .trust-strip { flex-direction: column; }
  /* сбрасываем горизонтальный flex-basis 180px — в колонке он раздувал высоту строки */
  .trust-item { flex: 0 0 auto; display: flex; align-items: baseline; gap: 12px; border-left: none; border-top: 1px solid var(--line); padding: 13px 0; }
  .trust-item:first-child { border-top: none; padding-top: 0; }
  .trust-val { font-size: 22px; }
  .trust-lbl { margin-top: 0; }
}
