/* =========================================
   GENEL GÖVDE VE STICKY FOOTER YAPISI
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f7f9;
    color: #1e293b;
}

#main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.footer-section {
    flex-shrink: 0;
}

/* ------------------------------
   GENEL USER SAYFALARI
   ------------------------------ */
.user-page {
    padding-top: 160px; /* Header ve üst bar için yeterli boşluk */
    padding-bottom: 80px;
    background: #f8fafc;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Premium Başlık (genel) */
.user-page h1,
.premium-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    position: relative;
    letter-spacing: -0.5px;
}
.user-page h1::after,
.premium-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #b8860b, #e8c678);
    border-radius: 4px;
}

/* ------------------------------
   PREMIUM TOAST NOTIFICATION
   ------------------------------ */
.toast-notification {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #fff;
    color: #333;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    font-weight: 500;
    border-left: 4px solid transparent;
}
.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-notification i {
    font-size: 1.4rem;
}
.toast-notification.success {
    border-left-color: #10b981;
}
.toast-notification.success i {
    color: #10b981;
}
.toast-notification.error {
    border-left-color: #ef4444;
}
.toast-notification.error i {
    color: #ef4444;
}

/* =========================================
   PREMIUM BOŞ SEPET (EMPTY STATE) TASARIMI
   ========================================= */
.premium-empty-cart {
    background: #ffffff;
    padding: 70px 40px;
    border-radius: 24px;
    /* Hafif ama derin bir gölge ile kutuyu öne çıkarma */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.04); 
    border: 1px solid rgba(241, 245, 249, 1);
    text-align: center;
    max-width: 650px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
}

/* Üst kısımdaki zarif altın/dore ince çizgi detayı */
.premium-empty-cart::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #b8860b, #e8c678);
}

.empty-cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.empty-cart-icon-wrapper .premium-svg-icon {
    color: #b8860b;
    position: relative;
    z-index: 2;
}

/* İkonun arkasındaki hafif ışıltı */
.icon-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(184,134,11,0.12) 0%, rgba(255,255,255,0) 65%);
    border-radius: 50%;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.premium-empty-cart h2 {
    font-size: 2rem;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.premium-empty-cart p {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Koyu renkli, şık ve geniş buton tasarımı */
.btn-premium-explore {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #0f172a; /* Temiz bir koyu lacivert/siyah */
    color: #ffffff;
    padding: 16px 45px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    border: 2px solid transparent;
}

/* Buton üzerine gelindiğinde oluşan ters yüz (invert) efekti */
.btn-premium-explore:hover {
    background: #ffffff;
    color: #0f172a;
    border-color: #0f172a;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.1);
}

.btn-premium-explore i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

/* Hover durumunda ok işaretinin hafif sağa kayması */
.btn-premium-explore:hover i {
    transform: translateX(6px);
}

/* Mobil cihazlar için boş sepet düzenlemesi */
@media (max-width: 768px) {
    .premium-empty-cart {
        padding: 50px 25px;
        margin: 20px 15px;
        border-radius: 20px;
    }
    .premium-empty-cart h2 {
        font-size: 1.6rem;
    }
    .btn-premium-explore {
        width: 100%; /* Telefondaysa buton tam genişlikte olsun */
        justify-content: center;
    }
}


/* =========================================
   YENİ NESİL PREMIUM FİLTRE KARTI
   ========================================= */
.premium-filter-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    margin-bottom: 40px;
    width: 100%;
}

/* Esnek Grid Yapısı */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

/* Geniş input (Arama alanı) için ekstra yer açma */
.filter-grid .filter-group.wide {
    grid-column: span 2;
}

/* Her Bir Giriş Grubu */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: #b8860b;
}

/* Input ve Select Ögelerinin Premium Hali */
.filter-group input,
.filter-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.filter-group input:focus,
.filter-group select:focus {
    background: #ffffff;
    border-color: #b8860b;
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.1);
    outline: none;
}

/* İki Girişli Fiyat Grubu Özel Tasarımı */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range-inputs input {
    text-align: center;
    padding: 14px 10px;
}

.range-divider {
    color: #94a3b8;
    font-weight: 600;
}

/* Alt Aksiyon Buton Satırı */
.filter-actions-row {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Filtre Uygulama Butonu (Dore Gradyan) */
.btn-filter-apply {
    background: linear-gradient(135deg, #b8860b, #d4af37);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.2);
}

.btn-filter-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.3);
}

/* Temizleme Butonu */
.btn-filter-clear {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-filter-clear:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* =========================================
   MOBIL UYUMLULUK DÜZENLEMELERİ
   ========================================= */
@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
    .filter-grid .filter-group.wide {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .premium-filter-card {
        padding: 20px;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .filter-grid .filter-group.wide {
        grid-column: span 1;
    }
    .filter-actions-row {
        flex-direction: column;
    }
    .btn-filter-apply,
    .btn-filter-clear {
        width: 100%;
        justify-content: center;
    }
}

/* ------------------------------
   ÜRÜN LİSTESİ (products.php)
   ------------------------------ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.product-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}
.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.product-card .img-wrapper {
    width: 100%;
    height: 250px; /* 200 → 250 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #ffffff;
    position: relative;
}

.product-card img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; <-- Sorun buydu */
    object-fit: contain; /* Görselin tamamını kutu içine sığdırır, en-boy oranını korur */
    padding: 10px;        /* Opsiyonel: Görsel ile kart kenarı arasında boşluk bırakır */
    background: #ffffff;
    transition: transform 0.3s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-body .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #b8860b;
    font-weight: 600;
    margin-bottom: 6px;
    background: rgba(184, 134, 11, 0.08);
    padding: 2px 12px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
}
.product-card-body h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 10px 0 0 0;
    color: #1e293b;
    line-height: 1.4;
}
.product-card-body .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #b8860b;
}
.card-footer {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-icon {
    background: #1e293b;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}
.btn-icon:hover {
    background: #b8860b;
    transform: scale(1.1);
}

/* =========================================
   FOTOĞRAFTAKİ TRENDYOL TARZI DETAY TASARIMI
   ========================================= */
.product-specifications-wrapper {
    background: #fff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    margin-top: 30px;
    width: 100%;
}

/* Açıklama alanı üst düzeni */
.spec-description-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.spec-image-side {
    flex: 0 0 120px;
    max-width: 120px;
}

.spec-image-side img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.spec-text-side {
    flex: 1;
}

.spec-text-side h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e293b;
}

/* Kademeli gizleme (Devamını Oku) kutusu */
.description-content {
    position: relative;
    max-height: 150px; /* İlk gösterilecek uzunluk sınırı */
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.8;
    color: #475569;
    font-size: 0.95rem;
}

/* Alt tarafa doğru beyaz solma efekti */
.description-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

/* Ortadaki "Daha Fazla Göster" Çizgisi ve Butonu */
.read-more-btn-wrapper {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.read-more-btn-wrapper::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.read-more-btn {
    position: relative;
    z-index: 2;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 35px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Ürün Özellikleri Alt Bölümü */
.spec-features-container {
    margin-top: 25px;
}

.spec-features-container h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
}

/* Fotoğraftaki gibi yan yana 3'lü Grid yapısı */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* Gri şık kutucuklar */
.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4f7f9; /* Fotoğraftaki hafif gri arka plan rengi */
    padding: 14px 18px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.feature-key {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.feature-value {
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}

/* Mobil Cihazlar İçin Tam Uyum */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* Tabletlerde yan yana 2 tane sıralanır */
    }
}

@media (max-width: 768px) {
    .spec-description-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .features-grid {
        grid-template-columns: 1fr; /* Telefonlarda alt alta tam genişlik sıralanır */
    }
}

/* =========================================
   YENİ ÜST BÖLÜM: TRENDYOL / PREMIUM TASARIM
   ========================================= */
.product-top-block {
    display: flex;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
    width: 100%;
}

/* Sol Taraftaki Sabit Görsel Kutusu */
.product-gallery-section {
    flex: 0 0 420px; /* Görsel alanına sabit maksimum genişlik */
    max-width: 420px;
}

.main-image-box {
    width: 100%;
    aspect-ratio: 1 / 1; /* Kare, temiz, sabit oran */
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow: hidden;
}

/* Görseli bozmadan kutuya sığdırma (Problemin kesin çözümü) */
.main-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: transform 0.3s ease;
}

.main-image-box:hover img {
    transform: scale(1.05); /* Üzerine gelince hafif büyüme efekti */
}

/* Sağ Taraftaki Bilgiler */
.product-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-link {
    color: #b8860b; 
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: inline-block;
}

.product-title {
    font-size: 1.8rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 20px 0;
}

.product-price-box {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #b8860b;
}

.product-status {
    margin-bottom: 25px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
}
.status-badge.success { background: #ecfdf5; color: #059669; }
.status-badge.danger { background: #fef2f2; color: #dc2626; }

/* Geniş, E-Ticaret Tipi Satın Al Butonu */
.btn-add-to-cart {
    background: #b8860b;
    color: #fff;
    border: none;
    width: 100%;
    max-width: 400px; /* Maksimum çok uzamasını engeller */
    padding: 16px;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-to-cart:hover {
    background: #9e7409;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(184, 134, 11, 0.2);
}

.btn-add-to-cart.disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Hızlı Teslimat & Güven Damgaları */
.trust-badges {
    display: flex;
    gap: 25px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px dashed #e2e8f0;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.badge-item i {
    color: #b8860b;
    font-size: 1.2rem;
}

/* YENİ ÜST KISIM MOBİL UYUM */
@media (max-width: 992px) {
    .product-top-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px;
    }
    .product-gallery-section {
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
    }
    .btn-add-to-cart {
        max-width: 100%; /* Telefondaysa buton tam ekran olsun */
    }
    .trust-badges {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* =========================================
   ALTA YÖNLENDİRME (SCROLL LINK)
   ========================================= */
.scroll-to-specs-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start; /* Sola yaslı, güven damgalarıyla hizalı */
}

.scroll-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 8px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px; /* Hap (pill) şeklinde modern görünüm */
    transition: all 0.3s ease;
}

.scroll-link:hover {
    color: #b8860b;
    border-color: #b8860b;
    background: #fff;
    box-shadow: 0 4px 10px rgba(184, 134, 11, 0.08);
}

/* Ok ikonuna aşağı yukarı seken (bounce) zarif bir animasyon ekler */
.scroll-link i {
    font-size: 0.8rem;
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(3px); }
    60% { transform: translateY(1.5px); }
}

@media (max-width: 992px) {
    .scroll-to-specs-wrapper {
        justify-content: center; /* Mobilde ortala */
    }
}

/* ------------------------------
   SEPET (cart.php)
   ------------------------------ */
.cart-table-wrapper {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    overflow-x: auto;
}
.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}
.cart-table thead th {
    background: #f8fafc;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.cart-table thead th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.cart-table thead th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
.cart-table tbody td {
    padding: 24px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.cart-table tbody tr:last-child td {
    border-bottom: none;
}
.cart-product-info strong {
    font-size: 1.1rem;
    color: #1e293b;
}

/* Sepet +/- Kontrolleri */
.qty-control {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    padding: 4px;
}
.qty-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: 0.2s;
}
.qty-btn:hover {
    background: #b8860b;
    color: #fff;
    border-color: #b8860b;
}
.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Silme butonu */
.remove-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff1f2;
    color: #e11d48;
    transition: 0.3s;
    text-decoration: none;
}
.remove-link:hover {
    background: #e11d48;
    color: #fff;
    transform: scale(1.05);
}

.cart-total-row td {
    padding-top: 30px;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid #b8860b !important;
}
.cart-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 30px;
    flex-wrap: wrap;
}
.cart-actions .btn-primary,
.cart-actions .btn-outline {
    padding: 14px 34px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}
.cart-actions .btn-primary {
    background: #b8860b;
    color: #fff;
    border: none;
}
.cart-actions .btn-primary:hover {
    background: #9e7409;
    transform: translateY(-3px);
}
.cart-actions .btn-outline {
    background: transparent;
    border: 2px solid #b8860b;
    color: #b8860b;
}
.cart-actions .btn-outline:hover {
    background: #b8860b;
    color: #fff;
}

/* =========================================
   YENİ ÖDEME (CHECKOUT) SAYFASI TASARIMI
   ========================================= */
.checkout-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
}

/* Sol Taraf: Adres ve Form İşlemleri */
.checkout-form-section {
    flex: 3;
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

/* Sağ Taraf: Sipariş Özeti (Sticky) */
.checkout-summary-section {
    flex: 2;
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    position: sticky;
    top: 120px; /* Header boşluğuna göre kaydırmada sabit kalır */
}

/* Ortak Kutu Başlıkları */
.checkout-section-title {
    font-size: 1.35rem;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}
.checkout-section-title i {
    color: #b8860b;
}

.summary-items-list {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Metin uzunsa yukarıdan hizalar, ortadan ezip bozmaz */
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 15px; /* İsim ile fiyat arasına nefes boşluğu koyar */
}

.summary-item:last-child {
    border-bottom: none;
}

/* Ürün Adı ve Adet Kutusunu Alt Alta Diziyoruz */
.summary-item-info {
    display: flex;
    flex-direction: column;
    gap: 8px; /* İsim ve adet kutusu arasındaki boşluk */
    flex: 1; /* Ortadaki boşluğu doldurup fiyatı sağa iter */
}

.summary-item .item-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word; /* Çok uzun kelimeleri kırarak taşmayı engeller */
}

/* Şık ve belirgin Adet Kutusu */
.item-qty {
    display: inline-flex;
    align-self: flex-start; /* Kendi içeriği kadar yer kaplar, uzamaz */
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Fiyat Alanı - Asla alt satıra düşmez */
.summary-item .item-price {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
    white-space: nowrap; /* Fiyat rakamlarının ₺ ile ayrılıp alta inmesini kesin olarak yasaklar */
    padding-top: 2px; /* Ürün adının ilk satırıyla aynı hizaya gelmesi için ince ayar */
}

/* Toplam Tutar Bloğu */
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}
.summary-total .total-price {
    color: #b8860b;
    font-size: 1.8rem;
}

/* Adres Yönetim Linki */
.address-manage-link {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 25px;
}
.address-manage-link a {
    color: #b8860b;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}
.address-manage-link a:hover {
    color: #9e7409;
}

/* Adres Yok Uyarısı ve Butonu */
.no-address-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.btn-address-add {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    border: 2px dashed #856404;
    color: #856404;
    text-decoration: none;
    font-weight: bold;
    background: #fff;
    transition: all 0.3s ease;
}
.btn-address-add:hover {
    background: #856404;
    color: #fff;
}

/* Ödemeyi Tamamla Butonu */
.btn-checkout {
    background: linear-gradient(135deg, #b8860b, #d4af37);
    color: #ffffff;
    border: none;
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.2);
}
.btn-checkout:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(184, 134, 11, 0.3);
}
.btn-checkout:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: #64748b;
}

/* Sepete Dön Linki */
.back-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.back-to-cart:hover {
    color: #b8860b;
}

/* Güven Damgaları */
.checkout-trust-badges {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
}
.trust-item i {
    color: #10b981; /* Yeşil SSL ve Kargo ikonu */
    font-size: 1.15rem;
}

/* =========================================
   MOBİL EKRANLAR (CHECKOUT UYUMU)
   ========================================= */
@media (max-width: 992px) {
    .checkout-grid {
        /* Mobilde sipariş özetini alta, işlem yapacağı formu üste alır */
        flex-direction: column; 
    }
    .checkout-form-section,
    .checkout-summary-section {
        width: 100%;
        position: static;
        padding: 25px;
    }
}
@media (max-width: 768px) {
    .checkout-form-section,
    .checkout-summary-section {
        padding: 20px 15px;
        border-radius: 16px;
    }
    .summary-total .total-price {
        font-size: 1.5rem;
    }
}

/* ------------------------------
   MOBİL UYUM
   ------------------------------ */
@media (max-width: 992px) {
    .user-page {
        padding-top: 140px;
    }
    .filter-bar {
        border-radius: 24px;
        width: 100%;
        padding: 20px;
    }
    .filter-bar form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar input,
    .filter-bar select {
        min-width: 100%;
        flex: 1 1 auto;
    }
    .product-detail-wrapper {
        flex-direction: column;
        padding: 30px;
    }
    .product-detail-image {
        flex: 1 1 auto;
    }
}

@media (max-width: 768px) {
    .user-page h1,
    .premium-title {
        font-size: 1.8rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    .cart-actions {
        justify-content: center;
    }
    .checkout-card {
        padding: 25px 20px;
    }
}

    /* Masaüstü (Büyük Ekranlar) İçin Sepet Görseli Düzenlemeleri */
    .cart-product-info {
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
        text-align: left;
    }

    .cart-item-img {
        width: 125px;   /* İsteğine göre bu değeri 100px yapabilirsin */
        height: 125px;  /* Genişlik ile aynı olmalı ki tam kare olsun */
        object-fit: contain; /* Fotoğrafın en-boy oranını bozmadan tamamını kutuya sığdırır */
        border-radius: 12px;
        border: 1px solid #f1f5f9;
        background: #ffffff;
        padding: 4px;
        flex-shrink: 0;
    }

    /* Görseli olmayan ürünler için varsayılan kutu tasarımı */
    .cart-item-img-placeholder {
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8fafc;
        border-radius: 12px;
        border: 1px solid #f1f5f9;
        color: #94a3b8;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

/* =========================================
   YENİ NESİL MOBİL SEPET (CART) STİLLERİ
   ========================================= */
@media (max-width: 768px) {
    /* Eski kaba gölgeleri ve dolguları temizle */
    .cart-table-wrapper {
        padding: 0;
        background: transparent;
        box-shadow: none;
        border: none;
        overflow-x: hidden; 
    }
    
    .cart-table {
        min-width: 100%;
        display: block;
    }
    
    /* Masaüstü başlıklarını tamamen kaldır */
    .cart-table thead {
        display: none; 
    }
    
    .cart-table tbody {
        display: block;
        width: 100%;
    }
    
    /* Her sepet satırını harika birer bağımsız mobil karta dönüştür */
    .cart-table tbody tr {
        display: block;
        position: relative;
        background: #ffffff;
        margin-bottom: 16px;
        border-radius: 20px;
        padding: 18px;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
        border: 1px solid #f1f5f9;
    }
    
    /* Hücrelerin dikey ve temiz hizalanması */
    .cart-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f8fafc;
    }
    
    /* Ürün Detay hücresi: En üstte yer alır */
    .cart-table tbody td:first-child {
        border-bottom: 1px dashed #e2e8f0;
        padding-bottom: 16px;
        margin-bottom: 6px;
    }
    
    /* Son hücrenin (Toplam) alt çizgisini kaldır */
    .cart-table tbody td[data-label="Toplam"] {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    /* Belirgin etiket başlıkları (td::before) */
    .cart-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 0.9rem;
        text-align: left;
    }
    
    /* Detay ve İşlem hücrelerinde sol başlığı gizle (çünkü görselden anlaşıyor) */
    .cart-table tbody td[data-label="Ürün Detayı"]::before,
    .cart-table tbody td[data-label="İşlem"]::before {
        display: none;
    }
    
    /* Ürün Bilgi Yapısı (Görsel ve metin yan yana) */
    /* Masaüstü (Büyük Ekranlar) İçin Sepet Görseli Düzenlemeleri */
    .cart-product-info {
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
        text-align: left;
    }

    .cart-item-img {
        width: 80px;   /* İsteğine göre bu değeri 100px yapabilirsin */
        height: 80px;  /* Genişlik ile aynı olmalı ki tam kare olsun */
        object-fit: contain; /* Fotoğrafın en-boy oranını bozmadan tamamını kutuya sığdırır */
        border-radius: 12px;
        border: 1px solid #f1f5f9;
        background: #ffffff;
        padding: 4px;
        flex-shrink: 0;
    }

    /* Görseli olmayan ürünler için varsayılan kutu tasarımı */
    .cart-item-img-placeholder {
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8fafc;
        border-radius: 12px;
        border: 1px solid #f1f5f9;
        color: #94a3b8;
        font-size: 1.5rem;
        flex-shrink: 0;
    }
    
    .cart-product-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .cart-product-title {
        font-size: 1.05rem;
        color: #0f172a;
        font-weight: 600;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .cart-product-mobile-price {
        font-size: 0.85rem;
        color: #64748b;
        font-weight: 500;
    }
    
    /* Silme butonunu Trendyol tarzı sağ üst köşeye sabitle */
    .cart-table tbody td[data-label="İşlem"] {
        position: absolute;
        top: 18px;
        right: 18px;
        border: none;
        padding: 0;
        width: auto;
        height: auto;
    }
    
    .remove-link {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #fff1f2;
        color: #f43f5e;
        box-shadow: 0 2px 8px rgba(244, 63, 94, 0.08);
    }
    
    /* Miktar Seçici Formu */
    .qty-form {
        margin: 0;
    }
    
    .qty-control {
        background: #f1f5f9;
        border-color: #e2e8f0;
        padding: 2px;
    }
    
/* 1. GENEL TOPLAM KARTININ TAM GENİŞLİK OLMASI */
    .cart-table tfoot {
        display: block;
        width: 100%;
    }

    .cart-total-row {
        display: flex;
        width: 100%; /* Ekran genişliğini tam kaplaması için */
        box-sizing: border-box; 
        margin-top: 15px;
        margin-bottom: 20px;
        background: #ffffff;
        border-radius: 16px;
        padding: 16px 20px; /* Yukarıdan aşağıdan daha dar bir kutu */
        box-shadow: 0 4px 25px rgba(15, 23, 42, 0.06);
        border: 1px solid #f1f5f9;
        align-items: center;
    }
    
    .cart-total-row td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding: 0 !important;
        border: none !important;
    }
    
    .cart-total-row td:first-child,
    .cart-total-row td:last-child {
        display: none !important; 
    }
    
    .cart-total-row td:nth-child(2)::before {
        content: "Genel Toplam";
        font-weight: 600;
        color: #64748b;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .cart-total-row td:nth-child(2) {
        font-size: 1.4rem !important; /* Rakam boyutunu bir tık kıstık */
        font-weight: 800;
        color: #b8860b !important;
    }

    /* 2. SABİT ALT BAR VE BUTON YÜKSEKLİKLERİNİN KÜÇÜLTÜLMESİ */
    .cart-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 10px 16px; /* 16px'den 10px'e düşürülerek dış alan daraltıldı */
        padding-bottom: max(10px, env(safe-area-inset-bottom)); 
        box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.08);
        z-index: 999;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin: 0;
        border-top: 1px solid rgba(241, 245, 249, 0.8);
    }
    
    .cart-actions .btn-outline {
        flex: 1;
        padding: 10px 8px; /* 14px'den 10px'e düşürüldü */
        font-size: 0.85rem; 
        font-weight: 600;
        text-align: center;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 2px solid #e2e8f0;
        color: #475569;
        white-space: nowrap;
    }
    
    .cart-actions .btn-primary {
        flex: 1.5;
        padding: 10px 12px; /* 14px'den 10px'e düşürüldü */
        font-size: 0.9rem; /* Buton içi metin hafifçe küçültüldü */
        font-weight: 700;
        text-align: center;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: linear-gradient(135deg, #b8860b, #d4af37);
        color: #ffffff;
        box-shadow: 0 4px 15px rgba(184, 134, 11, 0.25);
        border: none;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .product-card-body {
        padding: 14px 12px 18px;
    }
    .product-card-body h4 {
        font-size: 0.95rem;
    }
    .product-card-body .price {
        font-size: 1.1rem;
    }
    .product-card img {
        height: 180px;
    }
    .product-detail-wrapper {
        padding: 20px;
    }
    .product-detail-info h1 {
        font-size: 1.6rem;
    }
    .product-detail-info .price {
        font-size: 2rem;
    }
    .qty-control {
        flex-wrap: nowrap;
    }
    .qty-input {
        width: 30px;
    }
    .qty-btn {
        width: 28px;
        height: 28px;
    }
}


/* Profil sayfası için ek stiller */
.input-group {
    position: relative;
    margin-bottom: 20px;
    display: block; 
}

/* 2. Sadece etiketin (Label) kendi içindeki ikon ve metni hizalıyoruz */
.input-group input,
.input-group textarea,
.input-group select {
    position: relative; /* Katman kontrolü için eklendi */
    z-index: 1;         /* Çizgiyi arkaya itiyoruz */
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: 0.3s;
    background: #f9fafb;
    box-sizing: border-box;
}

/* 2. Etiketin (label) arka planını sağlamlaştırıp en öne alıyoruz */
.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff !important; /* Çizgiyi kesmesi için kesin arka plan rengi */
    padding: 0 8px;
    color: #888;
    transition: 0.3s ease;
    pointer-events: none;
    z-index: 10; /* Çizginin üstüne çıkması için 10 yaptık */
    display: flex;
    align-items: center;
    margin: 0;
}

/* İkonun farklı konumlara fırlamasını kesin olarak engelliyoruz */
.input-group label i {
    position: static !important;
    transform: none !important;
    margin-right: 8px;
    color: #b8860b;
}

/* 3. Odaklanma veya dolu olma durumunda sadece yukarı kayma efekti (Sola kayma iptal) */
/* 3. Odaklanma veya dolu olma durumunda sadece yukarı kayma efekti */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label,
.input-group select ~ label,
.input-group select:focus ~ label {
    top: 0;
    font-size: 0.8rem;
    color: #b8860b;
    transform: translateY(-50%); 
    z-index: 5; /* Etiketin çizginin kesinlikle üstünde kalmasını garanti eder */
}

/* Odaklanma görünümü */
.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184,134,11,0.1);
    outline: none;
    background: #fff;
}

/* Textarea düzeltmeleri */
.input-group textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 25px;
}
.input-group textarea ~ label {
    top: 25px;
}


/* FontAwesome ikonlarının genel stili (PHP kodunuzdaki class'lara göre) */
.input-group label i.fas {
    color: #b8860b;
}

/* Alert stilleri (kodunuzdaki gibi korunmuştur) */
.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 15px;
}
.alert-success {
    background: #e6f7e6;
    color: #2d7d2d;
    border-left: 4px solid #2d7d2d;
}
.alert-error {
    background: #fde8e8;
    color: #a94442;
    border-left: 4px solid #a94442;
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #856404;
}