/* --- ULTRA ELİT TEMA VE MODERN DOKUNUŞLAR --- */
:root {
    --bg-color: #f3f4f6;
    --text-color: #111827;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --card-radius: 12px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-color); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

.container { max-width: 1500px; margin: 0 auto; padding: 0 20px; }

/* Header & Footer */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 15px 0; margin-bottom: 25px; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 900; color: var(--theme-color); }
.site-footer { background: #111827; color: #fff; padding: 40px 0; margin-top: 50px; text-align: center; }

.breadcrumb-area { padding: 10px 0; margin-bottom: 10px; font-size: 0.85rem; color: #6b7280; }
.breadcrumb-area ul { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ANA YAPI */
.main-container { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }

/* SIDEBAR TASARIMI */
.sidebar { background: #fff; border-radius: var(--card-radius); border: 1px solid #e5e7eb; overflow: hidden; }

.btn-mobile-filter { display: none; }
.sidebar-mobile-header { display: none; } 

.sidebar-header {
    background: var(--filter-header);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sidebar-header h3 { margin: 0; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.reset-link { color: white; font-size: 0.75rem; opacity: 0.8; font-weight: 600; }

.filter-box { border-bottom: 1px solid #f3f4f6; }
.box-title {
    background: #f9fafb;
    padding: 12px 20px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    text-transform: capitalize;
}

/* --- KATEGORİ FİLTRE VE SCROLL BARI --- */
.cat-list { 
    list-style: none; padding: 0; margin: 0; 
    max-height: 380px; 
    overflow-y: auto; 
    scrollbar-width: thin; 
    scrollbar-color: #cbd5e1 #f8fafc;
}
.cat-list::-webkit-scrollbar { width: 6px; }
.cat-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.cat-item { border-bottom: 1px solid #f1f5f9; }
.cat-item:last-child { border-bottom: none; }
.cat-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 6px; transition: background-color 0.2s ease; }
.cat-header:hover { background-color: #f8fafc; }

.cat-link { text-decoration: none; color: #334155; font-weight: 500; font-size: 0.95rem; flex: 1; text-transform: capitalize; }
.cat-link.active { color: var(--theme-color); font-weight: 700; }
.cat-toggle { cursor: pointer; padding: 5px; color: #94a3b8; transition: transform 0.3s ease; }
.cat-sub.show + .cat-header .cat-toggle i, .cat-item:has(.cat-sub.show) > .cat-header .cat-toggle i { transform: rotate(180deg); }

.main-cat-link {
    color: var(--sidebar-title-color) !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    text-transform: capitalize;
}

.cat-sub { display: none; padding-left: 10px; border-left: 1px dashed #cbd5e1; margin-left: 16px; margin-bottom: 5px; }
.cat-sub .cat-item { border-bottom: none; }
.cat-sub .cat-header { padding: 5px 12px; }
.cat-sub .cat-link { font-size: 0.85rem; color: #64748b; font-weight: 400; transition: 0.2s; }
.cat-sub .cat-link:before { content: "•"; color: #cbd5e1; margin-right: 6px; font-size: 1.2rem; vertical-align: middle; }
.cat-sub .cat-link.active, .cat-sub .cat-link:hover { color: var(--theme-color); font-weight: 600; padding-left: 4px; }
.cat-sub.show { display: block; animation: fadeIn 0.3s ease-in-out; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Checkbox (Markalar ve Seçenekler için) */
.checkbox-list { padding: 15px 20px; max-height: 250px; overflow-y: auto; }
.custom-check { display: flex; align-items: center; margin-bottom: 10px; cursor: pointer; font-size: 0.9rem; color: #374151; }
.custom-check input { margin-right: 12px; width: 17px; height: 17px; accent-color: var(--theme-color); }

.price-range { padding: 15px 20px; }
.price-inputs { display: flex; align-items: center; gap: 8px; }
.p-input { display: flex; align-items: center; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 0 10px; background: #fff; flex: 1; height: 42px; }
.p-input input { border: none; width: 100%; font-size: 0.9rem; outline: none; text-align: center; font-weight: 700; }
.filter-apply-btn { background: var(--theme-color); color: white; border: none; width: 42px; height: 42px; border-radius: 10px; cursor: pointer; }

/* KATEGORİ DETAY AFİŞİ CSS */
.category-info-banner {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.main-cat-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.editor-content {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
.editor-content p { margin: 0 0 10px 0; }
.editor-content img { max-width: 100% !important; height: auto !important; display: inline-block; border-radius: 6px; }
.editor-content iframe, .editor-content video { max-width: 100% !important; border-radius: 8px; }

/* --- ÜRÜN KARTLARI DİZİLİMİ (IZGARA/GRID) --- */
.product-grid { display: grid; gap: 12px; }
.product-grid.grid3 { grid-template-columns: repeat(3, 1fr); }
.product-grid.grid4 { grid-template-columns: repeat(4, 1fr); }

/* TOOLBAR */
.list-toolbar { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 20px; padding: 12px 20px; 
    background: #fff; border-radius: var(--card-radius); border: 1px solid #e5e7eb; 
}
.toolbar-left { display: flex; align-items: center; gap: 15px; }
.result-count { font-size: 0.9rem; color: #64748b; font-weight: 600; }
.toolbar-right { display: flex; align-items: center; gap: 15px; }

.layout-selector { display: flex; gap: 5px; background: #f3f4f6; padding: 4px; border-radius: 8px; }
.layout-btn { border: none; background: transparent; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: #64748b; font-weight: 700; font-size: 0.8rem; }
.layout-btn.active { color: var(--theme-color); background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.sort-box select { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-weight: 700; color: #111827; cursor: pointer; outline: none; font-size: 0.9rem; background: #f9fafb; }

.loading-spinner {
    text-align: center;
    padding: 25px;
    display: none;
    color: var(--filter-header);
    font-size: 1rem;
    font-weight: 600;
    grid-column: 1 / -1;
}

/* SEPET BİLDİRİMİ */
.cart-toast {
    position: fixed; bottom: 25px; right: -450px; background: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); border-radius: 15px;
    padding: 25px; z-index: 999999; width: 350px; border-left: 8px solid #10b981;
    opacity: 0; transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-toast.show { right: 25px; opacity: 1; }

.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99999; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(2px); }
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* MOBİL GÖRÜNÜM */
@media (max-width: 900px) {
    .container { padding: 0 !important; }
    .main-container { grid-template-columns: 1fr; gap: 0; }
    
    .category-info-banner { border-radius: 0; border-left: none; border-right: none; margin-bottom: 5px; }

    .list-toolbar { border-radius: 0; border-left: none; border-right: none; margin-bottom: 5px; padding: 15px; flex-direction: column; gap: 10px; height: auto; }
    .toolbar-left, .toolbar-right { width: 100%; justify-content: space-between; }
    .layout-selector { display: none; }
    
    .btn-mobile-filter { 
        display: flex !important; 
        align-items: center; 
        gap: 8px; 
        background: var(--filter-header);
        color: #fff; 
        padding: 8px 15px; 
        border-radius: 8px; 
        font-weight: 700; 
        font-size: 0.8rem; 
        border: none; 
        cursor: pointer;
    }
    
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 2px !important; }
    
    .sidebar { 
        position: fixed; top: 0; left: -320px; width: 300px; height: 100%; 
        z-index: 1000000; border-radius: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.2); 
        overflow-y: auto; padding-bottom: 80px; 
    }
    .sidebar.active { left: 0; }
    .sidebar-mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: var(--filter-header); color: #fff; }
    .sidebar-mobile-header button { display: block; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
}