:root {
  --navy: #1f3d73;
  --navy-2: #14284d;
  --blue: #2a9fd8;
  --blue-soft: #e3f3fb;
  --bg: #f5f7fa;
  --surface: #fff;
  --border: #e3e8ef;
  --text: #1c2533;
  --muted: #687385;
  --green: #1f8f4e;
  --amber: #b9770e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 30, 60, .06), 0 6px 20px rgba(15, 30, 60, .06);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--navy); }
.btn.wa { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--navy); font: inherit; cursor: pointer; padding: 0; }

/* Üst bant */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.logo { height: 48px; width: auto; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: .01em; }
.top-nav { display: flex; gap: 18px; }
.top-nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.top-nav a:hover { color: var(--blue); }
.top-wa { padding: 8px 14px; }

/* Arama */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1b5f8f 100%); color: #fff; border-radius: 16px; padding: 32px 28px; margin: 22px 0 16px; }
.hero h1 { font-size: 30px; }
.hero .muted { color: #c6d4ec; margin: 6px 0 18px; }
.seg { display: inline-flex; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 4px; margin-bottom: 12px; }
.seg button { background: none; border: 0; color: #e4ecf8; font: inherit; font-weight: 600; padding: 7px 16px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--navy); }
.filters { display: grid; grid-template-columns: 2fr repeat(6, 1fr); gap: 8px; }
.filters input, .filters select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 0; background: #fff; color: var(--text); width: 100%; min-width: 0; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 12px; }

/* Kartlar */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding-bottom: 40px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(15, 30, 60, .12); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #e9eef5; overflow: hidden; flex: none; min-height: 0; }
/* Dikey/uzun fotoğraf kartı uzatmasın: alanı doldur, taşanı kırp */
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { display: grid; place-items: center; height: 100%; font-size: 48px; color: #b5c2d4; }
.noimg.big { aspect-ratio: 4 / 3; font-size: 80px; }
.tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); }
.tag.kiralik { background: var(--blue); }
.tag.opt { left: auto; right: 10px; background: var(--amber); }
.tag.inline { position: static; display: inline-block; margin-bottom: 8px; }
.count { position: absolute; bottom: 10px; right: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.card-body h3 { font-size: 16px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-size: 20px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.price.big { font-size: 28px; margin: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { background: var(--blue-soft); color: var(--navy); font-size: 12.5px; padding: 3px 9px; border-radius: 6px; }

/* Detay */
.back { display: inline-block; margin: 20px 0 12px; text-decoration: none; font-weight: 600; }
.detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; }
.gallery { min-width: 0; }
.main-img { position: relative; border-radius: var(--radius); overflow: hidden; background: #0f1724; aspect-ratio: 4 / 3; min-height: 0; }
.main-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); font-size: 26px; cursor: pointer; color: var(--navy); }
.nav.prev { left: 12px; } .nav.next { right: 12px; }
.counter { position: absolute; bottom: 10px; right: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; padding: 2px 8px; border-radius: 6px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; }
.thumbs button { flex: none; width: 92px; height: 68px; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer; background: none; opacity: .7; }
.thumbs button.on { border-color: var(--blue); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.side { display: flex; flex-direction: column; gap: 14px; }
.box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.box h1 { font-size: 22px; }
.box h2 { font-size: 17px; margin-bottom: 12px; }
.contact { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; }
.agent { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.detail-body { display: grid; gap: 16px; margin: 18px 0 40px; max-width: calc(63% - 10px); }
.desc { white-space: pre-wrap; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.specs dt, .specs dd { margin: 0; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 600; text-align: right; }

/* Alt bölümler */
.about { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 0; }
.about p { white-space: pre-wrap; max-width: 760px; }
.foot { background: var(--navy-2); color: #dce5f3; padding: 30px 0 18px; }
.foot .muted { color: #9fb0cc; }
.foot-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-contact { display: flex; flex-direction: column; gap: 6px; }
.foot-contact a { color: #fff; text-decoration: none; }
.copy { margin-top: 18px; font-size: 13px; }

.loading, .empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty.big h1 { color: var(--navy); margin-bottom: 8px; }
.grid .empty { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); }

@media (max-width: 1000px) {
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .filters input[name=q] { grid-column: 1 / -1; }
  .detail { grid-template-columns: 1fr; }
  .detail-body { max-width: none; }
  .contact { position: static; }
}
@media (max-width: 640px) {
  .top-nav { display: none; }
  .logo { height: 40px; }
  .brand-name { font-size: 15px; }
  .hero { padding: 22px 16px; border-radius: 12px; margin-top: 14px; }
  .hero h1 { font-size: 22px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
}
