﻿/* CSS cho thanh trượt giá */
#slider-range {
    margin: 10px 0 15px 0;
}

.ui-slider-horizontal {
    height: 6px;
    background: #e9ecef;
    border: none;
}

.ui-slider .ui-slider-range {
    background: #d0073d;
}

.ui-state-default, .ui-widget-content .ui-state-default {
    background: #fff;
    border: 2px solid #d0073d;
    border-radius: 50%;
    outline: none;
}

/* Layout cho Sidebar Filter (PC) */
.filter-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

    .filter-group:last-child {
        border-bottom: none;
    }

.filter-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #333;
    cursor: pointer; /* Hiển thị bàn tay khi di chuột */
    display: flex;
    justify-content: space-between; /* Đẩy chữ sang trái, icon sang phải */
    align-items: center;
    user-select: none; /* Không cho bôi đen text khi click click nhiều lần */
}

.filter-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

    .filter-item input[type="checkbox"] {
        margin-right: 8px;
        cursor: pointer;
        width: 16px;
        height: 16px;
        -webkit-appearance: checkbox;
    }
.ui-slider-horizontal .ui-slider-handle {
    margin-top: -2px;
}
/* Nút Lọc Mobile */
.mobile-filter-btn {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 20px;
    /*font-weight: bold;*/
    margin-bottom: 15px;
    width: 100%;
    text-align: left;
}

/* Responsive: Mobile View */
@media (max-width: 991px) {
    .mobile-filter-btn {
        display: block;
    }

    /* Chuyển Sidebar thành Popup Full Màn hình */
    .filter-sidebar-wrapper {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 0;
    }

        .filter-sidebar-wrapper.open {
            left: 0;
        }

    .filter-sidebar {
        border: none;
        border-radius: 0;
        padding: 60px 20px 20px 20px;
    }

    /* Nút Đóng Popup */
    .close-filter-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
        color: #333;
    }

    /* Footer cố định cho nút Lọc trên Mobile */
    .mobile-filter-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        display: flex;
        gap: 10px;
    }
}
/* 1. Ẩn triệt để nút X (Close) trên PC */
@media (min-width: 992px) {
    #closeMobileFilter {
        display: none !important;
    }
}

/* 2. Cấu hình vùng chứa Nút hành động ở cuối Filter Panel */
.filter-action-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    width: 100%;
}

    .filter-action-footer button {
        flex: 1; /* Nút sẽ tự động chia đều chiều rộng nếu có 2 nút, hoặc full 100% nếu có 1 nút */
    }

/* 3. Responsive cho Mobile */
@media (max-width: 991px) {
    .filter-sidebar-wrapper {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 0;
    }

        .filter-sidebar-wrapper.open {
            left: 0;
        }

    /* Giao diện bên trong Mobile: Nút đóng nằm góc trên phải */
    .filter-sidebar {
        border: none;
        border-radius: 0;
        padding: 50px 20px 30px 20px;
    }

    .close-filter-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
        color: #333;
        z-index: 10000;
    }
}
