#productsHeader {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;



    #filterMonitor {
        flex-grow: 2;
        justify-content: flex-start;
        justify-items: start;
        overflow-x: auto;
        font-size: 80%;

        >* {
            color: var(--color1);
            background-color: var(--color2);
            padding: 3px 10px;
            border-radius: 10px;
            white-space: nowrap;

            &::after {
                content: '\1AF77';
                font-family: 'webIcons';
                font-size: 50%;
                padding-inline-start: 5px;
                color: red
            }
        }
    }

    button {
        display: none;
    }
}

#productsWrapper {
    display: flex;
    gap: 25px;
    width: 100%;
    align-items: flex-start;

    >div:nth-child(2) {
        flex-grow: 1;

    }



    #filterContainer {
        position: sticky;
        top: var(--headerHeight);
        transition-property: top, height, transform, flex-basis;
        transition-duration: var(--headerTime), var(--headerTime), 0.3s, 0.3s;
        transition-delay: 0s, 0s, 0s, 0.3s;
        border-radius: 10px;
        padding-top: 10px;

        #filterDiv {
            background-color: white;
            border-radius: 5px;
            display: flex;
            flex-direction: column;
            font-size: 90%;
            height: calc(98svh - var(--headerHeight));
            width: 250px;
            /* border: 1px solid gray; */


            #filters {
                display: flex;
                flex-direction: column;
                overflow-y: auto;
                padding-inline: min(5vw, 10px);

                margin-block: 5px;

                #filterHeading {
                    background-color: var(--color3Light);
                    color: var(--color1);
                    min-height: 3rem;
                    padding-inline: 5px;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    gap: 10px;

                    .myIcons {
                        color: var(--color1);
                        width: 2rem;
                        height: 2rem;
                        border: 1px solid var(--color1);
                        place-content: center;
                        text-align: center;
                        font-size: 1.2rem;

                        &:hover {
                            color: var(--color2);
                            border-color: var(--color2);
                        }
                    }

                    span {
                        flex-grow: 2;
                    }

                    #hideFiltersBtn {
                        display: none;
                    }

                    .removeFilter {
                        color: var(--color2);
                        font-weight: normal;
                    }
                }


                [type=checkbox] {
                    width: 15px;
                    height: 15px;
                    margin-inline-start: 0;
                    transform: translateY(20%);
                }

                [type=number] {
                    width: fit-content;
                    text-align: left;

                    &.fromInput {
                        text-align: right;

                        &::-webkit-textfield-decoration-container {
                            flex-direction: row-reverse;
                        }
                    }
                }

                label {
                    white-space: nowrap;

                    small {
                        /* color: gray; */
                        font-weight: 100;
                    }

                }

                .dual_range_slider {
                    width: min(300px, 100%);
                }

                .filterChks {
                    display: grid;

                    label {
                        white-space: nowrap;
                    }
                }
            }
        }
    }

    #sortContainer {
        display: flex;
        font-size: 80%;
        gap: min(1rem, 2vw);

        label {
            cursor: pointer;
            color: gray;

            &:hover {
                color: var(--color2);
            }

            &:has(:checked) {
                color: var(--color1);
                font-weight: bold;
            }
        }

        input {
            display: none;
        }
    }

    #productsContainer {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(calc(var(--productThumbWidth)*.8), 1fr));
        padding-top: 20px;
        gap: 5px;
        justify-items: center;

        .productThumb.hidden {
            display: none;
        }
    }
}

.removeFilters,
.allCategories {
    display: none;

    &.active {
        display: unset;
    }
}

#sortHeader {
    display: flex;
    justify-content: space-between;

    #sortClose {
        display: none;
    }
}


@media screen and (max-width:1000px) {
    .filterCount {
        background-color: var(--color1);
        color: white;
        position: absolute;
        top: -.3rem;
        left: 0;
        width: 1.8rem;
        height: 1.8rem;
        border-radius: 50%;
        place-content: center;
    }

    .removeFilters.active {
        display: unset !important;
    }

    #productsHeader {
        button {
            display: block;

            background-color: white;
            border-color: lightgray;
            color: black;
            border-radius: 2rem;
            position: relative;
            padding-inline: 1.5rem;
            margin-top: .5rem;
        }

        .myIcons {
            font-size: 1.5rem;
            vertical-align: middle;
        }

    }

    #productsSection {

        #filterContainer {
            position: fixed;
            top: 0px;
            left: 0px;
            width: 100%;
            height: 100%;
            z-index: 1200;
            pointer-events: none;

            #hideFiltersBtn {
                display: unset !important;
                border: none !important;
            }

            #filterDiv {
                pointer-events: auto;
                transition: transform 0.3s;
                transform: translateY(100%);
                height: 100svh;
                width: 100%;

                border: none;
                position: relative;

                border-start-start-radius: 0;
                border-end-start-radius: 0;

                #filterHeading {
                    border-start-start-radius: 0;

                }
            }

            &.active {
                background-color: rgba(100, 100, 100, 0.2);
                pointer-events: all;

                &.filters {
                    #filtersFiltersSection {
                        display: grid
                    }

                    #filtersCategoriesSection {
                        display: none
                    }
                }

                &.categories {
                    #filtersFiltersSection {
                        display: none
                    }

                    #filtersCategoriesSection {
                        display: grid
                    }
                }

                #filterDiv {
                    transform: unset;
                }

            }
        }

        #sortWrapper {
            position: fixed;
            top: 0px;
            left: 0px;
            width: 100%;
            height: 100%;
            z-index: 1200;
            pointer-events: none;

            #sortContainer {
                pointer-events: auto;
                transition: transform 0.3s;
                transform: translateY(100%);
                height: 100svh;
                width: 100%;

                border: none;
                position: relative;
                background-color: var(--pageBackground);
                flex-direction: column;
                padding: min(10px, 5vw);

                border-start-start-radius: 0;
                border-end-start-radius: 0;

                #sortHeader {
                    background-color: var(--color3Light);
                    color: var(--color1);
                    min-height: 3rem;
                    padding-inline: 5px;
                    align-items: center;

                }

                #sortClose {
                    display: unset;
                    cursor: pointer;

                    &:hover {
                        color: var(--color2)
                    }
                }

            }

            &.active {
                background-color: rgba(100, 100, 100, 0.2);
                pointer-events: all;

                #sortContainer {
                    transform: unset;

                }
            }

        }

        #productsContainer {
            padding-top: 50px;

        }
    }
}