/* FILTERS */
.filter-container {
    display: flex;
    justify-content: center;
    background-color: #ecebe6;
    padding: 20px 0;
}

.filter-items {
    padding: 0;
    background-color: transparent;
    flex-wrap: wrap;
    width: 100%;
    gap: 15px;
}

.filter-name {
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    line-height: 1.2;
    overflow: hidden;
    font-weight: 700;
    padding: 0;
    margin-bottom: 0;
    transition: box-shadow 0.2s ease;
}

.filter-name:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.filter-name-text {
    background-color: #ffffff;
    min-height: 50px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-radius: 8px 8px 0 0;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.filter-name-text:hover {
    background-color: #f8f8f8;
}

.filter-name.open .filter-name-text {
    background-color: #f5f2f2;
    color: #000000;
}

.filter-name.open .filter-name-text:hover {
    background-color: #f5f2f2;
}

.filter-name.open .filter-name-text.active {
    background-color: #00a499;
    color: #FFFFFF;
}

.filter-name-text span {
    flex: 1;
}

.filter-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-close {
    color: #FFFFFF;
    font-size: 15px;
    cursor: pointer;
    display: none;
    transition: color 0.2s ease;
}

.filter-name-text.active .filter-close {
    display: block;
    color: #000;
}

.filter-close:hover {
    color: #f0f0f0;
}

.filter-name-text.active {
    background-color: #00a499;
    color: #FFFFFF;
}

.filter-chevron {
    color: #999 !important;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.filter-name-text.active .filter-chevron {
    color: #000 !important;
}

.filter-name.open .filter-chevron {
    transform: rotate(90deg);
}

.filter-values {
    background-color: #FFFFFF;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    font-weight: 400;
    font-size: 14px;
    padding: 15px;
    overflow-x: hidden !important;
}

.filter-name.open .filter-values {
    display: block;
}

.filter-values.no-scrollbar {
    overflow-y: hidden;
}

.filter-search-input {
    margin-bottom: 10px;
    height: 40px;
    font-size: 14px;
    padding: 8px 12px;
    background-color: #ecebe6;
}

.filter-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.filter-options-list::-webkit-scrollbar {
    width: 6px;
}

.filter-options-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.filter-options-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.filter-option {
    padding: 4px 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#product-filter .filter-options-list {
    overflow-x: auto;
}

#product-filter .filter-options-list::-webkit-scrollbar {
    height: 6px;
}

#product-filter .filter-option {
    overflow: visible;
    text-overflow: clip;
    width: max-content;
    min-width: 100%;
}

.filter-option.filter-option-hidden {
    display: none !important;
}

.filter-option input[type="checkbox"] {
    margin-right: 8px;
}

.filter-option .filter-count {
    color: #999;
    margin-left: 4px;
}

.filter-option-empty {
    opacity: 0.45;
    pointer-events: none;
}

.custom-slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 5px 5px;
}

.custom-slider-container .slider-wrapper {
    margin: 5px 0;
}

.custom-slider-container .filter-slider-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-slider-container .filter-slider-inputs::before {
    content: attr(data-label);
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.custom-slider-container .filter-slider-input-from,
.custom-slider-container .filter-slider-input-to {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    text-align: center;
    font-size: 14px;
}

/* Slider bar */
.custom-slider-container .filter-range-slider {
    width: 100%;
}

.custom-slider-container .slider.slider-horizontal {
    width: 100%;
    height: 20px;
    position: relative;
    touch-action: none;
}

.custom-slider-container .slider.slider-horizontal .slider-track {
    background: #e0e0e0;
    height: 4px;
    border-radius: 2px;
    top: 50%;
    margin-top: -2px;
    touch-action: none;
}

.custom-slider-container .slider.slider-horizontal .slider-selection {
    background: #00a499;
    border-radius: 2px;
    top: 50%;
    margin-top: -2px;
    height: 4px;
}

.custom-slider-container .slider.slider-horizontal .slider-handle {
    width: 16px;
    height: 16px;
    background: #00a499;
    border-radius: 50%;
    top: 50%;
    margin-top: -8px;
    cursor: pointer;
    touch-action: none;
}

.custom-slider-container .slider.slider-horizontal .slider-handle::before,
.custom-slider-container .slider.slider-horizontal .slider-handle::after {
    display: none;
}

.custom-slider-container .slider.slider-horizontal .slider-handle.changed {
    background: #007d75;
}

.custom-slider-container .slider .tooltip-main {
    display: none;
}

/* Mobile "show filters" trigger button */
.mobile-filter-container {
    background-color: #FFFFFF;
    padding: 0 0 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile_show_filters {
    width: 80%;
}

/* FILTER SUMMARY BAR */
.filter-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    padding: 10px 20px;
    margin: 20px -15px 0 -15px;
    box-sizing: border-box;
}

.filter-toggle-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #00a499;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-toggle-all:hover {
    background-color: #007d75;
}

.filter-summary-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-summary-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.filter-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background-color: #e8f7f6;
    border: 1px solid #b2e4e0;
    border-radius: 14px;
    padding: 0 6px 0 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #00706a;
}

.filter-summary-chip-value {
    white-space: normal;
}

.filter-summary-chip-name {
    font-weight: 700;
    white-space: nowrap;
    font-size: 12px;
    color: #333;
}

.filter-summary-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    border-radius: 50%;
    color: #00706a;
    font-size: 17px;
    line-height: 1.1;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.filter-summary-chip-remove:hover {
    opacity: 1;
    background-color: #c7ece8;
}

.filter-summary-clear {
    background: none;
    border: 1px solid #ccc;
    border-radius: 14px;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.4;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-summary-clear:hover {
    border-color: #00A499;
    color: #00A499;
}

.filter-summary-count {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 4px;
}

.filter-summary-count-number {
    font-size: 18px;
    font-weight: 700;
    color: #00A499;
    line-height: 1;
}

.filter-summary-count-label {
    font-size: 15px;
    font-weight: 500;
    color: #555;
}

/* RESPONSIVE */

.filter-name {
    flex: 0 0 calc(25% - 12px) !important;
    max-width: calc(25% - 12px);
}

@media (max-width: 1199px) {
    .filter-name {
        flex: 0 0 calc(33.333% - 10px) !important;
        max-width: calc(33.333% - 10px);
    }
}

@media (max-width: 991px) {
    .filter-name {
        flex: 0 0 calc(50% - 8px) !important;
        max-width: calc(50% - 8px);
    }

    .filter-summary-chip-remove {
        margin-top: 2px;
    }
}

@media (max-width: 767px) {
    .filter-container {
        display: none;
    }

    .filter-name {
        margin-bottom: 15px;
        flex: 0 0 100% !important;
        max-width: 100%;
    }

    .filter-name.open {
        height: auto;
        margin-bottom: 15px;
    }

    .filter-name:last-child {
        margin-bottom: 0;
    }

    .filter-values {
        margin-bottom: 0;
    }

    .filter-values.no-scrollbar {
        display: block;
    }

    .filter-slider-container {
        padding: 20px;
    }

    .slider-wrapper {
        margin-bottom: 15px;
        padding: 0 5px;
    }

    .filter-items {
        padding: 0;
        gap: 10px;
        display: flex;
        flex-direction: column;
    }

    .mobile-filters-bottom-buttons {
        margin: 15px;
        justify-content: space-evenly;
        align-items: stretch;
    }

    .mobile-filters-bottom-buttons > .lasma_button > button {
        width: 100%;
    }

    .mobile-filters-bottom-buttons > .lasma_button {
        flex-grow: 1;
    }

    .button-apply-filters-mobile {
        background-color: #00a499;
    }

    .use-filter-bottom {
        margin-right: 7.5px;
    }

    .cancel-filter-bottom {
        margin-left: 7.5px;
    }

    .filter-toggle-all {
        display: none;
    }

    .filter-summary {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin: 0 -15px;
        padding: 14px 16px;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .filter-summary-count {
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding-top: 12px;
        border-top: 1px solid #eee;
    }

    .filter-summary-count-number {
        font-size: 20px;
    }

    .filter-summary-count-label {
        font-size: 16px;
    }
}