/**
 * =============================================================================
 * NUR ENERJİ — ENDÜSTRİYEL EKİPMAN & B2B ÜRÜNLER MODERN TASARIM MİKRO-MODÜLÜ
 * -----------------------------------------------------------------------------
 * @module      : urunler.css
 * @description : Cam-panel filtre araç çubuğu, responsive sidebar, B2B kartlar
 * @version     : 2.1.0 Evolution
 * =============================================================================
 */

/* 1. GÜVENCE VE DEPO SAYAÇ BANDI */
.depo-guvence-bar {
    background: linear-gradient(135deg, #0b132b 0%, #0f172a 100%);
    padding: 22px 0;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guvence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    align-items: center;
}

.guvence-item {
    text-align: center;
    padding: 10px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.guvence-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guvence-lbl {
    font-size: 0.84rem;
    color: #94a3b8;
    font-weight: 500;
}

/* 2. MARKETPLACE ANA DÜZEN */
.marketplace-section {
    padding: 40px 0 80px;
    background: #f8fafc;
    min-height: 80vh;
}

.marketplace-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 32px;
    align-items: start;
}

/* Masaüstünde mobil filtre barını ve modal header'ı KESİNLİKLE gizle */
.mobile-filter-trigger-bar {
    display: none !important;
}

.sidebar-mobile-header {
    display: none !important;
}

/* 3. SOL SIDEBAR (FİLTRE MENÜSÜ) */
.marketplace-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-widget:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

.widget-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: #059669;
    font-size: 0.9rem;
}

.widget-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.widget-header-flex .widget-title {
    margin-bottom: 0;
}

.widget-badge {
    background: #ecfdf5;
    color: #059669;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Arama Kutusu */
.search-box-wrap {
    display: flex;
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.search-box-wrap:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: #ffffff;
}

.search-box-wrap input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    color: #1e293b;
    outline: none;
}

.search-box-wrap button {
    background: transparent;
    border: none;
    padding: 0 14px;
    color: #059669;
    cursor: pointer;
    transition: color 0.2s;
}

.search-box-wrap button:hover {
    color: #047857;
}

/* Kategori Ağacı */
.category-tree-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cat-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cat-link.active {
    background: #ecfdf5;
    color: #059669;
    font-weight: 700;
}

.cat-title-text {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-icon {
    font-size: 0.85rem;
}

.cat-arrow {
    font-size: 0.72rem;
    opacity: 0.5;
}

.count-pill {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    transition: background 0.2s;
}

.cat-link.active .count-pill {
    background: #10b981;
    color: #ffffff;
}

/* Marka Filtreleri */
.brand-filter-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.brand-filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none !important;
    font-size: 0.86rem;
    transition: all 0.2s ease;
}

.brand-filter-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.brand-filter-item.active {
    background: #f0fdf4;
    color: #15803d;
    font-weight: 700;
}

.brand-count {
    font-size: 0.74rem;
    color: #94a3b8;
}

/* Kondisyon Filtreleri */
.filter-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-condition-link {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none !important;
    font-size: 0.86rem;
    transition: all 0.2s ease;
}

.custom-condition-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.custom-condition-link.active {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

.cond-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.bullet-all { background: #94a3b8; }
.bullet-green { background: #10b981; }
.bullet-amber { background: #f59e0b; }
.bullet-blue { background: #0284c7; }

.cond-label {
    flex-grow: 1;
}

.cond-count {
    font-size: 0.74rem;
    color: #94a3b8;
}

/* Filtre Temizle Butonu */
.sidebar-actions {
    margin-top: 15px;
    margin-bottom: 20px;
}

.btn-clear-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.btn-clear-all:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Danışman Kartı */
.sidebar-contact-card {
    background: linear-gradient(135deg, #0b132b 0%, #1e293b 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
}

.scc-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 12px;
}

.sidebar-contact-card h5 {
    font-size: 0.96rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
}

.sidebar-contact-card p {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 14px;
}

.scc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
    width: 100%;
}

.scc-btn:hover {
    background: #059669;
}

/* 4. CAM-PANEL YÖNETİM ARAÇ ÇUBUĞU (TOOLBAR) */
.marketplace-toolbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 22px;
    margin-bottom: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.toolbar-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.count-display {
    font-size: 0.94rem;
    color: #475569;
    font-weight: 500;
}

.count-display strong {
    color: #0f172a;
    font-weight: 700;
}

.badge-count {
    background: #ecfdf5;
    color: #059669;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.page-indicator {
    font-size: 0.84rem;
    color: #94a3b8;
    margin-left: 4px;
}

/* Aktif Filtre Çipleri */
.active-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none !important;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.chip-remove {
    font-size: 0.7rem;
    opacity: 0.7;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Teklif Sepetim Butonu */
.btn-quote-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 10px;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quote-cart:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.quote-badge {
    background: #f59e0b;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sıralama Select */
.sort-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sort-control label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0;
    white-space: nowrap;
}

.sort-select {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    border-color: #10b981;
}

/* Görünüm Değiştirici (Grid / List) */
.view-mode-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    border: 1px solid #e2e8f0;
}

.mode-btn {
    border: none;
    background: transparent;
    padding: 7px 11px;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    color: #0f172a;
}

.mode-btn.active {
    background: #ffffff;
    color: #059669;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 5. ÜRÜN KARTLARI — GRID MODU */
.products-container.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-item-card:hover {
    transform: translateY(-6px);
    border-color: #10b981;
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.12);
}

/* Kart Görsel Alanı */
.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    max-height: 220px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.card-media-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform 0.4s ease;
}

.product-item-card:hover .card-media img {
    transform: scale(1.06);
}

/* Kart Rozetleri */
.badge-kondisyon {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.badge-code {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
}

/* Kart İçeriği */
.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-category {
    font-size: 0.76rem;
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: #0f172a;
    text-decoration: none !important;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #059669;
}

.card-spot {
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lokasyon ve Güvence Şeridi */
.card-specs-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* Fiyat Satırı */
.card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* 3'lü Eylem Butonları */
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 6px;
}

.card-actions a,
.card-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action-inspect {
    background: #f1f5f9;
    color: #334155 !important;
}

.btn-action-inspect:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

.btn-action-wa {
    background: #25d366;
    color: #ffffff !important;
}

.btn-action-wa:hover {
    background: #1ebc59;
}

.btn-action-quote {
    background: #0f172a;
    color: #ffffff;
}

.btn-action-quote:hover {
    background: #059669;
}

/* 6. ÜRÜN KARTLARI — LİSTE MODU (LIST MODE) */
.products-container.mode-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.products-container.mode-list .product-item-card {
    flex-direction: row;
    align-items: stretch;
}

.products-container.mode-list .card-media {
    width: 250px;
    min-width: 250px;
    max-height: 100%;
    aspect-ratio: auto;
    border-bottom: none;
    border-right: 1px solid #f1f5f9;
}

.products-container.mode-list .card-content {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
}

.products-container.mode-list .card-content-top {
    display: flex;
    flex-direction: column;
}

.products-container.mode-list .card-content-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #f1f5f9;
    padding-left: 20px;
}

.products-container.mode-list .card-title {
    font-size: 1.15rem;
    min-height: auto;
    margin-bottom: 6px;
}

.products-container.mode-list .card-spot {
    min-height: auto;
    margin-bottom: 8px;
}

.products-container.mode-list .card-actions {
    grid-template-columns: 1fr;
    gap: 8px;
}

/* 7. TEKLİF ÇEKMECESİ (QUOTE DRAWER) */
.quote-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quote-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.quote-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-drawer.active {
    right: 0;
}

.quote-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    color: #ffffff;
}

.quote-drawer-body {
    padding: 20px 24px;
    flex-grow: 1;
    overflow-y: auto;
}

.quote-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.btn-whatsapp-quote {
    background: #25d366;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 20px;
    border-radius: 12px;
    border: none;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: background 0.2s;
}

.btn-whatsapp-quote:hover {
    background: #1ebc59;
}

/* 8. RESPONSIVE UYARLAMALAR */
@media (max-width: 991px) {
    .marketplace-layout {
        grid-template-columns: 1fr;
    }

    /* Mobilde filtre barı aktif */
    .mobile-filter-trigger-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 12px 18px;
        margin-bottom: 20px;
    }

    .btn-mobile-filter {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #059669;
        color: #ffffff;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 0.88rem;
        cursor: pointer;
    }

    .mobile-badge {
        background: #f59e0b;
        color: #ffffff;
        font-size: 0.72rem;
        padding: 2px 6px;
        border-radius: 10px;
    }

    /* Mobilde Sidebar Off-Canvas */
    .marketplace-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 10000;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
        transition: left 0.35s ease;
    }

    .marketplace-sidebar.drawer-open {
        left: 0;
    }

    .sidebar-mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-mobile-header h3 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .sidebar-close-btn {
        background: transparent;
        border: none;
        font-size: 1.6rem;
        color: #64748b;
        cursor: pointer;
    }

    /* Liste modu mobilde grid'e döner */
    .products-container.mode-list .product-item-card {
        flex-direction: column;
    }

    .products-container.mode-list .card-media {
        width: 100%;
        min-width: 100%;
        max-height: 220px;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .products-container.mode-list .card-content {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .products-container.mode-list .card-content-bottom {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #f1f5f9;
        padding-top: 14px;
    }
}
