/* =================================================
   FONT – KURUMSAL
================================================= */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =================================================
   RENKLER – TEK ÇİZGİ RENGİ
================================================= */
:root {
    --accent: #f4a024;     /* TÜM ÇİZGİLER */
    --text-dark: #1f2937;
    --text-soft: #6b7280;
    --border: #e5e7eb;
    --bg: #f7f8fa;
    --white: #ffffff;
    --green: #16a34a;
    --red: #dc2626;
}

/* =================================================
   GENEL
================================================= */
body {
    background: var(--bg);
    color: var(--text-dark);
}

.cars-page-container {
    max-width: 1280px;        /* 🔥 ALTIN DEĞER */
    margin: 0 auto;           /* ortala */
    padding: 0 10px;          /* küçük ekran güvenliği */
    margin-top: 20px;

    display: grid;
    grid-template-columns: 260px 1fr; /* filtre + kartlar */
    gap: 50px;
}

/* =================================================
   FİLTRE PANELİ – BOX'LU GRUPLAR
================================================= */

.cars-filter-panel {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 14px;
    width: 100%;
    max-width: 290px;   /* 🔥 DAHA DAR */
}

/* Panel başlığı */
.filter-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 14px;
}

/* =================================================
   HER FİLTRE GRUBU = BOX
================================================= */

.filter-block {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;

    padding: 10px 10px 8px;
    margin-bottom: 10px;
}

/* =================================================
   GRUP BAŞLIĞI – BOX İÇİ
================================================= */

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;

    padding-left: 8px;
    margin-bottom: 6px;

    border-left: 2px solid #1f2937;
}

/* =================================================
   CHECKBOX SATIRLARI – SIKI
================================================= */

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    color: #374151;

    padding: 3px 2px;
}

/* Hover çok hafif */
.filter-checkbox:hover {
    background: #f3f4f6;
}

/* Checkbox */
.filter-checkbox input {
    width: 14px;
    height: 14px;
    accent-color: #374151;
}

/* =================================================
   STICKY (DESKTOP)
================================================= */
@media (min-width: 900px) {
    .cars-filter-panel {
        position: sticky;
        top: 20px;
    }
}

/* =================================================
   GRID
================================================= */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* =================================================
   KART – DAHA KISA
================================================= */
.car-card {
    width: 100%;
    min-height: 420px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* SOL ÇİZGİ */
.car-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
}

/* =================================================
   GÖRSEL
================================================= */
.car-image-wrapper {
    height: 160px;
    position: relative;
    background: #eaeaea;
}

.car-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =================================================
   MÜSAİTLİK
================================================= */
.car-status {
    position: absolute;
    top: 10px;
    left: 10px;

    padding: 4px 10px;
    border-radius: 6px;

    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.car-status.available {
    background: var(--green);
}

.car-status.unavailable,
.car-status.maintenance {
    background: var(--red);
}

.car-quick-meta {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: none;
    gap: 6px;
    z-index: 2;
}

.quick-pill {
    min-width: 86px;
    padding: 5px 8px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.78);
    color: #f8fafc;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.25);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.quick-pill small {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    opacity: .82;
}

.quick-pill strong {
    font-size: 13px;
    font-weight: 800;
    margin-top: 2px;
    color: #ffffff;
}

.quick-pill.year {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
}

.quick-pill.km {
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.92), rgba(51, 65, 85, 0.88));
}

/* =================================================
   İÇERİK
================================================= */
.car-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.car-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
}

.car-compact-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    width: auto;
    min-width: 0;
}

.compact-item {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1;
    padding: 3px 6px;
    border: 1px solid #dbe3ec;
    border-radius: 0;
    background: #f8fafc;
}

.compact-item em {
    font-style: normal;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .24px;
    color: #64748b;
}

.compact-item strong {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
}

.compact-divider {
    width: 1px;
    height: 14px;
    background: #cbd5e1;
}

/* =================================================
   ARAÇ ADI – ÇİZGİLİ
================================================= */
.car-title {
    font-size: 14px;
    font-weight: 600;

    padding: 8px 10px;
    margin: 0 0 8px;

    border-left: 3px solid var(--accent);
    background: #fafafa;
}

/* ince ayırıcı */
.car-title::after {
    content: "";
    display: block;
    margin-top: 6px;
    height: 1px;
    background: var(--border);
}

.car-meta-line {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
    color: #4b5563;
}

.car-meta-line span {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/* =================================================
   FİYAT – ÇİZGİLİ
================================================= */
.car-price {
    font-size: 14px;
    font-weight: 600;

    padding: 6px 10px;
    margin-bottom: 8px;

    border-left: 3px solid var(--accent);
    background: #fdf6ec;

    width: fit-content;
}

/* =================================================
   ÖZELLİKLER
================================================= */
.car-features {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;

    font-size: 11px;
    color: var(--text-soft);

    max-height: 72px;
    overflow: hidden;
}

.car-features li {
    padding-left: 8px;
    position: relative;
}

.car-features li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* =================================================
   BUTON – YAKIN
================================================= */
.car-detail-button {
    margin-top: auto;

    height: 36px;
    border-radius: 6px;

    border: 1px solid #0f172a;
    background: #0f172a;

    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;
}

.car-detail-button:hover {
    background: #020617;
    border-color: #020617;
}

/* =================================================
   RESPONSIVE
================================================= */
@media (max-width: 900px) {
    .cars-page-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cars-grid {
        justify-content: center;
    }
}

/* =================================================
   ARAÇ SINIFI – TEMEL STİL
================================================= */
.car-class {
    display: inline-block;

    font-size: 10px;
    font-weight: 600;
    letter-spacing: .2px;

    padding: 3px 7px;
    margin-bottom: 0;

    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #9ca3af;

    color: #374151;
}

/* =================================================
   SINIF RENKLERİ (SOFT / KURUMSAL)
   NOT: isim eşleşmesi text içerik üzerinden
================================================= */

/* Ekonomik */
.car-class:contains("Ekonomik"),
.car-class:contains("Economy") {
    background: #f1f5f9;
    border-left-color: #64748b;
    color: #334155;
}

/* SUV */
.car-class:contains("SUV") {
    background: #f0fdf4;
    border-left-color: #16a34a;
    color: #14532d;
}

/* VIP */
.car-class:contains("VIP") {
    background: #faf5ff;
    border-left-color: #7c3aed;
    color: #4c1d95;
}

/* Luxury / Premium */
.car-class:contains("Luxury"),
.car-class:contains("Premium") {
    background: #fff7ed;
    border-left-color: #f59e0b;
    color: #92400e;
}


/* =================================================
   MOBİL – FİLTRE ÜSTTE, ARAÇLAR ALTTA
================================================= */

@media (max-width: 900px) {

    .cars-page-container {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .cars-filter-panel {
        order: 1;
        width: 100%;
        margin-bottom: 16px;
    }

    .cars-list-panel {
        order: 2;
        width: 100%;
    }

    .cars-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =================================================
   MOBİL – FİLTRE TAŞMA SORUNU FIX
================================================= */

@media (max-width: 900px) {

    /* box model fix */
    *, *::before, *::after {
        box-sizing: border-box;
    }

    .cars-page-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .cars-filter-panel {
        width: 100%;
        max-width: 100%;
        margin: 0 0 16px 0;
        padding: 14px;
        overflow-x: hidden;
    }

    /* grup kutuları */
    .filter-block {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* checkbox satırları taşmasın */
    .filter-checkbox {
        width: 100%;
        max-width: 100%;
        white-space: normal;
    }

    /* uzun metinler satır atsın */
    .filter-checkbox span,
    .filter-label {
        word-break: break-word;
    }
}


/* =================================================
   MOBİL FİLTRE TOGGLE – YENİ / ELİT
================================================= */

@media (max-width: 900px) {

    .filter-toggle-btn {
        width: 100%;
        height: 40px;                /* DAHA KISA */

        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 0 14px;
        margin-bottom: 4px;          /* 🔥 BOŞLUK CİDDİ AZALTILDI */

        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 6px;          /* DAHA DÜZ */

        font-size: 13px;
        font-weight: 600;
        color: #1f2937;

        cursor: pointer;
    }

    /* sol ikon */
    .filter-toggle-btn::before {
        content: "☰";
        font-size: 14px;
        color: #6b7280;
    }

    /* sağ ok */
    .filter-toggle-btn::after {
        content: "⌄";
        font-size: 14px;
        color: #6b7280;
        transition: transform .2s ease;
    }

    .filter-toggle-btn.is-open::after {
        transform: rotate(180deg);
    }
}

/* =================================================
   MOBİL – BUTON / ARAÇ ARASI MİNİMUM BOŞLUK
================================================= */

@media (max-width: 900px) {

    .cars-filter-panel {
        margin-bottom: 4px;
    }

    .cars-list-panel {
        margin-top: 0;
        padding-top: 0;
    }

    .cars-page-container {
        row-gap: 6px;   /* GRID/FLEX boşluğu da sıkı */
    }
}

@media (max-width: 640px) {
    .cars-grid {
        grid-template-columns: 1fr;
    }

    .car-meta-row {
        margin: 0 0 8px;
    }

    .car-compact-meta {
        display: none;
    }

    .car-quick-meta {
        display: flex;
        right: 8px;
        bottom: 8px;
        gap: 5px;
    }

    .quick-pill {
        min-width: 78px;
        padding: 4px 7px 5px;
    }

    .quick-pill small {
        font-size: 9px;
    }

    .quick-pill strong {
        font-size: 12px;
    }

    .car-detail-button {
        min-height: 38px;
        white-space: normal;
        word-break: break-word;
        padding: 8px 10px;
    }
}


