.product {
    .container {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 5rem;
    }
}

.product__location {
    width: 100%;

    a {
        text-decoration: none;
    }

    a:hover {
        color: #db2424;
        text-decoration: underline;
    }
}

.product__layout {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: start;
    align-self: start;
    gap: 1em;
}

.product__left {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.product__filter__layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.product__filter__drop {
    display: none;
    width: 100%;
}

.search {
    display: flex;
    align-items: center;
    text-align: center;
}

.product__search {
    width: 100%;
    position: relative;
}

.search__input {
    font-family: inherit;
    font-size: var(--size-base);
    border: 1px solid #767676;
    color: #767676;
    padding: 1.4em 1.2em;
    border-radius: 0.625em;
    margin-right: -1.5rem;
    height: 30px;
    width: 15rem;
}

.search__input::-webkit-input-placeholder {
    font-weight: 400;
    color: #767676;
    font-size: var(--size-base);
}

.search__button {
    border: none;
    background-color: #fff;
    margin-top: 0.1em;
}

.search__button:hover {
    cursor: pointer;
}

.search input:focus {
    outline: none;
}

.product__search__dropdown {
    position: absolute;
    width: 100%;
    left: 5px;
    border: 1px solid var(--clr-slate);
    border-radius: 5px;
    overflow: hidden;
}

.product__search__dropdown__item {
    background-color: #fff;
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--clr-slate);
    display: flex;
    flex-direction: column;
}

.product__wrapper {
    border-radius: 13px;
    background-color: #fff;
    padding: 1.6em;
}

.product__right {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    gap: 1em;
}

.product__sort {
    width: 100%;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 1em;

    p {
        font-size: var(--size-base);
    }

    button {
        padding: 0.8em 1.6em;
        background: var(--clr-light);
        color: var(--clr-dark);
        border: none;
        border-radius: 0.625em;
        font-size: var(--size-base);
        cursor: pointer;
        position: relative;
        z-index: 1;
        overflow: hidden;
    }

    button:hover {
        background-color: #edf2f7;
        transform: scale(1.05);
    }

    select {
        background-color: var(--clr-light);
        border: none;
        border-radius: 0.625em;
        padding: 0.8em 1.2em;
        margin: 0;
        font-size: var(--size-base);
        cursor: pointer;
        line-height: inherit;
        z-index: 1;
        outline: none;

        &:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
        }
    }
}

.product__filter {
    width: 100%;
    h3 {
        font-size: var(--size-base);
        letter-spacing: -0.05;
        margin-bottom: 0.4rem;
    }

    h3:first-child {
        margin-top: 0;
    }
}

.product__filter__item {
    margin-bottom: 1rem;
}

.product__list {
    width: 100%;
    display: flex;
    justify-content: start;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
}

.product__item {
    position: relative;
    flex-basis: calc((100% - (1em * (4 - 1))) / 4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    text-decoration: none;
    color: var(--clr-dark);
    overflow: hidden;
    margin: 0;
    transition: all 0.3s;

    h3 {
        font-size: var(--size-lg);
        letter-spacing: -0.05;
    }

    button {
        position: absolute;
        bottom: -65px;
        right: 10px;
        transition: all 0.3s ease;
        z-index: 10;
    }
}

.product__item:hover {
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.product__item:hover > h3 {
    color: var(--clr-red);
}

.product__item:hover button {
    bottom: 14px;
}

.product__item__price {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}

.product__img {
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #f2f2f2;

    img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        mix-blend-mode: darken;
    }
}

.product__no {
    width: 100%;
    text-align: center;
    font-size: var(--size-2xl);
}

/* 2xl */
/* @media (max-width: 1536px) {} */

/* xl */
@media (max-width: 1280px) {
    .search__input {
        font-size: var(--size-sm);
        height: 25px;
        width: 12rem;
    }

    .search__input::-webkit-input-placeholder {
        font-size: var(--size-sm);
    }

    .search__button {
        width: var(--size-sm);
        height: var(--size-sm);
    }

    .product__filter {
        h3 {
            font-size: var(--size-sm);
        }
    }

    .product__item {
        flex-basis: calc((100% - (1em * (3 - 1))) / 3);

        button {
            font-size: var(--size-xs);
        }
    }

    .product__sort {
        p {
            font-size: var(--size-sm);
        }

        button {
            font-size: var(--size-sm);
        }

        select {
            font-size: var(--size-sm);
        }
    }
}

/* lg */
@media (max-width: 1024px) {
    .product__layout {
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .product__filter__drop {
        display: block;
        text-align: center;
        cursor: pointer;

        p {
            text-transform: uppercase;
            font-size: var(--size-3xl);
            font-weight: 700;
            font-family: var(--font-logo);
            letter-spacing: 0.1em;
        }
    }

    .product__filter {
        width: 100%;
        display: none;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: start;
        z-index: 1;

        &.active {
            display: flex;
        }

        h3 {
            font-size: var(--size-base);
        }
    }

    .product__filter__item {
        width: calc((100% - (1em * (3 - 1))) / 3);
    }

    .product__left {
        flex-direction: column-reverse;
        gap: 1em;
        width: 100%;
    }

    .search {
        display: flex;
        justify-content: center;
    }

    .search__input {
        font-size: var(--size-base);
        height: 30px;
        width: 15rem;
    }

    .search__input::-webkit-input-placeholder {
        font-size: var(--size-base);
    }

    .search__button {
        width: var(--size-base);
        height: var(--size-base);
    }

    .product__sort {
        p {
            font-size: var(--size-base);
        }

        button {
            font-size: var(--size-base);
        }

        select {
            font-size: var(--size-base);
        }
    }

    .product__item {
        flex-basis: calc((100% - (1em * (3 - 1))) / 3);

        h3 {
            font-size: var(--size-lg);
        }

        a {
            font-size: var(--size-sm);
        }
    }
}

/* md */
@media (max-width: 768px) {
    .product__item {
        flex-basis: calc((100% - (1em * (2 - 1))) / 2);
        p {
            align-self: start;
        }
        button {
            position: relative;
            bottom: 0;
            right: 0;
            width: 100%;
        }
    }

    .product__item:hover {
        box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    }

    .product__item:hover > h3 {
        color: var(--clr-red);
    }

    .product__item:hover button {
        bottom: 0;
    }
}

/* sm */
@media (max-width: 640px) {
    .product__filter__drop {
        p {
            font-size: var(--size-xl);
        }
    }

    .product__filter {
        h3 {
            font-size: var(--size-sm);
        }
    }

    .product__filter__item {
        width: calc((100% - (1em * (2 - 1))) / 2);
    }

    .search__input {
        font-size: var(--size-sm);
        height: 25px;
        width: 15rem;
    }

    .search__input::-webkit-input-placeholder {
        font-size: var(--size-sm);
    }

    .search__button {
        width: var(--size-sm);
        height: var(--size-sm);
    }

    .product__sort {
        p {
            font-size: var(--size-xs);
        }

        button {
            font-size: var(--size-xs);
        }

        select {
            font-size: var(--size-xs);
        }
    }

    .product__item {
        flex-basis: calc((100% - (1em * (1 - 1))) / 1);

        h3 {
            font-size: var(--size-base);
        }

        a {
            font-size: var(--size-xs);
        }
    }
}

/* xs */
/* @media (max-width: 475px) {} */
