/* ============================================================
   Kanadada.com — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Renkler — Türkiye / Kanada: kırmızı - beyaz - antrasit */
  --color-bg: #F8F6F1;
  --color-surface: #FFFFFF;
  --color-text: #201E1B;
  --color-text-muted: #726B60;
  --color-border: #EAE6DA;
  --color-border-strong: #D7D0BF;

  --color-red: #A6192E;
  --color-red-dark: #7E1424;
  --color-red-deep: #4A0D17;
  --color-red-tint: #FBEAEC;

  --color-navy: #1C1916;
  --color-navy-light: #35302A;

  --color-gold: #B9832E;
  --color-gold-tint: #FBF1DF;

  --color-success: #1F8A4C;
  --color-success-tint: #E8F5EC;
  --color-warning: #B9770E;
  --color-warning-tint: #FDF3E3;
  --color-danger: #7A1222;
  --color-danger-tint: #FBEAEC;

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(28,20,15,0.05), 0 1px 1px rgba(28,20,15,0.04);
  --shadow-md: 0 10px 24px -6px rgba(28,20,15,0.12), 0 2px 6px rgba(28,20,15,0.05);
  --shadow-lg: 0 24px 48px -12px rgba(20,14,10,0.28);

  --header-h: 72px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------------------------------------------------
   Butonlar
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.005em;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-red); color: #fff; box-shadow: 0 1px 2px rgba(122,18,34,0.25); }
.btn-primary:hover { background: var(--color-red-dark); box-shadow: 0 4px 12px rgba(122,18,34,0.28); }
.btn-accent { background: var(--color-navy); color: #fff; }
.btn-accent:hover { background: var(--color-navy-light); }
.btn-ghost { background: transparent; color: var(--color-text); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--color-bg); }
.btn-outline { background: #fff; color: var(--color-text); border: 1.5px solid var(--color-border-strong); }
.btn-outline:hover { border-color: var(--color-navy); }
.btn-danger-outline { background: #fff; color: var(--color-danger); border: 1.5px solid var(--color-danger); }
.btn-danger-outline:hover { background: var(--color-danger-tint); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 24px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
body { padding-top: var(--header-h); }
body.has-transparent-header { padding-top: 0; }

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  isolation: isolate;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

/* Saydam header (yalnızca hero'lu sayfalarda, örn. anasayfa):
   üstte hero'nun üzerinde saydam başlar, scroll'da katılaşır. */
body.has-transparent-header .site-header:not(.is-scrolled) {
  background: transparent;
  border-bottom-color: transparent;
}
body.has-transparent-header .site-header:not(.is-scrolled) .logo,
body.has-transparent-header .site-header:not(.is-scrolled) .main-nav a,
body.has-transparent-header .site-header:not(.is-scrolled) .lang-switch,
body.has-transparent-header .site-header:not(.is-scrolled) .icon-btn,
body.has-transparent-header .site-header:not(.is-scrolled) .user-menu-btn,
body.has-transparent-header .site-header:not(.is-scrolled) .header-auth-links .btn-ghost {
  color: #fff;
}
body.has-transparent-header .site-header:not(.is-scrolled) .main-nav a:hover { opacity: .8; }
body.has-transparent-header .site-header:not(.is-scrolled) .user-menu-btn i { color: rgba(255,255,255,0.7); }
body.has-transparent-header .site-header:not(.is-scrolled) .hamburger {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
}
body.has-transparent-header .site-header:not(.is-scrolled) .icon-btn:hover,
body.has-transparent-header .site-header:not(.is-scrolled) .user-menu-btn:hover,
body.has-transparent-header .site-header:not(.is-scrolled) .header-auth-links .btn-ghost:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
body.has-transparent-header .site-header.is-scrolled {
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--color-navy);
  flex-shrink: 0;
}
.logo-icon { color: var(--color-red); font-size: 20px; }
.logo-dot { color: var(--color-red); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  position: relative;
  transition: color .15s ease, opacity .15s ease;
}
.main-nav a:hover { color: var(--color-text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.lang-switch a { padding: 4px 6px; border-radius: 5px; }
.lang-switch a.active { color: var(--color-red); }

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-text-muted);
  position: relative;
}
.icon-btn:hover { background: var(--color-bg); color: var(--color-text); }

.nav-badge-wrap { position: relative; }
.nav-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--color-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; }

.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 24px;
  font-size: 14px; font-weight: 600;
}
.user-menu-btn:hover { background: var(--color-bg); }
.user-menu-btn i { font-size: 11px; color: var(--color-text-muted); }
.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: 8px;
  z-index: 200;
}
.user-menu-dropdown.open { display: block; }
.user-menu-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-sm);
}
.user-menu-dropdown a:hover { background: var(--color-bg); }
.user-menu-dropdown a.danger { color: var(--color-danger); }
.user-menu-dropdown a i { width: 16px; color: var(--color-text-muted); }

.post-ad-btn { flex-shrink: 0; }

.hamburger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.hamburger:hover { border-color: var(--color-navy); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 6px 20px 14px;
  box-shadow: var(--shadow-md);
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  z-index: 150;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:active { color: var(--color-red); }

.flash-msg {
  margin-top: 16px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}
.flash-success { background: var(--color-success-tint); color: var(--color-success); }
.flash-error { background: var(--color-danger-tint); color: var(--color-danger); }
body.has-transparent-header .flash-msg { margin-top: calc(var(--header-h) + 16px); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  background: linear-gradient(155deg, var(--color-red-deep) 0%, var(--color-navy) 46%, #0F0D0B 100%);
  padding: calc(var(--header-h) + 46px) 0 64px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* çok soft, tekrarlanan akçaağaç yaprağı deseni — dokusal derinlik için */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath fill='%23ffffff' d='M60 8c1.6 5.8 3.2 9.9 6 13.4 2.4-2 4.8-4.6 6.4-7.9 0 3.7-.6 7-1.8 10.3 3.4-.3 6.4-1.7 9.4-3.7-1.6 3.6-3.9 6.4-7 8.8 3.3 1 6.7 1 10.2.4-2.9 2.7-6.2 4.3-10 5.1 2.5 2.4 5.6 3.9 9 4.9-3.9 1.1-7.7 1-11.6-.1 1.3 3.3 3.5 5.9 6.3 8.2-4-.1-7.5-1.3-10.8-3.5.1 3.6 1 6.9 2.8 10-3.5-1.6-6.2-4-8.4-7.1-1 3.5-1.1 7-.4 10.6-2.6-2.7-4.3-5.8-5.2-9.4-2.2 2.9-3.4 6.1-3.9 9.7-1.6-3.3-2.2-6.8-1.9-10.6-3 2.2-5 5-6.4 8.4-.5-3.6.1-7 1.7-10.3-3.6 1.4-6.6 3.6-9 6.7 1-3.7 2.8-6.8 5.5-9.5-3.9.6-7.4 2.1-10.6 4.5 2-3.4 4.7-6 8.1-7.9-3.9-.5-7.7.1-11.4 1.7 3.1-3 6.7-4.9 10.8-5.9-3.3-1.7-6.9-2.5-10.8-2.4 3.7-1.9 7.6-2.7 11.7-2.2-2.4-2.9-5.4-5-9-6.3 4-.4 7.7.4 11.2 2.4-1-3.6-.9-7.2.3-10.9 2.1 3.1 3.2 6.4 3.5 10.1 2-3 3-6.3 3.1-10 2 3 3 6.3 2.7 10.1 2.7-2.6 4.4-5.6 5.2-9.4z'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.hero-inner { text-align: center; position: relative; }
.hero-title {
  font-size: clamp(30px, 4.6vw, 46px);
  letter-spacing: -.015em;
  color: #fff;
  margin-bottom: 14px;
}
.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 30px;
}
.hero-search {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 8px;
  border-radius: 14px;
  max-width: 720px;
  margin: 0 auto 18px;
  box-shadow: var(--shadow-lg);
}
.hero-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}
.hero-search-field i { color: var(--color-text-muted); }
.hero-search-field input,
.hero-search-field select {
  border: none;
  outline: none;
  width: 100%;
  font-size: 15px;
  background: transparent;
}
.hero-search-city { border-left: 1px solid var(--color-border); }
.hero-search-btn { flex-shrink: 0; padding: 12px 26px; box-shadow: none; }
.hero-post-btn { margin-top: 4px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.35); backdrop-filter: blur(2px); }
.hero-post-btn:hover { background: rgba(255,255,255,0.18); }

.hero-trust {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust strong { color: #fff; font-family: var(--font-display); }
.hero-trust i { color: var(--color-gold); }

@media (max-width: 720px) {
  .hero-search { flex-direction: column; }
  .hero-search-city { border-left: none; border-top: 1px solid var(--color-border); }
}

/* ------------------------------------------------------------
   Ana layout
   ------------------------------------------------------------ */
.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 56px;
  align-items: start;
}

.sidebar-categories {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.sidebar-categories h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding: 0 6px;
}
.sidebar-categories ul { display: flex; flex-direction: column; gap: 2px; }
.sidebar-categories li a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text);
  transition: background-color .15s ease, color .15s ease;
}
.sidebar-categories li a:hover { background: var(--color-red-tint); color: var(--color-red); }
.sidebar-categories li a i {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--color-bg);
  font-size: 13px;
  color: var(--color-text-muted);
  transition: background-color .15s ease, color .15s ease;
}
.sidebar-categories li a:hover i { background: var(--color-red); color: #fff; }

.sidebar-popular-posts {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.sidebar-popular-posts h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding: 0 6px;
}
.sidebar-popular-post-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  transition: background-color .15s ease;
}
.sidebar-popular-post-item:hover { background: var(--color-red-tint); }
.sidebar-popular-post-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg);
}
.sidebar-popular-post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sidebar-popular-post-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-popular-post-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mobilde/tablette sağ sidebar gizlendiği için aynı popüler yazılar
   içeriği ana akışa (yeni ilanlar ile popüler kategoriler arasına)
   taşınıyor. Masaüstünde gizli; @media (max-width:1080px) içinde açılıyor. */
.mobile-popular-posts {
  display: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 28px 0;
}
.mobile-popular-posts h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding: 0 6px;
}

.mobile-cat-toggle {
  display: none;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
}
.mobile-cat-panel {
  display: none !important;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.mobile-cat-panel a {
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
  font-weight: 500;
  display: flex; gap: 10px; align-items: center;
}
.mobile-cat-panel a:last-child { border-bottom: none; }
/* .mobile-cat-panel.open yalnızca mobil kırılım noktasında (aşağıdaki
   @media max-width:1080px içinde) açılır — masaüstünde asla görünmemeli,
   aksi halde 2 sütunlu grid'i bozup sidebar'ın header üzerine taşmasına
   yol açabiliyordu. */

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-left: 14px;
  border-left: 3px solid var(--color-red);
}
.section-heading h1, .section-heading h2 { font-size: 21px; letter-spacing: -.01em; }
.view-all-link { font-size: 14px; font-weight: 600; color: var(--color-red); display: inline-flex; align-items: center; gap: 6px; transition: gap .15s ease; }
.view-all-link:hover { gap: 9px; }
.result-count { font-size: 13.5px; color: var(--color-text-muted); font-weight: 600; }
.section-subtitle { font-size: 18px; margin: 32px 0 16px; }

.empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 15px;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
}

/* ------------------------------------------------------------
   İlan kartları
   ------------------------------------------------------------ */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}
.ad-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ad-card:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ad-card-img-wrap { position: relative; aspect-ratio: 4/3; background: #F0EEE8; overflow: hidden; }
.ad-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ad-card:hover .ad-card-img { transform: scale(1.04); }
.fav-toggle-btn {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  backdrop-filter: blur(4px);
  transition: color .15s ease, transform .15s ease;
}
.fav-toggle-btn.active, .fav-toggle-btn:hover { color: var(--color-red); }
.fav-toggle-btn:active { transform: scale(.9); }
.ad-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ad-card-price { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: var(--color-navy); }
.ad-card-title {
  font-size: 14.5px; font-weight: 600; color: var(--color-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 38px;
}
.ad-card-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 12.5px; color: var(--color-text-muted);
  margin-top: auto; padding-top: 6px;
  gap: 8px;
}
.ad-card-meta span {
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.ad-card-meta span:last-child { flex-shrink: 0; }

.popular-categories { margin-top: 54px; }
.popular-categories > h2, .how-it-works > h2 {
  font-size: 20px;
  letter-spacing: -.01em;
  padding-left: 14px;
  border-left: 3px solid var(--color-red);
  margin-bottom: 4px;
}

.popular-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.popular-cat-grid-lg { grid-template-columns: repeat(4, 1fr); margin-top: 24px; }
.popular-cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 12px 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.popular-cat-card:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.popular-cat-card i {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  font-size: 21px;
  color: var(--color-red);
  background: var(--color-red-tint);
  transition: background-color .15s ease, color .15s ease;
}
.popular-cat-card:hover i { background: var(--color-red); color: #fff; }
.popular-cat-card span { font-weight: 700; font-size: 14px; }
.popular-cat-card small { color: var(--color-text-muted); font-size: 12px; }

.how-it-works { margin-top: 50px; }
.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 18px;
  position: relative;
}
.how-steps::before {
  content: "";
  position: absolute;
  top: 40px; left: 12.5%; right: 12.5%;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--color-border-strong) 0 6px, transparent 6px 12px);
  z-index: 0;
}
.how-step {
  position: relative;
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}
.how-step-num {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--color-surface);
  color: var(--color-red);
  font-family: var(--font-display); font-weight: 800;
  border: 2px solid var(--color-red);
  border-radius: 50%;
  margin-bottom: 10px;
}
.how-step p { font-size: 14.5px; font-weight: 500; }

@media (max-width: 640px) {
  .how-steps::before { display: none; }
}

/* ------------------------------------------------------------
   Breadcrumb & filtre sidebar
   ------------------------------------------------------------ */
.breadcrumb {
  padding-top: 18px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.breadcrumb a:hover { color: var(--color-red); }

.filter-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.filter-sidebar h3 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.filter-form { display: flex; flex-direction: column; gap: 12px; }
.filter-form label { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.filter-form input, .filter-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  outline: none;
}
.filter-form input:focus, .filter-form select:focus { border-color: var(--color-navy); }
.price-range-fields { display: flex; gap: 8px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pagination a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
}
.pagination a.active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

/* ------------------------------------------------------------
   İlan detay sayfası
   ------------------------------------------------------------ */
.ad-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  padding: 24px 24px 60px;
  max-width: 1240px;
  margin: 0 auto;
}
.ad-detail-main { min-width: 0; }
.ad-gallery { margin-bottom: 20px; }
.ad-gallery-main {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--radius-md);
  background: #F0EEE8;
}
.ad-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.ad-gallery-thumb {
  width: 76px; height: 76px; object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer; flex-shrink: 0;
}
.ad-gallery-thumb:hover { border-color: var(--color-red); }

.ad-detail-title { font-size: 26px; margin-bottom: 10px; }
.ad-detail-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 20px; }
.ad-detail-meta span { display: flex; align-items: center; gap: 6px; }

.ad-extra-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}
.ad-extra-field { display: flex; flex-direction: column; gap: 2px; }
.ad-extra-field .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--color-text-muted); font-weight: 700; }
.ad-extra-field .value { font-size: 14.5px; font-weight: 600; }

.ad-description h2 { font-size: 17px; margin-bottom: 10px; }
.ad-description p { color: var(--color-text); line-height: 1.7; overflow-wrap: anywhere; word-break: break-word; }

.report-link {
  margin-top: 24px;
  color: var(--color-text-muted);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.report-link:hover { color: var(--color-danger); }

.ad-price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px;
}
.ad-price-big { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--color-navy); }

.message-box { display: none; flex-direction: column; gap: 8px; }
.message-box.open { display: flex; }
.message-box textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.fav-toggle-full.active { color: var(--color-red); border-color: var(--color-red); }

.ad-owner-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex; gap: 12px; align-items: center;
}
.ad-owner-card .owner-name { display: block; font-weight: 700; font-size: 15px; }
.ad-owner-card .owner-since { display: block; font-size: 12.5px; color: var(--color-text-muted); }

@media (max-width: 900px) {
  .ad-detail-layout { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Modal
   ------------------------------------------------------------ */
.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,30,33,0.5);
  align-items: center; justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  font-size: 22px; color: var(--color-text-muted);
}
.modal-content h3 { margin-bottom: 16px; }
.modal-content form { display: flex; flex-direction: column; gap: 12px; }
.modal-content select, .modal-content textarea {
  padding: 10px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------
   Formlar (giriş, kayıt, ilan ver)
   ------------------------------------------------------------ */
.auth-page {
  display: flex; justify-content: center;
  padding: 56px 20px;
}
.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
}
.auth-card h1 { font-size: 23px; margin-bottom: 20px; text-align: center; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--color-text-muted); }
.auth-alt a { color: var(--color-red); font-weight: 700; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-size: 13.5px; font-weight: 600; color: var(--color-text); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], select, textarea {
  padding: 11px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fff;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--color-navy); }
textarea { resize: vertical; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 4px; }
.checkbox-label input { width: auto; }

.form-error {
  background: var(--color-danger-tint);
  color: var(--color-danger);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  margin-bottom: 16px;
}
.form-error ul { padding-left: 18px; list-style: disc; }
.form-success {
  background: var(--color-success-tint);
  color: var(--color-success);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  margin-bottom: 16px;
}

.page-title { font-size: 24px; margin: 28px 0 20px; }

.post-ad-page { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }
.form-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 18px;
}
.form-step h2 { font-size: 16px; margin-bottom: 16px; color: var(--color-navy); }

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.photo-preview-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* ------------------------------------------------------------
   Kullanıcı / Admin panel ortak layout
   ------------------------------------------------------------ */
.user-layout, .admin-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 28px;
  padding: 28px 24px 60px;
}
.user-sidebar, .admin-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.admin-brand {
  font-family: var(--font-display); font-weight: 800;
  padding: 8px 10px 16px;
  display: flex; align-items: center; gap: 8px;
  color: var(--color-navy);
}
.user-sidebar nav, .admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.user-sidebar nav a, .admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--color-text-muted);
}
.user-sidebar nav a:hover, .admin-sidebar nav a:hover { background: var(--color-bg); color: var(--color-text); }
.user-sidebar nav a.active, .admin-sidebar nav a.active { background: var(--color-red-tint); color: var(--color-red); }
.user-sidebar nav a.danger { color: var(--color-danger); }
.user-sidebar nav a i, .admin-sidebar nav a i { width: 16px; text-align: center; }

.user-main, .admin-main { min-width: 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card i { color: var(--color-red); font-size: 18px; }
.stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.stat-card.highlight { border-color: var(--color-warning); background: var(--color-warning-tint); }

.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--color-border); }
.data-table th { background: var(--color-bg); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--color-text-muted); }
.data-table tr:last-child td { border-bottom: none; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: capitalize;
}
.status-active, .status-approve { background: var(--color-success-tint); color: var(--color-success); }
.status-pending { background: var(--color-warning-tint); color: var(--color-warning); }
.status-rejected, .status-expired { background: var(--color-danger-tint); color: var(--color-danger); }
.status-sold { background: #EEE; color: var(--color-text-muted); }

.admin-filter-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-filter-tabs a {
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.admin-filter-tabs a.active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.admin-search-form { display: flex; gap: 8px; margin-bottom: 18px; max-width: 380px; }
.admin-search-form input { flex: 1; padding: 10px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); }

.inline-add-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.inline-add-form input { padding: 10px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); width: auto; flex: 1; min-width: 160px; }

/* My ads list */
.my-ads-list { display: flex; flex-direction: column; gap: 12px; }
.my-ad-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.my-ad-row img { width: 84px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.my-ad-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.my-ad-title { font-weight: 700; font-size: 15px; }
.my-ad-meta { font-size: 12.5px; color: var(--color-text-muted); }
.my-ad-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Notifications */
.notification-list { display: flex; flex-direction: column; gap: 8px; }
.notification-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.notification-item i { color: var(--color-red); margin-top: 3px; }
.notif-title { display: block; font-weight: 700; font-size: 14.5px; }
.notif-body { display: block; font-size: 13.5px; color: var(--color-text-muted); }
.notif-time { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

/* Messaging */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 560px;
}
.conversation-list { border-right: 1px solid var(--color-border); overflow-y: auto; }
.conversation-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.conversation-item:hover, .conversation-item.active { background: var(--color-bg); }
.conversation-item-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.conv-name { font-weight: 700; font-size: 14px; }
.conv-ad-title { font-size: 12px; color: var(--color-red); font-weight: 600; }
.conv-last-msg { font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.conversation-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--color-border); font-weight: 700; flex-shrink: 0; }
.thread-ad-link { margin-left: auto; font-size: 12.5px; color: var(--color-red); font-weight: 600; }
.thread-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.thread-msg { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.thread-msg.theirs { align-self: flex-start; background: var(--color-bg); border-bottom-left-radius: 4px; }
.thread-msg.mine { align-self: flex-end; background: var(--color-navy); color: #fff; border-bottom-right-radius: 4px; }
.thread-msg-time { display: block; font-size: 10.5px; opacity: .65; margin-top: 4px; }
.thread-reply-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--color-border); flex-shrink: 0; }
.thread-reply-form textarea { flex: 1; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 10px 12px; resize: none; }
.thread-reply-form button { width: 46px; border-radius: var(--radius-sm); background: var(--color-red); color: #fff; }

/* Profile */
.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  max-width: 420px;
}
.profile-card h2 { font-size: 20px; }
.profile-city, .profile-since { color: var(--color-text-muted); font-size: 13.5px; }
.profile-stat { margin: 10px 0; font-weight: 700; color: var(--color-navy); }
.profile-about { margin: 12px 0; color: var(--color-text); }

.settings-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 480px;
  margin-bottom: 20px;
}
.settings-section h2 { font-size: 16px; margin-bottom: 16px; }

/* Error pages */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-size: 72px; color: var(--color-red); }
.error-page p { margin: 12px 0 24px; color: var(--color-text-muted); font-size: 16px; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.85);
  margin-top: 40px;
  padding: 50px 0 0;
  border-top: 3px solid var(--color-red);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,0.6); margin-top: 10px; max-width: 220px; }
.footer-brand .logo { color: #fff; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-col a {
  display: block; font-size: 14px; color: rgba(255,255,255,0.65); padding: 6px 0;
  transition: color .15s ease, padding-left .15s ease;
}
.footer-col a:hover { color: #fff; padding-left: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ------------------------------------------------------------
   Statik sayfalar (hakkımızda, iletişim vb.)
   ------------------------------------------------------------ */
.static-page { max-width: 760px; margin: 0 auto; padding: 40px 24px 60px; }
.static-page h1 { font-size: 27px; margin-bottom: 18px; }
.static-page h2 { font-size: 18px; margin: 26px 0 10px; }
.static-page p { margin-bottom: 12px; color: var(--color-text); }
.static-page ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.static-page li { margin-bottom: 6px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar-categories { display: none; }
  .sidebar-popular-posts { display: none; }
  .mobile-popular-posts { display: block; }
  .mobile-cat-toggle { display: flex; }
  .mobile-cat-panel.open { display: flex !important; }
  .ad-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-cat-grid, .popular-cat-grid-lg { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .user-layout, .admin-layout { grid-template-columns: 1fr; }
  .user-sidebar, .admin-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .lang-switch { display: none; }
  .header-auth-links { display: none; }
  .post-ad-btn span { display: none; }
  .post-ad-btn { padding: 10px 13px; }
  .icon-btn { width: 34px; height: 34px; }
  .user-menu-btn { padding: 4px; gap: 0; }
  .user-menu-btn span { display: none; }
  .user-menu-btn i { display: none; }
  .ad-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ad-card-title {
    -webkit-line-clamp: unset;
    overflow: visible;
    min-height: 0;
  }
  .ad-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .ad-card-meta span { white-space: normal; }
  .ad-card-meta span:last-child { align-self: flex-start; }
  .ad-extra-fields { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; text-align: center; }
  .footer-brand { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .footer-brand .logo { justify-content: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-col { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .footer-col:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .footer-col a { padding: 8px 0; }
  .footer-bottom { text-align: center; }
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .conversation-list { border-right: none; border-bottom: 1px solid var(--color-border); max-height: 240px; }
  .popular-cat-grid, .popular-cat-grid-lg { grid-template-columns: 1fr 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .ad-detail-layout { padding: 16px; }
}