/* =========================================
   AY-TECH OTO DANIŞMAN - V3 (CLEAN & SHARP)
   ========================================= */

:root {
    --bg-light: #F8F9FA;
    --surface: #FFFFFF;
    --primary: #D32F2F; /* Ay-Tech Kırmızısı */
    --dark: #111827;
    --gray: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* --- TEMEL AYARLAR --- */
body {
    background-color: var(--bg-light);
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    /* Kaydırma serbest */
    height: auto !important; 
    overflow-y: auto !important;
    margin: 0;
}

/* Ana İçerik Alanı */
.main-content {
    padding: 20px;
    padding-bottom: 100px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Başlık */
.page-header { margin-bottom: 20px; }
.page-header h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--dark);
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.page-header p { color: var(--gray); font-size: 0.9rem; font-weight: 600; }
.blink { color: var(--primary); animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --- GRID DÜZENİ (Masaüstü: Sol Sabit, Sağ Esnek) --- */
.consultant-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    align-items: start;
}

/* =========================================
   SOL PANEL: FİLTRELER
   ========================================= */
.filter-panel {
    background: var(--surface);
    padding: 20px;
    border: 1px solid var(--border);
    /* Keskin Köşe */
    border-radius: 0; 
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
}

.panel-header {
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.form-section { margin-bottom: 15px; }
.form-section label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray);
    margin-bottom: 6px;
    text-transform: uppercase;
}

/* Inputlar ve Selectler */
select, input[type=number] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray);
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    outline: none;
    border-radius: 0; /* Keskin */
    transition: 0.2s;
}
select:focus, input:focus {
    border-color: var(--primary);
    background: #FFF5F5;
}

.dual-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Slider Alanı */
.budget-slider-box {
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid var(--border);
}
.budget-display {
    text-align: right;
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}
input[type=range] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary);
    margin: 0;
}

/* Arama Butonu */
.search-btn {
    width: 100%;
    padding: 15px;
    background: var(--dark);
    color: #fff;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    border-radius: 0; /* Keskin */
}
.search-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* =========================================
   SAĞ PANEL: SONUÇLAR
   ========================================= */
.result-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Taşmayı önlemek için */
    min-width: 0; 
}

/* --- İSTATİSTİK BARLARI --- */
.stats-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 15px;
    box-shadow: var(--shadow);
    /* İçerik taşmasın */
    overflow: hidden; 
}

/* Taranan İlan Kutusu */
.stat-icon { display: none; } /* Yer kaplamasın diye gizledim */
.stat-card small {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--gray);
    margin-bottom: 5px;
    text-transform: uppercase;
}
.stat-card h3 {
    margin: 0;
    font-size: 2rem; /* Çok büyük değil */
    font-family: 'Teko', sans-serif;
    color: var(--dark);
    line-height: 1;
}

/* --- LİDER TABLOSU (SAĞ ÜST) --- */
.chart-container { 
    display: block; 
}
.chart-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border); padding-bottom: 5px; margin-bottom: 10px;
}
.stats-list {
    display: flex; flex-direction: column; gap: 8px;
}
/* Tablo Satırı */
.stat-item {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 5px; border-bottom: 1px dashed #eee;
}
.rank-box {
    width: 24px; height: 24px;
    background: var(--dark); color: #fff;
    font-family: 'Teko', sans-serif; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-content { flex: 1; min-width: 0; /* Flex içinde text-overflow çalışsın diye şart */ }
.stat-top { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; }
.model-name {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--dark);
}
.stat-percent { color: var(--primary); }
.progress-bg { height: 4px; background: #eee; width: 100%; }
.progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 1s ease; }


/* =========================================
   SNIPER (FIRSAT) KARTI - MODERN & SHARP
   ========================================= */
.sniper-card {
    background: #FFFFFF;
    border: 2px solid #22C55E; /* Canlı Yeşil */
    position: relative;
    margin-bottom: 25px;
    box-shadow: 8px 8px 0px rgba(34, 197, 94, 0.1);
    /* Keskin Köşe Tasarımı */
    clip-path: polygon(
        0 0, 
        100% 0, 
        100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 
        0 100%
    );
}

/* Fırsat Etiketi */
.sniper-badge {
    background: #22C55E;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 6px 15px;
    display: inline-block;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Kart İçerik Düzeni */
.sniper-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 30px;
}

/* Sol Taraf: Model ve Bilgi */
.s-info {
    flex: 1;
    min-width: 0;
}

.s-info h2 {
    margin: 0 0 10px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FİYAT ALANI (Düzeltilen Kısım) */
.s-price {
    display: flex;
    align-items: center; /* Ortala */
    gap: 15px; /* Fiyatlar arası mesafe */
    flex-wrap: wrap;
}

/* Eski Fiyat */
.s-price .old {
    color: #9CA3AF;
    font-family: 'Teko', sans-serif;
    font-size: 1.3rem;
    text-decoration: line-through;
    display: flex;
    gap: 4px; /* ₺ ve rakam arası */
}

/* Yeni Fiyat (Büyük Yeşil) */
.s-price .new {
    color: #16A34A;
    font-family: 'Teko', sans-serif;
    font-size: 2.0rem;
    font-weight: 600;
    display: flex;
    gap: 10px; /* ₺ ve rakam arası */
    line-height: 1;
}
/* consultant.css dosyasının en altına yapıştır */
body .go-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #111827 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(10% 0%, 100% 0%, 100% 70%, 90% 100%, 0% 100%, 0% 30%);
    border-right: 4px solid #16A34A;
    margin-top: 10px;
}

body .go-btn:hover {
    background: #16A34A !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.4);
}

/* Sağ Taraf: İndirim ve Buton */
.s-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.discount {
    background: #DCFCE7;
    color: #16A34A;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    padding: 4px 10px;
    border: 1px dashed #16A34A;
}

.go-btn {
    background: #111827;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    transition: 0.2s;
    border: none;
    white-space: nowrap;
}

.go-btn:hover {
    background: #22C55E;
    color: #fff;
    transform: translateX(5px);
}

.sniper-note {
    font-size: 0.7rem;
    color: #6B7280;
    padding: 0 20px 15px 20px;
    margin: 0;
    font-weight: 600;
    font-style: italic;
}

/* --- MOBİL UYUM --- */
@media (max-width: 768px) {
    .sniper-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }

    .s-action {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .s-price .new {
        font-size: 1.8rem;
    }
}

/* --- AI KARTLARI --- */
.ai-wrapper {
    background: var(--surface); padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.section-title {
    font-weight: 800; color: var(--dark);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px; margin-bottom: 15px;
}

.rec-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}
.rec-item {
    background: #fafafa;
    border: 1px solid var(--border);
    padding: 15px;
    border-top: 3px solid var(--primary);
}
.rec-item h3 { margin: 0 0 8px; font-size: 1rem; color: var(--dark); font-weight: 800; }
.rec-item p { font-size: 0.85rem; color: #444; line-height: 1.4; margin-bottom: 10px; }
.rec-chronic {
    font-size: 0.75rem; color: var(--primary); font-weight: 700;
    display: flex; gap: 5px; align-items: center;
}

.expert-box {
    margin-top: 20px;
    background: #FFF;
    border-left: 4px solid var(--dark);
    padding: 10px 15px;
}
.exp-title { font-weight: 800; font-size: 0.8rem; margin-bottom: 5px; }
.expert-box p { font-size: 0.9rem; line-height: 1.5; color: #333; }


/* =========================================
   MOBİL (RESPONSIVE) AYARLARI
   ========================================= */
@media (max-width: 900px) {
    /* 1. HEADER ÇAKIŞMASINI DÜZELTME */
    .main-content {
        padding-top: 100px !important; /* Header'dan kurtar */
    }

    .page-header { text-align: center; }
    .page-header h1 { font-size: 1.4rem; }

    /* 2. DÜZENİ TEK SÜTUNA İNDİR */
    .consultant-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Sol panel artık yukarıda normal bir kart gibi dursun */
    .filter-panel { position: static; }

    /* İstatistik Barları Alt Alta */
    .stats-bar { grid-template-columns: 1fr; }

    /* Sniper Kartı Sıkışmasın */
    .sniper-grid {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .s-action { 
        width: 100%; 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        margin-top: 10px;
    }

    /* AI Tavsiyeleri Alt Alta */
    .rec-list { grid-template-columns: 1fr; }
}
/* --- YENİ EKLENEN ÖZELLİKLER --- */

/* 1. Gelecek Simülasyonu */
.future-sim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4; /* Hafif yeşil */
    border: 1px solid #bbf7d0;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}
.future-sim.loss {
    background: #fef2f2; /* Hafif kırmızı */
    border-color: #fecaca;
}
.sim-title { font-weight: 700; font-size: 0.8rem; color: #333; }
.sim-val { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1.1rem; }
.trend-up { color: #16a34a; }
.trend-down { color: #dc2626; }
.disclaimer { display: block; font-size: 0.6rem; color: #999; margin-top: 2px; font-style: italic; }

/* 2. Sanayi Dostu Endeksi */
.maint-score-box {
    margin-top: 15px;
    display: flex; align-items: center; gap: 10px;
}
.score-bar-bg {
    flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden;
}
.score-bar-fill {
    height: 100%; 
    background: linear-gradient(90deg, #ef4444 0%, #eab308 50%, #22c55e 100%);
    width: 0%; transition: width 1s ease;
}
.score-val { font-family: 'Teko', sans-serif; font-size: 1.2rem; font-weight: 700; color: #333; }

/* 3. Ekspertiz Kopya Kağıdı */
.cheat-sheet {
    margin-top: 15px;
    background: #fff;
    border: 1px dashed #d32f2f;
    padding: 10px;
    position: relative;
}
.cheat-title {
    font-size: 0.7rem; font-weight: 900; color: #d32f2f; 
    text-transform: uppercase; margin-bottom: 5px;
    display: flex; align-items: center; gap: 5px;
}
.cheat-list { list-style: none; padding: 0; margin: 0; }
.cheat-list li {
    font-size: 0.85rem; color: #444; margin-bottom: 4px;
    display: flex; align-items: start; gap: 6px;
}
.cheat-list li:before {
    content: '\f00c'; /* FontAwesome check */
    font-family: "Font Awesome 6 Free"; font-weight: 900; color: #d32f2f; font-size: 0.8rem;
}