/**
 * =====================================
 * FILTER SIDEBAR STYLES (Optimized)
 * =====================================
 */

/* Backdrop (Optimized - No blur for better performance) */
.nb-filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nb-filter-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer (Optimized - GPU Accelerated Transform) */
.nb-filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 3000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;

    /* Hardware acceleration */
    transform: translateX(-100%);
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nb-filter-drawer.active {
    transform: translateX(0);
}

.nb-filter-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nb-filter-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.nb-filter-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}

.nb-filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.nb-filter-group {
    margin-bottom: 24px;
}

.nb-filter-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nb-filter-select,
.nb-filter-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.nb-filter-select:focus,
.nb-filter-input:focus {
    border-color: #333;
}

.nb-filter-price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.nb-filter-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
}

.btn-filter-clear {
    flex: 1;
    height: 48px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.btn-filter-apply {
    flex: 2;
    height: 48px;
    background: #1e293b;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

@media (max-width: 600px) {
    .nb-filter-drawer {
        width: 85%;
    }
}