:root {
--Red: hsl(14, 86%, 42%);
--Green: hsl(159, 69%, 38%);

--Rose-50: hsl(20, 50%, 98%);
--Rose-100: hsl(13, 31%, 94%);
--Rose-300: hsl(14, 25%, 72%);
--Rose-400: hsl(7, 20%, 60%);
--Rose-500: hsl(12, 20%, 44%);
--Rose-900: hsl(14, 65%, 9%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

img, svg {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
}

body {
    font-family: "Red Hat Text", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    background-color: var(--Rose-50);
}

.container {
    width: 90%;
    max-width: 1440px;
    padding: 2rem 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 300px;
    gap: 1rem;
}

/* Products container */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem 0.5rem;
    padding: 1rem 0;
}
.product {
    width: 200px;
}
.image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.image-wrapper.border {
    border: 2px solid var(--Red);
    border-radius: 0.5rem;
}
.image-wrapper img {
    width: 100%;
    border-radius: 0.5rem;
}
/* Add to cart btn */
.addToCartBtn{
    position: absolute;
    bottom: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0rem 1rem;
    height: 35px;
    background-color: #fff;
    color: var(--Rose-900);
    font-weight: 600;
    border: 1.5px solid var(--Rose-500);
    border-radius: 100vmax;
}
.addToCartBtn:hover {
    color: var(--Red);
    border: 1.5px solid var(--Red);
}
/* Product qty buttons */
.product-qty-btns{
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: absolute;
    bottom: -20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0rem 1rem;
    height: 35px;
    background-color: var(--Red);
    color: var(--Rose-900);
    font-weight: 600;
    border: none;
    border-radius: 100vmax;
}
.product-qty {
    color: #fff;
    font-size: 0.7rem;
    margin: 0 2rem;
}


.increment-btn, .decrement-btn {
    border: 1.5px solid #fff;
    border-radius: 100%;
    padding: 0.2rem;
    cursor: pointer;
}

.decrement-btn {
    display: block;
    padding: 2rem;
    width: 10px;
    height: 10px;
}

.increment-btn, .decrement-btn {
    border: 1.5px solid #fff;
    border-radius: 100%;
    padding: 0.2rem;
    cursor: pointer;
}

.details-wrapper {
    margin-top: 1.9rem;
    font-size: 0.9rem;
}
.name {
    color: var(--Rose-500);
}
.desc {
    color: var(--Rose-900);
    font-weight: 600;
    margin: 0.3rem 0;
}
.price {
    color: var(--Red);
    font-weight:600;
}


/* Cart Container */
.cart-container {
    background-color: #fff;
    height: fit-content;
    padding: 1.5rem 1rem;
    border-radius: 0.5rem;
    position: sticky;
    top: 30px;
}
.heading-2 {
    color: var(--Red);
    font-weight: 700;
}
/* Empty cart */
.empty-cart {
    display: block;
    padding: 2rem 0 1rem 0;
}
.empty-cart img {
    margin: 0 auto;
}
.empty-cart p {
    text-align: center;
    color: var(--Rose-500);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
}
/* Filled cart */
.filled-cart {
    margin-top: 1rem;
    display: none;
}
/* Cart items wrapper and individual item */
.cart-items-wrapper {
    display: flex;
    flex-direction: column;
    max-height: 380px;
    overflow-y: scroll;
}
.cart-item {
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--Rose-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cart-item-name {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: var(--Rose-900);
    font-weight: 600;
}
.cart-item-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}
.cart-item-qty {
    color: var(--Red);
    font-weight: 600;
}
.cart-item-single-price {
    color: var(--Rose-400);
    font-weight: 600;
}
.cart-item-full-price {
    color: var(--Rose-500);
    font-weight: 600;
}

/* Delete btn */
.delete-btn {
    border: 1.5px solid var(--Rose-300);
    border-radius: 100%;
    padding: 0.1rem;
}
.delete-btn:hover {
    border: 1.5px solid var(--Rose-500);
    border-radius: 100%;
    padding: 0.1rem;
}


/* Cart totals */
.cart-totals-wrapper {
    margin-top :1rem;
}
.grand-total-div,
.confirmed-order-totals {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}
/* grand total */
.grand-total,
.confirmed-grand-total {
    color: var(--Rose-900);
    font-size: 1rem;
}
.carbon-neutral-div {
    margin-top: 1rem;
    background-color: var(--Rose-100);
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    font-size: 0.8rem;
    padding: 1rem 0;
}
.carbon-neutral-div strong {
    margin: 0 5px;
    color: var(--Rose-900);
    font-weight: 700;
}
.carbon-neutral-div img {
    width: 15px;
    margin-right: 5px;
}
/* Confirm btn */
.confirm-order-btn,
.new-order-btn {
    background-color: var(--Red);
    color: #fff;
    border: 2px solid transparent;
    margin-top: 1rem;
    width: 100%;
    border-radius: 100vmax;
    padding: 0.5rem 1rem;
}
.confirm-order-btn:hover,
.new-order-btn:hover {
    background-color: hsl(14, 86%, 20%);
}


/* CONFIRMED SECTION. */
.confirmed-section {
    display: none;
}
.confirmed-section.show {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: 10%;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 400px;
    padding: 2rem 2rem;
    box-shadow: 50px 50px 50px 5000px rgba(0, 0, 0, 0.5);
}
.confirmed-items-container {
    background-color: var(--Rose-50);
    border-radius: 0.5rem;
    margin: 2rem 0 1rem 0;
    padding: 1rem 1rem;
}
.confirmed-icon {
    width: 35px;
    margin-bottom: 1rem;
}
.heading-3 {
    margin-bottom: 0.3rem;
}
.confirmed-items {
    height: 200px;
    overflow-y: scroll;
    padding-right: 20px;
}
.confirmed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--Rose-300);
    padding: 0.8rem 0;
}
.confirmed-item-details {
    flex: 1;
    margin-left: 0.6rem;
}
.confirmed-item img {
    width: 50px;
    border-radius: 0.2rem;
}
.confirmed-item-qty {
    color: var(--Red);
    font-weight: 600;
    margin-right: 0.6rem;
}
.confirmed-item-name {
    color: var(--Rose-900);
    font-weight: 700;
    font-size: 0.8rem;
}
.confirmed-item-price {
    color: var(--Rose-500);
    font-weight: 600;
    font-size: 0.9rem;
}
.confirmed-item-full-price {
    color: var(--Rose-900);
    font-weight: 600;
}

/* Confirmed order totals */
.confirmed-order-totals {
    margin-top: 1rem;
    color: var(--Rose-900);
}
.confirmed-grand-total {
    font-weight: 700;
    font-size: 1.1rem;
}



/* Footer */
.attribution {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}
.attribution a {
    color: hsl(228, 45%, 44%);
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}