/* ========================================
   ERGEN B2B - SITE CSS
   ======================================== */

/* ========================================
   ÜRÜN FİLTRELEME PANELİ
   ======================================== */
.filter-panel {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
}

.filter-panel .dropdown-toggle::after {
    margin-left: 0.5em;
}

.filter-panel .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-panel .input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Liste Görünümü */
.list-view .col-6,
.list-view .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
}

.list-view .product-card {
    display: flex;
    flex-direction: row;
    height: auto;
    min-height: 120px;
}

.list-view .product-card .img-wrap {
    flex: 0 0 120px;
    height: 120px;
    padding: 10px;
}

.list-view .product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-view .product-card .product-header {
    height: auto;
    padding: 10px 15px 5px 15px;
}

/* Responsive filtreleme paneli */
@media (max-width: 768px) {
    .filter-panel .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-panel .flex-grow-1 {
        width: 100%;
    }
    
    .filter-panel .d-flex.align-items-center.gap-3 {
        justify-content: center;
    }
}

/* ========================================
   GENEL YAPI VE DEĞİŞKENLER
   ======================================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #fd7e14;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    --transition: all 0.3s ease;
}

/* ========================================
   GENEL STİLLER
   ======================================== */
body { 
    background-color: var(--light-color); 
}

/* ========================================
   HEADER VE NAVIGATION
   ======================================== */
.header-logo { 
    height: 48px; 
    max-height: 12vw; 
    object-fit: contain; 
}

.topbar { 
    background: #ffffff; 
}

.social-links a { 
    opacity: .8; 
    transition: var(--transition);
}

.social-links a:hover { 
    opacity: 1; 
}

/* ========================================
   FOOTER
   ======================================== */
.footer-main {
    background: linear-gradient(180deg, #5a6268 0%, #495057 50%, #3d4349 100%) !important;
    background-color: #495057 !important;
    color: #e9ecef;
}

.footer-main .container {
    background: transparent !important;
}

.footer-main h6 {
    color: #fff;
    letter-spacing: 0.05em;
}

.footer-main .text-muted {
    color: #ced4da !important;
}

.footer-main a {
    color: #ced4da;
    transition: color 0.2s ease;
}

.footer-main a:hover {
    color: #fff;
}

/* Hızlı Linkler (Yeni Ürünler, Çok Satanlar, İndirimdekiler) aynı renk */
.footer-main a.link-secondary,
.footer-main .link-secondary {
    color: #ced4da !important;
}

.footer-main a.link-secondary:hover,
.footer-main .link-secondary:hover {
    color: #fff !important;
}

.footer-main .fa-brands:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Policies + Copy tek birleşik linear gradient (çok daha açık tonlar) */
.footer-policies {
    background: linear-gradient(180deg, #8a8d91 0%, #6c757d 100%) !important;
    color: #e9ecef;
    border-top: none !important;
}

.footer-policies a {
    color: #e9ecef;
    transition: color 0.2s ease;
}

.footer-policies a:hover {
    color: #fff;
}

.footer-copy {
    background: linear-gradient(180deg, #6c757d 0%, #5a6268 100%) !important;
    color: #e9ecef !important;
    border-top: 1px solid rgba(255,255,255,0.15) !important;
}

.footer-main.border-top {
    border-top-color: rgba(255,255,255,0.1) !important;
}

.footer-policies.border-top,
.footer-copy.border-top {
    border-top-color: rgba(255,255,255,0.06) !important;
}

/* ========================================
   ARAMA FORMU
   ======================================== */
/* Search */
.search-form {
    width: 100%;
}

.search-form .form-control {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Search Suggest Panel (statik, input altında) */




.search-suggestions {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
}

.search-suggestions .suggest-columns {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.suggestions-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .suggestion-item:last-child {
        border-bottom: none;
    }

    .suggestion-item:hover {
        background-color: #e9ecef;
    }

.suggestion-item-icon {
    margin-right: 12px;
    color: #6c757d;
    width: 20px;
    text-align: center;
}

.suggestion-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.suggestion-item-title {
    font-weight: 500;
    color: #212529;
    margin-bottom: 2px;
}

/* Kategori/Marka: isimler sola, sayılar sağda aynı hizada */
.suggestion-item-with-count .suggestion-item-text {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}
.suggestion-item-with-count .suggestion-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}
.suggestion-item-with-count .suggestion-item-count {
    min-width: 2rem;
    text-align: right;
    flex-shrink: 0;
}




/* ========================================
   LOGIN SİSTEMİ
   ======================================== */
.login-modern { 
    gap: 0.5rem !important; 
}

.login-modern .input-icon { 
    position: static; 
}

.login-modern .input-icon i { 
    position: static; 
    left: 0; 
    top: 0; 
    transform: none; 
    color: var(--secondary-color); 
    font-size: 0.9rem; 
}

.login-modern .input-icon .form-control-sm { 
    padding-left: 1.75rem; 
    border-radius: var(--border-radius); 
}

.login-modern .form-control-sm { 
    min-width: 150px; 
}

.login-modern .login-btn { 
    border-radius: var(--border-radius); 
    box-shadow: 0 6px 12px rgba(13,110,253,0.15); 
}

.login-box { 
    background: #ffffff; 
    border: 1px solid rgba(0,0,0,0.075); 
    border-radius: 0.75rem; 
    box-shadow: var(--box-shadow); 
}

/* Mini istatistik kutuları */
.mini-tile { 
    background: #fff; 
    border-radius: var(--border-radius); 
    padding: 0.4rem 0.55rem; 
    min-width: 62px; 
    box-shadow: 0 6px 12px rgba(0,0,0,0.08); 
}

.mini-tile i { 
    color: var(--warning-color); 
    font-size: 1.1rem; 
		display: block;
	}

.mini-tile-count { 
    font-size: 0.95rem; 
    color: var(--dark-color); 
}

/* ========================================
   GENEL YARDIMCI SINIFLAR (HOME VIEWS)
   ======================================== */

/* Yükseklik / genişlik yardımcıları */
.h-400px {
    height: 400px;
}

.w-72px {
    width: 72px;
}

.h-72px {
    height: 72px;
}

.max-w-580 {
    max-width: 580px;
}

.max-w-620 {
    max-width: 620px;
}

.max-w-480 {
    max-width: 480px;
}

.max-w-200 {
    max-width: 200px;
}

/* Metin hizalama / görünürlük */
.text-center-inline {
    text-align: center;
}

.no-resize {
    resize: none;
}

/* Breadcrumb özel ayırıcı */
.breadcrumb-angle-divider {
    --bs-breadcrumb-divider: '>';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Z-index yardımcıları */
.z-index-10 {
    z-index: 10;
}

/* Ürün detay sayfası */
.product-main-image {
    height: 400px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.product-thumbnail {
    width: 50px;
    height: 50px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-thumbnail img {
    object-fit: cover;
}

.product-title-dynamic {
    font-size: var(--font-size);
}

/* Sepet / kaydedilen sepet ortak ikon daireleri */
.icon-circle-72 {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-warning {
    background: #fff3cd;
}

.icon-circle-muted {
    background: #f0f3f7;
}

.icon-circle-success {
    background: #e8f5e9;
}

.icon-lg-warning {
    font-size: 28px;
    color: #856404;
}

.icon-lg-cart {
    font-size: 28px;
    color: #6c757d;
}

.icon-lg-success {
    font-size: 32px;
    color: #28a745;
}

/* Tablo genişlik yardımcıları (detay / kaydedilen sepet) */
.w-140px {
    width: 140px;
}

.w-36px {
    width: 36px;
}

.min-w-340px {
    min-width: 340px;
}

.min-w-260px {
    min-width: 260px;
}

.min-w-180px {
    min-width: 180px;
}

.w-50px {
    width: 50px;
}

.w-100px {
    width: 100px;
}

.w-150px {
    width: 150px;
}

/* Diğer yardımcılar */
.w-120px {
    width: 120px;
}

.w-110px {
    width: 110px;
}

.sticky-top-80 {
    position: sticky;
    top: 80px;
}

.bg-bank-header {
    background: #8e8e8f;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar-dark .nav-link { 
    color: rgba(255,255,255,0.85); 
    transition: var(--transition);
}

.navbar-dark .nav-link:hover { 
    color: #ffffff; 
}

/* ========================================
   ÜRÜN KARTLARI
   ======================================== */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-body > div {
    text-align: center;
}

.product-card .card-body .d-flex {
    justify-content: center;
}

.product-card .price-section {
    margin-top: auto;
}

.product-card .card-title {
    min-height: 3.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--dark-color);
    word-wrap: break-word;
}

/* Ürün header */
.product-header {
    background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    height: 40px;
}

.product-status-icons .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.product-favorite .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    transition: var(--transition);
}

.product-favorite .btn:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Ürün resim – tüm kartlarda aynı en/boy (sabit frame) */
.img-wrap {
    display: flex;
	align-items: center;
	justify-content: center;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.05);
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
    height: 160px;
	min-height: 160px;
	overflow: hidden;
}

.product-card img {
    max-width: 80px !important;
	max-height: 80px !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
	transition: transform 0.2s ease;
}

.product-card img:hover {
	transform: scale(1.05);
}

/* ========================================
   FİYAT GÖSTERİMİ
   ======================================== */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.price-block {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background-color: var(--light-color);
}

.price-title {
    font-size: 0.75rem;
    color: #secondary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Fiyat satırları */
.price-row {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-row:last-child {
    border-bottom: none;
}

.price-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.price-value {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Fiyat tip renkleri */
.price-cari { color: var(--primary-color) !important; }
.price-taksit { color: var(--warning-color) !important; }
.price-havale { color: var(--info-color) !important; }
.price-toptan { color: var(--danger-color) !important; }
.price-perakende { color: var(--success-color) !important; }

/* ========================================
   BUTONLAR
   ======================================== */
.btn-outline-primary.btn-sm,
.btn-outline-secondary.btn-sm {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
}

/* ========================================
   TREE MENU
   ======================================== */
/* ========================================
   KATEGORİ KARTI (SABİT YÜKSEKLİK)
   ======================================== */
/* Sidebar sütun üstte kalsın */
.col-12.col-lg-3 { position: static; }

/* İçerik sütunu altta kalsın */
.col-12.col-lg-9 { position: static; }

/* KATEGORİ KARTI (SABİT YÜKSEKLİK) */
.col-lg-3 .card {
    height: 90vh; 
    max-height: 90vh;
    overflow: visible;
    position: static; }
.col-lg-3 .card-body {
    height: calc(80vh - 60px);
    overflow: visible;
    position: static;

}

/* ========================================
   LOADING VE ANİMASYONLAR
   ======================================== */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner.show {
    display: block;
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   FOOTER
   ======================================== */
.footer-main { 
    background: #fff; 
}

.footer-policies { 
    background: #fff; 
}

.footer-copy { 
    background: #f1f3f5; 
}

/* ========================================
   CONTAINER VE GRID
   ======================================== */

/* Sağ içerik ve üst header katmanlarını aşağı çek */
.header-middle, .topbar, .navbar, .content-pane, .col-12.col-lg-9, #productsContainer, .product-card, .card.h-100.product-card {
	position: static !important;
}

/* ========================================
   treemenu
   ======================================== */

#treeMenu {
    position: relative;
    max-height: 70vh;
}

    #treeMenu ul {
        list-style: none;
        margin: 0;
        padding-left: 0;
      
    }

    #treeMenu li {
        position: relative;
    }

        #treeMenu li > ul {
            display: none;
            position: absolute;
            top: 0; /* satırın üst hizası */
            left: 100%; /* sağa açıl */
            z-index: 2;
        }

        #treeMenu li:hover > ul {
            display: block;
       
        }

        #treeMenu li > ul li:hover > ul {
            display: block;
        }

        #treeMenu li > ul li {
            position: relative;
        }

            #treeMenu li > ul li > ul {
                display: none;
                position: absolute;
                top: 0; /* aynı satırdan başla */
                left: 100%; /* bir kademe daha sağa açıl */
             
            }

        #treeMenu li > a {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .5rem;
            padding: .4rem .55rem;
            border-radius: .35rem;
            color: #333;
            background: transparent;
            text-decoration: none;
        }

            #treeMenu li > a:hover {
                background: #f5f7fa;
                color: var(--primary-color);
                text-decoration: none;
            }

        #treeMenu li > ul {
            background: #fff;
            border: 1px solid rgba(0,0,0,.08);
            border-radius: .5rem;
            box-shadow: 0 12px 28px rgba(0,0,0,.10);
            padding: .25rem 0;
        }

            #treeMenu li > ul li > a {
    display: flex;
    align-items: center;
                justify-content: space-between;
                gap: .5rem;
                padding: .4rem .55rem;
                color: #333;
                white-space: nowrap;
                background: transparent;
            }

                #treeMenu li > ul li > a:hover {
                    background: #f5f7fa;
                    color: var(--primary-color);
                }

            #treeMenu li > ul,
            #treeMenu li > ul li > ul {
                backdrop-filter: none;
            }

    #treeMenu > ul > li {
        position: static;
    }

        #treeMenu > ul > li > ul {
            position: absolute;
            top: 0;
           
            height: auto;
            min-height: 122%;
            width: 100%;
        }

/* Büyük ekranlarda orta genişlik */
@media (min-width: 1200px) {
    .container, .container-lg, .container-xl, .container-xxl {
        max-width: 1360px;
    }
}

@media (min-width: 1400px) {
    .container, .container-xxl {
        max-width: 1440px;
    }
}

@media (min-width: 992px) {
    .tree-pane {
        flex: 0 0 300px;
        max-width: 300px;
        width: 300px;
    }

    .content-pane {
        flex: 0 0 calc(100% - 300px);
        max-width: calc(100% - 300px);
        width: calc(100% - 300px);
        min-width: 0;
    }

    .col-lg-3 .card {
        height: 90vh; /* Desktop'ta %80 yükseklik */
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991.98px) {
    .login-box {
        display: none;
    }

    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-header {
        height: 35px !important;
    }
    
    .product-status-icons .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .img-wrap {
        height: 120px;
        min-height: 120px;
    }

    .product-card .card-title {
        min-height: 3rem;
        font-size: 0.85rem;
    }

    .col-lg-3 .card {
        height: 60vh; /* Tablet'te %60 yükseklik */
    }
}

/* Mobil (576px - 767px) */
@media (max-width: 767.98px) {
    .header-logo {
        height: 40px;
    }

    .product-card {
        margin-bottom: 0.75rem;
    }

    .product-header {
        height: 32px !important;
        padding: 0.25rem 0.5rem !important;
    }

    .product-status-icons .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }

    .img-wrap {
        height: 100px;
        min-height: 100px;
        padding: 0.25rem;
    }

    .product-card img {
        max-width: 60px !important;
        max-height: 60px !important;
    }

    .product-card .card-title {
        min-height: 2.5rem;
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .card-body {
        padding: 0.5rem !important;
    }

    .price-row {
        padding: 0.15rem 0;
}

.price-label {
        font-size: 0.7rem;
}

.price-value {
        font-size: 0.8rem;
    }

    .col-lg-3 .card {
        height: 50vh; /* Mobilde %50 yükseklik */
    }
}

/* Küçük mobil (575px ve altı) */
@media (max-width: 575.98px) {
    .header-logo {
        height: 36px;
    }

    .topbar {
        padding: 0.25rem 0;
    }

        .topbar .container {
            padding-left: 0.5rem;
            padding-right: 0.5rem;
        }

    .search-form {
        flex-direction: column;
        gap: 0.5rem;
    }

        .search-form .btn-sm {
            width: 100%;
        }

    .product-card {
        margin-bottom: 0.5rem;
    }

    .product-header {
        height: 28px !important;
        padding: 0.2rem 0.4rem !important;
    }

    .product-status-icons .badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.25rem;
    }

    .img-wrap {
        height: 80px;
        min-height: 80px;
        padding: 0.2rem;
    }

    .product-card img {
        max-width: 50px !important;
        max-height: 50px !important;
    }

    .product-card .card-title {
        min-height: 2rem;
        font-size: 0.75rem;
        line-height: 1.1;
    }

    .card-body {
        padding: 0.4rem !important;
    }

    .price-row {
        padding: 0.1rem 0;
    }

    .price-label {
        font-size: 0.65rem;
    }

    .price-value {
        font-size: 0.75rem;
    }

    .btn-outline-primary.btn-sm,
.btn-outline-secondary.btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .col-lg-3 .card {
        height: 40vh; /* Küçük mobilde %40 yükseklik */
    }
}

