:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #17212b;
  --dim: #66727e;
  --line: #e3e8ed;
  --accent: #0e7a5f;
  --accent-soft: #e2f3ee;
  --owner: #b45309;
  --owner-soft: #fef3c7;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 6px 18px rgba(16, 32, 48, .05);
  font-family: "Noto Sans Georgian", "Sylfaen", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: inherit; line-height: 1.5; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* topbar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-size: 20px; }
.logo b { letter-spacing: .3px; }
.logo-tld { color: var(--accent); font-weight: 800; }
.proto-badge { font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 20px; padding: 2px 9px; margin-left: 9px; vertical-align: 2px; font-weight: 600; }
.nav a { margin-left: 20px; color: var(--dim); font-size: 14.5px; font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--ink); }
.nav a#navOwner { color: var(--owner); font-weight: 700; }

/* hero */
.hero { background: linear-gradient(160deg, #0d3b32 0%, #0e7a5f 90%); color: #fff; padding: 38px 0 30px; }
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: .2px; }
.hero-sub { opacity: .85; margin-top: 6px; font-size: 15px; }
.stats { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.stat b { font-size: 22px; display: block; }
.stat span { font-size: 12.5px; opacity: .8; }

/* filters */
.filters-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-top: -18px; position: relative; z-index: 5; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 22px; padding: 7px 16px; font-size: 14px; font-weight: 600; color: var(--dim); transition: .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-owner.active { background: var(--owner); border-color: var(--owner); }
.hot-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding: 10px 12px; background: #fff8ec; border: 1px solid #f5dfb8; border-radius: 11px; }
.hot-label { font-size: 13px; font-weight: 700; color: var(--owner); }
.hot { border: 1px solid #eed49a; background: #fff; border-radius: 18px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: #7c5209; transition: .15s; }
.hot:hover { border-color: var(--owner); color: var(--owner); }
.hot.active { background: var(--owner); border-color: var(--owner); color: #fff; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 9px; margin-top: 13px; }
.filter-row select, .filter-row input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink); min-width: 0; }
.filter-row input:focus, .filter-row select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.filter-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; flex-wrap: wrap; gap: 10px; }
.dup-toggle { font-size: 13.5px; color: var(--dim); display: flex; gap: 7px; align-items: center; }
#dupInfo { color: var(--accent); font-weight: 600; }

.btn { border: none; border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 700; }
.btn-alert { background: var(--ink); color: #fff; }
.btn-alert:hover { background: #000; }
.btn-more { background: #fff; border: 1px solid var(--line); color: var(--ink); margin: 22px auto; display: block; padding: 11px 34px; }
.btn-accent { background: var(--accent); color: #fff; width: 100%; }
.btn-owner { background: var(--owner); color: #fff; width: 100%; }

/* results */
.results-line { margin: 20px 2px 12px; font-size: 14px; color: var(--dim); }
.results-line b { color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, box-shadow .12s; position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16, 32, 48, .12); }
.card-img { height: 168px; background: #dde4ea; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img .noimg { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; height: 100%; font-size: 42px; background: linear-gradient(135deg, #e7edf2, #d3dde6); }
.noimg small { font-size: 12px; color: var(--dim); font-weight: 600; }
.badge { position: absolute; top: 10px; left: 10px; font-size: 11.5px; font-weight: 700; border-radius: 7px; padding: 3px 9px; background: rgba(15, 23, 32, .78); color: #fff; }
.badge-owner { background: var(--owner); }
.badge-vip { background: linear-gradient(135deg, #b8860b, #daa520); }
.badge-feat { background: #d97706; }
.card.vip { border: 2px solid #daa520; box-shadow: 0 0 0 3px rgba(218, 165, 32, .15), var(--shadow); }
.card.featured { border: 2px solid #f59e0b; }
.badge-dup { position: absolute; top: 10px; right: 10px; background: var(--danger); color: #fff; font-size: 11px; border-radius: 7px; padding: 3px 8px; font-weight: 700; }
.imgcount { position: absolute; bottom: 8px; right: 10px; color: #fff; font-size: 11.5px; background: rgba(15,23,32,.6); border-radius: 6px; padding: 2px 7px; }
.card-body { padding: 13px 14px 14px; }
.price { font-size: 18.5px; font-weight: 800; }
.price small { font-weight: 600; color: var(--dim); font-size: 12.5px; margin-left: 6px; }
.card-title { font-size: 13.8px; font-weight: 600; margin-top: 5px; height: 42px; overflow: hidden; }
.card-loc { font-size: 12.5px; color: var(--dim); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--dim); margin-top: 9px; border-top: 1px dashed var(--line); padding-top: 9px; }
.src-line { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim); margin-top: 8px; }
.src-line .src { font-weight: 700; color: var(--accent); }
.src-line .src.owner { color: var(--owner); }

/* modals */
.overlay { position: fixed; inset: 0; background: rgba(10, 18, 26, .55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; max-width: 780px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 0; position: relative; }
.modal-sm { max-width: 470px; }
.modal-pricing { max-width: 900px; }
.m-close { position: absolute; top: 12px; right: 14px; border: none; background: rgba(15,23,32,.08); border-radius: 50%; width: 34px; height: 34px; font-size: 16px; z-index: 5; }
.m-img { height: 300px; background: #dde4ea; }
.m-img img { width: 100%; height: 100%; object-fit: cover; }
.m-img .noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 72px; background: linear-gradient(135deg, #e7edf2, #d3dde6); }
.m-body { padding: 20px 24px 24px; }
.m-price { font-size: 26px; font-weight: 800; }
.m-price small { font-size: 14px; color: var(--dim); margin-left: 8px; }
.m-title { font-size: 17px; font-weight: 700; margin-top: 6px; }
.m-loc { color: var(--dim); font-size: 14px; margin-top: 4px; }
.m-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.m-meta div { background: var(--bg); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.m-meta b { display: block; font-size: 15px; }
.m-desc { font-size: 14px; color: #333d47; }
.m-note { background: var(--accent-soft); border: 1px solid #bfe3d8; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; margin-top: 16px; }
.m-note.owner-note { background: var(--owner-soft); border-color: #fcd9a0; }
.m-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.m-actions .btn { flex: 1; text-align: center; }
.phone-reveal { font-size: 22px; font-weight: 800; color: var(--owner); letter-spacing: 1px; }
.lock-teaser { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--dim); margin-top: 14px; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 24px; }
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.plan.hot { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); position: relative; }
.plan h3 { font-size: 16px; }
.plan .p-price { font-size: 26px; font-weight: 800; margin: 8px 0 4px; }
.plan .p-price span { font-size: 13px; color: var(--dim); font-weight: 500; }
.plan ul { list-style: none; margin: 12px 0 16px; font-size: 13.5px; color: #333d47; }
.plan li { padding: 4px 0; }
.p-tag { position: absolute; top: -11px; left: 20px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 12px; padding: 2px 11px; }
.m-head { padding: 22px 24px 0; font-size: 19px; font-weight: 800; }
.m-subhead { padding: 4px 24px 0; color: var(--dim); font-size: 13.5px; }

/* forms in modals */
.f-body { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.f-body input, .f-body select, .f-body textarea { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 14px; font-family: inherit; width: 100%; }
.f-body textarea { min-height: 80px; resize: vertical; }
.f-ok { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 600; }

/* owner packages + demo payment */
.pkg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pkg { border: 1px solid var(--line); border-radius: 11px; padding: 10px 8px; text-align: center; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.pkg:has(input:checked) { border-color: var(--owner); background: var(--owner-soft); }
.pkg input { display: none; }
.pkg b { font-size: 12.5px; }
.pkg-price { font-weight: 800; font-size: 15px; }
.pkg small { color: var(--dim); font-size: 10.5px; line-height: 1.3; }
.pay-box { display: flex; flex-direction: column; gap: 10px; }
.pay-line { display: flex; justify-content: space-between; background: var(--bg); border-radius: 9px; padding: 10px 13px; font-size: 14px; }
.dim-line { color: var(--dim); }

/* district price comparison */
.stats-tabs { display: flex; gap: 8px; padding: 14px 24px 4px; }
.stats-list { padding: 12px 24px 6px; }
.stat-row { display: grid; grid-template-columns: 210px 1fr 110px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-name { font-size: 13.5px; font-weight: 600; }
.stat-name small { color: var(--dim); font-weight: 400; }
.stat-track { background: var(--bg); border-radius: 6px; height: 14px; overflow: hidden; }
.stat-bar { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 6px; }
.stat-val { font-size: 14px; font-weight: 800; text-align: right; white-space: nowrap; }
.stat-val small { color: var(--dim); font-weight: 500; font-size: 11px; }
.stat-row.cheapest .stat-name { color: var(--accent); }
.stat-row.cheapest .stat-bar { background: linear-gradient(90deg, var(--accent), #16a34a); }
.cheap-tag { background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 700; border-radius: 10px; padding: 2px 8px; vertical-align: 1px; }
.stats-foot { padding: 12px 24px 22px; font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line); margin-top: 8px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 130px 1fr 84px; } .pkg-row { grid-template-columns: 1fr; } }

.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 34px; font-size: 13px; color: var(--dim); background: #fff; }
.footer .dim { font-size: 12px; margin-top: 6px; }

@media (max-width: 900px) {
  .filter-row { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .m-meta { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 23px; }
}
