/* search-filter.css */
.filter-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 20px;
}

.filter-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 150px);
    position: sticky;
    top: 80px;
    z-index: 100;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-toggle-btn {
    display: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.filter-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: #2c3e50;
}

.filter-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group-title {
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group-title::before {
    content: "•";
    color: #007bff;
    font-size: 1.5rem;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-option:hover {
    background-color: #e9ecef;
}

.filter-option input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
    color: #555;
    flex: 1;
}

.filter-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
}

.filter-apply {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.filter-apply:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.filter-reset {
    background: #6c757d;
    color: white;
}

.filter-reset:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #1976d2;
}

.active-filter-remove {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: #d32f2f;
    transition: color 0.2s ease;
}

.active-filter-remove:hover {
    color: #b71c1c;
}

.wh_search_results.col-xs-12.col-sm-12.col-md-12.col-lg-12 {
    flex: 1;
    padding-left: 20px;
}

@media (max-width: 991px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    .filter-sidebar.open {
        left: 0;
    }
    
    .filter-toggle-btn {
        display: block;
        position: fixed;
        top: 80px;
        left: 10px;
        z-index: 1001;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        padding: 8px 12px;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .filter-close {
        display: block;
    }
    
    .wh_search_results.col-xs-12.col-sm-12.col-md-12.col-lg-12 {
        padding-left: 0;
        width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.searchresult {
    animation: fadeIn 0.3s ease;
}


/* ========= 紧凑型侧边栏 ========= */
.filter-sidebar {
    padding: 12px;               /* 原为 20px */
    font-size: 13px;             /* 整体字号小一号 */
}

.filter-group {
    margin-bottom: 10px;         /* 原为 20px */
}

.filter-group-title {
    margin-bottom: 4px;
    padding-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
}

/* 选项横向排列，一行两列 */
.filter-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;                /* 行间距 4px，列间距 8px */
    max-height: 120px;           /* 原为 200px，更少滚动 */
    overflow-y: auto;
}

.filter-option {
    padding: 4px 6px;            /* 原为 8px 12px */
    font-size: 12px;
    border-radius: 4px;
}

.filter-option input {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

/* 按钮区域再压扁 */
.filter-actions {
    margin-top: 10px;
}
.filter-btn {
    padding: 6px 10px;
    font-size: 13px;
}

/* 移动端恢复纵向单列 */
@media (max-width: 991px) {
    .filter-options {
        grid-template-columns: 1fr;
        max-height: 150px;
    }
}