/* ucretsizilan — ana stil
   Kimlik: güven veren çivit mavisi + sıcak amber vurgu, ferah ızgara, yuvarlatılmış kartlar.
   Hedef: hızlı taranabilir ilan listesi, mobil öncelikli. */

:root {
  --indigo: #2541b2;
  --indigo-dark: #1b2e7a;
  --indigo-soft: #eef1fc;
  --amber: #ff8a3d;
  --amber-dark: #e8701f;
  --ink: #1a1f2b;
  --slate: #5b6675;
  --line: #e6e9ef;
  --bg: #f6f7f9;
  --white: #fff;
  --green: #1b9e57;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20,30,60,.06), 0 4px 16px rgba(20,30,60,.05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--bg); line-height: 1.55;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 16px; }
.logo {
  font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--indigo);
  white-space: nowrap; text-decoration: none;
}
.logo:hover { text-decoration: none; }
.search { flex: 1; display: flex; max-width: 560px; }
.search input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--line); border-right: 0;
  border-radius: 9px 0 0 9px; font-size: 15px; outline: none;
}
.search input:focus { border-color: var(--indigo); }
.search button {
  padding: 0 20px; background: var(--indigo); color: #fff; border: 0;
  border-radius: 0 9px 9px 0; font-weight: 600; cursor: pointer; font-size: 15px;
}
.search button:hover { background: var(--indigo-dark); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-block; padding: 9px 16px; border-radius: 9px; font-weight: 600;
  font-size: 14px; cursor: pointer; border: 0; text-align: center; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--slate); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-danger { background: #e5484d; color: #fff; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* kategori şeridi */
.catbar { background: var(--indigo-dark); }
.catbar-inner { display: flex; gap: 4px; overflow-x: auto; padding: 0; scrollbar-width: none; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a {
  color: #cfd6f5; padding: 11px 14px; font-size: 13.5px; white-space: nowrap; font-weight: 500;
}
.catbar a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }

.site-main { padding: 24px 16px 48px; min-height: 50vh; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--indigo) 0%, var(--indigo-dark) 100%);
  color: #fff; border-radius: 18px; padding: 44px 32px; text-align: center; margin-bottom: 28px;
}
.hero h1 { font-size: 28px; margin: 0 0 8px; font-weight: 800; letter-spacing: -.5px; }
.hero p { margin: 0 0 20px; opacity: .9; font-size: 16px; }

.section-title { font-size: 20px; font-weight: 800; margin: 28px 0 16px; letter-spacing: -.3px; }
.section-title small { color: var(--slate); font-weight: 600; font-size: 15px; }

/* ---------- Kategori ızgarası ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; }
.cat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 12px; text-align: center; transition: .15s; color: var(--ink);
}
.cat-card:hover { border-color: var(--indigo); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.cat-icon { font-size: 30px; display: block; margin-bottom: 8px; }
.cat-name { font-weight: 600; font-size: 14px; }

/* ---------- İlan ızgarası ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 16px; }
.listing-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); transition: .15s; display: flex; flex-direction: column;
}
.listing-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; border-color: #d8dde8; }
.lc-img { aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--indigo-soft); }
.lc-body { padding: 12px 13px; }
.lc-price { color: var(--amber-dark); font-weight: 800; font-size: 17px; }
.lc-title { font-size: 14px; margin: 4px 0; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.lc-meta { font-size: 12px; color: var(--slate); }

.empty { background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--slate); }

/* ---------- İlan detay ---------- */
.breadcrumb { font-size: 13px; color: var(--slate); margin-bottom: 16px; }
.breadcrumb a { color: var(--slate); }
.listing-detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.ld-cover { width: 100%; border-radius: var(--radius); background: var(--indigo-soft); aspect-ratio: 4/3; object-fit: cover; }
.ld-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ld-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.ld-thumbs img:hover { border-color: var(--indigo); }
.ld-info h1 { font-size: 22px; margin: 0 0 8px; }
.ld-price { font-size: 26px; font-weight: 800; color: var(--amber-dark); margin-bottom: 14px; }
.ld-meta { display: flex; flex-direction: column; gap: 6px; color: var(--slate); font-size: 14px; margin-bottom: 18px; }
.ld-seller { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.ld-seller strong { font-size: 16px; }
.ld-seller span { color: var(--slate); font-size: 13px; }
.ld-owner-actions { display: flex; gap: 8px; margin-top: 14px; }
.ld-description { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.ld-description h2 { margin-top: 0; font-size: 17px; }
.ld-desc-body { color: #333; font-size: 15px; }

/* ---------- Formlar ---------- */
.form-box, .auth-box { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 28px; max-width: 620px; margin: 10px auto; box-shadow: var(--shadow); }
.auth-box { max-width: 400px; }
.form-box h1, .auth-box h1 { margin-top: 0; font-size: 22px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: 15px; outline: none; background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--indigo); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-box button, .auth-box button { margin-top: 20px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--slate); }

.alert { padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 12px; }
.alert.err { background: #fde8e8; border: 1px solid #f5b5b5; color: #b42318; }
.alert.info { background: #fff4d6; border: 1px solid #f0d98a; color: #9a6700; }

/* ---------- İlanlarım tablosu ---------- */
.mylist-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mylist-table th, .mylist-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mylist-table th { background: #fafbfd; color: var(--slate); font-size: 12px; text-transform: uppercase; }
.status { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-active { background: #e7f7ed; color: var(--green); }
.status-pending { background: #fff4d6; color: #9a6700; }
.status-rejected { background: #fde8e8; color: #b42318; }
.status-expired { background: #eceff3; color: #667; }
.mylist-table .actions a { margin-right: 10px; font-size: 13px; }

/* ---------- Sayfalama ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; }
.pagination a.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* ---------- Reklam alanları ---------- */
.ad-slot { margin: 20px 0; text-align: center; min-height: 90px; overflow: hidden; }
.ad-slot:empty { display: none; }

/* ---------- Statik / 404 ---------- */
.static-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 760px; }
.notfound { text-align: center; padding: 60px 20px; }
.notfound h1 { font-size: 72px; margin: 0; color: var(--indigo); }
.muted { color: var(--slate); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c4cbd6; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 40px 16px 24px; }
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #c4cbd6; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px; font-size: 13px; color: #8b94a3; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .listing-detail { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .search { order: 3; max-width: 100%; width: 100%; }
  .logo { font-size: 19px; }
  .header-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
}

/* Erişilebilirlik */
:focus-visible { outline: 3px solid rgba(37,65,178,.4); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
