/* --- TASARIM SİSTEMİ (Dinamik Ayarlar) --- */
:root {
    /* Renkler */
    --primary-color: #0a472e;
    --primary-hover: #a8b324;
    --primary-soft: rgba(67, 97, 238, 0.1);
    --success-color: #2ec4b6;
    --warning-color: #ff9f1c;
    --danger-color: #e71d36;


    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 10, 71, 46; /* #0a472e renginin RGB karşılığı */
    
    --bs-success: var(--success-color);
    --bs-success-rgb: 46, 196, 182;

    --bs-warning: var(--warning-color);
    --bs-danger: var(--danger-color);

    /* Arka Planlar */
    --body-bg: #f4f7fe;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

    /* Ölçüler */
    --radius-lg: 20px;
    --radius-md: 12px;
    --sidebar-width: 280px;

    /* Efektler */
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}



/* --- GENEL SIFIRLAMA --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    min-height: 100vh;
    margin: 0;
    color: #333;
}

/* --- AUTH (GİRİŞ/KAYIT) SAYFALARI --- */
body.auth-page {
    background: var(--bg-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
}

.auth-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.auth-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.auth-header {
    background-color: var(--primary-color);
    padding: 35px;
    text-align: center;
    color: white;
}

.auth-footer {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    padding: 8px 25px;
    border-radius: 50px;
    color: #666;
    font-size: 0.8rem;
}

/* --- FORM ELEMANLARI --- */
.form-control {
    border-radius: var(--radius-md);
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus {
    box-shadow: 0 0 0 3px var(--primary-soft);
    border-color: var(--primary-color);
}

.input-group-text {
    background-color: #fff;
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: #6c757d;
}

.input-group .form-control {
    border-left: none;
}

.input-group .btn-outline-secondary {
    border-color: #dee2e6;
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.btn-auth {
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px;
    font-weight: 600;
    color: #fff;
    transition: var(--transition);
}

.btn-auth:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    color: #fff;
}

/* --- PANEL (SIDEBAR) --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #eee;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #f8f9fa;
}

.sidebar-search {
    position: relative;
    padding: 0 5px;
}

.sidebar-search .form-control {
    padding-left: 35px;
    background-color: #f8f9fa !important;
}

.sidebar-search .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.nav-pills .nav-link {
    color: #555;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 5px 15px;
    transition: var(--transition);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* --- MAIN CONTENT & TOP NAVBAR --- */
.main-content {
    flex: 1;
    padding: 30px;
}

.top-navbar {
    background: #fff;
    padding: 12px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    position: sticky;
    top: 0;
    z-index: 900;
}

/* --- DASHBOARD BİLEŞENLERİ --- */
.stat-card,
.category-card,
.product-card-mini {
    background: #fff;
    border: none;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    text-decoration: none;
}

.category-card {
    display: block;
    text-align: center;
}

.category-card:hover,
.product-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.cat-circle {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 10px;
    font-weight: bold;
    font-size: 1.2rem;
}

.product-card-mini img {
    border-radius: 15px;
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin-bottom: 10px;
}

.promo-card {
    background: var(--primary-color);
    color: #fff;
    border-radius: 25px;
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.promo-card i.bg-icon {
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 12rem;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #a0aec0;
}

.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* --- PROFİL ÖZEL --- */
.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary-color);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    transition: var(--transition);
    cursor: pointer;
}

.nav-tabs-custom {
    border-bottom: 2px solid #f0f0f0;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: #777;
    font-weight: 600;
    padding: 12px 25px;
    position: relative;
}

.nav-tabs-custom .nav-link.active {
    color: var(--primary-color);
    background: none;
}

.nav-tabs-custom .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* --- ARAMA OVERLAY & SIDEBAR MOBİL --- */
.full-screen-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: none;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.full-screen-search.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.search-input-big {
    font-size: 1.5rem;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background: transparent;
    width: 100%;
    padding: 10px 0;
    outline: none;
}

.search-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 999;
    display: none;
}

/* --- MOBİL UYUMLULUK --- */
@media (max-width: 992px) {
    #sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
        position: fixed;
        height: 100%;
    }

    #sidebar.active {
        margin-left: 0;
    }

    /* Overlay kontrolü HTML içindeki tetikleyiciye bağlıdır */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggested-products {
    opacity: 0.9;
    animation: fadeInUp 0.5s ease backwards;
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.suggested-products .product-card-mini {
    cursor: pointer;
    transition: var(--transition);
}

.suggested-products .product-card-mini:hover {
    transform: scale(1.03);
    background-color: var(--primary-soft);
}

.btn-check:checked+.btn-sm {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2) !important;
}

#corporateFields {
    animation: fadeIn 0.4s ease;
}



/* Resimlerin standart görünümü */
.product-card-mini img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
}

/* --- Sipariş Durum Stepper --- */
/* --- Mobil Uyumluluk Sihirbazı --- */
@media (max-width: 768px) {

    /* Tabloyu mobilde tamamen gizle */
    .desktop-table {
        display: none;
    }

    /* Mobil Liste Tasarımı */
    .mobile-order-list {
        display: block !important;
    }

    .order-mobile-card {
        background: white;
        border-radius: 15px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .order-stepper::before {
        left: 10% !important;
        width: 80% !important;
    }

    .step-text {
        font-size: 0.65rem !important;
    }
}

/* --- Masaüstü/Genel Stiller --- */
.mobile-order-list {
    display: none;
}

.order-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.order-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 5%;
    width: 90%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #cbd5e0;
}

.step-item.active .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 5px var(--primary-soft);
}

.step-item.completed .step-icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: #fff;
}

/* Avatar Stack */
.product-avatar-group {
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.avatar-item {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -12px;
    overflow: hidden;
    background: #f8f9fa;
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-item.plus-count {
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-status {
    padding: 5px 10px;
    font-size: 0.7rem;
    border-radius: 50px;
    font-weight: 600;
}

.bg-success-soft {
    background: #e6fffa;
    color: #38a169;
}

.bg-info-soft {
    background: #ebf8ff;
    color: #3182ce;
}

/* --- Ürün Avatar Grubu (Avatar Stack) --- */
.product-avatar-group {
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.avatar-item {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -12px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.avatar-item:hover {
    transform: translateY(-3px);
    z-index: 10;
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-item.plus-count {
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- Durum Rozetleri (Soft Colors) --- */
.badge-status {
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 50px;
}

.bg-success-soft {
    background-color: #e6fffa;
    color: #28a745;
}

.bg-warning-soft {
    background-color: #fffaf0;
    color: #dd6b20;
}

.bg-danger-soft {
    background-color: #fff5f5;
    color: #e53e3e;
}

.bg-info-soft {
    background-color: #ebf8ff;
    color: #3182ce;
}

/* --- Sipariş Detay Ürün Kartları --- */
/* Mobil Uyumluluk İçin Ekstra Dokunuşlar */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    /* Mobilde Ürün Listesi Tablosunu Kart Görünümüne Çevir */
    .mobile-table-view thead {
        display: none;
    }

    .mobile-table-view tr {
        display: flex;
        flex-direction: column;
        padding: 15px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .mobile-table-view td {
        padding: 5px 0 !important;
        border: none !important;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-table-view .product-info {
        width: 100% !important;
        margin-bottom: 10px;
    }

    /* Masaüstünde sağda duran özet mobilde üste çıksın */
    .sticky-summary {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 20px;
    }
}

/* swal css  */

.swal2-styled.swal2-confirm {
    background-color: var(--primary-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 10px var(--primary-soft) !important;
    color: white;
}

.swal2-popup {
    border-radius: var(--radius-lg) !important;
    font-family: 'Inter', sans-serif !important;
}

/* ==========================================================================
   FAVORİLER (WISHLIST) ÖZEL STİLLERİ
   ========================================================================== */

/* Favori Sayfası Badge */
.bg-primary-soft {
    background-color: var(--primary-soft);
    color: var(--primary-color);
}

/* Ürün Kartı Resim Alanı İyileştirmesi */
.product-card-mini .img-wrapper {
    position: relative;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
}

.product-card-mini img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Resmin kesilmesini önler */
    padding: 15px;
    transition: var(--transition);
}

.product-card-mini:hover img {
    transform: scale(1.08);
}

/* Favoriden Kaldır Butonu (Senin sistemine entegre) */
.remove-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    color: var(--danger-color);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    z-index: 10;
    cursor: pointer;
}

.remove-fav-btn:hover {
    background: var(--danger-color);
    color: #fff;
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 6px 15px rgba(231, 29, 54, 0.2);
}

/* Favori Silme Animasyonu */
.fav-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Boş Durum (Empty State) İkonu */
.empty-fav-icon-box {
    width: 100px;
    height: 100px;
    background: var(--primary-soft);
    color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Önerilen Ürünler Bölümü */
.suggested-section {
    margin-top: 50px;
}

.suggested-section h5 {
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.suggested-section h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
}

/* --- Mobilde Ürün Kartı Ayarı --- */
@media (max-width: 576px) {
    .product-card-mini img {
        height: 130px;
    }
    .remove-fav-btn {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
}

/* ==========================================================================
   YENİ EKLENEN SİPARİŞ & DATATABLES ÖZELLİKLERİ 
   (Mevcut CSS'inizin En Altına Ekleyin)
   ========================================================================== */

/* DataTables Genel Güzelleştirme */
.dataTables_wrapper .dataTables_filter {
    margin-top: 25px !important; /* İstediğin yukarıdan boşluk */
    margin-bottom: 15px !important;
    text-align: right !important;
}

/* Tablo Başlığındaki Sıralama Oklarını Kaldır */
table.dataTable thead .sorting::before, 
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before, 
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after { 
    display: none !important; 
}

/* Sayfalama (Pagination) Tasarımı ve Boşlukları */
.dataTables_wrapper .dataTables_paginate {
    margin-right: 20px !important; /* Sağdan uzaklaşma */
    margin-bottom: 30px !important; /* Alttan uzaklaşma */
    margin-top: 20px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 50px !important;
    border: none !important;
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 10px var(--primary-soft) !important;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 20px;
    padding-left: 10px;
}

/* Mobil Arama Kutusu (Sadece Mobilde Görünür) */
@media (max-width: 768px) {
    #mobileSearchInput {
        margin-top: 10px;
        margin-bottom: 15px;
    }
}

/* "Daha Fazla Göster" Butonu Efekti */
#loadMoreBtn {
    transition: var(--transition);
    border: 1px solid #eee;
}

#loadMoreBtn:hover {
    background-color: var(--primary-soft);
    color: var(--primary-color);
}

/* --- SİPARİŞ TAKİP ÇUBUĞU MOBİL FIX --- */
@media (max-width: 768px) {
    /* Kartın içindeki padding'i azaltarak alan kazanalım */
    .card.p-md-4 {
        padding: 15px !important;
    }

    /* Stepper'ın dışarı taşmasını engelle */
    .order-stepper {
        gap: 5px;
        margin-bottom: 20px;
    }

    /* Çizgiyi ikonlara göre hizala */
    .order-stepper::before {
        top: 18px !important;
        left: 10% !important;
        width: 80% !important;
    }

    /* İkonları küçült */
    .step-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem;
        margin-bottom: 5px !important;
    }

    /* Metinleri çok küçük yap veya d-none olanları kontrol et */
    .step-text {
        font-size: 0.6rem !important;
        line-height: 1.1;
        display: block !important; /* Mobilde yazılar görünsün ama küçük olsun */
        word-break: break-word; /* Uzun kelimeleri böl */
    }

    /* Başlıktaki Sipariş No ve Tarih alanını alt alta getir */
    .small-mobile-text {
        font-size: 1rem !important;
    }
}

/* Sayfanın yatayda kaymasını kökten engellemek için */
.dashboard-wrapper, .main-content {
    overflow-x: hidden !important;
    width: 100%;
}


@media (max-width: 767.98px) {
    .desktop-table-card {
        display: none !important;
    }
    /* DataTables'ın otomatik oluşturduğu wrapper'ı da mobilde gizle */
    .dataTables_wrapper {
        display: none !important;
    }
    /* Mobil listeyi zorla göster */
    .mobile-order-list {
        display: block !important;
    }
}

/* Masaüstünde mobil listeyi gizle */
@media (min-width: 768px) {
    .mobile-order-list {
        display: none !important;
    }
}

/* Stepper (Sipariş Takip) Mobil Fix */
@media (max-width: 768px) {
    .order-stepper::before {
        left: 10% !important;
        width: 80% !important;
    }
    .step-text {
        font-size: 0.65rem !important;
    }
    .step-icon {
        width: 35px !important;
        height: 35px !important;
    }
}


a{ 
    color : var(--primary-color);
}

/* ===== bootstrap renk güncelleme ===== */

/* Bootstrap Butonlarını Senin Hover Renginle Güncelleme */
.btn-primary {
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--primary-hover);
    --bs-btn-hover-border-color: var(--primary-hover);
    --bs-btn-active-bg: var(--primary-hover);
    --bs-btn-disabled-bg: var(--primary-color);
}

/* Senin Link Rengini Değiştirme */
a {
    --bs-link-color: var(--primary-color);
    --bs-link-hover-color: var(--primary-hover);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    
    /* Hover (Üzerine Gelince) Durumu */
    --bs-btn-hover-bg: var(--primary-hover);
    --bs-btn-hover-border-color: var(--primary-hover);
    --bs-btn-hover-color: #ffffff; /* Üzerine gelince yazı beyaz olsun */
    
    /* Aktif/Tıklanmış Durumu */
    --bs-btn-active-bg: var(--primary-hover);
    --bs-btn-active-border-color: var(--primary-hover);
    --bs-btn-active-color: #ffffff;
    
    /* Odaklanma (Focus/Tıklama Sonrası) Çerçeve Rengi */
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

/* ===== end bootstrap renk güncelleme ===== */