/* ================================================== */
/* Kategoriler Sidebar Filtreleme CSS
/* Modern ve Responsive Tasarım
/* ================================================== */

/* Mobil Filtre Butonu */
.mobile-filter-toggle {
    position: relative;
    z-index: 100;
}

.mobile-filter-toggle .btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;

}

.mobile-filter-toggle .btn-main i {
    font-size: 20px;
}

/* Filter Badge (Aktif filtre sayısı) */
.filter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ana Sidebar */
.sidebar-kategoriler {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

/* Sidebar Header (Mobil) */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin: -25px -25px 25px -25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    margin-top:20px;
    border-bottom: 2px solid #dee2e6;
}

.sidebar-header h4 {
    color: #333;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-close {
    background: #fff;
    border: 2px solid #dee2e6;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: #f8f9fa;
    transform: rotate(90deg);
    border-color: var(--primary-color, #007bff);
    color: var(--primary-color, #007bff);
}

.sidebar-close:active {
    transform: rotate(90deg) scale(0.95);
}

.sidebar-close i {
    font-size: 22px;
    font-weight: bold;
}

.sidebar-close .close-text {
    position: absolute;
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

/* Icon yoksa text göster, icon varsa text gizle */
.sidebar-close i:not(.icofont-close) + .close-text {
    display: block;
}

.sidebar-close .icofont-close ~ .close-text {
    display: none;
}

/* Sidebar Content */
.sidebar-content {
    /* Scroll bar kaldırıldı, içerik aşağıya doğru uzayabilir */
}

/* Widget Kategori */
.widget-kategori {
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 20px;
    animation: fadeInUp 0.5s ease;
}

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

.widget-kategori:last-child {
    border-bottom: none;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color, #007bff);
    display: inline-block;
    position: relative;
    padding-left: 12px;
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color, #007bff);
    border-radius: 2px;
}

.widget-content {
    margin-top: 15px;
}

/* Kategori Listesi */
.kategori-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kategori-item {
    margin-bottom: 8px;
}

.kategori-item a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e8e8e8;
}

.kategori-item a:hover {
    background: var(--primary-color, #007bff);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.kategori-item.active a {
    background: var(--primary-color, #007bff);
    color: #fff;
    font-weight: 600;
}

.kategori-item i {
    margin-right: 10px;
    font-size: 12px;
    opacity: 0.7;
}

/* Filtre Widget */
.widget-filtre {
    margin-top: 20px;
}

/* Filtre Section */
.filtre-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.filtre-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filtre-title i {
    color: var(--primary-color, #007bff);
    font-size: 18px;
}

/* Filtre Listesi */
.filtre-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filtre-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Custom Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    user-select: none;
    flex: 1;
    font-size: 14px;
    color: #555;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    color: var(--primary-color, #007bff);
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary-color, #007bff);
}

/* Custom Checkbox Input */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Custom Checkbox Box */
.checkbox-custom {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Checkbox Checked State */
.checkbox-label input:checked ~ .checkbox-custom {
    background-color: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
}

/* Checkbox Checkmark */
.checkbox-label input:checked ~ .checkbox-custom:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Checkbox Text */
.checkbox-text {
    margin-left: 5px;
}

/* Item Count Badge */
.item-count {
    background: #e8e8e8;
    color: #666;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    white-space: nowrap;
}

.filtre-item:hover .item-count {
    background: var(--primary-color, #007bff);
    color: #fff;
}

/* Mobil Responsiveness */
@media (max-width: 991px) {
    /* Desktop'ta gizle */
    .mobile-filter-toggle {
        display: block;
    }
    
    /* Sidebar mobilde overlay olarak */
    .sidebar-kategoriler {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease;
        margin: 0;
    }
    
    .sidebar-kategoriler.active {
        left: 0;
    }
    
    .sidebar-content {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    .sidebar-content::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .sidebar-content::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

    .sidebar-content::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
}

@media (min-width: 992px) {
    /* Desktop'ta mobil butonu gizle */
    .mobile-filter-toggle {
        display: none !important;
    }
    
    /* Desktop'ta overlay gizle */
    .sidebar-overlay {
        display: none !important;
    }
    
    /* Desktop'ta header gizle */
    .sidebar-header {
        display: none !important;
    }
    
    /* Desktop'ta normal sidebar */
    .sidebar-kategoriler {
        position: relative;
        width: 100%;
        height: auto;
        left: 0;
    }
}

/* Animasyonlar */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sidebar-kategoriler.active {
    animation: slideIn 0.3s ease;
}

.sidebar-overlay.active {
    animation: fadeIn 0.3s ease;
}

/* Form Submit Button */
#form-filtre-kategori .btn-submit {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: var(--primary-color, #007bff);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#form-filtre-kategori .btn-submit:hover {
    background: var(--secondary-color, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Filtreleri Temizle Butonu */
.btn-clear-filters {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-filters:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-clear-filters i {
    font-size: 16px;
}

/* Küçük ekranlar için optimize */
@media (max-width: 575px) {
    .sidebar-kategoriler {
        width: 90%;
        max-width: 90%;
    }
    
    .filtre-section {
        padding: 15px;
    }
    
    .widget-kategori {
        padding: 15px;
    }
}

/* Dark Mode Devre Dışı - Her zaman beyaz tema */
