/* İlan AI ana sayfa — GOOGLE SADELİĞİ
   İlk ekran: marka + tek arama kutusu + birkaç örnek (style.css .g-*).
   Altında yalnız iki bölüm: tek ilan akışı (#homeFeed) ve kategori/bölge
   bağlantıları. Sabit renk YOK — yalnız style.css değişkenleri. */
.home-page { background: var(--bg); }
.home-page .site-footer { margin-top: 56px; }

/* Ana sayfada başlık çubuğu sade: logo büyük aramanın içinde, çubukta tekrar etmez */

/* Bölümler */
.home-section { padding: 28px 0; }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.home-section-head h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.home-links .home-section-head:not(:first-child) { margin-top: 30px; }
.home-more { font-size: .9rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.home-more:hover { color: var(--primary); }

/* Tek akış ızgarası */
.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-card {
  position: relative; min-width: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-card:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.home-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.home-card-media > img, .home-card-media > svg { width: 100%; height: 100%; object-fit: cover; }
.home-card-badges { position: absolute; z-index: 3; top: 10px; left: 10px; right: 50px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.home-card-badge {
  display: inline-flex; padding: 4px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--text) 78%, transparent); color: var(--surface);
  font-size: .68rem; font-weight: 800;
}
.home-card-badge.ai { background: var(--deal); }
.home-card-badge.new { background: var(--primary); }
.home-card-badge.today, .home-card-badge.featured { background: var(--accent); color: var(--surface); }
.home-card-badge.drop { background: var(--over); }
.home-card-fav {
  position: absolute; z-index: 4; top: 8px; right: 8px; display: grid; place-items: center;
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 90%, transparent); font-size: 1rem;
}
.home-card-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.home-card-price { color: var(--text); font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; }
.home-card-old-price { margin-left: 6px; color: var(--muted); font-size: .74rem; font-weight: 600; text-decoration: line-through; }
.home-card-title {
  display: -webkit-box; overflow: hidden; color: var(--text); font-size: .92rem; line-height: 1.35;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 2.7em;
}
.home-card-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--muted); font-size: .8rem; }
.home-card-location { overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.home-card-link { position: absolute; z-index: 3; inset: 0; }

.home-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 160px; padding: 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 16px;
}
.home-empty-icon { font-size: 1.4rem; }
.home-empty b { color: var(--text); }
.home-skeleton { min-height: 260px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.home-skeleton::before {
  content: ""; display: block; aspect-ratio: 4 / 3;
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 45%, var(--surface-2) 60%);
  background-size: 220% 100%; animation: homeShimmer 1.2s infinite linear;
}
@keyframes homeShimmer { to { background-position: -220% 0; } }

/* Kategori ve bölge bağlantıları: sade, kompakt */
.home-links .cat-grid { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.home-links .region-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }

@media (max-width: 1080px) { .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 420px) {
  .home-card-body { padding: 10px; }
  .home-card-price { font-size: .98rem; }
  .home-card-title { font-size: .84rem; }
  .home-card-location { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-card, .home-card:hover { transition: none; transform: none; }
  .home-skeleton::before { animation: none; }
}

/* Kullanıcı tercihi: ana sayfa koyu temada da açık/kum kalır.
   Sabit renk YOK — style.css'teki --l-* açık palet sabitleri kullanılır. */
html[data-theme="dark"] .home-page {
  --bg: var(--l-bg); --surface: var(--l-surface); --surface-2: var(--l-surface-2);
  --text: var(--l-text); --muted: var(--l-muted); --border: var(--l-border);
  --primary: var(--l-primary); --primary-2: var(--l-primary-2); --accent: var(--l-accent);
  --deal: var(--l-deal); --over: var(--l-over); --fair: var(--l-fair);
  --shadow: var(--l-shadow); --shadow-lg: var(--l-shadow-lg);
  background: var(--bg); color: var(--text);
}

/* ── İki kolonlu açılış: sol başlık + arama kartı, sağ öne çıkan ilan ── */
body[data-page="index"] main { display: block; }
.h-hero { padding: clamp(28px, 6vw, 64px) 0 clamp(24px, 4vw, 40px); }
.h-hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.h-eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.h-title { font-size: clamp(2.1rem, 5.2vw, 3.7rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; }
.h-sub { color: var(--muted); font-size: 1.05rem; margin: 16px 0 24px; max-width: 34em; }
.h-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px 16px; box-shadow: var(--shadow); }
.h-tabs { justify-content: flex-start; gap: 22px; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.h-tabs .tab-btn { background: none; border: none; border-radius: 0; padding: 6px 2px 10px; margin-bottom: -1px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.h-tabs .tab-btn.active { background: none; color: var(--text); border-bottom-color: var(--accent); }
.h-search { display: flex; align-items: center; gap: 6px; }
.h-search input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 13px 14px; font-size: 1rem; }
.h-search input:focus { outline: none; border-color: var(--primary); }
.h-search .btn { border-radius: 10px; padding: 13px 20px; white-space: nowrap; }
.h-quick { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 12px; font-size: .88rem; }
.h-quick a { color: var(--text); padding: 2px 12px; border-left: 1px solid var(--border); }
.h-quick a:first-child { padding-left: 0; border-left: none; }
.h-quick a:hover { color: var(--accent); text-decoration: underline; }

.h-show { min-width: 0; }
.h-welcome {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: clamp(24px, 4vw, 40px);
  min-height: 340px; justify-content: center; border-radius: 18px; color: var(--surface);
  background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--text) 62%, var(--accent)));
  box-shadow: var(--shadow-lg);
}
.h-welcome svg { color: var(--accent); }
.h-welcome h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; letter-spacing: -.02em; }
.h-welcome p { opacity: .82; max-width: 30em; }
.h-welcome .btn { background: var(--accent); color: var(--text); border-color: var(--accent); margin-top: 6px; }
.h-feat { position: relative; display: block; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.h-feat-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.h-feat-media img { width: 100%; height: 100%; object-fit: cover; }
.h-feat-tag { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 8px; background: var(--accent); color: var(--surface); font-size: .8rem; font-weight: 700; }
.h-feat-body { padding: 16px 20px 18px; }
.h-feat-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.h-feat-loc { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.h-feat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; }
.h-feat-price { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.h-feat-meta { color: var(--muted); font-size: .9rem; }
.h-feat a.h-feat-link { position: absolute; inset: 0; }

.home-section-head h2 { font-size: 1.4rem; }

@media (max-width: 900px) {
  .h-hero-in { grid-template-columns: minmax(0, 1fr); }
  .h-welcome { min-height: 0; }
}
@media (max-width: 520px) {
  .h-search { flex-wrap: wrap; }
  .h-search input { flex: 1 1 100%; }
  .h-search .g-mic { order: 2; }
  .h-search .btn { order: 3; flex: 1; }
  .h-tabs { gap: 16px; }
}
