* {
    box-sizing: border-box;
    margin: 0;
    font-family: 'Red Hat Text', sans-serif;
}

:root {
    --height-btn: 40px;

    --width-btn: 150px
}

body {
    background-color: hsl(20, 50%, 98%);
    min-height: 1300px;
}

.container {
    display: flex;
    gap: 20px;
    margin: 50px 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.products-list .products-type {
    margin-bottom: 30px;
    font-size: 24px;
}

.container-grid {
    display: grid;
    grid-template-columns: repeat(3, 260px);
    gap: 24px;
}

.products-item {
    overflow: hidden;
}

.products-item.selected .products-pro .products-image {
    border: 2px solid hsl(14, 86%, 42%);
}

.products-pro {
    position: relative;
}

.products-pro .products-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0;

}

.products-pro .products__actions {
    height: var(--height-btn);
    width: var(--width-btn);
    position: absolute;
    bottom: calc(var(--height-btn) / -2);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    overflow: hidden;

}

.products-item.selected .products__actions {
    background-color: hsl(14, 86%, 42%);
    border: none;
    color: white;
    gap: 40px;
    /* font-size: 14px; */
}


.products__actions .products__add-to-cart-btn {
    border: 1px solid hsl(14, 65%, 9%);
    border-radius: 20px;
}

.products-item.selected .products__actions:hover {
    color: white;
}


.products-pro .products__actions:hover .products__add-to-cart-btn {
    border: 1px solid hsl(14, 86%, 42%);

    color: hsl(14, 86%, 42%);
}

.products__add-to-cart-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.products__add-to-cart-btn {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0 22px;

    background-color: white;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: hsl(14, 65%, 9%);
}

.products-quantity {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
}

.qty-products {
    background-color: hsl(14, 86%, 42%);
    border: none;
    border-radius: 100%;
    border: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
}

.products-quantity svg {
    width: 9px;
    height: 9px;
}

.products__qty-decrement:hover,
.products__qty-increment:hover {
    background-color: white;
}

.products__qty-decrement:hover svg path,
.products__qty-increment:hover svg path {
    fill: hsl(14, 86%, 42%);
}

.products-info {
    margin-top: var(--height-btn);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.products-info .products-category {
    font-size: 13px;
    font-weight: 600;
    color: hsl(14, 25%, 72%);
}

.products-info .products-name {
    font-size: 14px;
    font-weight: 700;
    color: hsl(14, 65%, 9%);
}

.products-info .products-price {
    color: hsl(14, 86%, 42%);
    font-weight: 600;
    font-size: 14px;
}

.cart {
    width: 320px;
    background-color: white;
    border-radius: 16px;
    position: static;
    height: fit-content;

}

.cart .cart-heading {
    color: hsl(14, 86%, 42%);
    font-size: 24px;
    margin-bottom: 20px;
}

.cart .wrapper {
    margin: 22px;
}

.cart__empty {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: hsl(12, 20%, 44%);
    font-weight: 600;
    font-size: 14px;
}

.cart__empty img {
    width: 60%;
    object-fit: cover;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Cart Items */

.cart__items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.cart__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cart__item .cart__item-name {
    font-size: 14px;
    font-weight: 600;
    color: hsl(14, 65%, 9%);
}

.cart__item .cart__item-info {
    font-size: 13px;
    margin-top: 18px;
    display: flex;
}

.cart__item-info .cart__item-qty {
    font-weight: 700;
    color: hsl(14, 86%, 42%);
    margin-right: 12px;

}

.cart__item .cart__item-prices {
    color: hsl(7, 20%, 60%);
}

.cart__item-prices .cart__item-price-unit {
    font-weight: 500;
}

.cart__item-prices .cart__item-price-total {
    font-weight: 700;
}


.cart__item .cart__remove-btn {
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #CAAFA7;
    border-radius: 50%;
    padding: 3px;
}

.cart__remove-btn:hover {
    border: 1px solid #000;

}

.cart__remove-btn:hover svg path {
    fill: #000;
}

.cart__item .cart__remove-btn svg path {
    width: 8px;
    height: 8px;
    padding: 0;
}

.cart__selected {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
}

.cart__total {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.cart__total-label {
    font-size: 14px;
}

.cart__total-price {
    font-size: 18px;
    font-weight: 700;
}

.cart__carbon {
    background-color: hsl(13, 31%, 94%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
}

.cart__carbon-highlight {
    font-weight: 700;
}

.cart__selected .cart__btn {
    border: none;
    background-color: hsl(14, 86%, 42%);
    padding: 10px;
    color: white;
    font-weight: 600;
    border-radius: 18px;
    font-size: 13px;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.6 ease-in-out;
}

.cart__selected .cart__btn:hover {
    background-color: hsl(14, 90%, 27%);
}

/* order confirmed dialog */
#order-confirmed-dialog::backdrop {
    background-color: #000;
    opacity: 0.5;

}

#order-confirmed-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 10px;
}

#order-confirmed-dialog .dialog__content {
    margin: 10px;
}

#order-confirmed-dialog .dialog__image {
    width: 34px;
    height: 34px;
}

#order-confirmed-dialog .dialog__title {
    font-size: 34px;
    margin: 20px 0 10px 0;
}

#order-confirmed-dialog .dialog__message {
    color: hsl(12, 20%, 44%);
    font-size: 15px;
    margin-bottom: 20px;
}

.dialog__cart-wrap {
    background-color: hsl(13, 31%, 94%);
    border-radius: 10px;
    display: flex;
}

.dialog__cart-content {
    margin: 16px 16px;
}

#order-confirmed-dialog .cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

#order-confirmed-dialog .cart-item {
    display: flex;
    width: 370px;
    justify-content: space-between;
}

#order-confirmed-dialog .cart-item__image {
    width: 50px;
    border-radius: 8px;
}

#order-confirmed-dialog .cart-item__wrap {
    display: flex;
    gap: 14px;
}

#order-confirmed-dialog .cart-item__quantity {
    display: flex;
    gap: 28px;
}

#order-confirmed-dialog .cart-item__name {
    font-weight: 700;
    font-size: 15px;
}

#order-confirmed-dialog .cart__divider {
    margin: 14px 0;
}


#order-confirmed-dialog .cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#order-confirmed-dialog .cart-item__qty {
    color: hsl(14, 86%, 42%);
    font-size: 14px;
    font-weight: 700;
}

#order-confirmed-dialog .cart-item__price-unit {
    color: hsl(12, 20%, 44%);
    font-size: 14px;
}

#order-confirmed-dialog .cart-item__price-total {
    font-weight: 700;
    font-size: 14px;
}

#order-confirmed-dialog .dialog__total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#order-confirmed-dialog .dialog__total-label {
    font-size: 14px;
    font-weight: 600;
    color: hsl(14, 65%, 9%);
}

#order-confirmed-dialog .dialog__total-price {
    font-weight: 800;
    font-size: 18px;
    margin-block: 0;
}

#order-confirmed-dialog button {
    width: 100%;
    border: none;
    border-radius: 20px;
    padding: 13px 0;
    margin-top: 20px;
    color: white;
    background-color: hsl(14, 86%, 42%);
}

#order-confirmed-dialog button:focus-visible {
    outline: none;
    --box-shadow-color: hsl(14, 65%, 49%);
    box-shadow: 3px 3px 5px var(--box-shadow-color),
        -3px -3px 5px var(--box-shadow-color),
        -3px 3px 5px var(--box-shadow-color),
        3px -3px 5px var(--box-shadow-color);
}