/* ================= CHECKOUT MODAL ================= */
.checkout-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);

    justify-content: center;
    align-items: flex-start;

    overflow-y: auto;
    padding: 35px 0px;

    z-index: 3000;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    padding: 30px 25px;
    border-radius: 25px;
    width: 100%;
    max-width: 520px;
    max-height: none;

    display: flex;
    flex-direction: column;
    color: #fff;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-top: 5px solid #C6A85C;
    border-bottom: 5px solid #C6A85C;
}

@keyframes popUp {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Heading */
.modal-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #C6A85C;
    text-align: center;
}

/* Input Fields */
.modal-content input,
.modal-content textarea,
.modal-content select {
    margin-bottom: 0;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #C6A85C;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 15px;
    width: 100%;
    outline: none;
    transition: 0.3s;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    border-color: #bfa258;
    box-shadow: 0 0 5px 2px rgba(198, 168, 92, 0.3);
}

/* Place Order Button */
#place-order {
    background: #C6A85C;
    color: #fff;
    font-weight: 600;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}


/* ================= CHECKOUT TOTALS ================= */
.checkout-totals {
    margin: 20px 0 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(198, 168, 92, 0.4);
    /* subtle golden divider */
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* space between rows */
    font-size: 16px;
}

.checkout-totals div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s;
}

.checkout-totals div span {
    font-weight: 600;
    color: #C6A85C;
    /* golden accent */
}

.checkout-totals .total-row {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.checkout-totals .total-row span {
    color: #C6A85C;
    font-size: 18px;
}

/* Hover subtle effect for total rows */
.checkout-totals div:hover {
    transform: translateX(2px);
    opacity: 0.95;
}

/* Mobile responsiveness */
@media(max-width:480px) {
    .checkout-totals {
        font-size: 14px;
        gap: 8px;
    }

    .checkout-totals .total-row {
        font-size: 16px;
    }

    .checkout-totals .total-row span {
        font-size: 18px;
    }
}

#place-order:hover {
    background: #bfa258;
    box-shadow: 0 8px 20px rgba(198, 168, 92, 0.4);
    transform: translateY(-2px);
}

/* Cancel Button */
#close-modal {
    background: none;
    color: #fff;
    border: 2px solid #C6A85C;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

#close-modal:hover {
    background: #C6A85C;
    color: #fff;
    border-color: #bfa258;
    transform: translateY(-2px);
}

/* Responsive */
@media(max-width:480px) {
    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h3 {
        font-size: 20px;
    }
}


/* ================= CHECKOUT STRUCTURE ================= */

.checkout-section {
    margin-bottom: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(198, 168, 92, 0.3);
}

.section-title {
    font-size: 14px;
    margin-bottom: 8px;
    color: #C6A85C;
    font-weight: 600;
    border-bottom: 1px solid rgba(198, 168, 92, 0.4);
    padding-bottom: 4px;
}

/* Form layout */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
}

.form-group label {
    margin-bottom: 2px;
    font-size: 11px;
    letter-spacing: 0.3px;
    color: #C6A85C;
}

.form-row {
    display: flex;
    gap: 8px;
}

.form-group.half {
    flex: 1;
}

/* Order summary */
.summary-section {
    background: rgba(198, 168, 92, 0.08);
    border: 1px solid rgba(198, 168, 92, 0.5);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.total-row {
    font-weight: 700;
    font-size: 16px;
    border-top: 1px solid rgba(198, 168, 92, 0.4);
    padding-top: 10px;
    color: #C6A85C;
}

@media (max-width: 768px) {
    /* @media (max-width: 480px) { */

        /* ================= CHECKOUT ================= */
        /* ===== MOBILE CHECKOUT ===== */
        /* ===== MOBILE CHECKOUT POPUP ===== */
        .modal-content {
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            padding: 5px 5px;
            border-radius: 20px;
        }

        .modal-content h3 {
            font-size: 20px;
            margin-bottom: 18px;
        }

        .modal-content input,
        .modal-content textarea,
        .modal-content select {
            font-size: 14px;
            padding: 10px 12px;
            margin-bottom: 0;
        }

        .checkout-totals {
            font-size: 12px;
            /* smaller base font */
            gap: 6px;
            /* less spacing between rows */
        }

        .checkout-totals div {
            font-size: 12px;
            gap: 5px;
        }

        .checkout-totals div span {
            font-size: 12px;
        }

        .checkout-totals .total-row {
            font-size: 14px;
        }

        .checkout-totals .total-row span {
            font-size: 14px;
        }

        .modal-content input,
        .modal-content select {
            font-size: 13px;
            padding: 10px 12px;
        }

        /* Textareas (Address, Note) should be taller for usability */
        .modal-content textarea {
            font-size: 13px;
            padding: 10px 12px;
            min-height: 35px;
            resize: vertical;
        }


        #place-order,
        #close-modal {
            width: 80%;
            /* narrower than full width */
            font-size: 12px;
            /* smaller font */
            padding: 8px 0;
            /* smaller padding */
            margin: 8px auto 0;
            /* center horizontally with top margin */
            display: block;
            /* ensure centered */
            border-radius: 22px;
            /* keep rounded style */
            text-align: center;
            /* center text */
        }
    /* } */
}