:root {
  --ink: #1b2129;
  --steel: #3b4550;
  --muted: #5f6b77;
  --paper: #f4f5f6;
  --white: #ffffff;
  --concrete: #e7e9ec;
  --line: #d9dde2;
  --hazard: #ffc20e;
  --ok: #14764a;
  --warn: #b45309;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 20, 26, .06), 0 10px 26px rgba(16, 20, 26, .08);
  --head: 'Barlow Condensed', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 .75em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.main { padding-top: 8px; padding-bottom: 48px; }
.ico { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); font-size: .92rem; }
.hazard { height: 10px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--ink) 14px 28px); }

/* Шапка */
.site-head { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; }
.head-row { display: flex; align-items: center; gap: 14px 18px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-size: 1.6rem; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; background: var(--hazard); color: var(--ink); border-radius: 8px; font-size: 1.05rem; font-weight: 800; }
.brand b { color: var(--hazard); font-weight: 800; }
.quick-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: #2a323c; border-radius: 10px; padding: 4px 4px 4px 12px; min-width: 0; color: #9aa5b1; }
.quick-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font: inherit; padding: 8px 0; outline: none; }
.quick-search input::placeholder { color: #9aa5b1; }
.quick-search button { background: var(--hazard); color: var(--ink); border: 0; border-radius: 7px; padding: 8px 14px; font-family: var(--head); font-weight: 700; text-transform: uppercase; cursor: pointer; }
.menu { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.menu > a:not(.btn) { color: #e6e9ee; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.menu > a:not(.btn):hover { color: var(--hazard); }

/* Бутони */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 9px; border: 2px solid transparent; font-family: var(--head); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; cursor: pointer; background: var(--white); color: var(--ink); line-height: 1.2; }
.btn-cta { background: var(--hazard); color: var(--ink); }
.btn-cta:hover { background: #ffd23f; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { border-color: var(--ink); background: transparent; }
.btn-ghost-light { border-color: #fff; color: #fff; background: transparent; }
.btn-sm { padding: 7px 12px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-link { color: var(--hazard); font-weight: 600; }
button.btn, .btn { font: inherit; font-family: var(--head); }
:focus-visible { outline: 3px solid var(--hazard); outline-offset: 2px; }

/* Начало */
.hero { background-color: var(--ink); color: #fff; padding: 56px 0 64px; position: relative; overflow: hidden;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 36px 36px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--hazard); }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--hazard); font-weight: 700; margin: 0 0 12px; }
.hl { color: var(--hazard); }
.lead { font-size: 1.08rem; color: #c9d1da; max-width: 60ch; }
.hero-search { display: flex; gap: 8px; margin: 24px 0 16px; max-width: 620px; }
.hero-search input { flex: 1; min-width: 0; padding: 14px 16px; border-radius: 10px; border: 0; font: inherit; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero-panel { display: grid; gap: 12px; }
.hero-panel div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-left: 6px solid var(--hazard); padding: 16px 18px; border-radius: var(--radius); }
.hero-panel strong { display: block; font-family: var(--head); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.hero-panel span { color: #c9d1da; }

.block { margin-top: 44px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cat { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.cat:hover { transform: translateY(-2px); border-color: var(--hazard); }
.cat-ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--hazard); }
.cat-ico .ico { width: 28px; height: 28px; stroke-width: 1.7; }
.cat-body { flex: 1; min-width: 0; }
.cat h3 { margin: 0 0 4px; }
.cat p { margin: 0; color: var(--muted); font-size: .95rem; }
.cat-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* Карти */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16, 20, 26, .14); }
.card-vip { border: 2px solid var(--hazard); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--concrete); display: grid; place-items: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.no-img { color: var(--steel); }
.no-img .ico { width: 56px; height: 56px; stroke-width: 1.4; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3 { font-size: 1.2rem; margin: 2px 0 0; }
.tag { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.price { font-family: var(--head); font-weight: 700; font-size: 1.25rem; margin: auto 0 0; }
.meta { margin: 0; color: var(--muted); font-size: .92rem; display: flex; gap: 6px; align-items: center; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-family: var(--head); font-weight: 700; padding: 3px 9px; border-radius: 6px; font-size: .9rem; display: inline-flex; gap: 5px; align-items: center; }
.badge-vip { background: var(--hazard); color: var(--ink); }

/* Оценки */
.stars { color: #e39b00; letter-spacing: 1px; font-size: 1.05rem; }
.stars-none { color: var(--muted); font-size: .9rem; }
.rating-line { display: flex; gap: 6px; align-items: center; margin: 2px 0 0; font-size: .95rem; }
.stars-pick { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; position: relative; }
.stars-pick legend { position: absolute; left: -9999px; }
.stars-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-pick label { font-size: 2rem; color: #cfd4da; cursor: pointer; line-height: 1; }
.stars-pick label:hover,
.stars-pick label:hover ~ label,
.stars-pick input:checked ~ label { color: #e39b00; }
.review { border-top: 1px solid var(--line); padding: 14px 0; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.helpful { margin: 6px 0 0; }
.helpful .btn { padding: 5px 10px; }
.review-form { border-top: 2px solid var(--hazard); padding-top: 16px; margin-top: 12px; }
.review-form .field { margin-bottom: 12px; }

/* Формуляри */
.page-head { margin: 8px 0 22px; }
.page-head.narrow { max-width: 760px; }
.page-head h1 { margin: 6px 0; }
.head-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lead-sm { color: var(--muted); margin: 0; max-width: 70ch; }
.crumbs { font-size: .92rem; color: var(--muted); margin: 0 0 4px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.card-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.form { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin-bottom: 14px; }
.field input, .field select, .field textarea, .filters select, .form input[type=file], .row-actions input {
  font: inherit; font-weight: 400; padding: 11px 12px; border: 1.5px solid #c5ccd4; border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; min-height: 120px; }
.row-actions input { width: auto; min-width: 200px; padding: 7px 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.filters { display: flex; gap: 12px; align-items: end; margin: 0 0 18px; flex-wrap: wrap; }
.filters .field { margin: 0; min-width: 180px; }
.filters .btn { align-self: end; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; border-left: 6px solid var(--steel); background: #fff; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { border-color: var(--ok); }
.flash-warn { border-color: var(--warn); background: #fff7ed; }
.flash-info { border-color: var(--steel); }
.empty { background: var(--white); border: 2px dashed var(--line); padding: 24px; border-radius: var(--radius); color: var(--muted); }
.auth { max-width: 520px; margin: 0 auto; }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.summary code { background: var(--concrete); padding: 2px 6px; border-radius: 6px; }

/* Обява */
.listing { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.gallery-main { aspect-ratio: 4 / 3; background: var(--concrete); border-radius: 10px; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.gallery-thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.gallery-empty { aspect-ratio: 4 / 3; background: var(--concrete); border-radius: 10px; display: grid; place-items: center; color: var(--steel); }
.gallery-empty .ico { width: 90px; height: 90px; stroke-width: 1.2; }
.listing-info h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-top: 8px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 5px; align-items: center; padding: 3px 9px; border-radius: 6px; font-family: var(--head); font-weight: 700; background: var(--ink); color: #fff; font-size: .95rem; }
.pill-vip { background: var(--hazard); color: var(--ink); }
.pill-soft { background: var(--concrete); color: var(--ink); }
.price-big { font-family: var(--head); font-weight: 800; font-size: 2rem; margin: 6px 0 12px; }
.facts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; color: var(--muted); }
.facts li { display: flex; gap: 8px; align-items: center; }
.owner-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.owner-bar form { margin: 0; }
.prose { margin-top: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.prose p { max-width: 75ch; }

/* Моите обяви, админ */
.my-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.my-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; }
.my-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--concrete); display: grid; place-items: center; color: var(--steel); }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-item h3 { font-size: 1.15rem; margin: 4px 0 2px; }
.my-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.my-actions form { margin: 0; }
.status { font-size: .82rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef1f4; color: var(--steel); }
.status-active { background: #dcfce7; color: var(--ok); }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: var(--danger); }
.reason { color: var(--danger); font-size: .92rem; margin: 4px 0 0; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--hazard); border-radius: var(--radius); padding: 12px 18px; }
.stat strong { font-family: var(--head); font-size: 1.9rem; display: block; line-height: 1; }
.admin-item { padding: 16px; }
.admin-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.row-actions form { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }

/* Промоции */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.plan { position: relative; display: grid; gap: 4px; background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 44px 16px 16px; cursor: pointer; }
.plan input { position: absolute; top: 16px; right: 14px; accent-color: var(--ink); width: 18px; height: 18px; }
.plan:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hazard); }
.plan-vip { border-color: #f1c33a; }
.plan-name { font-family: var(--head); font-weight: 800; font-size: 1.25rem; display: flex; gap: 8px; align-items: center; }
.plan-price { font-family: var(--head); font-size: 1.8rem; font-weight: 800; }
.plan-desc { color: var(--muted); font-size: .93rem; }
.promo-form h2 { font-size: 1.4rem; }
.methods { display: grid; gap: 10px; margin-bottom: 22px; }
.method { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; }
.method input { margin-top: 5px; accent-color: var(--ink); }
.method:has(input:checked) { border-color: var(--ink); }
.method .ico { width: 1.6em; height: 1.6em; color: var(--steel); margin-top: 2px; }

.message { max-width: 620px; margin: 40px auto; text-align: center; background: var(--white); padding: 36px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Подножие */
.site-foot { background: var(--ink); color: #c9d1da; margin-top: 40px; }
.foot-row { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 22px 0; flex-wrap: wrap; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-links a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: var(--hazard); }

/* Телефони */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .listing { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .my-item { grid-template-columns: 56px 1fr; }
  .my-thumb { width: 56px; height: 56px; }
  .my-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
  .card-form { padding: 16px; }
  .row-actions input { min-width: 0; width: 100%; }
}
