/* === MOBILE FILTER PANEL === */
@media (max-width: 1199.98px) {
    .col-xl-4 {
        position: absolute;
        left: -9999px;
        width: 0;
        padding: 0;
        margin: 0;
    }

    .col-xl-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #mobile-filter {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: #ffffff;
        z-index: 1050;
        padding: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: left 0.3s ease;
        border-radius: 0 16px 16px 0;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.18);
    }

    #mobile-filter.active {
        left: 0;
    }

    body.filter-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    #open-filter {
        display: block !important;
    }

    #mobile-filter .filter-header {
        position: relative;
        padding-right: 56px;
    }

    #close-filter {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1060;
        background: rgba(0, 0, 0, 0.05);
    }

    #close-filter i {
        font-size: 16px;
        pointer-events: none;
    }
}

/* === DESKTOP FILTER === */
@media (min-width: 1200px) {
    #mobile-filter {
        position: static;
        height: auto;
        width: auto;
        box-shadow: none;
        border-radius: 0;
        padding: inherit;
        overflow: visible;
        background: transparent;
        transition: none;
    }

    #open-filter {
        display: none !important;
    }
}

/* === CUSTOM SCROLLBAR === */
#mobile-filter {
    scrollbar-width: thin;
    scrollbar-color: #f96b39 #f1f1f1;
}

#mobile-filter::-webkit-scrollbar {
    width: 6px;
}

#mobile-filter::-webkit-scrollbar-thumb {
    background-color: #f96b39;
    border-radius: 6px;
}

/* === FILTER CLEAR BUTTON === */
.filter-clear-btn {
    padding: 6px 18px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f8f8f8;
    transition: 0.25s ease-in-out;
}

.filter-clear-btn:hover {
    background-color: #f96b39 !important;
    color: white !important;
    border-color: #f96b39 !important;
}

/* === LOADER === */
.filter-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f96b39;
}
/* =================== MOBILE FILTER HAMBURGER =================== */
.mobile-filter-toggle {
    position: fixed;
    top: 250px;
    right: 16px;
    z-index: 999;
    background: #f96b39;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-filter-toggle:hover {
    background: #d96328;
    transform: scale(1.05);
}

.mobile-filter-toggle i {
    font-size: 20px;
}

.mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-filter-overlay.active {
    opacity: 1;
}

.mobile-filter-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #f4f2ee;
    z-index: 1001;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
}

.mobile-filter-drawer.active {
    right: 0;
}

.mobile-filter-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    padding: 16px;
    border-bottom: 1px solid #d4d2ce;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.mobile-filter-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-filter-close {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.mobile-filter-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.mobile-filter-content {
    padding: 16px;
}

.mobile-filter-content .form-control,
.mobile-filter-content .form-select,
.mobile-filter-content .form-float-input {
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #d4d2ce;
    border-radius: 8px;
    background: #ffffff;
}

.mobile-filter-content .form-control:focus,
.mobile-filter-content .form-select:focus,
.mobile-filter-content .form-float-input:focus {
    border-color: #f96b39;
    box-shadow: 0 0 0 2px rgba(249, 107, 57, 0.1);
}

@media (max-width: 1199px) {
    .mobile-filter-toggle {
        display: flex;
    }

    .desktop-filter-sidebar {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .mobile-filter-toggle,
    .mobile-filter-overlay,
    .mobile-filter-drawer {
        display: none !important;
    }
}
/* Filter Count Badge */
.mobile-filter-toggle {
    overflow: visible;
}

.filter-count-badge {
    display: none;
    background: #0a66c2;
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    position: absolute;
    top: -4px;
    right: -4px;
}

/* Clear All link in drawer header */
.mobile-clear-all-link {
    font-size: 13px;
    font-weight: 600;
    color: #f96b39;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #f96b39;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.mobile-clear-all-link:hover {
    background: #f96b39;
    color: #fff;
}

/* Reset link below Apply */
.reset-link {
    display: block;
    text-align: center;
    color: rgba(0, 0, 0, 0.64);
    font-size: 14px;
    margin-top: 6px;
    text-decoration: none;
    font-weight: 700;
}

.reset-link:hover {
    color: #f96b39;
}
