.float-filter-wrapper {
    position: relative;
}

.float-filter-box {
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    display: block;
}

/* Filter Header */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Collapsible sections */
.filter-section {
    border-radius: 6px;
    margin-bottom: 14px;
    overflow: hidden;
}

.filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #333; /* Title text color */
    border-bottom: 1px solid #333; /* Title bottom border in same color */
}

.filter-toggle:hover {
    background: #fff;
    color: #333;

}

.filter-toggle .filter-title {
    text-align: left;
}

/* Chevron arrow built from two thin lines */
.filter-toggle .arrow {
    position: relative;
    width: 14px;
    height: 14px;
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.filter-toggle .arrow::before,
.filter-toggle .arrow::after {
    content: '';
    position: absolute;
    top: 5px; /* vertically center the V */
    width: 10px;
    height: 2px; /* thin line */
    background: #333; /* Chevron color */
    display: block;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* Left stroke of the chevron */
.filter-toggle .arrow::before {
    left: 0px;
    transform: rotate(45deg);
}

/* Right stroke of the chevron */
.filter-toggle .arrow::after {
    right: -2px;
    transform: rotate(-45deg);
}

/* When section is open, rotate whole chevron to point up */
.filter-section.open .filter-toggle .arrow {
    transform: rotate(180deg);
}

.filter-content {
    display: none;
    padding: 10px 10px 12px;
    border-top: 1px solid #eee;
    background: #fff;
}

.filter-section.open .filter-content {
    display: block;
}
.filter-content label{
    display: block;
}
.filter-section.open button{
    border: none;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
}

.filter-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    display: none; /* Hide on desktop as it doesn't serve a purpose there */
}

.filter-close-btn:hover {
    color: #333;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Category Styling */
.category-list {
    max-height: 300px;
    overflow-y: auto;
}

.parent-category {
    margin-bottom: 10px;
}

.parent-category > label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.subcategories {
    padding-left: 20px;
    margin-bottom: 10px;
}

.subcategories label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #666;
}

/* Price Slider */
.price-slider-container {
    position: relative;
    height: 40px;
    margin: 20px 0 10px;
}

.price-slider {
    position: absolute;
    width: 100%;
    height: 5px;
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 3;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #C26431;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #C26431;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.price-slider-track {
    position: absolute;
    height: 5px;
    background: #C26431;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.price-slider-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 5px;
    background: #ddd;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

.price-output {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* Apply Filters Button */
.apply-filters-btn {
    background: #C26431;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
}

.apply-filters-btn:hover {
    background: #C26431;
}

/* Reset Filters Button */
.reset-filters-btn {
    background: transparent;
    color: #C26431;
    border: 1px solid #C26431;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    line-height: 18px;
    font-weight: 600;
    margin-top: 10px;
}

.reset-filters-btn:hover {
    background: rgba(194, 100, 49, 0.06);
}

/* Mobile Floating Button */
.float-filter-mobile-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #C26431;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.float-filter-mobile-btn:hover {
    background: #C26431;
}

/* Mobile Overlay Panel */
@media screen and (max-width: 768px) {
    /* Mobile close button styling */
    .filter-close-btn {
        display: block; /* Show on mobile */
        font-size: 28px;
        padding: 5px 10px;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10000;
    }
    .float-filter-box {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 9998;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
        padding: 10px 0 0 0;
    }

    .float-filter-box.open {
        display: block;
    }

    /* Header styling */
    .filter-header {
        position: relative;
        width: 100%;
        background: #fff;
        margin: 0 0 15px 0;
        padding: 15px 20px 5px;
    }

    .filter-header h3 {
        margin: 0;
        padding-top: 10px;
        text-align: center;
    }

    /* Fixed apply button */
    .apply-filters-btn {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 15px;
        border-radius: 0;
        z-index: 9999;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    }

    /* Scrollable content area */
    .float-filter-box form {
        height: 100%;
        overflow-y: auto;
        padding: 2px 21px 123px 20px;
    }

    .float-filter-mobile-btn {
        display: block;
    }

    .float-filter-mobile-btn.hidden {
        display: none;
    }

    /* Prevent background scrolling when filter is open */
    body.filter-open {
        overflow: hidden;
    }
}

/* Term count style for attribute values */
.attribute-volym-list .term-count {
    color: #888;
    font-weight: normal;
    margin-left: 4px;
    font-size: 90%;
}
