/* ================================================================
   CHECKOUT — Shopify-inspired light theme
   White form · Gray summary · Clean sections · Solid CTA
   ================================================================ */

:root {
    --page-bg:    #f6f6f7;
    --form-bg:    #ffffff;
    --summary-bg: #f3f4f6;
    --text:       #0d0d0d;
    --muted:      #6b7280;
    --subtle:     #9ca3af;
    --border:     #d1d5db;
    --border-soft: #e5e7eb;
    --accent:     #d91a62;
    --accent-h:   #b8145a;
    --success:    #047857;
    --danger:     #dc2626;
    --radius:     6px;
    --radius-sm:  4px;
    --radius-lg:  10px;
}

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--text); }

/* ── Urgency bar ─────────────────────────────────────────────── */
.flashbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}

.flashbar__label {
    color: var(--muted);
    font-weight: 500;
}

.flashbar__timer {
    padding: 3px 11px;
    border-radius: 4px;
    background: var(--text);
    color: #fff;
    font-family: "Space Grotesk", monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ── Page container ──────────────────────────────────────────── */
.checkout-page,
.success-page {
    width: min(1100px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

/* ── Hero banner ─────────────────────────────────────────────── */
.hero-banner {
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.08);
    background: #06101f;
}

.hero-banner__image {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Checkout shell — one unified card, form+summary side by side */
.checkout-shell {
    display: grid;
    grid-template-columns: 1fr 360px;
    align-items: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 24px rgba(0,0,0,0.07);
}

/* ── Form side ───────────────────────────────────────────────── */
.checkout-card {
    padding: 28px 32px;
    background: var(--form-bg);
    border-right: 1px solid var(--border-soft);
}

.checkout-card__intro {
    margin-bottom: 18px;
}

.checkout-card__intro h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.05;
    font-weight: 800;
    color: var(--text);
}

.checkout-card__intro p {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.checkout-resume-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(20, 184, 166, 0.10);
    border: 1px solid rgba(20, 184, 166, 0.22);
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
}

.checkout-resume-note.is-hidden {
    display: none;
}

/* ── Payment marks row ───────────────────────────────────────── */
.checkout-trustbar {
    margin-bottom: 18px;
    padding: 0;
    border: none;
    background: none;
}

.payment-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.trust-points { display: none; }

.payment-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.payment-mark--paypal     { background: #ffc439; color: #003087; }
.payment-mark--apple      { background: #1d1d1f; color: #fff; }
.payment-mark--google     { background: #fff; color: #202124; border: 1px solid #dadce0; }
.payment-mark--visa       { background: #1434cb; color: #fff; }
.payment-mark--mastercard { background: #eb001b; color: #fff; }
.payment-mark--amex       { background: #006fcf; color: #fff; }

/* ── Form sections (Contact / Upgrades / Payment) ────────────── */
/* Shopify pattern: section label + border-top divider */
.form-section {
    padding: 20px 0;
    border-top: 1px solid var(--border-soft);
}

/* First visible section gets no top border */
.checkout-trustbar + form .form-section:first-child,
.form-section.is-first {
    border-top: none;
    padding-top: 0;
}

.section-kicker {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
}

/* ── Field grid ──────────────────────────────────────────────── */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-grid--compact {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field,
.field--full {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field span {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.field input,
.field select,
.stripe-field {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.12s, box-shadow 0.12s;
    -webkit-appearance: none;
    appearance: none;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5' fill='none' viewBox='0 0 10 5'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M1 1l4 3 4-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
    cursor: pointer;
}

.field input::placeholder { color: #c4c9d4; }

.stripe-field:empty::before {
    content: attr(data-placeholder);
    color: #c4c9d4;
    font-size: 14px;
}

.field input:focus,
.field select:focus,
.stripe-field.is-focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 26, 98, 0.10);
}

/* ── Order bumps ─────────────────────────────────────────────── */
.order-bumps {
    padding: 20px 0;
    border-top: 1px solid var(--border-soft);
}

.section-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.section-row h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.section-row p,
.section-row span:last-child {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.order-bumps__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bump-card {
    display: block;
    cursor: pointer;
}

.bump-card__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bump-card__content {
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fafafa;
    transition: border-color 0.12s, background 0.12s;
}

.bump-card__checkbox:checked + .bump-card__content {
    border-color: var(--accent);
    background: #fff9fb;
}

.bump-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.bump-card__tag {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 3px;
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bump-card h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.bump-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bump-card__price {
    text-align: right;
    flex-shrink: 0;
}

.bump-card__price strong {
    display: block;
    font-size: 14px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.bump-card__price span {
    display: block;
    margin-top: 2px;
    color: var(--subtle);
    font-size: 11px;
    text-decoration: line-through;
}

/* ── Payment section ─────────────────────────────────────────── */
.payment-stack {
    padding: 20px 0 0;
    border-top: 1px solid var(--border-soft);
}

/* Wallets: stacked, full-width — like Shopify Express checkout */
.wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 0;
}

.wallet-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

#paypal-wallet-shell {
    border-color: #e5b80b;
    background: #fffdf0;
}

#express-wallet-shell {
    border-color: var(--border);
    background: #fff;
}

.wallet-card__label {
    display: block;
    padding: 9px 12px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.wallet-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    margin: 8px 10px 0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
}

.wallet-placeholder--paypal {
    background: #ffc439;
    color: #003087;
}

.wallet-placeholder--express {
    justify-content: space-between;
    padding: 0 14px;
    background: #000;
    color: #fff;
    font-size: 12px;
}

.wallet-card__hint {
    margin: 0;
    padding: 6px 12px 10px;
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.5;
}

.wallet-card.is-hidden,
#express-wallet-shell.is-hidden,
#paypal-wallet-shell.is-hidden { display: none; }

#paypal-button,
#express-checkout-element {
    min-height: 44px;
    padding: 0 10px 10px;
}

.wallet-card.wallet-card--live .wallet-placeholder,
.wallet-placeholder.is-hidden { display: none; }

/* ── "or pay with card" divider ──────────────────────────────── */
.payment-divider {
    position: relative;
    margin: 16px 0;
    text-align: center;
}

.payment-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-soft);
}

.payment-divider span {
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: var(--form-bg);
    color: var(--subtle);
    font-size: 12px;
}

/* ── Card panel ──────────────────────────────────────────────── */
.card-panel {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.card-icons {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
}

.card-icons span {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--page-bg);
    border: 1px solid var(--border-soft);
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
}

/* ── Error message ───────────────────────────────────────────── */
.checkout-message {
    min-height: 18px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--danger);
}

/* ── Submit CTA ──────────────────────────────────────────────── */
/* Shopify-feel: full-width, solid, no gradient, confident */
.checkout-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.12s, transform 0.12s;
}

.checkout-submit:hover {
    background: var(--accent-h);
    transform: translateY(-1px);
}

.checkout-submit:active {
    transform: translateY(0);
}

.checkout-submit:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.checkout-submit strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
}

/* ── Legal + trust ───────────────────────────────────────────── */
.checkout-legal {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.7;
    color: var(--subtle);
    text-align: center;
}

.checkout-legal a { color: var(--subtle); }

.security-note {
    margin-top: 10px;
    text-align: center;
}

.security-note__line {
    font-size: 11px;
    color: var(--subtle);
}

.security-note__grid { display: none; }

/* ── Summary sidebar ─────────────────────────────────────────── */
.summary-card {
    position: sticky;
    top: 50px;
    padding: 28px 24px;
    background: var(--summary-bg);
    min-height: 100%;
    border-left: 1px solid var(--border-soft);
}

.summary-card .section-kicker {
    display: block;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-cover {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #06101f;
}

.summary-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.summary-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.summary-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}

.summary-card__top h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.summary-card__top p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.summary-card__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    background: rgba(0,0,0,0.06);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Summary list (dynamic via JS) ──────────────────────────── */
.summary-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.summary-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.summary-item p {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.summary-item--selected strong { color: var(--text); }

.summary-item > strong:last-child {
    white-space: nowrap;
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    flex-shrink: 0;
}

/* ── Totals ──────────────────────────────────────────────────── */
.summary-totals {
    display: grid;
    gap: 8px;
    padding: 14px 0;
    margin-top: 14px;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.summary-totals div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.summary-totals span {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

.summary-totals strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    color: var(--text);
}

/* ── Summary security (hidden — redundant) ───────────────────── */
.summary-security { display: none; }

/* ── Guarantee ───────────────────────────────────────────────── */
.summary-guarantee {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.summary-guarantee h4 {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
}

.summary-guarantee p {
    margin: 0;
    color: #374151;
    font-size: 11px;
    line-height: 1.55;
}

/* ── Support ─────────────────────────────────────────────────── */
.summary-support {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px;
}

.summary-support span { color: var(--muted); font-weight: 500; }
.summary-support a { color: var(--accent); font-weight: 600; text-decoration: none; }
.summary-support a:hover { text-decoration: underline; }

/* ── Success page ────────────────────────────────────────────── */
.success-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 50px);
}

.success-card {
    width: min(660px, 100%);
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--form-bg);
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 24px rgba(0,0,0,0.07);
}

.success-card h1 {
    margin: 12px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.success-card p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.success-state {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 3px;
    background: #ecfdf5;
    color: var(--success);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 16px;
}

.summary-list--success { margin-top: 20px; }
.summary-support--success { padding-top: 14px; border-top: 1px solid var(--border-soft); }

.success-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: var(--radius);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s, transform 0.12s;
}

.primary-button { border: none; background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-h); }
.ghost-button { border: 1px solid var(--border); background: #fff; color: var(--text); }
.ghost-button:hover { background: var(--page-bg); }

/* ── Responsive: Tablet ──────────────────────────────────────── */
@media (max-width: 820px) {
    .checkout-shell {
        grid-template-columns: 1fr;
    }

    .checkout-card {
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
    }

    .summary-card {
        position: static;
        border-left: none;
    }

    .wallet-grid,
    .order-bumps__list {
        grid-template-columns: 1fr;
    }
}

/* ── Responsive: Mobile ──────────────────────────────────────── */
@media (max-width: 580px) {
    .checkout-page,
    .success-page {
        width: 100%;
        padding: 12px 12px 48px;
    }

    .checkout-card { padding: 20px; }
    .summary-card  { padding: 20px; }

    .hero-banner { border-radius: var(--radius); margin-bottom: 14px; }

    .field-grid { grid-template-columns: 1fr; }
    .field-grid--compact { grid-template-columns: 1fr 1fr; }
    .wallet-grid,
    .order-bumps__list { grid-template-columns: 1fr; }

    .success-actions { grid-template-columns: 1fr; }

    .flashbar { gap: 8px; padding: 8px 14px; }
    .flashbar__label { font-size: 12px; }
    .flashbar__timer { font-size: 12px; }

    .checkout-card__intro h2 {
        font-size: 20px;
    }
}
