.cart {
    margin-top: 50px;
}

.cart p {
    font-size: 17px;
    margin-bottom: 0;
}

.cart__header {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.cart__header-title {
    font-size: 17px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    font-weight: normal;
    margin-bottom: 0;
}

.cart__header-title span {
    font-size: 14px;
    margin-left: 5px;
    color: #333;
}

#clear {
    width: 27px;
    object-fit: contain;
    opacity: 0.8;
    cursor: pointer;
}

.cart__body {
    padding: 10px; 
    margin-bottom: 160px;
}

.cart__item {
    padding: 24px 0;
}

.cart__item:last-child {
    border-bottom: none;
}


.cart__item-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 94px;
}


/* Checkbox */
.cart__checkbox {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #888;
    cursor: pointer;
    transition: all 0.2s;
}

.cart__checkbox:hover {
    border-color: var(--primary-color);
}

.cart__checkbox.cart__checkbox--checked {
    border: none;
}

.cart__checkbox.cart__checkbox--checked .cart__check-icon {
    display: block;
}

.cart__checkbox--checked::after {
    content: '';
    z-index: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary-color);
    top: 0;
    left: 0;
    border: 1px solid transparent;
}

.cart__check-icon {
    position: absolute;
    z-index: 2;
    color: #fff;
    font-size: 20px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

/* Product */
.cart__link {
    width: 100%;
}

.cart__product {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 40px;
}

.cart__product-img {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 8px;
    display: block;
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.cart__product-name {
    margin-left: 10px;
    margin-bottom: 0;
    text-align: left;
}

/* Quantity */
.cart__quantity {
    display: flex;
    align-items: center;
}

.cart__quantity-decrease,
.cart__quantity-increase {
    color: #555;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
}

.cart__quantity-decrease {
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
}

.cart__quantity-increase {
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
}

.cart__quantity-value {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.cart__item-inner .cart__price {
    font-size: 17px;
}

/* Remove */
.cart__remove {
    width: 24px;
    opacity: 0.75;
}


.checkout {
    z-index: 3;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 450px;
    min-height: 125px;
    border: 1px solid #eee;
    background-color: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 0 12px rgb(0 0 0 / 15%);
}

.checkout__area {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.checkout__total {
    padding-right: 10px;
}

.checkout__total > p {
    color: #555;
}

.checkout__total-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.checkout__price {
    color: #555 ;
    margin-bottom: 3px;
    margin-right: 20px;
}

.checkout__price span{
    color: #333;
    display: inline-block;
    font-size: 15px;
    padding: 1px 5px;
    background-color: var(--secondary-color);
    border-radius: 3px;
    font-weight: 600;
}

.checkout__btn { 
    min-width: 150px;
    border-radius: 7px;
}

.checkout__btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.cart__info-mobile {
    display: none;
    margin-left: 14px;
}

.cart__empty {
    width: 350px;
    margin: 0 auto;
}


.confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: 4;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;

    visibility: hidden;
    opacity: 0;  
    pointer-events: auto;
    transition: all ease-in 0.2s;
    
}

.confirm.confirm--show {
    visibility: visible;
    opacity: 1;  
}


.confirm__forms {
    overflow: hidden;
    max-height: 100vh;
    overflow-y: overlay;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 12px -4px #666;
}

.confirm__forms form {
    padding: 20px;
}

.form__shipping-address {
    width: 380px;
}

.form__order {
    min-width: 620px;
}

.form__order,
.form__shipping-address ,
.form__bill {
    display: none;
}

.form__shipping-address.form__shipping-address--show {
    display: block;
}
.form__order.form__order--show {
    display: block;
}

.form__bill.form__bill--show {
    display: block;
}

.confirm__forms .form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 7px;
}

.confirm__forms .form__title {
    font-family: var(--heading-font);
    font-size: 30px;
    letter-spacing: 0.8px;
    margin-bottom: 0;
    margin-left: 0;
}

.confirm__forms .form__close {
    font-size: 30px;
}

.confirm__forms section {
    margin-bottom: 22px;
}

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

.form__heading > h5 {
    color: #444;
    font-size: 17px;
    margin-bottom: 0;
}

.form__heading > .form__edit-btn {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #333;
}

.form__address {
    border-radius: 7px;
    padding: 10px;
    background-color: var(--secondary-color);
}

.form__address p {
    color: #333;
    margin-bottom: 0;
}

.form__orders {
    padding-left: 0;
    padding-right: 10px;
    margin-bottom: 0;
    max-height: 150px;
    overflow-y: scroll;
}

.form__orders-item {
    height: 50px;
    margin-bottom: 18px;
    
}
.form__orders-link {
    height: 100%;
    display: flex;
    align-items: center;
}

.form__orders-link > img{
    width: 50px;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.form__orders-info {
    flex: 1;
    margin-left: 10px;
    overflow: hidden;
}

.form__orders-info p {
    margin-bottom: 0;
}

.form__orders-name {
    color: #444;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    word-wrap: break-word;
}

.form__orders-quantity {
    font-size: 13px;
    color: #555;
    border: 1px solid #ccc;
    padding: 0 3px;
    border-radius: 4px;
}

/*  */
.form__voucher {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 7px;
    padding: 5px 10px;
    transition: all ease 0.2s;
}

.form__voucher:focus-within {
    border-color: var(--primary-color);
}

.form__voucher-input {
    font-size: 15px;
    flex: 1;
    color: #333;
}

.form__voucher-btn {
    color: var(--primary-color);
    border-radius: 4px;
    padding: 4px 8px;

}

.form__voucher-btn  {
    
}

/*  */
.form__cost {
    padding-left: 0;
}

.form__cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 7px 0;
}

.form__cost-item:last-child {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.form__cost-label {
    color: #555;
    margin-bottom: 0;
}

.form__cost-price {
    font-size: 17px;
    margin-bottom: 0;
}

.form__bill {
    min-width: 370px;
    position: relative;
    padding: 20px;
}

.bill__header {
    margin-bottom: 20px;
    border-bottom: 2px dashed #ccc;
}

.bill__success-icon {
    font-size: 55px;
    color: var(--primary-color);
}

.bill__title {
    margin-top: 10px;
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .cart__product {
        padding-left: 0;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .cart {
        margin-top: 0;
    }

    .cart__header {
        margin-bottom: 20px;
    }

    .cart__item-inner {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .cart__product {
        padding-left: 0;

    }

    .cart__product .cart__product-name {
        display: none;
    }

    .cart__product-img {
        
        width: 94px;
        height: 100%;
    }

    .cart__info-mobile {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start; 
        overflow: hidden;
    }

    .cart__info-mobile .cart__product-name {
        max-width: 100%;
        font-size: 18px;
        font-weight: 600;
        display: block;
        margin-left: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .cart__info-mobile .cart__price {
        font-size: 17px;
        margin-top: 3px;
    }

    .cart__actions {
        margin-top: 8px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .cart__quantity-decrease,
    .cart__quantity-increase,
    .cart__quantity-value {
        width: 30px;
        height: 30px;
    }

    .cart__remove {
        width: 22px;
    }

    .checkout {
        width: 100vw;
        min-width: unset;
        height: auto;
        bottom: 0;
        padding-bottom: 22px;

        border-radius: unset;
        border: none;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .cart__empty {
        width: 220px;
    }

    .confirm__forms {
        border-radius: unset;
    }

    .confirm {
        background-color: rgba(0, 0, 0 , 0.3);
        align-items: flex-end;
    }

    .form__order,
    .form__shipping-address {
        width: 100vw;
        height: 89vh;
        min-width: unset;
    }

    .form__bill {
        width: 100vw;
    }
}