/* Genel Ayarlar ve Sıfırlama */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    /* Mobil'de yatay kaydırmayı engellemek için */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================================== */
/* HEADER STYLES */
/* ========================================================== */
.main-header {
    background-color: #000; /* Turuncu */
    color: #fff;
    padding: 0px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0;
    border-radius: 0;
    z-index: 1000; /* Dropdown'ın diğer elemanların üzerinde görünmesi için */
    position: sticky; /* Sticky yapıldı */
    top: 0; /* Sticky olması için */
    width: 100%; /* Genişlik 100% olmalı */
    height: auto; /* Header yüksekliğini içeriğe göre otomatik ayarla */
    min-height: 80px; /* Logo büyüdüğü için minimum yüksekliği artırıldı */
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.8em;
    font-weight: 700;
}

.header-logo img {
    /* Logo boyutu artırıldı */
    height: 100px; /* İstediğiniz boyuta göre bu değeri ayarlayabilirsiniz */
    margin-right: 10px;
    max-width: 100%;
    object-fit: contain; /* Görselin oranını koru */
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 25px; /* Mevcut boşluk değeri korundu */
    flex-wrap: nowrap; /* Öğelerin tek satırda kalmasını sağlar, taşma olursa aşağı düşmez */
}

/* Arama Kutusu */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 200px; /* Varsayılan genişlik */
    margin-right: 15px; /* Mevcut boşluk */
    flex-shrink: 1; /* Gerektiğinde küçülmesine izin ver */
    flex-grow: 1; /* Kullanılabilir alanı doldurmasını sağlar */
    min-width: 150px; /* Minimum bir genişlik verebiliriz, daha fazla küçülmesin */
}

.search-container input[type="text"] {
    padding: 8px 15px;
    padding-right: 40px; /* İkon için boşluk */
    border: none;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 100%; /* Kapsayıcısına göre genişlik */
    transition: width 0.3s ease;
}

.search-container input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-container input[type="text"]:focus {
    width: 250px; /* Focuslandığında genişlik */
    background-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

/* Arama ikonu için stil */
.search-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2em;
    padding: 5px;
    pointer-events: none; /* İkonun tıklanmasını engeller */
}

/* Canlı Arama Sonuçları Dropdown Stilleri */
#search-results-dropdown {
    position: absolute;
    top: 100%; /* Arama kutusunun hemen altında */
    left: 0;
    width: 100%; /* Kapsayıcısının (search-container) genişliğini alsın */
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1005; /* Header'dan daha yüksek, profilden düşük */
    display: none;
    padding: 5px 0;
}
/* magza.css dosyasına eklenecekler */

/* Simge ve metin için kapsayıcı */
.icon-with-text-container {
    display: flex; /* Öğeleri düzenlemek için flexbox kullanın */
    flex-direction: column; /* Öğeleri dikey olarak yığınlayın */
    align-items: center; /* Yatayda ortala */
    justify-content: center; /* Dikeyde ortala */
    cursor: pointer; /* Tıklanabilir olduğunu belirt */
    text-align: center; /* Metni ortala */
    padding: 5px; /* Biraz dolgu ekleyin */
    min-width: 60px; /* Hizalama için minimum genişlik sağlayın */
    margin: 0 10px; /* Simgeler arasına boşluk bırakmak için */
    position: relative; /* cart-item-count için konumlandırma */
}
/* Sepetim ve Profilim yazıları için */
.header-nav .icon-with-text-container .icon-label {
    color: #FFFFFF; /* Beyaz renk kodu */
    /* Başka stil özellikleri varsa buraya ekleyebilirsiniz, örneğin: */
    /* font-size: 14px; */
    /* font-weight: 600; */
}

/* Sepet sayacı (0, 1, 2 vb.) için */
.header-nav .icon-with-text-container .cart-item-count {
    color: #FFFFFF; /* Beyaz renk kodu */
    /* Arka plan rengini veya diğer stilleri de ayarlayabilirsiniz */
    /* background-color: red; */
    /* border-radius: 50%; */
    /* padding: 2px 6px; */
}

.icon-with-text-container .cart-icon,
.icon-with-text-container .profile-icon {
    /* Mevcut resim stilleri, çok büyük olmadıklarından emin olun */
    width: 40px; /* Örnek boyut, gerektiği gibi ayarlayın */
    height: 40px; /* Örnek boyut, gerektiği gibi ayarlayın */
    /*margin-bottom: 5px;*/
}

/* Metin etiketi için stil */
.icon-label {
    font-size: 0.8em; /* Etiket için daha küçük yazı tipi boyutu */
    color: #333; /* Okunabilirlik için daha koyu renk */
    white-space: nowrap; /* Metnin kaymasını önle */
}

/* Sepet öğesi sayacı konumlandırması */
.cart-item-count {
    position: absolute;
    top: 0; /* Kapsayıcının üstüne göre ayarla */
    right: 0; /* Kapsayıcının sağına göre ayarla */
    background-color: red; /* Sayacın arka plan rengi */
    color: white; /* Sayacın metin rengi */
    border-radius: 50%; /* Yuvarlak şekil */
    padding: 2px 6px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    transform: translate(50%, -50%); /* Köşeden dışarı taşımak için */
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f0f0f0;
    cursor: pointer;
}

.search-result-item img {
    width: 40px;
    height: 60px;
    object-fit: contain;
    margin-right: 10px;
    border: 1px solid #eee;
    border-radius: 3px;
    flex-shrink: 0;
}

.search-result-info {
    flex-grow: 1;
}

.search-result-info p {
    margin: 0;
    line-height: 1.3;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95em;
    color: #2c3e50;
}

/* ========================================================== */
/* SEPET VE PROFİL İKONLARI İÇİN İYİLEŞTİRMELER VE EKLEMELER */
/* ========================================================== */

/* Header'daki tüm gezinme ikonları için genel stil (bağlantı olmayabilir) */
.header-nav > div { /* Doğrudan div elemanlarını hedefle */
    display: flex; /* İçerideki ikon veya resmi ortalamak için */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0; /* Küçülmeyi engelle */
}

.header-nav > div:hover {
    transform: translateY(-2px);
}

/* Sepet ikonu kapsayıcısı */
.cart-icon-container {
    position: relative;
    background-color: #3498db; /* Mavi arka plan */
    border-radius: 50%;
    /* Düzeltme: İkonun etrafındaki mavi kenarlığı azaltmak için kapsayıcı boyutunu optimize ettik. */
    width: 40px; /* Mevcut haliydi, ikonun sığması için genellikle bu ideal */
    height: 40px; /* Genişlikle aynı yapın, yuvarlak kalsın */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cart-icon {
    /* Düzeltme: İkonun kapsayıcısını daha fazla doldurmasını sağlamak için %90 kullanıldı. */
    width: 90%; /* Kapsayıcının %90'ını kapla */
    height: 90%; /* Kapsayıcının %90'ını kapla */
    filter: invert(100%); /* İkonu beyaz yapar */
    /* Düzeltme: `object-fit: cover` kullanarak boşluk kalmadan kapsayıcıyı doldurmasını sağladık. */
    object-fit: cover; /* Resmi boşluk kalmayacak şekilde doldur, gerekirse kırp */
    border-radius: 50%; /* İkonun kendisi de yuvarlak olsun */
}

/* Sepet öğe sayısı balonu */
.cart-item-count {
    position: absolute;
    background-color: #e74c3c; /* Kırmızı renk */
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 50%;
    min-width: 20px; /* Küçük sayılar için minimum genişlik */
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    display: flex; /* İçindeki sayıyı ortalamak için */
    justify-content: center;
    align-items: center;
    height: 20px; /* Yüksekliği sabitle */
}

/* Profil ikonu kapsayıcısı */
.profile-icon-container {
    position: relative;
    border-radius: 50%;
    width: 50px; /* Mevcut haliydi, ikonun sığması için genellikle bu ideal */
    height: 50px; /* Genişlikle aynı yapın, yuvarlak kalsın */
}

.profile-icon {
    /* Düzeltme: İkonun kapsayıcısını daha fazla doldurmasını sağlamak için %90 kullanıldı. */
    width: 90%; /* Kapsayıcının %90'ını kapla */
    height: 90%; /* Kapsayıcının %90'ını kapla */
    object-fit: cover; /* Resmi boşluk kalmayacak şekilde doldur, gerekirse kırpar */
    border-radius: 50%; /* Profil resmi yuvarlak kalsın */
    border: 1px solid #ddd; /* İsteğe bağlı: Hafif bir kenarlık */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}
/* ========================================================== */
/* POPUP STYLES (CART & PROFILE) */
/* ========================================================== */

/* Profil Popup Stilleri - Mevcut kodunuzdan alındı ve iyileştirildi */
.profile-popup {
    position: fixed; /* Sabit konum */
    top: 70px; /* Header'ın yüksekliğine göre ayarlanmalı (deneme yapın) */
    right: 20px; /* Sağdan boşluk */
    width: 280px; /* Pop-up genişliği */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1001; /* Diğer elementlerin üzerinde görünmesi için */
    display: flex; /* İçeriği hizalamak için flexbox kullan */
    flex-direction: column; /* İçeriği dikey sırala */
    max-height: 80vh; /* Maksimum yükseklik */
    /* Animasyon ve başlangıç konumu */
    transform: translateX(100%); /* Başlangıçta sağdan dışarıda */
    opacity: 0;
    pointer-events: none; /* Gizliyken tıklamayı engelle */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; /* Animasyon */
}

.profile-popup.active {
    transform: translateX(0); /* İçeri kaydır */
    opacity: 1;
    pointer-events: auto; /* Aktifken tıklamayı etkinleştir */
}

/* Header ve kapatma butonu stilleri */
.profile-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    border-top-left-radius: 8px; /* Köşeleri yuvarlama */
    border-top-right-radius: 8px; /* Köşeleri yuvarlama */
}

.profile-popup-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease;
}

.close-popup-btn:hover {
    color: #333;
}

/* İçerik ve buton stilleri */
.profile-popup-content {
    flex-grow: 1;
    overflow-y: auto; /* İçerik taşarsa kaydırılabilir olsun */
    padding: 15px;
}

.profile-guest-content {
    text-align: center;
    padding: 20px 0;
}

.profile-guest-content p {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.1em;
}

.profile-btn {
    display: block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    color: white;
    transition: background-color 0.2s ease;
    margin: 10px auto;
    max-width: 200px;
}

.login-btn {
    background-color: #28a745;
}

.login-btn:hover {
    background-color: #218838;
}

.register-btn {
    background-color: #3498db;
}

.register-btn:hover {
    background-color: #2980b9;
}

/* Sepet Popup Stili - Mevcut kodunuzdan alındı ve iyileştirildi */
.cart-popup {
    position: fixed;
    top: 70px; /* Header'ın altından başla, profil pop-up ile aynı hizaya getirildi */
    right: -400px; /* Başlangıçta ekranın sağında gizli */
    width: 350px;
    max-height: 80vh; /* Ekran yüksekliğinin %80'i */
    background-color: #fff;
    border: 1px solid #ddd; /* Yeni eklendi */
    border-radius: 8px; /* Yeni eklendi */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* Gölge iyileştirildi */
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-popup.active {
    right: 20px; /* Profil pop-up ile aynı sağ boşluğa getirildi */
}

.cart-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f7f7f7;
    border-top-left-radius: 8px; /* Köşeleri yuvarlama */
    border-top-right-radius: 8px; /* Köşeleri yuvarlama */
}

.cart-popup-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease;
}

.close-popup-btn:hover {
    color: #333;
}

.cart-popup-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.empty-cart-message {
    text-align: center;
    color: #777;
    margin-top: 50px;
}

/* Sepet İçeriği - Satıcıya Göre Gruplama için Geliştirme */
.seller-group {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
}

.seller-group h3 {
    font-size: 1.1em;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.cart-items-list { /* Bu sınıf artık seller-items-list içinde olabilir */
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cart-item-image {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.cart-item-price {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    display: flex; /* Miktar inputu ile yan yana gelmesi için */
    align-items: center;
}

.cart-item-quantity-input {
    width: 50px; /* Input genişliği */
    padding: 3px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    margin-left: 5px;
}

.cart-item-total {
    font-weight: bold;
    color: #28a745; /* Toplam fiyatı yeşil yap */
    margin-top: 5px;
}

.remove-item-btn { /* Mevcut .remove-from-cart-btn ile birleştirilebilir */
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background-color: #c0392b;
}

.cart-popup-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #f7f7f7;
    text-align: center;
    border-bottom-left-radius: 8px; /* Köşeleri yuvarlama */
    border-bottom-right-radius: 8px; /* Köşeleri yuvarlama */
}

.cart-total {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.checkout-btn, .clear-cart-btn {
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.checkout-btn {
    background-color: #27ae60;
    color: white;
    border: none;
}

.checkout-btn:hover {
    background-color: #229a5b;
}

.clear-cart-btn {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
}

.clear-cart-btn:hover {
    background-color: #d0d0d0;
}

/* ========================================================== */
/* BİLDİRİM STYLES */
/* ========================================================== */
#cart-notification {
    position: fixed;
    left: 50%; /* Yatayda ortalamak için */
    transform: translateX(-50%); /* Kendi genişliğinin yarısı kadar sola kaydırarak tam ortala */
    background-color: #4CAF50; /* Yeşil arka plan rengi */
    color: white; /* Yazı rengi */
    padding: 20px 40px; /* İç boşluğu artırarak boyutu yarı yarıya büyütüyoruz */
    border-radius: 8px; /* Köşeleri yuvarlama */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Gölge efekti */
    z-index: 9999; /* Diğer öğelerin üzerinde görünmesini sağlar, yüksek değer */
    opacity: 0; /* Başlangıçta görünmez */
    top: -100px; /* Başlangıçta ekranın üstünde daha fazla gizle */
    transition: top 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.6s ease-out; /* Daha dinamik bir animasyon */
    font-size: 1.6em; /* Yazı boyutunu büyütüyoruz */
    text-align: center;
    min-width: 350px; /* Minimum genişliği artır */
    white-space: nowrap; /* Metnin tek satırda kalmasını sağlar */
}

#cart-notification.show {
    top: 30px !important; /* Ekranın üstünden daha aşağı insin */
    opacity: 1 !important; /* Görünür olsun */
}

/* ========================================================== */
/* DİĞER SAYFA BÖLÜMLERİ */
/* ========================================================== */

/* Ana İçerik Konteyneri (magaza.php'deki container) */
.container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

h3.section-title {
    text-align: left;
    color: #e67e22;
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.8em;
    padding-bottom: 10px;
    display: inline-block;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    justify-content: center;
    margin-bottom: 30px;
}

@media (min-width: 1200px) {
    .book-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.book-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    min-height: 380px;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.book-card-image-container {
    width: 150px;
    height: 225px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.book-card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    margin: auto;
    display: flex; /* Center for image */
}

.book-card-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
    width: 100%;
}

.book-card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.3;
    height: 3.9em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-author, .book-card-publisher {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* --- book-card ve içindeki metinler için düzeltmeler --- */

.book-card-link {
    text-decoration: none; /* Bu, linkin kendisindeki alt çizgiyi kaldırır */
    color: inherit; /* Linkin metin renginin, bulunduğu elementten miras almasını sağlar */
}

/* book-card-details içindeki tüm p etiketlerinin alt çizgisini kaldır */
.book-card-details p {
    text-decoration: none; /* Bu satır kritik */
}

/* Ayrıca, fiyatlar da linkin içindeyse, onların da alt çizgisini kaldırın */
.price-container span {
    text-decoration: none;
}

/* --- FİYAT STİLLERİ BAŞLANGICI --- */

/* Genel fiyat kapsayıcısı */
.price-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    flex-wrap: wrap;
    font-size: 1.1em;
    font-weight: 700;
}

/* Orijinal (İndirimli ürünlerdeki eski) Fiyat Stili */
.original-price {
    color: #e74c3c;
    text-decoration: line-through;
    font-size: 0.8em;
    white-space: nowrap;
    font-weight: normal;
}

/* İndirimli (Yeni) Fiyat Stili */
.discounted-price {
    color: #27ae60;
    font-size: 1.2em;
    font-weight: 700;
    white-space: nowrap;
}

/* İndirim Olmayan Kitap Kartı Fiyatı Stili */
.normal-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #e67e22;
}

/* Canlı Arama Sonuçları İçin Fiyat Konteyneri */
.search-result-item .price-container {
    font-size: 0.85em;
    gap: 5px;
    margin-top: 2px;
    justify-content: flex-start;
}

/* Canlı Arama Sonuçları İçin Eski (Orijinal) Fiyat Stili */
.search-result-item .original-price {
    color: #e74c3c;
    text-decoration: line-through;
    font-size: 1em;
    font-weight: normal;
}

/* Canlı Arama Sonuçları İçin İndirimli (Yeni) Fiyat Stili */
.search-result-item .discounted-price {
    color: #27ae60;
    font-size: 1.1em;
    font-weight: bold;
}

/* Canlı Arama Sonuçları İçin İndirim Olmayan Normal Fiyat Stili */
.search-result-item .normal-price {
    color: #e67e22;
    font-weight: 700;
    font-size: 1.1em;
}
/* --- FİYAT STİLLERİ BİTTİ --- */


#loadMoreBtn {
    display: block;
    margin: 30px auto;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    background-color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

#loadMoreBtn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

#loadingSpinner {
    display: none;
    text-align: center;
    margin: 20px auto;
    font-size: 1.1em;
    color: #666;
}

/* Slayt Gösterisi Stilleri */
.slideshow-container {
    max-width: 1200px;
    position: relative;
    margin: 40px auto 20px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.mySlides {
    display: none;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.dots-container {
    text-align: center;
    padding: 20px;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active-dot, .dot:hover {
    background-color: #717171;
}

/* Yükleme Spinner'ı Stili (Genel Kullanım) */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto; /* Ortalamak için */
    display: block; /* Genelde blok element olarak kullanılır */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================== */
/* Responsive Tasarım */
/* ========================================================== */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column; /* Logo üstte, navigasyon altta */
        padding: 10px 15px;
        border-radius: 0;
        height: auto;
        min-height: 90px;
    }
    .header-logo {
        margin-bottom: 10px;
        width: 100%; /* Logo kapsayıcısının tüm genişliği kaplamasını sağla */
        justify-content: center; /* Logoyu ortala */
    }
    .header-logo img {
        height: 60px; /* Mobil için logo boyutu */
    }
    .header-nav {
        margin-top: 5px; /* Logodan biraz boşluk */
        width: 100%; /* Navigasyonun tüm genişliği kaplamasını sağla */
        justify-content: space-between; /* Öğeleri uçlara yasla */
        gap: 5px; /* Daha az boşluk, sıkışmayı önlemek için */
        padding: 0 5px; /* Kenarlardan iç boşluk, taşmayı önlemek için */
    }
    .search-container {
        flex-grow: 1; /* Arama kutusunun esnemesini sağla */
        margin-right: 0; /* Boşluğu kaldır */
        margin-bottom: 0; /* Boşluğu kaldır */
        min-width: 0; /* Küçülmesine izin ver */
        padding-right: 10px; /* Sepet ikonundan biraz boşluk bırak */
    }
    .search-container input[type="text"] {
        width: 100%; /* Kapsayıcısına göre %100 genişlik */
        padding-right: 35px; /* İkon için yeterli boşluk bırak */
    }
    .search-container input[type="text"]:focus {
        width: 100%; /* Mobil'de odaklandığında da %100 kalsın */
    }
    .search-icon {
        right: 15px; /* İkonu sağa yasla */
    }
    #search-results-dropdown {
        width: calc(100% - 30px); /* Kapsayıcının padding'i kadar kenarlardan boşluk */
        left: 15px; /* Sol kenardan hizala */
        right: 15px; /* Sağ kenardan hizala */
        border-radius: 5px; /* Popup'a uygun yuvarlama */
    }

    /* Sepet ve Profil ikon kapsayıcıları */
    .cart-icon-container,
    .profile-icon-container {
        /* Düzeltme: Mobil için daha küçük ama yine de ikonun oturmasını sağlayacak boyutlar */
        width: 35px;
        height: 35px;
        flex-shrink: 0; /* Küçülmemelerini sağla */
    }
    .cart-icon {
        /* Düzeltme: Mobil ikonun kapsayıcıyı doldurması için %90 kullanıldı. */
        width: 90%;
        height: 90%;
        object-fit: cover; /* Veya contain */
        border-radius: 50%; /* Yuvarlak kalsın */
    }
    .profile-icon {
        /* Düzeltme: Mobil ikonun kapsayıcıyı doldurması için %90 kullanıldı. */
        width: 90%;
        height: 90%;
        object-fit: cover; /* Veya contain */
        border-radius: 50%; /* Yuvarlak kalsın */
    }
    .cart-item-count {
        top: -5px; /* Konumlandırmayı ayarla */
        right: -5px;
        font-size: 0.75em;
        padding: 2px 5px;
        min-width: 18px;
        height: 18px;
    }

    /* Pop-up'lar için mobil düzenleme */
    .cart-popup, .profile-popup {
        width: 100%;
        top: 0; /* Tamamen üstten başlasın */
        right: 0; /* Sağ kenara sıfırla */
        max-height: 100vh; /* Tam ekran yüksekliği */
        border-radius: 0; /* Köşeleri yuvarlama kaldır */
        box-shadow: none; /* Gölgeyi kaldır (isteğe bağlı) */
        transform: translateX(100%); /* Başlangıçta sağdan dışarı */
        transition: transform 0.3s ease-in-out;
    }
    .cart-popup.active, .profile-popup.active {
        transform: translateX(0); /* İçeri kaydır */
    }

    /* Diğer mobil ayarlamalar */
    .container {
        margin: 20px auto; /* Üstteki boşluğu koru */
        padding: 15px;
    }
    h3.section-title {
        font-size: 1.5em;
    }
    .book-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }
    .book-card {
        min-height: 320px;
    }
    .book-card-image-container {
        width: 100px;
        height: 150px;
    }
    .book-card-title {
        font-size: 0.95em;
        height: 3.8em;
    }
    #loadMoreBtn {
        padding: 10px 20px;
        font-size: 1em;
    }
    .slideshow-container {
        margin: 0 auto 20px auto;
        border-radius: 0;
    }
    .mySlides {
        max-height: 250px;
    }
    .prev, .next {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: 1fr 1fr;
    }
    /* Bildirim için daha küçük mobil ekranlar */
    #cart-notification {
        padding: 15px 25px; /* Mobil için biraz küçültme */
        font-size: 1.2em;
        min-width: 280px;
        top: -80px; /* Mobil için başlangıç konumu */
    }
    #cart-notification.show {
        top: 20px !important; /* Mobil için bitiş konumu */
    }
}