/* ============================================================
   VELORA — Araç listesi sayfası (araclar.php)
   ============================================================ */

/* Hero'nun altına taşan rezervasyon widget'ı */
.page-cars .page-hero { padding-bottom: clamp(100px, 11vw, 156px); }
.cars-widget-wrap { position: relative; z-index: 30; margin-top: clamp(-88px, -7vw, -58px); }

.cars-main { padding: clamp(44px, 6vw, 80px) 0 clamp(70px, 9vw, 120px); }

/* ---------- Yerleşim ---------- */
.cars-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px; align-items: start;
}
.cars-results { min-width: 0; }

/* ---------- Filtre kenar çubuğu ---------- */
.cars-sidebar { position: sticky; top: calc(var(--nav-h) + 16px); }
.cars-filter {
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto; overscroll-behavior: contain;
}
.cars-filter::-webkit-scrollbar { width: 6px; }
.cars-filter::-webkit-scrollbar-track { background: transparent; }
.cars-filter::-webkit-scrollbar-thumb { background: rgba(10, 18, 32, .16); border: none; border-radius: 4px; }

.cars-filter .f-group {
  border: 0; border-bottom: 1px dashed var(--line);
  padding: 20px 22px; margin: 0; min-width: 0;
}
.f-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 13px; padding: 0;
}
.f-title i { color: var(--gold-dark); font-size: 16px; }
legend.f-title { float: left; width: 100%; }
.f-opts { clear: both; display: flex; flex-direction: column; }

.f-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; cursor: pointer; font-size: 14.5px; color: var(--ink);
  transition: color .15s;
}
.f-opt:hover { color: var(--gold-dark); }
.f-opt input {
  width: 17px; height: 17px; margin: 0; flex-shrink: 0;
  accent-color: var(--gold-dark); cursor: pointer;
}
.f-opt .f-ico { color: var(--gold-dark); font-size: 16px; width: 18px; text-align: center; }
.f-opt .cnt {
  margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: var(--bone); border-radius: 999px; padding: 2px 9px; min-width: 28px; text-align: center;
}

.f-price { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); align-items: center; gap: 6px; }
.f-price .sep { height: 1.5px; background: var(--line); border-radius: 2px; }
.f-price .input { padding: 11px 12px; font-size: 14px; }
.f-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 9px; }
.f-hint i { color: var(--gold-dark); font-size: 14px; }

.f-actions { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.f-clear {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--muted); transition: color .2s;
}
.f-clear:hover { color: var(--red); }

/* Mobil filtre düğmesi */
.cars-filter-toggle { display: none; width: 100%; margin-bottom: 18px; }
.cars-filter-toggle .ft-count {
  background: var(--gold); color: var(--ink); border-radius: 999px;
  font-size: 11.5px; font-weight: 800; padding: 1px 9px;
}

/* ---------- Araç çubuğu (sayaç + sıralama) ---------- */
.cars-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px 20px; flex-wrap: wrap; margin-bottom: 16px;
}
.cars-toolbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cars-count { font-size: 15px; color: var(--muted); }
.cars-count b { color: var(--ink); font-family: var(--font-display); font-size: 22px; margin-right: 4px; }
.cars-sort { display: flex; align-items: center; gap: 10px; }
.cars-sort label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.cars-sort label i { color: var(--gold-dark); font-size: 15px; }
.cars-sort select { width: auto; min-width: 185px; padding: 10px 38px 10px 14px; font-size: 14px; font-weight: 600; }

/* ---------- Aktif filtre çipleri ---------- */
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip-x i { font-size: 12px; opacity: .65; transition: opacity .2s; }
.chip-x:hover { border-color: rgba(214, 69, 69, .5); color: var(--red); background: rgba(214, 69, 69, .08); }
.chip-x:hover i { opacity: 1; }
.chip-clear { background: var(--ink); color: var(--gold-2); border-color: var(--ink); transition: background .2s; }
.chip-clear:hover { background: var(--ink-3); }

/* Tarihlerde dolu araç notu */
.cars-note {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--muted);
  background: rgba(201, 169, 106, .09); border: 1px dashed rgba(201, 169, 106, .4);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 22px;
}
.cars-note i { color: var(--gold-dark); font-size: 17px; margin-top: 1px; flex-shrink: 0; }

/* ---------- Kart sarmalayıcı + karşılaştır kutusu ---------- */
.car-wrap { position: relative; }
.car-wrap .car-card { height: 100%; }
.cmp-check {
  position: absolute; top: 58px; right: 12px; z-index: 4; cursor: pointer;
  transition: transform .35s var(--ease);
}
.car-wrap:hover .cmp-check { transform: translateY(-6px); }
.cmp-check input { position: absolute; opacity: 0; pointer-events: none; }
.cmp-check span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .05em;
  background: rgba(10, 18, 32, .5); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid transparent; transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.cmp-check:hover span { background: rgba(10, 18, 32, .74); border-color: rgba(201, 169, 106, .55); }
.cmp-check input:checked + span { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-gold); }
.cmp-check input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Yapışkan karşılaştırma çubuğu ---------- */
.compare-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 380;
  transform: translate(-50%, calc(100% + 40px));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: min(860px, calc(100vw - 28px));
  background: var(--ink); color: var(--bone);
  border: 1px solid rgba(201, 169, 106, .45); border-radius: 24px;
  padding: 13px 16px; box-shadow: var(--shadow-lg);
  transition: transform .4s var(--ease);
}
.compare-bar.show { transform: translate(-50%, 0); }
.compare-bar .cmp-count-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2);
}
.compare-bar .cmp-count-wrap i { font-size: 21px; color: var(--gold); }
.cmp-items { display: flex; gap: 8px; flex-wrap: wrap; }
.cmp-item {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line-d);
  border-radius: 999px; padding: 5px 5px 5px 13px; font-size: 13px;
}
.cmp-item b { font-weight: 600; white-space: nowrap; }
.cmp-item button {
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .12); color: var(--bone);
  display: grid; place-items: center; font-size: 11px; transition: background .2s, color .2s;
}
.cmp-item button:hover { background: var(--red); color: #fff; }
.compare-bar .cmp-clear {
  width: 38px; height: 38px; border-radius: 50%; margin-left: auto;
  border: 1px solid var(--line-d); background: transparent; color: var(--muted-2);
  font-size: 16px; display: grid; place-items: center; transition: border-color .2s, color .2s;
}
.compare-bar .cmp-clear:hover { border-color: var(--red); color: var(--red); }
.cmp-go.disabled { opacity: .45; pointer-events: none; }
.compare-bar.shake { animation: cmpShake .45s var(--ease); }
@keyframes cmpShake {
  20% { transform: translate(calc(-50% - 9px), 0); }
  50% { transform: translate(calc(-50% + 9px), 0); }
  80% { transform: translate(calc(-50% - 4px), 0); }
}

/* ---------- Karşılaştırma tablosu ---------- */
.compare-panel { margin-bottom: clamp(36px, 5vw, 56px); overflow: hidden; scroll-margin-top: calc(var(--nav-h) + 16px); }
.compare-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 22px 26px; border-bottom: 1px solid var(--line);
}
.compare-head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 27px); display: flex; align-items: center; gap: 11px; }
.compare-head h2 i { color: var(--gold-dark); }
.compare-scroll { overflow-x: auto; }
.compare-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14.5px; }
.compare-table th, .compare-table td {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: middle;
}
.compare-table thead th { vertical-align: top; padding-top: 22px; }
.compare-table tbody th[scope="row"] {
  width: 172px; white-space: nowrap;
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: rgba(246, 244, 239, .6);
}
.compare-table tbody tr:nth-child(even) td { background: rgba(246, 244, 239, .35); }
.compare-table tr.cmp-action th, .compare-table tr.cmp-action td { border-bottom: 0; padding-block: 18px; }
.cmp-car img {
  width: 100%; max-width: 230px; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 12px; margin-bottom: 11px;
}
.cmp-car b a { font-family: var(--font-display); font-size: 17.5px; transition: color .2s; }
.cmp-car b a:hover { color: var(--gold-dark); }
.cmp-car .cmp-year { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.cmp-price { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink); }
.cmp-price small { display: block; font-family: var(--font-body); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cmp-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.cmp-feats i { color: var(--green); margin-right: 6px; }

/* ---------- Duyarlılık ---------- */
@media (max-width: 1240px) and (min-width: 1081px) {
  .cars-results .g-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1020px) {
  .cars-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cars-sidebar { position: static; display: none; margin-bottom: 26px; min-width: 0; }
  .cars-sidebar.open { display: block; }
  .cars-filter { max-height: none; overflow: visible; }
  .cars-filter-toggle { display: inline-flex; justify-content: center; }
}
@media (max-width: 640px) {
  .cars-toolbar { flex-direction: column; align-items: flex-start; }
  .cars-sort { width: 100%; justify-content: space-between; }
  .compare-bar { border-radius: 18px; bottom: 12px; }
  .cmp-item b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
}
