/* --- GEK PREMIUM LUXURY & SOFT-GLOW THEME --- */
.katalog-konteyner {
    width: 100%;
    margin-top: 25px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0 10px;
}


/* Üst Bar - Ultra Temiz ipeksi Beyaz & İnce Kırmızı Çizgi (SABİT-STICKY MODLU) */
.katalog-ust-bar {
    /* --- Sabitleme Kuralları --- */
    position: -webkit-sticky; /* Safari desteği için */
    position: sticky;
    top: 0;                   /* Ekranın en üst sıfır noktasına yapış */
    z-index: 1000;            /* Ürün kartlarının (z-index: 5) kesinlikle üstünde kalması için */
    
    /* --- Arka Plan ve Akışkanlık --- */
    background: rgba(255, 255, 255, 0.95); /* Arkadaki ürünler kayarken altından okunmasın diye opaklığı 0.85'ten 0.95'e çektik */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 25px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Alttan çok hafif, kibar bir kırmızı ışıma */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 0 4px 15px rgba(221, 23, 26, 0.04);
}
.katalog-sayac {
    color: #2d3748;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
}

/* Kibar ve Estetik Nabız Noktası */
.katalog-sayac::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #dd171a;
    border-radius: 50%;
    margin-right: 10px;
    animation: kibarNabiz 2s infinite;
}

@keyframes kibarNabiz {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.5; }
    100% { transform: scale(0.95); opacity: 1; }
}

.katalog-limit {
    background: #ffffff;
    color: #dd171a;
    border: 1px solid rgba(221, 23, 26, 0.3);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(221, 23, 26, 0.05);
}

/* Ürün Izgarası */
.katalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Elit ve Yumuşak Işıltılı Ürün Kartı */
.katalog-kart {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #555;
    position: relative;
    /* Kartın altındaki yumuşak ipeksi gölge */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    
}

/* Kartın Üzerine Gelindiğinde (Arkasından Yumuşak Kırmızı/Gri Haresi Çıkar) */
.katalog-kart:hover {
    transform: translateY(-6px);
    border-color: rgba(221, 23, 26, 0.15);
    /* Janjanı sağlayan soft-glow efekti burada */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 10px 25px rgba(221, 23, 26, 0.05);
}

/* İpeksi Puan Rozeti */
.katalog-puan {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    color: #dd171a;
    border: 1px solid rgba(221, 23, 26, 0.1);
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Soft Akışkan Görsel Alanı */
.katalog-resim-alani {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #fbfbfd 0%, #f5f5f7 100%); /* Apple tarzı temiz gri */
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.01);
}

.katalog-baslik {
    color: #1d1d1f; /* Apple siyahı */
    font-size: 15px;
    font-weight: 600;
    margin: 5px 0 12px 0;
    line-height: 1.4;
}

/* Minimalist İnce Stok Çubuğu */
.katalog-stok-alani {
    margin-bottom: 18px;
}
.katalog-stok-metin {
    font-size: 12px;
    color: #86868b;
    margin-bottom: 6px;
}
.katalog-stok-bar {
    background: #f5f5f7;
    height: 5px; /* İnce ve kibar */
    border-radius: 10px;
    overflow: hidden;
}
.katalog-stok-doluluk {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Yumuşak Degrade Stok Renkleri */
.stok-kirmizi { background: linear-gradient(90deg, #ff5e62, #ff9966); }
.stok-turuncu { background: linear-gradient(90deg, #ffb347, #ffcc33); }
.stok-yesil { background: linear-gradient(90deg, #56ab2f, #a8e063); }

/* Kadifemsi ve Etkileyici Buton (Sistem Menüsü Tonunda) */
.katalog-btn {
    background: #343a40; /* Şablondaki menü rengi */
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
    letter-spacing: -0.1px;
    transition: all 0.3s ease;
}

/* Butonun Üzerine Gelince Yumuşakça GEK Kırmızısına Geçişi */
.katalog-btn:hover {
    background: #dd171a;
    box-shadow: 0 4px 15px rgba(221, 23, 26, 0.25);
}

.katalog-btn:active {
    transform: scale(0.98);
}

/* İpeksi Bildirim (Toast) */
.katalog-toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: none;
    z-index: 99999;
    font-weight: 600;
    font-size: 18px;
}

/* Adet ve Buton Yan Yana Hizalama */
.katalog-aksiyon-alani {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

/* Adet Seçici Kapsayıcı */
.katalog-adet-grup {
    display: flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Artı ve Eksi Butonları */
.adet-degistir {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border-radius: 6px;
}
.adet-degistir:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Sayı Inputu (Ortadaki Alan) */
.urun-adet-input {
    width: 35px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #1d1d1f;
    -moz-appearance: textfield; /* Firefox okları gizleme */
}

/* Chrome, Safari, Edge için input oklarını gizleme */
.urun-adet-input::-webkit-outer-spin-button,
.urun-adet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Butonun genişliğini esnek yaptık ki inputun yanına sığsın */
.katalog-btn {
    flex-grow: 1;
    white-space: nowrap;
}

/* Sepete Eklenmiş Ürünün Özel Janjanlı Hali */
.katalog-kart.sepette-kart {
    background: linear-gradient(135deg, #fffdfd 0%, #fef8f8 100%); /* Çok hafif, kibar bir kırmızımsı beyaz geçiş */
    border-color: #dd171a; /* Çerçeve GEK kırmızısı olur */
    box-shadow: 0 10px 25px rgba(221, 23, 26, 0.04); /* Altından hafif kırmızı haresi parlar */
}

/* Sepetteki ürünün butonunu da "Eklendi" moduna sokalım */
.katalog-kart.sepette-kart .katalog-btn {
    background: #10b981; /* Buton yeşile döner */
}
.katalog-kart.sepette-kart .katalog-btn:hover {
    background: #059669;
}


/* --- POPUP (MODAL) ANA ARKA PLANI --- */
.sepet-popup-esnek-arka {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px); /* Arka planı hafifçe buğular, çok elit durur */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999; /* Her şeyin en üstünde dursun */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Popup Aktif Olduğunda Çalışacak Sınıf */
.sepet-popup-esnek-arka.aktif {
    opacity: 1;
    visibility: visible;
}

/* --- POPUP PENCERE KUTUSU --- */
.sepet-popup-kutu {
    background: #ffffff;
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-30px);
    transition: all 0.3s ease-in-out;
}
.sepet-popup-esnek-arka.aktif .sepet-popup-kutu {
    transform: translateY(0);
}

/* Üst Başlık Grubu */
.sepet-popup-baslik-grup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f7;
    padding-bottom: 15px;
}
.sepet-popup-baslik-grup h3 {
    margin: 0;
    font-size: 18px;
    color: #1d1d1f;
    font-weight: 600;
}
.sepet-popup-kapat {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #86868b;
    cursor: pointer;
    line-height: 1;
}
.sepet-popup-kapat:hover {
    color: #dd171a;
}

/* İçerideki Mini Sayaç */
.sepet-popup-sayac {
    background: #fff5f5;
    color: #dd171a;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin: 15px 0;
    border: 1px solid rgba(221, 23, 26, 0.1);
}

/* İçerik Listeleme Alanı (Maksimum yükseklik verdik ki ürün çoksa popup ekrandan taşmasın, içeride scroll olsun) */
.sepet-popup-icerik {
    max-height: 350px;
    overflow-y: auto;
    margin-top: 10px;
}

/* Üst bardaki sepet butonu stili */
.katalog-sepet-tetik-btn {
    background: #ffffff;
    border: 1px solid #dd171a;
    color: #dd171a;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size : 18px;
}
.katalog-sepet-tetik-btn:hover {
    background: #dd171a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(221, 23, 26, 0.15);
}
.sepet-yukleniyor {
    text-align: center;
    color: #86868b;
    padding: 20px;
    font-size: 14px;
}


/* =================================================================
   MODERN SEPET POPUP DÜZENİ (ÇAKIŞMA ÖNLEYİCİ SPESİFİK SEÇİCİLER)
   ================================================================= */

/* Liste Kapsayıcısı ve Kaydırma Çubuğu */
#sepet-dinamik-liste .sepet-liste-wrapper {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 5px;
    font-family: sans-serif !important;
}

/* Her bir ürün satırı */
#sepet-dinamik-liste .sepet-item-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 5px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    gap: 10px !important;
}

/* Sol Grup: Resim ve Metinler */
#sepet-dinamik-liste .sepet-sol-grup {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Ürün Resim Çerçevesi */
#sepet-dinamik-liste .sepet-img-box {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

#sepet-dinamik-liste .sepet-img-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Ürün Yazı Alanı */
#sepet-dinamik-liste .sepet-txt-box {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
}

/* Ürün Adı (Kocaman olmayı engelleyen kesin kural) */
#sepet-dinamik-liste .sepet-urun-adi {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    line-height: 1.4 !important;
}

/* Adet ve Birim Puan Bilgisi */
#sepet-dinamik-liste .sepet-urun-detay-alt {
    font-size: 14px !important;
    color: #64748b !important;
    margin-top: 2px !important;
    display: block !important;
}

/* Sağ Grup: Puan ve Silme */
#sepet-dinamik-liste .sepet-sag-grup {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

/* Ürün Toplam Puanı */
#sepet-dinamik-liste .sepet-satir-toplam-puan {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
}

/* Kırmızı Silme Butonu */
#sepet-dinamik-liste .sepet-sil-btn-yeni {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: none !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* Alt Özet Sabit Alanı */
#sepet-dinamik-liste .sepet-ozet-tablo {
    margin-top: 15px !important;
    padding-top: 12px !important;
    border-top: 2px solid #f1f5f9 !important;
    font-family: sans-serif !important;
}

#sepet-dinamik-liste .sepet-toplam-flex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    color: #334155 !important;
    margin-bottom: 12px !important;
}

#sepet-dinamik-liste .sepet-toplam-yeşil {
    font-size: 16px !important;
    color: #10b981 !important;
}

/* Alışverişi Tamamla Butonu */
#sepet-dinamik-liste .sepet-onayla-btn-yeni {
    width: 100% !important;
    background: #10b981 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    display: block !important;
}

.sepet-iptal-btn-yeni{
    background-color: #ef4444; color: #ffffff; display: inline-flex; align-items: center; justify-content: center; width: auto; border: none; padding: 0 16px; border-radius: 8px; font-weight: 600; 
    font-size: 14px; cursor: pointer; transition: background 0.2s; white-space: nowrap; margin: 0;
}
.katalog-gecmis-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    margin-left: 10px;
}
.katalog-gecmis-btn:hover { background: #e2e8f0; }


/* Tam ekran modu tetiklendiğinde ana kutunun alacağı şekil */
.sepet-popup-kutu.tam-ekran-aktif {
    width: 95% !important;
    max-width: 95% !important;
    height: 90vh !important;
    max-height: 90vh !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; /* İçeriği dikey sırala */
}

/* 🎯 KRİTİK DÜZELTME: Tam ekrandayken dinamik liste ve wrapper'ı aşağıya kadar esnetiyoruz */
.sepet-popup-kutu.tam-ekran-aktif .sepet-popup-icerik,
.sepet-popup-kutu.tam-ekran-aktif .sepet-liste-wrapper {
    height: 100% !important;
    max-height: calc(90vh - 80px) !important; /* Başlık payını düşüp kalanı listeye veriyoruz */
    overflow-y: auto !important; /* Aşağı doğru taşan ürünler için kaydırma çubuğu */
}

/* Tam ekran butonu stili */
.tam-ekran-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
    color: #64748b;
    transition: color 0.2s;
}
.tam-ekran-btn:hover {
    color: #1e293b;
}

/* Mouse üzerine gelince hafif opak kırmızı arka plan */
.mf-kare-kutu:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    transform: scale(1.03);
}

/* Kutu seçildiğinde (aktif klası aldığında) daha belirgin opak kırmızı */
.mf-kare-kutu.secili-mf {
    background-color: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}


