/* ==========================================================================
   TEMA RENKLERİ VE KÖK AYARLAR
   ========================================================================== */
body[data-theme="light"] {
    --bg-main: #f4f4f5;
    --bg-surface: #ffffff;
    --border-color: #e4e4e7;
    --text-primary: #09090b;
    --text-muted: #71717a;
    --brand-red: #f43f5e;
    --filter-bg: #f4f4f5;
    --quick-menu-bg: #ffffff;
    --quick-menu-text: #27272a;
    --modal-overlay: rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] {
    --bg-main: #09090b;
    --bg-surface: #18181b;
    --border-color: #27272a;
    --text-primary: #f4f4f5;
    --text-muted: #a1a1aa;
    --brand-red: #f43f5e;
    --filter-bg: #27272a;
    --quick-menu-bg: #18181b;
    --quick-menu-text: #f4f4f5;
    --modal-overlay: rgba(0, 0, 0, 0.85);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* KİLİTLEME SİHİRBAZI */
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

/* NAVBAR & HEADER */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--brand-red); }
.menu-trigger { font-size: 20px; cursor: pointer; color: var(--text-primary); }

header { text-align: center; padding: 40px 20px; background: var(--bg-surface); border-bottom: 1px solid var(--border-color); }
header h1 { font-size: 28px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; letter-spacing: -1px; }
header h1 span { color: var(--brand-red); }

.navbar .nav-location-btn {
    font-size: 12px !important;    /* 11px'ten 10px'e düşürdük */
    padding: 1px 4px !important;   /* Daha da daralttık */
    white-space: nowrap !important; /* Yazının asla alt satıra geçmemesini sağlar */
}
}

/* ARAMA VE DETAYLI FİLTRELEME */
.search-area { 
    max-width: 500px !important; /* !important ekleyerek diğer kuralları ezmesini sağladık */
    width: 90% !important;      /* Ekran küçükse kutuyu biraz daraltır */
    margin: 0 auto !important;  /* Sayfayı ortalar */
}
.search-box { display: flex; align-items: center; background: var(--filter-bg); border: 1px solid var(--border-color); padding: 12px 16px; border-radius: 50px; gap: 10px; }
.search-box i { color: var(--text-muted); }
.search-box input { border: none; background: transparent; width: 100%; outline: none; font-size: 15px; color: var(--text-primary); }

.advanced-search-toggle { background: none; border: none; color: var(--brand-red); font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; }
.advanced-filter-panel { max-width: 600px; margin: 15px auto 0 auto; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); display: none; }
.advanced-filter-panel.open { display: block; }
.filter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.filter-group { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.filter-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.filter-group select, .filter-group input { padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--filter-bg); color: var(--text-primary); outline: none; font-size: 13px; }
.filter-range { display: flex; gap: 5px; }
.filter-range input { width: 50%; }
.filter-actions { grid-column: span 2; display: flex; justify-content: flex-end; }
.btn-clear-filters { background: transparent; border: none; color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* HIZLI MENÜ */
/* HIZLI MENÜ - MOBİL VE PC AYARLARI */
.quick-menu-container { 
    max-width: 1200px; 
    margin: 20px auto 5px auto; 
    padding: 0 15px; 
    display: flex; 
    justify-content: center; /* PC'de ortalar */
}

.quick-menu-wrapper { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    white-space: nowrap; 
    padding-bottom: 8px; 
    scrollbar-width: none; 
    justify-content: center; /* PC'de ortalar */
}

/* MOBİL İÇİN ÖZEL AYAR (768px altı) */
@media (max-width: 768px) {
    .quick-menu-container {
        justify-content: flex-start; /* Mobilde sola yaslar */
    }
    .quick-menu-wrapper {
        justify-content: flex-start; /* Mobilde sola yaslar */
        padding-left: 5px; /* Başlangıçta çok yapışık durmaması için */
    }
}

.quick-menu-wrapper::-webkit-scrollbar { display: none; }

.quick-menu-item { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    background: var(--quick-menu-bg); 
    color: var(--quick-menu-text); 
    border: 1px solid var(--border-color); 
    padding: 10px 16px; 
    border-radius: 20px; 
    font-size: 13px; 
    font-weight: 600; 
    text-decoration: none; 
    cursor: pointer; 
    transition: all 0.2s; 
    text-align: center; 
}

.quick-menu-item:hover { 
    border-color: var(--brand-red); 
    color: var(--brand-red); 
}

/* PREMIUM WHATSAPP BANNER */
.sell-car-banner-container { max-width: 1000px; margin: 15px auto 10px auto; padding: 0 15px; text-align: center; }
.btn-premium-sell { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(135deg, #25d366, #128c7e); color: #ffffff !important; border: none; padding: 14px 30px; border-radius: 50px; font-size: 15px; font-weight: 800; text-decoration: none; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3); width: 100%; max-width: 500px; animation: pulse 2s infinite ease-in-out; }
@keyframes pulse { 
    0% { transform: scale(1); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3); } 
    50% { transform: scale(1.03); box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5); } 
    100% { transform: scale(1); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3); } 
}

/* VİTRİN ARAÇ KARTLARI */
.container-wrapper { padding-bottom: 40px; }
.section-main-title { max-width: 1200px; margin: 30px auto 12px auto; padding: 0 15px; font-size: 18px; font-weight: 800; border-left: 4px solid var(--brand-red); padding-left: 10px; letter-spacing: -0.5px; }

.cars-grid { 
    max-width: 1200px; 
    margin: 0 auto 25px auto; 
    padding: 0 15px; 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 20px; 
}

.car-card { 
    background: var(--bg-surface); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    overflow: hidden; 
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex;
    flex-direction: column;
    position: relative;
}

.car-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); 
}

.car-card-img-wrapper {
    width: 100%;
    height: 165px; 
    background: var(--filter-bg);
    position: relative;
    overflow: hidden;
}

.car-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.card-info { 
    padding: 15px; 
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-surface);
}

.card-title { 
    font-size: 15px; 
    font-weight: 700; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.card-price { 
    font-size: 17px; 
    font-weight: 800; 
    color: var(--brand-red); 
}

.card-specs { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap; 
    margin-top: 4px;
}

.card-specs span { 
    background: var(--filter-bg); 
    color: var(--text-muted); 
    font-size: 12px; 
    font-weight: 600; 
    padding: 4px 10px; 
    border-radius: 6px; 
}

.sold-ribbon {
    position: absolute; top: 12px; right: 12px; 
    background: var(--brand-red); color: #fff; 
    font-size: 10px; font-weight: 800; padding: 4px 8px; 
    border-radius: 5px; z-index: 5; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* SIDEBAR STİLLERİ */
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: var(--bg-surface); z-index: 999; padding: 20px; box-shadow: 5px 0 25px rgba(0,0,0,0.1); transition: left 0.3s; display: flex; flex-direction: column; justify-content: space-between; }
.sidebar.open { left: 0; }
.sidebar-menu { list-style: none; margin-top: 30px; flex-grow: 1; }
.sidebar-menu li { margin-bottom: 10px; }
.sidebar-menu li a { display: flex; align-items: center; gap: 12px; padding: 12px 15px; color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 10px; }
.sidebar-menu li a:hover { background: var(--filter-bg); color: var(--brand-red); }
.sidebar .info-card { background: var(--filter-bg); padding: 15px; border-radius: 12px; font-size: 13px; }

/* ==========================================================================
   İLAN KART DETAYI - SAHİBİNDEN TARZI MIKNATISLI GALERİ
   ========================================================================== */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 200; backdrop-filter: blur(4px); overflow-y: auto; padding: 20px 10px; }
.modal-content { background: var(--bg-surface); max-width: 600px; margin: 20px auto; border-radius: 20px; overflow: hidden; position: relative; border: 1px solid var(--border-color); }

.modal-slider { position: relative; width: 100%; height: 320px; background: #000; }

.modal-slider-wrapper { 
    display: flex; 
    width: 100%; 
    height: 100%; 
    overflow-x: auto; 
    overflow-y: hidden;
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
}
.modal-slider-wrapper::-webkit-scrollbar { display: none; }

.modal-slider-wrapper img { 
    width: 100%; 
    height: 100%;
    flex-shrink: 0; 
    object-fit: contain; 
    cursor: pointer; 
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.close-slider-btn { position: absolute; top: 12px; right: 12px; z-index: 10; background: rgba(0,0,0,0.5); color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; border: none; }

/* NOKTA SİSTEMİ */
.modal-dots { 
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); 
    display: flex; gap: 6px; z-index: 10;
}
.modal-dots .dot {
    width: 8px; height: 8px; background: rgba(255, 255, 255, 0.4); 
    border-radius: 50%; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-dots .dot.active {
    background: var(--brand-red);
    transform: scale(1.2);
    width: 18px; 
    border-radius: 4px;
}

.zoom-hint { background: var(--filter-bg); color: var(--text-muted); font-size: 11px; text-align: center; padding: 6px; font-weight: 600; border-bottom: 1px solid var(--border-color); }
.modal-body { padding: 20px; }
.modal-body h2 { font-size: 18px; font-weight: 800; margin-bottom: 5px; }
#mPrice { font-size: 20px; font-weight: 800; color: var(--brand-red); margin-bottom: 15px; }
.specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 15px; }
.spec-item { background: var(--filter-bg); padding: 10px 12px; border-radius: 8px; font-size: 13px; display: flex; justify-content: space-between; }
.spec-item span { color: var(--text-muted); }

/* Satır atlamalarını kusursuz koruyan açıklama alanı */
#mDesc { 
    color: var(--text-muted); 
    font-size: 13px; 
    line-height: 1.6; 
    margin-bottom: 15px;
    white-space: pre-line; 
    word-break: break-word; 
}

.modal-taksit-info { background: rgba(37, 211, 102, 0.1); color: #128c7e; padding: 10px; border-radius: 8px; font-size: 12px; font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }

/* NAİF VE MODERN İLETİŞİM BUTONLARI */
.modal-actions { 
    display: flex; 
    gap: 12px; 
    margin-top: 10px;
}
.btn-wa { 
    flex: 1; 
    background: #25D366; 
    color: white !important; 
    text-align: center; 
    padding: 11px 18px; 
    border-radius: 30px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 13px;
    letter-spacing: 0.3px;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
    transition: all 0.2s ease;
}
.btn-call { 
    flex: 1; 
    background: #18181b; 
    color: #ffffff !important; 
    text-align: center; 
    padding: 11px 18px; 
    border-radius: 30px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 13px;
    letter-spacing: 0.3px;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    box-shadow: 0 4px 12px rgba(24, 24, 27, 0.15);
    transition: all 0.2s ease;
}
body[data-theme="dark"] .btn-call {
    background: #f4f4f5;
    color: #09090b !important;
}
.btn-wa:hover, .btn-call:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* KATALOG "TÜM İLANLARI GÖR" BUTONU */
.show-more-container {
    text-align: center;
    margin: 20px auto 30px auto;
    max-width: 1200px;
    padding: 0 15px;
}
.btn-show-more {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.btn-show-more:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
.btn-show-more i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

/* KURUMSAL BİLGİ PENCERESİ */
.info-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-overlay); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 20px; }
.info-modal.active { opacity: 1; pointer-events: auto; }
.info-modal-content { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; width: 100%; max-width: 500px; padding: 25px; position: relative; text-align: center; }
.info-modal-close { position: absolute; top: 15px; right: 15px; font-size: 28px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.info-modal-icon { font-size: 40px; color: var(--brand-red); margin-bottom: 15px; }
.info-modal-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.info-modal-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; text-align: justify; }

/* ==========================================================================
   TAM EKRAN (FULLSCREEN) GALERİ - SIFIR HATA MIKNATISLI SİSTEM
   ========================================================================== */
.fullscreen-gallery { 
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: #000000; 
    z-index: 99999; 
    overflow: hidden;
}

.fullscreen-wrapper { 
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.fullscreen-wrapper::-webkit-scrollbar { display: none; }

.fs-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.fs-slide img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

.close-fs-btn { 
    position: absolute; top: 20px; right: 20px; 
    color: rgba(255, 255, 255, 0.8); font-size: 38px; 
    cursor: pointer; z-index: 100; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3); border-radius: 50%;
}

.fullscreen-counter {
    position: absolute; bottom: 25px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff; padding: 6px 16px;
    border-radius: 20px; font-size: 13px;
    font-weight: 700; letter-spacing: 0.5px;
    z-index: 100; border: 1px solid rgba(255,255,255,0.15);
}

/* Masaüstü Yönlendirme Okları */
.fs-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px; background: rgba(255,255,255,0.1);
    color: white; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
    z-index: 100; font-size: 18px; transition: background 0.2s;
}
.fs-nav-btn:hover { background: rgba(255,255,255,0.25); }
.fs-prev-btn { left: 20px; }
.fs-next-btn { right: 20px; }

/* FOOTER */
footer { background: var(--bg-surface); border-top: 1px solid var(--border-color); padding: 40px 20px 20px 20px; margin-top: 50px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.footer-col h4 { font-size: 14px; font-weight: 800; margin-bottom: 15px; text-transform: uppercase; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links li a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.footer-info-card { background: var(--filter-bg); padding: 12px; border-radius: 8px; font-size: 12px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; background: var(--filter-bg); color: var(--text-primary); display: flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; }
.copyright { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ==========================================================================
   MOBİL İNCE AYARLAR
   ========================================================================== */
@media (max-width: 580px) {
    .cars-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px; 
        padding: 0 10px;
    }
    
    .car-card-img-wrapper { height: 115px; }
    
    .card-title { font-size: 13px; }
    .card-price { font-size: 14.5px; }
    .card-specs span { font-size: 10px; padding: 3px 6px; }
    .section-main-title { font-size: 16px; margin: 25px auto 10px auto; }

    .modal-slider { height: 230px; } 
    header h1 { font-size: 22px; }
    .filter-grid { grid-template-columns: 1fr; }
    .filter-actions { grid-column: span 1; }
    .fs-nav-btn { display: none; } 
}
/* PC Görünümünde Arama Çubuğunu Zorla Sınırla */
@media (min-width: 769px) {
    .search-area {
        max-width: 500px !important;
        width: 100% !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* Arama kutusunu kapsayıcısına hapsediyoruz */
    .search-box {
        max-width: 100% !important;
        width: 100% !important;
    }
}
/* EIDS Banner Tasarımı */
.eids-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-surface); /* Eğer değişkenin yoksa #1a1a1a yazabilirsin */
    border: 1px solid var(--border-color); /* Eğer değişkenin yoksa #333 yazabilirsin */
    padding: 12px 20px;
    border-radius: 12px;
    margin: 15px auto;
    max-width: 1200px; /* Sitenin ana genişliğiyle aynı tutar */
    width: 90%;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.eids-banner i {
    color: var(--brand-red); /* Kırmızı renk */
    font-size: 18px;
}
/* Modal Genel Yapısı */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Sitenin arka planıyla uyumlu koyu transparan */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Modern ve şık bir görünüm katar */
}

.modal-box {
    background: #181818; /* Sitenin genel arka planına uygun renk */
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px; /* Köşeleri sitenle uyumlu yap */
    position: relative;
    border: 1px solid #333; /* Hafif bir çerçeve */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Derinlik hissi */
    color: #e0e0e0; /* Okunabilir bir metin rengi */
}
/* ... mevcut .modal-box kodların burada bitiyor ... */
.modal-box {
    background: #181818;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #e0e0e0;
}

/* BURADAN İTİBAREN YENİ EKLEYECEĞİN KODLAR: */

.modal-overlay:target {
    display: flex;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    color: #fff;
    text-decoration: none;
    line-height: 1;
}

.modal-box h3 {
    margin-bottom: 15px;
    color: #fff;
}

.modal-box p {
    line-height: 1.6;
    font-size: 14px;
}