.wssw-categories-container, .wssw-attributes-container, .wssw-price-filter { font-family: sans-serif; margin-bottom: 20px; }
.wssw-back-link { display: block; margin-bottom: 10px; text-decoration: none; color: #007cba; font-weight: bold; cursor: pointer; }
.wssw-category-list, .wssw-subcategory-list { list-style: none; padding: 0; margin: 0; }
.wssw-category-item { margin: 5px 0; }
.wssw-category-link-wrapper { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.wssw-category-link-wrapper a { text-decoration: none; color: #333; flex-grow: 1; }
.wssw-toggle-icon { font-size: 10px; margin-left: 5px; transition: transform 0.3s; }
.wssw-category-item.open > .wssw-category-link-wrapper .wssw-toggle-icon { transform: rotate(180deg); }
.wssw-subcategory-list { padding-left: 15px; display: none; }
.wssw-category-item.open > .wssw-subcategory-list { display: block; }
.wssw-attribute-group { margin-bottom: 15px; }
.wssw-attribute-title { font-size: 16px; margin-bottom: 10px; font-weight: 600; }
.wssw-attribute-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wssw-attribute-tag { border: 1px solid #ccc; padding: 5px 10px; text-decoration: none; color: #666; font-size: 13px; border-radius: 4px; background: #fff; }
.wssw-price-slider-container { display: flex; flex-direction: column; gap: 10px; }
.wssw-price-slider { width: 100%; cursor: pointer; }
.wssw-price-values { display: flex; justify-content: space-between; font-size: 14px; }
.wssw-filter-button { background: #333; color: #fff; border: none; padding: 8px; cursor: pointer; border-radius: 4px; }
/* Desktop Layout */
.wssw-responsive-filter-wrapper {
    position: relative;
}
.wssw-filter-mobile-btn {
    display: none;
}

/* Desktop view: Show everything in a column */
@media (min-width: 769px) {
    .wssw-filter-overlay {
        position: static !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        visibility: visible !important;
        opacity: 1 !important;
        transition: none !important;
        overflow: visible !important;
    }
    .wssw-filter-overlay-header {
        display: none !important;
    }
    .wssw-filter-overlay-content {
        display: block !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    .wssw-filter-section {
        margin-bottom: 30px;
    }
    .wssw-section-header {
        font-weight: bold;
        font-size: 18px;
        margin-bottom: 15px;
        display: block;
        color: #333;
    }
}

/* Tablet & Mobile Layout */
@media (max-width: 768px) {
    .wssw-filter-mobile-btn {
        display: block;
        width: 100%;
        padding: 12px;
        background: #333;
        color: #fff;
        border: none;
        border-radius: 4px;
        font-size: 16px;
        cursor: pointer;
        text-align: center;
        margin-bottom: 15px;
    }

    .wssw-filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Changed from 100% to 100vh */
        background: #fff;
        z-index: 999999;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .wssw-filter-overlay.active {
        visibility: visible;
        opacity: 1;
    }

    .wssw-filter-overlay-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
        background: #f9f9f9;
        flex-shrink: 0; /* Ensure header doesn't shrink */
    }

    .wssw-overlay-title {
        font-size: 20px;
        font-weight: bold;
    }

    .wssw-filter-close-btn {
        font-size: 30px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .wssw-filter-overlay-content {
        flex-grow: 1;
        padding: 20px;
        overflow-y: auto !important; /* Force scroll */
        -webkit-overflow-scrolling: touch;
        height: calc(100vh - 60px); /* Approximate header height */
    }

    .wssw-filter-section {
        margin-bottom: 30px;
    }

    .wssw-section-header {
        font-weight: bold;
        font-size: 18px;
        margin-bottom: 15px;
        display: block;
        color: #333;
    }
}

/* Active attribute state */
.wssw-attribute-tag.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

.wssw-category-item.current > .wssw-category-link-wrapper > a {
    font-weight: 700;
    color: #000;
}

/* Active filter chips */
.wssw-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f6f6f6;
    border-radius: 4px;
}

.wssw-active-filters[hidden] {
    display: none;
}

.wssw-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 13px;
    color: #333;
}

.wssw-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 1;
    border-radius: 50%;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.wssw-clear-filters {
    margin-left: auto;
    background: none;
    border: none;
    color: #a00;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

/* Results counter above the grid */
.wssw-results-bar {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* Body scroll lock while mobile overlay is open */
body.wssw-overlay-open {
    overflow: hidden;
}

