:root {
    --productWrapWidth: 230px;
    --productContentSize: 200px;
}

.section {
    padding: 80px 60px;
    padding-bottom: 150px;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.products_empty {
    margin-top: 30px;
}

.product_list_wrap {
    display: flex;
    justify-content: center;
}

.products_wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    transition-duration: 0.3s;
}

.product {
    width: var(--productWrapWidth);
    margin-top: 50px;
    float: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    transition-duration: 0.3s;
}

.product a {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product:hover {
    transform: scale(1.05);
}

.product_img_wrap {
    width: var(--productContentSize);
    height: var(--productContentSize);
    /* background-color: var(--grey); */
    background-color: #fff;
    padding: 15px 0;
    border-radius: 13px;
    box-shadow: 0 0 10px rgba(3, 3, 3, 0.1);
    overflow: hidden;
}

.product_img_scroll {
    height: 100%;
    display: flex;
    position: relative;
    left: 0;
    transition-duration: 0.3s;
}

.product_img_scroll img {
    width: var(--productContentSize);
}

.product_text {
    max-width: var(--productContentSize);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product_name {
    font-size: 25px;
    cursor: pointer;
}

.product_border {
    width: 0;
    height: 3px;
    background-color: var(--darkBlue);
    transition-duration: 0.3s;
}

.product:hover .product_border {
    width: 100%;
}

.product:hover .product_name {
    color: var(--darkBlue);
}

.product_colors {
    width: var(--productContentSize);
    display: flex;
    gap: 15px;
}

.product_color {
    width: 20px;
    height: 20px;
    /* border-radius: 1000px; */
    border-radius: 4px;
    /* box-shadow: 0 0 5px rgba(3, 3, 3, 0.1); */
    border: 1px solid rgba(3, 3, 3, 0.3);
    transition-duration: 0.3s;
    cursor: pointer;
}

.product_color:hover {
    transform: scale(1.2);
}

/* Filter styling starts here */
.filter_wrap {
    position: absolute;
    left: 60px;
}

.filter_title {
    align-self: flex-start;
    font-size: 25px;
}

.filter_title_mobile {
    display: none;
}

.filter_title label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter_title p {
    width: 30px;
    height: 30px;
    background: url(../icons/arrow_left_black.png) top / cover no-repeat;
    transform: rotate(180deg);
    transition-duration: 0.3s;
}

.filter_wrap {
    margin-top: 30px;
}

.filter_elements_wrap {
    width: 0;
    overflow: hidden;
    transition-duration: 0.3s;
    text-wrap: nowrap;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter_element {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter_element_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter_element_top {
    font-size: 20px;
}

.filter_element_item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter_element_item label,
.filter_element_item input{
    cursor: pointer;
}

.filter_element_item input {
    appearance: none;
    width: 15px;
    height: 15px;
    margin: 0;
    background-color: var(--white);
    border: 1px solid var(--black);
    border-radius: 0;
    color: var(--black);
    display: grid;
    place-content: center;
}

.filter_element_item input::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--darkBlue);
}

.filter_element_item input[type=radio],
.filter_element_item input[type=radio]::before {
    border-radius: 1000px;
}

.filter_element_item input:checked::before {
    transform: scale(1);
}

/* Filter toggle */
#filter_toggle:checked~label p {
    transform: rotate(0);
}

.section:has(#filter_toggle:checked) .filter_elements_wrap {
    width: 150px;
}

.section:has(#filter_toggle:checked) .product_list_wrap {
    width: calc(100% - 200px);
}

.filter_brand_hidden {
    display: none;
}

/* Filter mobile toggle */
.filter_mobile_close {
    margin-bottom: 40px;
    font-size: 25px;
    display: none;
}

.filter_mobile_close label {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter_mobile_close img {
    width: 30px;
    height: 30px;
    padding: 5px;
    border-radius: 1000px;
    background-color: var(--black);
}
/* Filter styling ends here */


/* ========== Media query 1024 start here ========== */
@media screen and (max-width: 1024px) {
    .filter_title_mobile {
        display: flex;
    }

    .filter_title_desktop {
        display: none;
    }

    .filter_title p {
        background: url(../icons/filter_black.png) top / cover no-repeat;
        transform: rotate(0);
    }

    .filter_wrap {
        margin: 0;
        max-width: 400px;
        width: 0;
        height: 100vh;
        padding-top: calc(var(--navbarHeight) + 50px);
        background-color: var(--grey);
        box-shadow: 0 0 10px rgba(3, 3, 3, 0.5);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 98;
        transition-duration: 0.3s;
        overflow: hidden;
    }

    .filter_mobile_close {
        text-wrap: nowrap;
        display: flex;
    }

    /* Filter toggle */
    .section:has(#filter_mobile_toggle_open:checked) .filter_wrap {
        width: 100%;
        padding: 50px;
        padding-top: calc(var(--navbarHeight) + 50px);
    }

    .section:has(#filter_mobile_toggle_open:checked) .filter_elements_wrap {
        width: 100%;
    }

    .section:has(#filter_toggle:checked) .product_list_wrap {
        width: 100%;
    }
}

/* ========== Media query 850 start here ========== */
@media screen and (max-width: 850px) {
    .section {
        padding: 60px 30px;
        padding-bottom: 100px;
    }
}

/* ========== Media query 800 start here ========== */
@media screen and (max-width: 800px) {
    :root {
        --productWrapWidth: 180px;
        --productContentSize: 150px;
    }

    .section {
        padding: 60px 20px;
        padding-bottom: 100px;
    }

    .filter_title {
        margin-top: 20px;
        margin-left: 20px;
    }
}

/* ========== Media query 500 start here ========== */
@media screen and (max-width: 500px) {
    .filter_wrap {
        max-width: 100%;
    }
}

/* ========== Media query 420 start here ========== */
@media screen and (max-width: 420px) {
    :root {
        --productWrapWidth: 150px;
        --productContentSize: 130px;
    }

    .products_wrap {
        gap: 10px;
    }

    .product {
        margin-top: 30px;
    }

    .product_colors {
        gap: 10px;
    }
}