@import "../component-loading/style.css";
@import "../component-pagination/style.css";
.product-list {
    >.container {}
}

.product-list__title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.product-list-open-mobile-filter {
    padding: 6px 12px;
    border: 1px solid var(--color-gray-1);
    display: none;
    align-items: center;
    gap: 8px;
}

.product-list__category {
    width: fit-content;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 40px;
}

.product-list__category-btn {
    color: var(--color-primary-1);
    padding-top: 10px;
    padding-bottom: 5px;
    border-bottom: 5px solid transparent;
    transition: border-bottom .3s;

}

.product-list__category-btn:hover,
.product-list__category-btn--active {
    border-bottom: 5px solid var(--color-primary-1);
}

#mobile-category {
    display: none;
    width: 100%;
    padding: 12px;
    border-radius: 0;
    border: 1px solid var(--color-gray-3);
    color: var(--color-gray-3);
    outline: none;
}

#mobile-category:focus,
#mobile-category:focus-visible {
    border: 1px solid var(--color-gray-1);
    color: var(--color-gray-1);
}

@media screen and (width < 768px) {
    .product-list-open-mobile-filter {
        display: flex;
    }

    .product-list__category {
        display: none;
    }

    #mobile-category {
        display: block;
    }
}

.product-list-container {
    max-width: 1440px;
    margin: 60px auto 0;
    display: flex;
    align-items: start;
	flex-wrap: wrap;
    padding-bottom: 80px;
    padding-right: 74px;
}

.product-list-container > .component-pagination {
	width: 100%;
}

.product-list-sidebar {
    width: calc(386 / 1366 * 100%);
    padding: 0 40px;

    >h3 {
        padding-bottom: 16px;
        border-bottom: 1px solid var(--color-gray-6);
    }

    >.close-mobile-filter {
        display: none;
        margin-bottom: 40px;
        margin-left: auto;
    }
}

.product-list__cards {
    width: calc(980 / 1366 * 100%);
    padding: 0 50px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px 80px;

    >.no-data {
        grid-column: 1 / -1;
    }
}

.product-list-card:hover .product-list-card__img{
    transform: scale(1.1);
}

.product-list-card__img-container {
    aspect-ratio: 1;
    padding: 40px;
    background-color: var(--color-gray-7);
    margin-bottom: 24px;
}
.product-list-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s;
}

.product-list-card__brand {
    color: var(--color-primary-1);
    margin-bottom: 12px;
}

@media screen and (width < 1440px) {
    .product-list-container {
        padding-right: 0;
    }
}

@media screen and (width < 1248px) {
    .product-list__cards {
        gap: 24px 40px;
    }
}

@media screen and (width < 1024px) {
    .product-list-sidebar {
        padding: 0 12px 0 24px;
    }
    .product-list__cards {
        gap: 24px;
        padding: 0 24px 0 12px;
    }
}

@media screen and (width < 768px) {
    .product-list-sidebar {
        position: fixed;
        inset: 0;
        z-index: 5;
        width: 100%;
        padding: 40px 24px;
        background-color: white;
        display: none;
    
        >.close-mobile-filter {
            display: block;
        }
    
        &.active {
            display: flex;
            flex-direction: column;
        }
    }
    .product-list__cards {
        width: 100%;
        padding: 0 24px;
    }
}

@media screen and (width < 576px) {
    .product-list__cards {
        width: 100%;
        padding: 0 24px;
    }
    .product-list-card__brand {
        margin-bottom: 0;
    }
}

#product-list-search {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;

    >input {
        width: 100%;
        flex-grow: 1;
        padding: 8px 20px;
        color: var(--color-gray-3);
        outline: none;
        border: 1px solid var(--color-gray-3);
        border-radius: 999px;
    }

    >button {
        flex-shrink: 0;

    }
}

@media screen and (width < 1248px) {
    #product-list-search {
        gap: 24px;
    }
}

@media screen and (width < 1024px) {
    #product-list-search {
        gap: 12px;
        margin-bottom: 40px;
    }
}

#product-list-checkbox {
    >.filter-dropdown {
        padding-top: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--color-gray-6);

        >button {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            width: 100%;

            >h4 {
                text-align: start;
            }

            >svg {
                flex-shrink: 0;
                transition: transform .5s;
            }
        }

        >div {
            display: grid;
            grid-template-rows: 0fr;
            transition: grid-template-rows .5s;

            >div {
                overflow: hidden;

                >div {
                    padding-top: 24px;

                    >label {
                        padding: 4px 0;
                        display: flex;
                        align-items: start;
                        gap: 12px;
                        margin-bottom: 12px;

                        >input {
                            flex-shrink: 0;
                            accent-color: var(--color-primary-1);
                            width: 16px;
                            height: 16px;
                            margin: 4px 0;
                        }
                    }

                    >label:last-child {
                        margin-bottom: 0;
                    }
                }
            }
        }

        &.active {
            >button>svg {
                transform: rotate(90deg);
            }

            >div {
                grid-template-rows: 1fr;
            }
        }
    }
}

@media screen and (width < 768px) {
    #product-list-checkbox {
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
    }
}