.section.cart {
    padding: 60px 0;
}

.cart .container {
    display: flex;
    align-items: start;
    gap: 40px;
}

.cart-info {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid var(--grey-color);
    border-radius: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.cart-item:not(:last-of-type) {
    border-bottom: 1px solid var(--grey-color);
}

.cart-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cart-info a:not(:last-of-type) {
    border-bottom: 1px solid var(--grey-color);
}

.cart-item img {
    width: 150px;
    object-fit: contain;
}

.item-info {
    height: 100%;
    width: 160px;
}

.item-info h3 {
    font-size: 18px;
    font-weight: normal;
    color: #003049;
    margin-bottom: 5px;
    width: 180px;
}

.item-info p {
    color: var(--black-color);
    font-size: 18px;
    font-weight: bold;
}

.qty-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--grey-color);
    border-radius: 5px;
    overflow: hidden;
}

.qty-box button {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--green-color);
    font-size: 18px;
    cursor: pointer;
}

.qty-box input {
    width: 50px;
    text-align: center;
    border: none;
}

.qty-box input[type="number"]::-webkit-outer-spin-button,
.qty-box input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.delete {
    background: #ff3b3b;
    border: none;
    color: var(--white-color);
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
}

.checkout {
    flex: 1;
    padding: 25px;
    border-radius: 10px;
    height: fit-content;
    border: 1px solid var(--grey-color);
}

.checkout h3 {
    margin-bottom: 10px;
}

.payment {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

.total-box {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 10px;
}

form input,
form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
}

textarea {
    height: 80px;
    resize: none;
}

.confirm-btn {
    margin-top: 10px;
    background: var(--green-color);
    border: none;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .cart .container {
        flex-direction: column;
    }

    .cart .container>div {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .cart-item {
        flex-direction: column;
        align-items: start;
    }

    .cart-item-content {
        flex-direction: column;
        align-items: start;
    }

    .cart-item img {
        display: block;
        margin: 0 auto;
        width: 100%;
    }

    .checkout {
        padding: 10px
    }
}

.order-confirmation {
    position: fixed;
    /* cover full viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    /* dark overlay */
    z-index: 9999;
}

.confirmation-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInScale 0.3s ease;
}

.success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.confirmation-card h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.confirmation-card p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-size: 14px;
    transition: 0.3s ease;
}

.back-home:hover {
    background: #333;
}


/* Smooth popup animation */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

button:disabled {
    cursor: not-allowed;
}