/* --- PRODUCT.CSS TAM SÜRÜM --- */

/* 1. DEĞİŞKENLER */
:root {
    --primary-color: #0061f2;
    --secondary-color: #6900f2;
    --dark-bg: #0f172a;
    --light-bg: #f3f4f6;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; text-decoration: none; list-style: none; }
body { background-color: var(--light-bg); color: var(--text-dark); overflow-x: hidden; }

/* 2. SIDEBAR (YAN MENÜ) */
.sidebar {
    width: var(--sidebar-width); background-color: var(--dark-bg); height: 100vh;
    position: fixed; left: calc(var(--sidebar-width) * -1); top: 0;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.4s ease; z-index: 1000;
}
.sidebar.open { left: 0; }
.sidebar-header { padding: 2rem; text-align: center; color: var(--white); border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-links { padding: 1rem; flex-grow: 1; }
.nav-links a { display: flex; align-items: center; padding: 12px 20px; color: #94a3b8; border-radius: 8px; transition: 0.3s; }
.nav-links a i { margin-right: 15px; width: 20px; text-align: center; }
.nav-links a:hover, .nav-links a.active { background: var(--primary-color); color: var(--white); transform: translateX(5px); }
.sidebar-footer { padding: 1rem; text-align: center; color: #475569; font-size: 0.8rem; border-top: 1px solid rgba(255,255,255,0.05); }

.hamburger { position: fixed; top: 20px; left: 20px; z-index: 1100; background: var(--white); border: none; padding: 10px 15px; border-radius: 8px; cursor: pointer; box-shadow: var(--shadow); transition: 0.4s; }
.hamburger.shift { left: calc(var(--sidebar-width) + 20px); }

.content { transition: margin-left 0.4s ease; min-height: 100vh; background: var(--light-bg); }
.content.shift { margin-left: var(--sidebar-width); }

/* 3. ÜRÜN KARTLARI */
.page-hero {
    height: 300px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: var(--white);
    margin-bottom: 3rem; position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60%; height: 60%; background-image: url('zeykaa_oto_logo.jpg');
    background-position: center; background-repeat: no-repeat; background-size: contain;
    opacity: 0.05; z-index: 0; pointer-events: none;
}
.page-hero h1, .page-hero p { position: relative; z-index: 1; }

.products-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem 4rem 2rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.product-card { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: 0.3s; cursor: pointer; border: 1px solid rgba(0,0,0,0.05); }
.product-card:hover { transform: translateY(-10px); }
.img-wrapper { height: 220px; background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 10px; }
.img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-info { padding: 1.5rem; text-align: center; }

/* 4. MODAL TASARIMI (KAYMA SORUNU ÇÖZÜLEN KISIM) */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 5000;
    justify-content: center; align-items: center; padding: 20px;
}

.modal-box {
    background: var(--white); width: 100%; max-width: 1000px; height: 650px;
    border-radius: 16px; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}

.modal-grid { 
    display: grid; 
    grid-template-columns: 500px 1fr; /* Sol taraf 500px sabitlendi, sağ taraf esnek */
    height: 100%; 
}

/* MODAL SOL (MEDYA) */
.modal-left {
    background: #f8fafc; padding: 2rem;
    display: flex; flex-direction: column; gap: 20px;
    border-right: 1px solid #e2e8f0;
}

.main-image-wrapper {
    width: 100%; height: 350px; 
    display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
    position: relative; overflow: hidden;
}
.main-image-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* THUMBNAILS (ALT SATIRA GEÇME AYARI) */
.thumbnails { 
    display: flex; 
    flex-wrap: wrap; /* Resimler sığmazsa alt satıra geçer */
    gap: 10px; 
    overflow-y: auto; 
    max-height: 160px; /* Çok resim olursa modalı bozmaz, kaydırılır */
    padding: 5px;
}

.thumbnails img, .video-thumb-wrapper {
    width: 75px; height: 75px; flex-shrink: 0;
    object-fit: cover; border-radius: 8px;
    cursor: pointer; border: 2px solid transparent; transition: 0.3s;
}
.thumbnails img:hover, .thumbnails img.active-thumb, .video-thumb-wrapper.active-thumb {
    border-color: var(--primary-color); transform: scale(1.05);
}

/* VİDEO BUTONU */
.video-thumb-wrapper {
    background: #1e293b; color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.video-thumb-wrapper i { font-size: 1.4rem; margin-bottom: 2px; color: #fbbf24; }
.video-thumb-wrapper small { font-size: 0.65rem; }

#video-container { width: 100%; height: 100%; display: none; }
#product-video { width: 100%; height: 100%; background: #000; border-radius: 8px; object-fit: contain; }

/* MODAL SAĞ (DETAYLAR) */
.modal-right { padding: 3rem 2rem; overflow-y: auto; }
.modal-right h2 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 1rem; }
.divider { height: 4px; width: 60px; background: var(--primary-color); margin-bottom: 1.5rem; }
.modal-right p { color: var(--text-light); line-height: 2; margin-bottom: 2rem; font-size: 1.2rem; }

.close-btn { position: absolute; top: 15px; right: 20px; font-size: 2.5rem; color: #94a3b8; cursor: pointer; z-index: 100; }
.close-btn:hover { color: #ef4444; }

/* 5. GOOGLE TRANSLATE & DİL AYARLARI */
.sidebar, nav, ul { overflow: visible !important; }
.language-item { position: relative; display: flex; align-items: center; margin-top: 30px; padding: 10px 15px; cursor: pointer; border-radius: 10px; transition: 0.3s; color: #94a3b8; }
.language-item:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
#google_translate_element { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; opacity: 0.01 !important; z-index: 100; }
.goog-te-banner-frame.skiptranslate { display: none !important; } 

/* 6. RESPONSIVE */
@media (max-width: 992px) {
    .content.shift { margin-left: 0; }
    .modal-grid { grid-template-columns: 1fr; }
    .modal-box { height: auto; max-height: 95vh; overflow-y: auto; }
    .modal-left { border-right: none; border-bottom: 1px solid #e2e8f0; }
}

/* --- DETAIL BUTON ESKİ GÖRÜNÜMÜNÜ GERİ GETİRME --- */
.detail-btn {
    padding: 10px 25px; 
    background: transparent; 
    border: 2px solid var(--primary-color);
    color: var(--primary-color); 
    border-radius: 50px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.3s;
    display: inline-block; /* Konumlandırma için */
    margin-top: 10px;
}

.product-card:hover .detail-btn { 
    background: var(--primary-color); 
    color: var(--white); 
}