/*
 * Araç detay galerisi - 4:3 görüntüleme
 * Vehicle-Details-min.css'ten SONRA yüklenmelidir (üzerine yazar).
 *
 * Görseller Arac-Detay.js içinde <div class="g43"> çerçevesine sarılır.
 * Çerçeve her ekran genişliğinde 4:3 oranını korur (padding-bottom: 75%),
 * görsel ise çerçeve içinde oranı bozulmadan gösterilir:
 *   - Büyük görsel / Mega foto : object-fit: contain  (kırpma yok, boşluklar zemin rengiyle dolar)
 *   - Küçük resimler (thumb)   : object-fit: cover    (alanı doldurur, taşan kısım kırpılır)
 * Büyük görselde de kırpmalı tam dolgu istenirse aşağıdaki "contain" değerlerini "cover" yapmanız yeterli.
 */

/* ---- Ortak 4:3 çerçeve ---- */
.g43 {
    position: relative;
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 3 / 4 = %75 -> 4:3 */
    overflow: hidden;
    background-color: #f1f2f4;
}

.g43 > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0;
    -o-object-fit: contain;
    object-fit: contain;
    -o-object-position: center center;
    object-position: center center;
}

/* ---- Ana slider (sayfadaki büyük görsel) ---- */
#Slider .Photos .img .g43 > img {
    width: 100% !important;
    max-height: none !important;
}

/* ---- Mega foto popup ---- */
#MegaPhoto .Slider .owl-item .g43 > img {
    width: 100% !important;
}

/* Mega foto ok butonlarını 4:3 alanın dikey ortasına hizala */
#MegaPhoto .Slider.owl-theme .owl-controls {
    top: 50%;
}

#MegaPhoto .Slider.owl-theme .owl-controls .owl-buttons div {
    top: -42px; /* ok görseli 84px yüksekliğinde */
}

/* ---- Küçük resimler (thumbnail) - sabit 120x90 = 4:3 ---- */
.g43.g43-thumb {
    width: 120px;
    height: 90px;
    padding-bottom: 0;
}

.g43.g43-thumb > img {
    -o-object-fit: cover;
    object-fit: cover;
}

#Slider .Pagination .owl-item .g43-thumb > img,
#MegaPhoto .Pagination .owl-item .g43-thumb > img {
    width: 100% !important;
    height: 100% !important;
    cursor: pointer;
}

#MegaPhoto .Pagination .owl-item .g43-thumb {
    margin: 0 auto;
}
