/* =========================================================
   GLOBAL RESET & BASE
========================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sea-blue: #1697d2;
    --sea-blue-dark: #0f86c4;
    --sea-blue-deep: #0b74ae;
    --sea-blue-soft: #e8f6fd;
    --sea-blue-border: #8fd0ee;
    --white: #ffffff;
    --bg: #f4f9fc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #dbe7ef;
    --danger: #dc2626;
    --success-bg: #eef9ff;
    --success-border: #9fdcf5;
    --warning-bg: #fff;
    --warning-border: #d7e9f4;
    --shadow-sm: 0 10px 24px rgba(15, 134, 196, 0.08);
    --shadow-md: 0 16px 40px rgba(15, 134, 196, 0.12);
    --shadow-lg: 0 24px 60px rgba(11, 116, 174, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* =========================================================
   PAGE WRAPPER
========================================================= */
.checkout-page {
    padding-top: 9.5rem;
    padding-bottom: 4rem;
}

.checkout-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1.8rem;
    color: var(--sea-blue-deep);
    letter-spacing: -0.02em;
}

/* =========================================================
   LOGIN / GUEST NOTICES
========================================================= */
.checkout-auth-notice,
.checkout-guest-notice {
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.checkout-auth-notice {
    background: linear-gradient(180deg, #f4fbff 0%, #e9f7fe 100%);
    border: 1.5px solid var(--sea-blue-border);
    color: var(--sea-blue-deep);
    font-weight: 700;
}

.checkout-guest-notice {
    background: var(--white);
    border: 1.5px solid var(--border);
    color: #475569;
    line-height: 1.7;
}

/* =========================================================
   MAIN FLEX LAYOUT
========================================================= */
.checkout-flex {
    display: flex;
    gap: 3.2rem;
    align-items: flex-start;
}

.checkout-left {
    flex: 1;
}

.checkout-right {
    width: 460px;
}

/* =========================================================
   ORDER SUMMARY CARD
========================================================= */
.checkout-summary {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow-md);
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px dashed #d8e6ef;
}

.checkout-summary-row:last-child {
    border-bottom: none;
}

.checkout-summary-row.highlight {
    background: linear-gradient(180deg, #f1fbff 0%, #e7f6fd 100%);
    padding: 1rem 1.2rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    border: 1px solid #c7e8f7;
}

.checkout-label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 600;
}

.checkout-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    text-align: right;
}

.checkout-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--sea-blue);
}

/* =========================================================
   PHONE VALUE
========================================================= */
.phone-value {
    font-family: 'Inter', monospace;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* =========================================================
   PROMO CODE
========================================================= */
.promo-box {
    margin-top: 1.6rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
    border: 1.5px dashed var(--sea-blue-border);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
}

.promo-box label {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    display: block;
    color: var(--sea-blue-deep);
}

.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 #cfdee8;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.promo-input-wrap input:focus {
    border-color: var(--sea-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(22, 151, 210, 0.12);
}

.promo-input-wrap button {
    padding: 0 1rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(180deg, var(--sea-blue) 0%, var(--sea-blue-dark) 100%);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 18px rgba(22, 151, 210, 0.2);
}

.promo-input-wrap button:hover {
    background: linear-gradient(180deg, var(--sea-blue-dark) 0%, var(--sea-blue-deep) 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(22, 151, 210, 0.28);
}

/* =========================================================
   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;
    color: var(--sea-blue-deep);
}

.checkout-guest-email span {
    color: var(--danger);
}

.checkout-guest-email input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1.5px solid #cfdee8;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-guest-email input:focus {
    border-color: var(--sea-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(22, 151, 210, 0.12);
}

/* =========================================================
   PAYMENT SECTION
========================================================= */
.payment-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 1.3rem;
    text-align: center;
    color: var(--sea-blue-deep);
    letter-spacing: -0.01em;
}

/* PAYMENT METHODS */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    display: block;
    border: 2px solid #d8e5ed;
    border-radius: 16px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: border 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.payment-option:hover {
    border-color: #b7dff1;
    box-shadow: 0 12px 28px rgba(22, 151, 210, 0.08);
    transform: translateY(-1px);
}

.payment-option input {
    display: none;
}

.payment-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.payment-info {
    flex: 1;
    min-width: 0;
}

.payment-info strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.payment-info span {
    display: block;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
}

/* PAYMENT IMAGE */
.payment-gateway {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 140px;
}

.payment-gateway img {
    display: block;
    width: 120px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* SELECTED STATE */
.payment-option:has(input:checked) {
    border-color: var(--sea-blue);
    background: linear-gradient(180deg, #f5fcff 0%, #e8f6fd 100%);
    box-shadow: 0 14px 28px rgba(22, 151, 210, 0.16);
}

/* =========================================================
   PROCEED BUTTON
========================================================= */
.btn-proceed-pay {
    margin-top: 1.8rem;
    width: 100%;
    padding: 0.95rem;
    border-radius: 18px;
    border: none;
    background: linear-gradient(180deg, var(--sea-blue) 0%, var(--sea-blue-dark) 100%);
    color: var(--white);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 14px 28px rgba(22, 151, 210, 0.24);
}

.btn-proceed-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(22, 151, 210, 0.34);
    background: linear-gradient(180deg, var(--sea-blue-dark) 0%, var(--sea-blue-deep) 100%);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 768px) {
    .payment-option {
        padding: 0.95rem 1rem;
    }

    .payment-box {
        gap: 0.8rem;
    }

    .payment-info strong {
        font-size: 0.95rem;
    }

    .payment-info span {
        font-size: 0.85rem;
    }

    .payment-gateway {
        min-width: 110px;
    }

    .payment-gateway img {
        width: 95px;
    }
}

@media (max-width: 575px) {
    .payment-box {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .payment-info {
        flex: 1;
    }

    .payment-gateway {
        min-width: 90px;
    }

    .payment-gateway img {
        width: 82px;
    }

    .btn-proceed-pay {
        font-size: 0.95rem;
        padding: 0.9rem;
    }
}

@media (max-width: 400px) {
    .payment-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-gateway {
        min-width: unset;
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.35rem;
    }

    .payment-gateway img {
        width: 105px;
    }
}

/* =========================================================
   WARNINGS & FOOT NOTE
========================================================= */
.wallet-warning {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--danger);
    font-weight: 600;
}

.checkout-note {
    margin-top: 1.4rem;
    font-size: 0.85rem;
    color: var(--muted);
    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;
    }
}

/* =========================================================
   COUPON
========================================================= */
.checkout-coupon {
    margin-top: 1.8rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.checkout-coupon label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--sea-blue-deep);
}

.checkout-coupon label span {
    font-weight: 500;
    color: var(--muted);
}

.coupon-input-wrap {
    display: flex;
    gap: 0.6rem;
}

.coupon-input-wrap input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #cfdee8;
    font-size: 14px;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.coupon-input-wrap input:focus {
    outline: none;
    border-color: var(--sea-blue);
    box-shadow: 0 0 0 3px rgba(22, 151, 210, 0.12);
}

.coupon-input-wrap button {
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    border: none;
    background: #edf8fd;
    color: var(--sea-blue);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.coupon-input-wrap button:hover {
    background: var(--sea-blue);
    color: var(--white);
}

.coupon-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 12px;
    color: var(--muted);
}

/* =========================================================
   LOADER
========================================================= */
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(8, 52, 79, 0.52);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.page-loader.active {
    display: flex;
}

.loader-card {
    background: var(--white);
    padding: 2rem 2.4rem;
    border-radius: 18px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid #d7ebf6;
}

.spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #dbe8f0;
    border-top-color: var(--sea-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}