/* =========================================================
   GLOBAL RESET & BASE
========================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
}

/* =========================================================
   PAGE WRAPPER
========================================================= */

.checkout-page {
    padding-top: 9.5rem;   /* below navbar + status bar */
    padding-bottom: 4rem;
}

.checkout-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1.8rem;
}

/* =========================================================
   LOGIN / GUEST NOTICES
========================================================= */

.checkout-auth-notice,
.checkout-guest-notice {
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.checkout-auth-notice {
    background: #ecfeff;
    border: 1.5px solid #67e8f9;
    font-weight: 700;
}

.checkout-guest-notice {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    color: #7c2d12;
    line-height: 1.7;
}

/* =========================================================
   MAIN FLEX LAYOUT
========================================================= */

.checkout-flex {
    display: flex;
    gap: 3.2rem;
    align-items: flex-start;
}

.checkout-left {
    flex: 1;
}

/* 🔥 WIDER RIGHT PANEL */
.checkout-right {
    width: 460px;
}

/* =========================================================
   ORDER SUMMARY CARD
========================================================= */

.checkout-summary {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.8rem 2rem;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px dashed #e5e7eb;
}

.checkout-summary-row:last-child {
    border-bottom: none;
}

.checkout-summary-row.highlight {
    background: #f5f3ff;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    border: none;
}

.checkout-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.checkout-value {
    font-size: 0.95rem;
    font-weight: 800;
}

.checkout-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: #6d28d9;
}

/* ✅ FIX PHONE DISPLAY */
.phone-value {
    font-family: 'Inter', monospace;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* =========================================================
   PROMO CODE (PROFESSIONAL)
========================================================= */

.promo-box {
    margin-top: 1.6rem;
    background: #ffffff;
    border: 1.5px dashed #c4b5fd;
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
}

.promo-box label {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    display: block;
}

.promo-input-wrap {
    display: flex;
    gap: 0.6rem;
}

.promo-input-wrap input {
    flex: 1;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    font-size: 0.9rem;
}

.promo-input-wrap input:focus {
    border-color: #6d28d9;
    outline: none;
}

.promo-input-wrap button {
    padding: 0 1rem;
    border-radius: 10px;
    border: none;
    background: #6d28d9;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}

.promo-input-wrap button:hover {
    background: #5b21b6;
}

/* =========================================================
   GUEST EMAIL
========================================================= */

.checkout-guest-email {
    margin-top: 1.8rem;
}

.checkout-guest-email label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: block;
}

.checkout-guest-email span {
    color: #ef4444;
}

.checkout-guest-email input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1.5px solid #d1d5db;
    font-size: 0.95rem;
}

.checkout-guest-email input:focus {
    border-color: #6d28d9;
    outline: none;
}

/* =========================================================
   PAYMENT SECTION
========================================================= */

.payment-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 1.3rem;
    text-align: center;
}

/* PAYMENT METHODS */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease;
    background: #ffffff;
}

.payment-option input {
    display: none;
}

.payment-box strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.payment-box span {
    font-size: 0.8rem;
    color: #6b7280;
}

/* SELECTED STATE */
.payment-option:has(input:checked) {
    border-color: #6d28d9;
    background: #f5f3ff;
}

/* =========================================================
   PROCEED BUTTON
========================================================= */

.btn-proceed-pay {
    margin-top: 1.8rem;
    width: 100%;
    padding: 0.95rem;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-proceed-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(109, 40, 217, 0.35);
}

/* =========================================================
   WARNINGS & FOOT NOTE
========================================================= */

.wallet-warning {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 600;
}

.checkout-note {
    margin-top: 1.4rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    line-height: 1.6;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
    .checkout-flex {
        flex-direction: column;
    }

    .checkout-right {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .checkout-title {
        font-size: 1.55rem;
    }

    .checkout-summary {
        padding: 1.4rem;
    }

    .payment-title {
        font-size: 1.05rem;
    }
}


.checkout-coupon {
    margin-top: 1.8rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.2rem;
}

.checkout-coupon label {
    display: block;
    font-weight: 700;
    margin-bottom: .6rem;
    color: #111827;
}

.checkout-coupon label span {
    font-weight: 500;
    color: #6b7280;
}

.coupon-input-wrap {
    display: flex;
    gap: .6rem;
}

.coupon-input-wrap input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.coupon-input-wrap input:focus {
    outline: none;
    border-color: #6d28d9;
    box-shadow: 0 0 0 2px rgba(109,40,217,.15);
}

.coupon-input-wrap button {
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    border: none;
    background: #ede9fe;
    color: #6d28d9;
    font-weight: 700;
    cursor: pointer;
}

.coupon-hint {
    display: block;
    margin-top: .5rem;
    font-size: 12px;
    color: #6b7280;
}

/* ================= LOADER ================= */
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.page-loader.active { display: flex; }

.loader-card {
    background: #fff;
    padding: 2rem 2.4rem;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #e5e7eb;
    border-top-color: #6d28d9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}