/* ==========================================
    1. GLOBAL SIFIRLAMA VE DEĞİŞKENLER
   ========================================== */
:root {
    --primary: #0f2c59; 
    --gold: #d4a017;
    --gray-bg: #f8f9fa;
    --text: #333;
    --border: #e9ecef;
    --white: #ffffff;
    --shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* Kayma ve hizalama hatalarını kökten çözen sıfırlama */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box !important; 
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Yatay taşmayı engeller */
    background-color: var(--gray-bg);
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
}

.detail-page-wrapper { 
    width: 100%;
    padding: 20px 0; 
    min-height: 80vh;
}

.container {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;  /* Tam simetri için sol 15px */
    padding-right: 15px; /* Tam simetri için sağ 15px */
}

/* Görsel Koruma */
.protected-img { 
    pointer-events: none; 
    user-select: none; 
    -webkit-user-drag: none;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==========================================
    2. ÜST BİLGİ ALANI (BAŞLIK & FİYAT)
   ========================================== */
.detail-top-bar {
    display: flex; 
    flex-direction: column;
    background: var(--white); 
    padding: 20px; 
    border-radius: 12px;
    box-shadow: var(--shadow); 
    margin-bottom: 25px;
    width: 100%;
}

.detail-top-bar h1 { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--primary); 
    margin-bottom: 8px; 
    letter-spacing: -0.5px; 
    text-align: left;
}
.detail-top-bar p { color: #666; font-size: 0.9rem; display: flex; align-items: center; }
.detail-top-bar p i { color: var(--gold); margin-right: 8px; }

.price-area { 
    text-align: left; 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px solid var(--border);
    width: 100%;
}

.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--gold); display: block; line-height: 1; }
.detail-id { font-size: 0.8rem; color: #999; margin-top: 5px; display: block; text-transform: uppercase; font-weight: 600; }

@media (min-width: 768px) {
    .detail-top-bar { flex-direction: row; justify-content: space-between; align-items: flex-end; padding: 25px 30px; }
    .price-area { border-top: none; padding-top: 0; margin-top: 0; text-align: right; }
    .detail-top-bar h1 { font-size: 2rem; }
}

/* ==========================================
    3. ANA IZGARA (GRID)
   ========================================== */
.detail-main-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 20px; 
    margin-bottom: 25px;
    width: 100%;
}

@media (min-width: 992px) {
    .detail-main-grid { grid-template-columns: 2fr 1fr; gap: 30px; }
}

/* ==========================================
    4. GELİŞMİŞ GALERİ SİSTEMİ (SLIDER)
   ========================================== */
.gallery-column { width: 100%; overflow: hidden; }

.gallery-viewport { 
    position: relative; 
    width: 100%; 
    height: 280px; 
    background: #000; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow);
}

@media (min-width: 768px) { .gallery-viewport { height: 500px; } }

.slider-container { display: flex; width: 100%; height: 100%; transition: all 0.4s ease-out; }
.slide-item { min-width: 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.slide-item img { max-width: 100%; max-height: 100%; object-fit: contain; }

.slider-nav { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    width: 45px; height: 45px; background: rgba(0,0,0,0.5); 
    color: #fff; border: none; border-radius: 50%; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
}
.prev-arrow { left: 10px; } .next-arrow { right: 10px; }

.thumb-nav { display: flex; gap: 10px; overflow-x: auto; padding: 15px 0; scrollbar-width: none; width: 100%; }
.thumb-nav::-webkit-scrollbar { display: none; }
.thumb-box { flex: 0 0 85px; height: 65px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 3px solid transparent; transition: 0.3s; opacity: 0.6; }
.thumb-box.active { border-color: var(--gold); opacity: 1; transform: scale(1.05); }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================
    5. SIDEBAR (DANIŞMAN & HIZLI BİLGİLER)
   ========================================== */
.agent-box, .quick-specs { 
    background: var(--white); 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    margin-bottom: 20px; 
    width: 100%; 
}
.agent-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.agent-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gray-bg); }
.agent-name h4 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.agent-name p { margin: 2px 0 0 0; font-size: 0.85rem; color: #777; }

.agent-contact { display: flex; gap: 10px; flex-direction: column; width: 100%; }
.call-btn, .wp-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 700; transition: 0.3s; width: 100%; }
.call-btn { background: var(--primary); }
.wp-btn { background: #25d366; }

.quick-specs ul { list-style: none; }
.quick-specs li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 12px 0; font-size: 0.9rem; }
.quick-specs li:last-child { border-bottom: none; }
.quick-specs span { color: var(--primary); font-weight: 700; }

/* ==========================================
    6. SEKMELER (TABS) - MOBİLDE KUSURSUZ GRİD
   ========================================== */
.tabs-container { background: var(--white); padding: 25px; border-radius: 12px; box-shadow: var(--shadow); width: 100%; margin-top: 10px; }

.tabs-header { 
    display: flex; 
    gap: 5px; 
    border-bottom: 2px solid var(--gray-bg); 
    margin-bottom: 25px; 
    overflow-x: auto; 
    scrollbar-width: none; 
}

.t-btn { 
    background: none; border: none; padding: 12px 20px; 
    font-size: 0.95rem; font-weight: 700; color: #888; 
    cursor: pointer; border-bottom: 3px solid transparent; 
    white-space: nowrap; transition: 0.3s; 
}
.t-btn.active { color: var(--primary); border-bottom-color: var(--gold); }

.t-content { display: none; animation: fadeIn 0.4s ease; }
.t-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Teknik Özellikler Izgarası */
.all-specs-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%; }
@media (min-width: 576px) { .all-specs-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; } }

.spec-group h5 { font-size: 1.1rem; color: var(--gold); margin-bottom: 15px; font-weight: 800; border-bottom: 1px solid #eee; padding-bottom: 5px; display: inline-block; }
.spec-group p { display: flex; justify-content: space-between; margin-bottom: 8px; color: #666; font-size: 0.9rem; border-bottom: 1px solid #f9f9f9; }
.spec-group span { color: var(--primary); font-weight: 700; }

/* ==========================================
    7. LIGHTBOX & PREMIUM KİLİDİ
   ========================================== */
.lightbox-overlay { 
    display: none; position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); z-index: 99999; 
    align-items: center; justify-content: center; 
    backdrop-filter: blur(10px); 
}
.lightbox-overlay.active { display: flex; }
.close-lightbox { position: absolute; top: 25px; right: 25px; color: var(--white); font-size: 40px; cursor: pointer; }

.premium-lock-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.85); z-index: 10000; 
    display: flex; align-items: center; justify-content: center; 
    backdrop-filter: blur(8px); 
}
.premium-lock-modal { 
    background: #fff; padding: 40px; border-radius: 20px; 
    text-align: center; max-width: 450px; width: 90%; 
    margin: 0 auto; 
}
.lock-icon { font-size: 3.5rem; color: var(--gold); margin-bottom: 15px; }
.premium-lock-modal h2 { color: var(--primary); margin-bottom: 10px; font-weight: 800; }
.lock-actions { display: flex; gap: 15px; justify-content: center; margin-top: 25px; }
.btn-lock { padding: 12px 25px; border-radius: 50px; text-decoration: none; font-weight: 700; transition: 0.3s; }
.btn-register-lock { background: var(--gold); color: #fff; }
.btn-login-lock { background: #f0f0f0; color: #333; }

/* ==========================================
    8. MOBİL ÖZEL: TAM SİMETRİ VE DÜZENLEME
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .detail-top-bar {
        padding: 20px 15px !important;
        align-items: stretch !important;
    }

    .title-area, .price-area {
        text-align: left !important;
        width: 100% !important;
    }

    /* Sekmeler: Tam 2'li Izgara ve Ortalama */
    .tabs-header {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        overflow-x: hidden !important;
        padding: 5px 0 !important;
        border-bottom: none !important;
    }

    .t-btn {
        width: 100% !important;
        padding: 12px 5px !important;
        font-size: 13px !important;
        text-align: center !important; /* Metni buton içinde ortalar */
        background: #fff !important;
        border: 1px solid var(--border) !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
        display: block !important;
    }

    .t-btn.active {
        color: var(--gold) !important;
        border: 2px solid var(--gold) !important;
        background: #fff !important;
        box-shadow: 0 4px 10px rgba(212, 160, 23, 0.1) !important;
    }

    .t-btn:hover {
        color: var(--gold) !important;
        border-color: var(--gold) !important;
        background: #fdfaf0 !important;
    }

    /* Özellikler: Mobilde tek sütun daha dengelidir */
    .all-specs-grid, .feature-grid {
        grid-template-columns: 1fr !important;
    }

    .gallery-viewport { height: 240px !important; }
}

/* Küçük Telefonlar İçin Ekstra Hassasiyet */
@media (max-width: 480px) {
    .detail-price { font-size: 1.6rem !important; }
    .detail-top-bar h1 { font-size: 1.25rem !important; }
    .t-btn { font-size: 11px !important; padding: 10px 2px !important; }
    .premium-lock-modal { padding: 30px 20px !important; }
}
/* ==========================================
    ÖZELLİKLER (FEATURES) MODERN TASARIM
   ========================================== */

/* Grid Yapısı: Otomatik sığdırma (Her kutu en az 180px) */
#t-feat .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 10px 0;
}

/* Her bir özellik öğesi */
#t-feat .f-item {
    background: #f8fafc; /* Çok hafif mavi/gri arka plan */
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease-in-out;
}

/* İkon Stili */
#t-feat .f-item i {
    color: #22c55e; /* Canlı yeşil */
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Hover Efekti: Üzerine gelince belirginleşme */
#t-feat .f-item:hover {
    background: #ffffff;
    border-color: var(--gold); /* Altın rengi border */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

/* Özellik Bulunmadığında Görünen Mesaj */
#t-feat .no-feature {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #fdfdfd;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #94a3b8;
}

/* Mobil Uyumluluk Ayarı */
@media (max-width: 576px) {
    #t-feat .feature-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobilde yan yana 2 tane */
        gap: 8px;
    }
    
    #t-feat .f-item {
        padding: 10px;
        font-size: 0.85rem;
    }
}