/* =========================================
   1. GENEL AYARLAR
   ========================================= */
body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
    padding-bottom: 90px;
    overflow-y: scroll;
}

/* =========================================
   2. APP CONTAINER
   ========================================= */
.app-container {
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Tablet */
@media (min-width: 768px) {
    .app-container {
        max-width: 720px;
        border-left: 1px solid #eee;
        border-right: 1px solid #eee;
    }
}

/* Masaüstü (Genişlik Sınırlarını Kaldırdık - Rahat Görünüm) */
@media (min-width: 992px) {
    .app-container {
        max-width: 960px;
    }
}
@media (min-width: 1200px) {
    .app-container {
        max-width: 1140px;
    }
}

/* =========================================
   2. HEADER & NAVİGASYON
   ========================================= */
.app-header {
    background-color: #ffffff;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    
    /* YENİ EKLENEN KISIM: */
    position: relative;
    z-index: 1030; /* Kategorilerin (1020) üzerine çıkması için */
}

.category-sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 12px 0;
}

.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
    white-space: nowrap;
    padding: 8px 24px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid #e9ecef;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.cat-pill:hover { background-color: #f8f9fa; color: #000; }

.cat-pill.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* =========================================
   4. RENKLER & BUTONLAR
   ========================================= */
.text-primary-custom { color: var(--primary-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }

.btn-primary-custom {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    transition: all 0.2s;
}
.btn-primary-custom:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary-custom:active { transform: scale(0.98); }

/* =========================================
   5. ÜRÜN KARTLARI (FIXED)
   ========================================= */
.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%; /* Kartların boyunu eşitle */
    overflow: hidden;
    display: flex;       /* İçerik düzeni için flex */
    flex-direction: column; /* İçerik dikey dizilsin (ama içerde yatay böleceğiz) */
    justify-content: center;
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.06) !important;
        border-color: var(--primary-color);
    }
}

.product-img-wrapper {
    width: 120px; /* Sabit Genişlik */
    height: 120px; /* Sabit Yükseklik */
    flex-shrink: 0; /* Asla büzülme! */
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* ÖNEMLİ: Çok satırlı metni (...) ile kesmek için */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2 satır göster, gerisini kes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-add {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #eee;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.btn-add:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* =========================================
   6. YAPIŞKAN SEPET
   ========================================= */
#stickyCart {
    left: 0; right: 0; bottom: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
}
.sticky-cart-container {
    width: 100%;
    padding: 0 20px 20px 20px;
    pointer-events: auto;
    max-width: 100%; 
}
@media (min-width: 768px) { .sticky-cart-container { max-width: 720px; } }
@media (min-width: 992px) { .sticky-cart-container { max-width: 960px; } }
@media (min-width: 1200px) { .sticky-cart-container { max-width: 1140px; } }

/* =========================================
   7. AUTH MODAL (Giriş / Kayıt)
   ========================================= */
.auth-tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.auth-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    opacity: 0.8;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.05); /* Rengi yumuşattık */
}