/* =============================================
** === HUSKY HIERARCHY FIX (Scroll + Search) ===
** =============================================
*/

/* =============================================
** === HUSKY HIERARCHY & INTERACTION FIX ===
** ============================================= */

/* 1. Ensure the Sidebar is "On Top" so clicks work */
#secondary, .woof_sid_wrapper {
    position: relative;
    z-index: 99;
    pointer-events: auto !important;
}

/* 2. Scrollable Model List (Prevents infinite sidebar) */
.woof_container_car_model .woof_list_checkbox,
.woof_container_inner_car_model {
    max-height: 250px !important;
    overflow-y: auto !important;
    border: 1px solid #eee;
    padding: 10px;
}

/* 3. Interaction Fix: Ensure clicks hit the checkbox, not the air */
.woof_list_checkbox label {
    cursor: pointer !important;
    display: inline-block !important;
    width: auto !important;
}

/* 4. Fix Toggle Icon (+/-) clickability */
.woof_is_opened, .woof_is_closed {
    cursor: pointer !important;
    position: relative;
    z-index: 100;
}

/* =============================================
** MOBILE SIDEBAR VISIBILITY FIX
** ============================================= */

/* 1. Prevent the sidebar from being hidden by theme classes */
@media (max-width: 991px) {
    #secondary, 
    .widget-area,
    .sidebar-content {
        display: block !important; /* Force it to show */
        width: 100% !important;   /* Make it full width */
        float: none !important;
        margin-top: 30px;          /* Add space between content and filters */
        padding: 0 15px;           /* Prevent edge-to-edge text */
    }

    /* 2. Optional: Mobile "Filter" Button Styling */
    /* If Husky has a mobile toggle enabled, make it look professional */
    .woof_show_auto_form {
        display: block !important;
        background: #4682B4 !important; /* Your brand color */
        color: white !important;
        padding: 12px;
        text-align: center;
        border-radius: 4px;
        margin-bottom: 20px;
        font-weight: bold;
    }
}

/* 3. Tame the Husky layout on small screens */
@media (max-width: 480px) {
    .woof_container {
        width: 100% !important; /* Force filters to stack vertically */
        float: none !important;
    }
}