body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8f9fa; }

/* Üst Bilgi Barı */
.top-bar { background-color: #212529; color: #fff; font-size: 0.9rem; padding: 8px 0; }

/* Ürün Kartları */
.product-card { 
    transition: transform 0.2s, box-shadow 0.2s; 
    border: none; 
    height: 100%; 
    background: #fff;
    border-radius: 8px;
    overflow: hidden; 
}
.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

/* --- RESİM ALANI (LİSTELEME SAYFASI - GÜNCELLENDİ) --- */
.product-img-wrapper { 
    height: 250px; /* Masaüstünde standart yükseklik */
    width: 100%;
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #fff; 
    border-bottom: 1px solid #f0f0f0;
    padding: 10px; /* Resim kenarlara yapışmasın diye boşluk */
    position: relative;
}

.product-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain !important; /* ÖNEMLİ: Resmi kesme, kutuya sığdır */
}

/* --- MOBİL İÇİN ÖZEL AYAR (GÜNCELLENDİ) --- */
@media (max-width: 576px) {
    .product-img-wrapper {
        height: 500px; /* Mobilde görsel alanı biraz daha yüksek olsun */
        padding: 5px;
        display: flex; /* Flex yapısını koru */
        aspect-ratio: auto; /* Kare zorunluluğunu kaldır */
    }
    
    .product-img-wrapper img {
        /* Mobilde de resmin tamamı görünsün, kırpılmasın */
        object-fit: contain !important; 
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        max-width: 100% !important;
    }
}

/* Ürün Başlıkları */
.product-title {
    font-size: 1.15rem; 
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    text-decoration: none;
    display: block;
}
.product-title:hover {
    color: #000;
}

/* Fiyatlar */
.old-price { text-decoration: line-through; color: #999; font-size: 0.95rem; margin-right: 5px;}
.new-price { color: #d63384; font-weight: bold; font-size: 1.25rem; }

/* Yıldızlar */
.rating-stars { color: #ffc107; font-size: 0.9rem; margin-top: 5px; }
.rating-text { color: #888; font-size: 0.8rem; margin-left: 5px; }

/* --- BUTON ÖZELLEŞTİRME (YEŞİL) --- */
.product-card .btn-custom-green {
    background-color: #198754 !important; /* Yeşil Arkaplan */
    color: #ffffff !important; /* Beyaz Yazı */
    border: 1px solid #198754 !important;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    transition: all 0.3s;
}

.product-card .btn-custom-green:hover {
    background-color: #145c32 !important; /* Koyu Yeşil (Hover) */
    border-color: #145c32 !important;
    color: #ffffff !important;
}

/* Footer */
footer { background-color: #fff; border-top: 1px solid #eee; margin-top: 50px; }
footer a { color: #666; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #000; }


/* --- ÜRÜN DETAY SAYFASI --- */
.product-gallery-wrapper {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

/* Büyük Resim */
.main-image-container {
    height: 400px; /* Masaüstü yüksekliği */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}
.main-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Küçük Resimler (Thumbnails) */
.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Çok resim olursa yana kaydır */
}
.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}
.thumbnail:hover, .thumbnail.active {
    opacity: 1;
    border-color: #198754; /* Yeşil çerçeve */
}

/* Mobil İçin Detay Ayarı */
@media (max-width: 576px) {
    .main-image-container {
        height: auto;
        min-height: 300px;
    }
}


/* --- WHATSAPP BUTONU (Orijinal Renkler) --- */
.btn-whatsapp {
    background-color: #25D366 !important; /* WhatsApp Yeşili */
    color: #ffffff !important; /* Beyaz Yazı */
    border: 1px solid #25D366 !important;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background-color: #128C7E !important; /* Hover olunca koyu WhatsApp tonu */
    border-color: #128C7E !important;
    color: #ffffff !important;
}

/* --- ARAMA BUTONU (Mavi) --- */
.btn-call-blue {
    background-color: #0d6efd !important; /* Standart Mavi */
    color: #ffffff !important; /* Beyaz Yazı */
    border: 1px solid #0d6efd !important;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-call-blue:hover {
    background-color: #0b5ed7 !important; /* Hover olunca koyu Mavi */
    border-color: #0b5ed7 !important;
    color: #ffffff !important;
}


/* --- MODERN SİPARİŞ FORMU --- */

/* Ödeme Seçenekleri (Kart Görünümlü Radio Button) */
.payment-selector {
    display: none; /* Varsayılan radio butonunu gizle */
}

.payment-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.payment-card:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.payment-card i {
    font-size: 1.5rem;
    color: #6c757d;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

/* Seçili Olduğunda (CSS Peer Selector Mantığı) */
.payment-selector:checked + .payment-card {
    border-color: #198754; /* Yeşil Çerçeve */
    background-color: #f0fff4; /* Açık Yeşil Arka Plan */
}
.payment-selector:checked + .payment-card i {
    color: #198754;
}
.payment-selector:checked + .payment-card .check-icon {
    opacity: 1;
}

.check-icon {
    margin-left: auto;
    color: #198754;
    opacity: 0; /* Başta gizli */
    transition: opacity 0.2s;
}

/* Form Alanları */
.modern-input {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s;
}
.modern-input:focus {
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15); /* Yeşil Focus */
    border-color: #198754;
}

/* Sipariş Özeti Kartı */
.order-summary-modern {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}
.summary-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #eee;
}


/* --- HEMEN SİPARİŞ VER BUTONU (Kırmızı) --- */
.btn-buy-now {
    background-color: #e63946 !important; /* Canlı Kırmızı */
    color: #ffffff !important; /* Beyaz Yazı */
    border: 1px solid #e63946 !important;
    font-weight: 700; /* Kalın Yazı */
    text-transform: uppercase; /* Harfleri Büyüt */
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(230, 57, 70, 0.3); /* Hafif gölge */
    transition: all 0.3s ease;
}

.btn-buy-now:hover {
    background-color: #d62828 !important; /* Üzerine gelince Koyu Kırmızı */
    border-color: #d62828 !important;
    transform: translateY(-2px); /* Hafif yukarı kalkma efekti */
    box-shadow: 0 6px 12px rgba(214, 40, 40, 0.4);
    color: #ffffff !important;
}

.btn-buy-now i {
    margin-right: 8px; /* İkon ile yazı arası boşluk */
}


/* --- KATEGORİ SAYFASI --- */

/* Sidebar Menü Linkleri */
.list-group-item {
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    color: #000;
    padding-left: 20px !important; /* Hover olunca hafif sağa kayma efekti */
}

/* Seçili Olan Kategori */
.active-category {
    background-color: #e9ecef !important; /* Gri Zemin */
    color: #000 !important;
    font-weight: 700 !important;
    border-left: 4px solid #198754 !important; /* Sol tarafta yeşil çizgi */
}






/* --- BENZER ÜRÜNLER KESİN ÇÖZÜM --- */

/* Kart Yapısı */
.related-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

/* Resim Alanı: Her cihazda tam kare */
.related-img-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1; /* Kare oran */
    overflow: hidden;
    position: relative;
    background: #fff;
}

.related-img-link img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Resim sığdırılır, kesilmez */
    padding: 10px;
    transition: transform 0.3s ease;
}

/* Başlık Alanı: 2 satıra sabitleme */
.related-product-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3rem;
    height: 2.6rem; /* 1.3 * 2 satır */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
}

/* Mobilde başlık biraz daha küçülebilir */
@media (max-width: 768px) {
    .related-product-title {
        font-size: 0.85rem;
        height: 2.4rem;
        line-height: 1.2rem;
    }
    .new-price {
        font-size: 36px !important;
    }
}


/* Ana Sayfa ve Kategori İle Aynı Kart Düzeni */
.product-title-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem; /* 2 satır için sabit yükseklik */
    line-height: 1.5rem;
    font-size: 1rem;
    transition: color 0.2s;
}

.product-img-link {
    display: block;
    overflow: hidden;
    background: #f8f9fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* Kare oran */
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 15px;
}

.product-img-link:hover img {
    transform: scale(1.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Mobilde başlık ve fiyat fontu ayarı */
@media (max-width: 768px) {
    .product-title-link {
        font-size: 0.9rem;
        height: 2.6rem;
        line-height: 1.3rem;
    }
}




/* --- BENZER ÜRÜNLER DÜZELTME (MOBİL & MASAÜSTÜ) --- */

/* Link Kapsayıcısı */
.related-fix-link {
    display: block;
    overflow: hidden;
    background: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    text-decoration: none;
}

/* Resim Çerçevesi - Tam Kare Yapısı */
.related-fix-wrapper {
    position: relative;
    width: 100%;
    /* padding-top: %100 demek genişlik neyse yükseklik de o olsun demektir (Kare) */
    padding-top: 100%; 
    background: #fff;
    overflow: hidden;
}

/* Resmin Kendisi */
.related-fix-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Resmi kesmeden kutuya sığdır */
    padding: 15px; /* Kenarlardan biraz boşluk bırak */
    transition: transform 0.3s ease;
}

/* Hover Efekti (Üzerine gelince büyüme) */
.related-fix-link:hover .related-fix-wrapper img {
    transform: scale(1.05);
}

/* --- MOBİL İÇİN EKSTRA GÜVENLİK --- */
@media (max-width: 576px) {
    .related-fix-wrapper {
        height: auto !important; /* Eski sabit yüksekliği eziyoruz */
        aspect-ratio: 1 / 1; /* Modern tarayıcılar için kare zorlaması */
    }
    
    .related-fix-wrapper img {
        padding: 5px; /* Mobilde boşluğu biraz azaltabiliriz */
    }
}