@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

* {
    --cardWidth: 250px;
    --cardHeight: 400px;
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}

body {
    background-color: orange;
    position: relative;
}

main {
    min-height: 950px;
    background-color: orange;
    padding-top: 10px;
    padding-bottom: 10px;
    position: relative;
}

.top {
    background-image: url("../img/shop_banner.png");
    background-position: top;
    background-size: cover;
    background-attachment: fixed;
    height: 300px;
    overflow: hidden;
    margin-top: -10px;
    box-shadow: 0px 0px 3px black;
}

.filter {
    position: sticky;
    top: 0px;
    display: grid;
    grid-template-columns: 90px auto;
}

.filterOptions {
    position: sticky;
    top: 90px;
    width: 300px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 600px;
    overflow-y: none;
    margin: 15px 8px;
}

.filterTitle,
.searchBar,
.vegi,
.vegan,
.glutenFree,
.healthy,
.seafood,
.comfy,
.appetizer,
.mediterranean,
.asian,
.italian,
.french,
.mexican,
.american,
.dessert,
.drinks {
    margin: 2px 20px;
    user-select: none;
}

.search {
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 100%;
    margin: 5px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}
.filterClear {
    width: 150px;
    background-color: orange;
    border: 1.5px rgb(0, 0, 0) solid;
    text-align: center;
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20%;
    margin-bottom: 5px;
    user-select: none;
}

.filterClear:hover {
    cursor: pointer;
    transform: scale(1.1);
    box-shadow: 0px 0px 2px black;
}

label:hover {
    cursor: pointer;
}

.filterTitle {
    color: orange;
    border-bottom: 4px solid rgb(0, 0, 0);
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 15px 0px 15px 250px;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.card {
    width: var(--cardWidth);
    height: var(--cardHeight);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.5s linear;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

.img {
    display: flex;
    width: calc(var(--cardWidth) / 2);
    height: calc(var(--cardWidth) / 2);
    border: 1.5px black solid;
    border-radius: calc(var(--cardWidth));
    margin: 10px calc(var(--cardWidth) / 4);
    transition: all 0.5s linear;
}

.img:hover {
    width: calc(var(--cardWidth) - 20px);
    height: calc(var(--cardWidth) - 20px);
    border-radius: 0px;
    margin: 10px 10px;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 190px;
    margin: 20px 10px;
    border-bottom: 1px solid grey;
    gap: 10px;
}

.price {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-right: 10px;
}

.addItem {
    position: relative;
    top: -15px;
    left: 50px;
    width: 148px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: none;
    border-radius: 15px;
    background-color: orange;
}

.addItem,
.button__icon,
.button__text {
    transition: all 0.3s;
}

.addItem .button__text {
    transform: translateX(30px);
    color: #fff;
    font-weight: 600;
    position: relative;
    left: 25px;
}

.addItem .button__icon {
    position: absolute;
    transform: translateX(109px);
    height: 100%;
    width: 39px;
    background-color: #0066cc;
    display: flex;
    align-items: center;
    border-radius: 15px;
    justify-content: center;
}

.addItem .svg {
    width: 30px;
    stroke: #fff;
}

.addItem:hover {
    background: orange;
}

.addItem:hover .button__text {
    color: transparent;
}

.addItem:hover .button__icon {
    width: 148px;
    transform: translateX(0);
}

.addItem:active .button__icon {
    background-color: #ffffff;
}

.addItem:active {
    border: 1px solid #2e8644;
}

.addItem.added {
    animation: addToCartAnimation 0.5s ease;
    background-color: orange;
}

@keyframes addToCartAnimation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    position: relative;
    z-index: 1000;
}

.cart-button {
    color: white;
    border-radius: 5px;
    cursor: pointer;
    width: 30px;
    text-align: center;
}

.cart-button::after {
    content: attr(data-quantity);
    display: block;
    position: relative;
    top: -65px;
    right: -10px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px;
    font-size: 15px;
}

.shopping_cart {
    margin-right: 20px;
    margin-top: 30px;
}
