:root {
  --navy: #0f1c2e;
  --navy-2: #17324f;
  --red: #c81e1e;
  --green: #15803d;
  --bg: #f4f6f8;
  --card: #fff;
  --text: #122033;
  --muted: #5b6775;
  --line: #e5e9ee;
  --shadow: 0 12px 30px rgba(15, 28, 46, 0.08);
  --sans: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, select, input, textarea { font: inherit; }
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 24px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark {
  width: 40px; height: 40px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 700; border-radius: 8px;
}
.brand-text strong { display: block; font-size: 16px; }
.brand-text span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; gap: 18px; margin-left: auto; font-weight: 600; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a.is-on { color: var(--navy); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.tel { font-weight: 700; text-decoration: none; color: var(--navy); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px;
  background: var(--red); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; }

.hero {
  position: relative; color: #fff;
  min-height: 520px;
  display: grid; align-items: end;
  background:
    linear-gradient(180deg, rgba(15,28,46,.35) 0%, rgba(15,28,46,.78) 100%),
    url("/assets/img/hero.jpg") center/cover no-repeat;
  padding: 72px 0 36px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 10px; font-weight: 700; }
.hero p { margin: 0 0 22px; max-width: 540px; color: rgba(255,255,255,.86); }
.search-bar {
  display: grid; grid-template-columns: 1.4fr .9fr .9fr auto;
  gap: 8px; background: #fff; padding: 10px; border-radius: 12px;
  box-shadow: var(--shadow); color: var(--text);
}
.search-bar input, .search-bar select {
  min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff;
}

.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.cat {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #fff; text-decoration: none; padding: 14px 16px; border-radius: 10px; font-weight: 700;
}
.listing-section, .page-head, .about, .contact { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.section-head h2, .page-head h1 { margin: 0; font-size: 28px; }
.section-head a { color: var(--red); font-weight: 700; text-decoration: none; }
.lead { color: var(--muted); }

.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.listing-card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.listing-cover { position: relative; aspect-ratio: 4/3; background: #dbe3ea; }
.listing-cover img, .gallery-main { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px; color: #fff;
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 6px;
}
.badge-satilik { background: var(--red); }
.badge-kiralik { background: var(--green); }
.listing-body { padding: 14px 16px 18px; }
.price { font-size: 20px; font-weight: 700; color: var(--navy); }
.listing-body h3 { margin: 6px 0 4px; font-size: 16px; }
.place, .meta { margin: 0; color: var(--muted); font-size: 13px; }

.filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px;
}
.filters a, .filters span {
  text-decoration: none; border: 1px solid var(--line); background: #fff;
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.filters a.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

.detail { padding: 28px 0 72px; }
.crumb { color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 14px; }
.detail-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 24px; }
.gallery { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.gallery-main { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.gallery-video { width: 100%; max-height: 72vh; background: #0f172a; display: block; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; }
.gallery-thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; }
.detail-copy { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-top: 16px; }
.detail-copy h1 { margin: 8px 0 10px; font-size: 28px; }
.price.big { font-size: 30px; margin-bottom: 8px; }
.kicker { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.specs { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.spec { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.desc { line-height: 1.7; color: #334155; }
.side-card, .tkgm-panel, .tkgm-preview, .panel, .empty-note, .admin-login {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.side-card h2, .tkgm-panel h2, .admin-edit h2, .panel h2 { margin: 0 0 12px; font-size: 20px; }
.contact-actions { display: grid; gap: 8px; }
.map-wrap { min-height: 220px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 12px; }
#map { min-height: 320px; background: #d9e2ea; }
.map-note { margin: 0; padding: 20px; color: var(--muted); }
.source-note { font-size: 12px; color: var(--muted); }
.facts { margin-top: 22px; }
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.row span { color: var(--muted); }

.about-grid, .split, .footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.site-footer { background: var(--navy); color: rgba(255,255,255,.78); padding: 36px 0 18px; }
.site-footer a { color: #fff; text-decoration: none; display: block; margin: 6px 0; }
.brand.light .mark { background: #fff; color: var(--navy); }
.brand.light .brand-text span { color: rgba(255,255,255,.65); }
.footer-copy { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; display: flex; justify-content: space-between; }
.wa-float {
  position: fixed; right: 18px; bottom: 18px; background: #22c55e; color: #fff;
  padding: 12px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; z-index: 50;
}

.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.field input, .field select, .field textarea {
  min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff;
}
.field textarea { min-height: 120px; padding: 12px; }
.status { margin-top: 12px; color: var(--muted); }
.status.error { color: var(--red); }
.results { display: none; margin-top: 16px; grid-template-columns: .9fr 1.1fr; gap: 14px; }
.results.show { display: grid; }
.admin-table { display: grid; gap: 10px; }
.admin-row { display: flex; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.admin-actions { display: flex; gap: 12px; }
.admin-actions a { color: var(--red); }
.keep-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.keep-photo img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; }
.save-bar { margin-top: 16px; }
.page-head { padding-bottom: 8px; }
.empty-note { color: var(--muted); }

@media (max-width: 900px) {
  .nav, .header-cta .btn { display: none; }
  .search-bar, .cats, .listing-grid, .detail-grid, .about-grid, .split, .footer-grid, .form-grid, .results.show {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 420px; padding-top: 48px; }
}
