/* ======================================= */
/* css/kategori.css - TAM GÜNCEL VERSİYON */
/* ======================================= */

/* ============================================ */
/* ALT KATEGORİ CHECKBOX STİLLERİ */
/* ============================================ */
.sub-category-item {
    border-bottom: 1px solid #f1f5f9;
}

.sub-category-item:last-child {
    border-bottom: none;
}

.sub-category-checkbox {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.sub-category-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-content {
    display: flex;
    align-items: center;
    padding: 10px 15px 10px 45px;
    gap: 8px;
    transition: all 0.2s;
    position: relative;
}

/* Custom checkbox görünümü */
.checkbox-content::before {
    content: '';
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    transition: all 0.2s;
}

/* Checkbox işaretli hali */
.sub-category-checkbox input[type="checkbox"]:checked + .checkbox-content::before {
    background: var(--primary);
    border-color: var(--primary);
}

/* Checkbox içindeki tick işareti */
.sub-category-checkbox input[type="checkbox"]:checked + .checkbox-content::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 18px;
    font-size: 0.7rem;
    color: white;
}

/* Hover efekti */
.checkbox-content:hover {
    background: #f8fafc;
}

.sub-category-checkbox input[type="checkbox"]:checked + .checkbox-content {
    background: #eff6ff;
}

/* İkon stili */
.checkbox-content i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Kategori adı */
.checkbox-content .kategori-adi {
    flex: 1;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.sub-category-checkbox input[type="checkbox"]:checked + .checkbox-content .kategori-adi {
    color: var(--primary);
    font-weight: 600;
}

/* Ürün sayısı badge */
.checkbox-content .urun-sayisi {
    font-size: 0.75rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.sub-category-checkbox input[type="checkbox"]:checked + .checkbox-content .urun-sayisi {
    background: var(--primary);
    color: white;
}

/* ============================================ */
/* SİDEBAR ANA KUTU */
/* ============================================ */
.main-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sidebar-divider {
    height: 15px;
}

/* ============================================ */
/* SIDEBAR BAŞLIKLARI */
/* ============================================ */
.sidebar-header {
    background: var(--dark);
    color: white;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header.alt-header {
    background: #f1f5f9;
    color: var(--dark);
    border-radius: 0;
    border-top: 1px solid var(--border);
}

/* ============================================ */
/* KATEGORİ LİSTESİ (ANA LİSTE) */
/* ============================================ */
.category-list, .extra-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list {
    padding-bottom: 5px;
}

.category-item {
    border-bottom: 1px solid #f1f5f9;
}

.category-item:last-child {
    border-bottom: none;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
}

.category-link:hover {
    background: #f8fafc;
    color: var(--primary);
}

.category-link i:first-child {
    width: 25px;
    text-align: center;
    color: var(--primary);
    margin-right: 10px;
}

.toggle-icon {
    margin-left: auto;
    font-size: 0.8em;
    color: #94a3b8;
    transition: transform 0.3s;
}

/* ============================================ */
/* AKORDİYON YAPISI - ALT KATEGORİLER */
/* ============================================ */
.sub-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
    background: #fcfcfc;
}

.category-item.open > .category-link .toggle-icon {
    transform: rotate(90deg);
}

.sub-category-list a {
    display: block;
    padding: 10px 15px 10px 50px;
    font-size: 0.95rem;
    color: #475569;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sub-category-list a:hover {
    background: #eff6ff;
    color: var(--primary);
    border-left-color: var(--primary);
}

/* ============================================ */
/* SEÇİLİ KATEGORİ VURGUSU */
/* ============================================ */
.category-link.selected-item, 
.sub-category-list a.selected-item {
    background: #eff6ff;
    color: var(--primary) !important;
    font-weight: 600;
}

.sub-category-list a.selected-item {
    border-left-color: var(--primary) !important;
}

/* ============================================ */
/* EKSTRA MENÜ LİSTESİ */
/* ============================================ */
.extra-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s;
}

.extra-list a:hover {
    background: #f1f5f9;
    color: var(--accent);
}

.extra-list i {
    color: var(--accent);
    width: 25px;
    text-align: center;
}

/* ============================================ */
/* MARKA LİSTESİ - YENİ TASARIM */
/* ============================================ */
.brand-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.brand-item {
    position: relative;
}

.brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 85px;
}

.brand-link:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.brand-link.selected-brand {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.brand-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.brand-link:hover .brand-icon {
    transform: scale(1.1);
}

.brand-link.selected-brand .brand-icon {
    animation: pulse 2s infinite;
}

.brand-name {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
}

.brand-link.selected-brand .brand-name {
    font-weight: 700;
}

/* Seçili marka için check işareti */
.brand-link.selected-brand::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 5px;
    right: 5px;
    background: white;
    color: var(--primary);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Pulse animasyonu */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================================ */
/* FİLTRE KUTUSU - GELİŞMİŞ TASARIM */
/* ============================================ */
.sidebar-filter-box {
    padding: 0;
    margin-top: 0;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.filter-form {
    padding: 15px;
    background: #fff;
}

.filter-group {
    margin-bottom: 18px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.filter-group:last-of-type {
    margin-bottom: 0;
}

.filter-group h4 {
    font-size: 0.9rem;
    color: var(--dark);
    margin: 0 0 12px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group h4 i {
    color: var(--accent);
    font-size: 0.85rem;
}

/* Arama input özel stil */
.filter-row input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
    background: white;
}

.filter-row input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Fiyat input stilleri */
.filter-price-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.filter-price-row input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.filter-price-row input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-price-row .price-separator {
    color: #94a3b8;
    font-weight: 600;
    font-size: 1rem;
}

/* Checkbox özel stil */
.filter-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-checkbox-wrapper:hover {
    background: #eff6ff;
}

.filter-checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-checkbox-wrapper label {
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* Butonlar */
.filter-buttons {
    padding: 0 15px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-filter-apply {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent), #eab308);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-filter-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-filter-apply:active {
    transform: translateY(0);
}

.btn-filter-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: #dc2626;
    text-decoration: none;
    padding: 10px;
    border: 2px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-filter-clear:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.btn-filter-clear::before {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* ============================================ */
/* KATEGORİ LİSTELEME SAYFASI BAŞLIKLARI */
/* ============================================ */
.category-list-header h1 {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.category-list-header p {
    color: #64748b;
    margin-top: 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.alert.no-product {
    background: #f1f5f9;
    color: #334155;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 30px;
}

.alert.no-product i {
    margin-right: 10px;
    color: var(--primary);
}

/* ============================================ */
/* SAYFALAMA (PAGİNATİON) */
/* ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    padding: 30px 0 10px 0;
}

.pagination a, 
.pagination span {
    display: block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s;
    font-weight: 500;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination span.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}

/* ============================================ */
/* RESPONSİVE TASARIM */
/* ============================================ */

/* Tablet görünüm */
@media (min-width: 769px) and (max-width: 1024px) {
    .brand-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sidebar-header {
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    .category-link {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* Mobil görünüm */
@media (max-width: 768px) {
    .main-sidebar {
        border-radius: 8px;
    }
    
    .sidebar-header {
        font-size: 0.95rem;
        padding: 10px 15px;
    }
    
    .category-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .category-link i:first-child {
        width: 20px;
        margin-right: 8px;
    }
    
    .sub-category-list a {
        padding: 8px 12px 8px 40px;
        font-size: 0.85rem;
    }
    
    /* Alt kategori checkbox mobil */
    .checkbox-content {
        padding: 9px 12px 9px 40px;
        gap: 6px;
    }
    
    .checkbox-content::before {
        left: 12px;
        width: 16px;
        height: 16px;
    }
    
    .sub-category-checkbox input[type="checkbox"]:checked + .checkbox-content::after {
        left: 15px;
        font-size: 0.65rem;
    }
    
    .checkbox-content i {
        width: 18px;
        font-size: 0.85rem;
    }
    
    .checkbox-content .kategori-adi {
        font-size: 0.85rem;
    }
    
    .checkbox-content .urun-sayisi {
        font-size: 0.7rem;
        padding: 2px 6px;
        min-width: 25px;
    }
    
    .brand-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px;
    }
    
    .brand-link {
        padding: 12px 8px;
        min-height: 75px;
    }
    
    .brand-icon {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .brand-name {
        font-size: 0.75rem;
    }
    
    /* Filtreleme mobil optimizasyonu */
    .filter-form {
        padding: 12px;
    }
    
    .filter-group {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .filter-group h4 {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .filter-price-row input[type="number"],
    .filter-row input[type="text"] {
        padding: 9px;
        font-size: 0.85rem;
    }
    
    .filter-checkbox-wrapper {
        padding: 8px;
    }
    
    .filter-checkbox-wrapper label {
        font-size: 0.85rem;
    }
    
    .filter-buttons {
        padding: 0 12px 12px 12px;
    }
    
    .btn-filter-apply {
        padding: 11px;
        font-size: 0.9rem;
    }
    
    .btn-filter-clear {
        padding: 9px;
        font-size: 0.8rem;
    }
    
    .category-list-header h1 {
        font-size: 1.6rem;
    }
    
    .category-list-header p {
        font-size: 0.9rem;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
    .brand-link {
        padding: 10px 6px;
        min-height: 70px;
    }
    
    .brand-icon {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }
    
    .brand-name {
        font-size: 0.7rem;
    }
    
    .pagination a, 
    .pagination span {
        padding: 8px 12px;
        font-size: 0.9rem;
        margin: 0 3px;
    }
}