.filter-container {
    max-width: 390px;
    padding: 15px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.clear-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 15px;
}

.search-bar {
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}
.search-bar input::placeholder {
    font-size: 12px !important;
}
.selected-filters {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Tag style */
.selected-filter-item {
    background-color: white;
    border: 2px solid red;
    color: red;
    padding: 5px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    animation: fadeIn 0.2s ease-in-out;
}

/* Remove button (×) */
.remove-filter {
    background: transparent;
    border: none;
    color: red;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.remove-filter:hover {
    transform: scale(1.2);
}

.filter-section {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.filter-title {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.slider-container input[type="range"] {
    width: 100%;
    margin: 5px 0;
}

.slider-value {
    font-size: 14px;
    margin-top: 5px;
    font-weight: bold;
    color: #007bff;
}

.collapsible .filter-content {
    display: none;
}

.collapsible.open .filter-content {
    display: flex;
    flex-direction: column;
    margin-left: 15px;
    margin-right: 15px;
}
fancy-checkbox.filter-option.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
.filter-section.collapsed .filter-content,
.filter-section.collapsed .collapse {
    display: none;
}
.collapse{
    margin-left: 15px;
    margin-right: 15px;
}
.filter-section.disabled {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}
.arrow-icon {
    transition: transform 0.3s ease;
}

.filter-section.open .arrow-icon {
    transform: rotate(-180deg);
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    cursor: pointer;
    font-size: 20px;
}



.search-wrapper {
    position: relative;
}
.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: none;
}
.search-wrapper input:not(:placeholder-shown) + .clear-search {
    display: block;
}

.no-products-found-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 60px 20px;
    width: 100%;
    text-align: center;
}

.no-products-found img {
    max-width: 80px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-products-found h4 {
    color: #db1e27;
    margin-bottom: 8px;
}

.no-products-found p {
    color: #555;
}


/*firefox slider fix*/
@-moz-document url-prefix() {
    .multi-range-slider input[type=range] {
        -moz-appearance: none;
        appearance: none;
        position: absolute;
        height: 0;
        width: 100%;
        pointer-events: all;
        background: transparent;
        z-index: 3;
    }

    .multi-range-slider input[type=range]::-moz-range-thumb {
        width: 16px;
        height: 16px;
        border: none;
        border-radius: 50%;
        background: #007bff;
        cursor: pointer;
    }

    .multi-range-slider input[type=range]::-moz-range-track {
        background: transparent;
        height: 4px;
    }
}
/* ===============================
   FILTER SYSTEM STYLING
   =============================== */

/* ====== SELECTED FILTERS AREA ====== */
#selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 16px;
}

.selected-filter {
    background-color: #fff;
    border: 1px solid #D71920;
    color: #D71920;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.selected-filter button {
    background: none;
    border: none;
    color: #D71920;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin-left: 4px;
}

#reset-filters {
    background-color: #D71920;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#reset-filters:hover {
    background-color: #B6161C;
}

/* ====== FILTER GROUP WRAPPER ====== */
#filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ====== FILTER GROUP SECTION ====== */
.filter-group {
    background-color: #FAF5EF;
    padding: 18px 16px 20px;
    margin-bottom: 15px;
}
.filter-section.Child{
    background-color: #FAF5EF;
    border: unset;
}
.filter-section.Child:nth-child(1 of .filter-section.Child) {
   margin-top: 10px;
}

/* ====== GROUP TITLE ====== */
.filter-group h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1E1A16;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.filter-group h2 .icon {
    color: #D71920;
    font-size: 18px;
}

/* ====== INNER FILTER CARDS ====== */
.filter-section {
    background-color: #fff;
    border: 1px solid #EFE5DC;
    padding:5px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: 0.2s ease;
}

.filter-section:last-child {
    margin-bottom: 0;
}

/* ====== COLLAPSIBLE HEADER ====== */
.filter-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1E1A16;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-section h3 .arrow {
    font-size: 14px;
    color: #1E1A16;
    transition: transform 0.2s ease;
}

.filter-section.collapsed h3 .arrow {
    transform: rotate(-90deg);
}

.filter-content {
    margin-top: 12px;
}

.filter-option:last-child {
    margin-bottom: 0;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #D71920;
    cursor: pointer;
}

.filter-option label {
    font-size: 15px;
    color: #1E1A16;
    cursor: pointer;
}

/* ====== SLIDER CONTAINER ====== */
.slider-container {
    position: relative;
    margin-top: 12px;
}

.slider {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background-color: #EEE3D9;
}

.slider .range {
    position: absolute;
    height: 100%;
    background-color: #D71920;
    border-radius: 3px;
}

.slider .thumb {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background-color: #D71920;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 0 0 0 #fff;
    transition: 0s ease;
}

/* hide native range inputs */
.slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    opacity: 0;
    pointer-events: none;
}

/* slider values under the bar */
.slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #1E1A16;
    margin-top: 6px;
}

.slider-values span {
    display: inline-block;
}

.slider-values span::after {
    content: " CHF";
    font-size: 12px;
    color: #6C6A6A;
}

/* ====== NOTES (KPI) SECTION ====== */
.filter-group.notes .slider .range {
    background-color: #D71920;
}

/* ====== CHARACTERISTICS SECTION ====== */
.filter-group.characteristics .filter-section {
    background-color: #fff;
}

/* ====== TOOLTIPS ====== */
.myTooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Tooltip bubble */
/*.myTooltip::after {*/
/*    content: attr(data-tooltip);*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 110%;*/
/*    background-color: #1E1A16;*/
/*    color: #fff;*/
/*    padding: 12px 16px;*/
/*    border-radius: 6px;*/
/*    font-size: 13px;*/
/*    line-height: 1.5;*/
/*    white-space: normal;*/
/*    width: 300px;*/
/*    max-height: 60vh;*/
/*    overflow-y: auto;*/
/*    text-align: left;*/
/*    opacity: 0;*/
/*    visibility: hidden;*/
/*    pointer-events: none;*/
/*    transition: opacity 0.25s ease;*/
/*    z-index: 100;*/
/*    box-sizing: border-box;*/
/*    word-wrap: break-word;*/
/*}*/

/*!* Arrow *!*/
/*.myTooltip::before {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: 20px;*/
/*    left: 100%;*/
/*    border-width: 6px;*/
/*    border-style: solid;*/
/*    border-color: transparent #1E1A16 transparent transparent;*/
/*    opacity: 0;*/
/*    visibility: hidden;*/
/*    transition: opacity 0.25s ease;*/
/*}*/

/* Show tooltip */
.myTooltip:hover::after,
.myTooltip:hover::before {
    opacity: 1;
    visibility: visible;
}
@media (max-width: 600px) {
    .myTooltip::after {
        width: 80vw;
        max-height: 50vh;
        left: 50%;
        top: auto;
        bottom: 125%;
        transform: translateX(-50%);
        font-size: 14px;
    }

    .myTooltip::before {
        left: 50%;
        top: auto;
        bottom: 115%;
        transform: translateX(-50%);
        border-color: #1E1A16 transparent transparent transparent;
    }
}
.filter-left {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 10px;
}
/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    #filters-wrapper {
        gap: 20px;
    }

    .filter-group h2 {
        font-size: 18px;
    }

    .filter-section {
        padding: 12px 14px;
    }

    .slider .thumb {
        width: 16px;
        height: 16px;
    }
}

.child-group {
    margin-left: 1rem;
    border-left: 2px solid #eee;
    padding-left: 1rem;
}

.child-group .filter-title {
    font-size: 1rem;
    color: #333;
}

.filter-view-tabs {
    display: flex;
    justify-content: space-around;
    background: #f9f4ef;
    border-radius: 6px 6px 0 0;
    position: relative;
    border-bottom: 1px solid #e5e2de;
}

.filter-tab {
    flex: 1;
    text-align: center;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    position: relative;
    transition: color 0.2s ease;
}

.filter-tab:hover {
    color: #db1e27;
}

.filter-tab.active {
    color: #db1e27;
    font-weight: 700;
}

.filter-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #db1e27;
    border-radius: 2px;
}

.filter-group {
    margin-top: 1.5rem;
}

.filter-section.Child {
    margin-left: 20px;
    border-left: 2px solid #f1f1f1;
    padding-left: 10px;
}
.filter-group {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.filter-group.fade-init {
    opacity: 0;
    transform: translateY(10px);
}


.filter-section.open .filter-content,
.filter-section.open .collapse {
    opacity: 1;
}

.filter-view-tabs {
    display: flex;
    justify-content: space-evenly;
    border-bottom: 2px solid #f5e9e6;
    margin-bottom: 8px;
}

.filter-tab {
    background: transparent;
    border: none;
    font-weight: 600;
    color: #a09b9b;
    padding: 10px 15px;
    cursor: pointer;
    transition: color 0.25s ease, border-bottom 0.25s ease;
}

.filter-tab.active {
    color: #db1e27;
    border-bottom: 2px solid #db1e27;
}

/* Global tooltip styling */
.global-tooltip {
    position: absolute;
    background: #1E1A16;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 300px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
}
