/* ============================================================================
   Aurora Demo Store — storefront styling.
   Neutral control-plane palette (slate + indigo) so the demo feels cohesive
   with the Payments Console platform it showcases.
   ============================================================================ */
:root {
    --accent: #3b5bdb;
    --accent-strong: #2f49b8;
    --accent-soft: #eef2ff;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --faint: #94a3b8;
    --line: #e6e8ee;
    --line-soft: #eef0f4;
    --bg: #f6f7f9;
    --card: #ffffff;
    --ok: #1f9d57;
    --ok-soft: #e7f6ee;
    --warn: #b76e00;
    --warn-soft: #fdf2dc;
    --danger: #d23b3b;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --pill: 999px;
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink-soft);
    background: var(--bg);
    font-size: 15px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.15; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---- buttons ---------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: var(--r-md);
    border: 1px solid transparent; transition: all .15s ease; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--accent-strong); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:not(:disabled):hover { background: var(--bg); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* ---- header ----------------------------------------------------------- */
header.site {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand .mark {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #6d7cf0); color: #fff; box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 20px; height: 20px; }
.brand .sub { font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.powered {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted);
    background: var(--bg); border: 1px solid var(--line); padding: 6px 12px; border-radius: var(--pill);
}
.powered b { color: var(--ink); font-weight: 700; }
.env-badge {
    font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--warn); background: var(--warn-soft); padding: 3px 8px; border-radius: var(--pill);
}
.cart-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink); color: #fff; border: 0; padding: 10px 16px; border-radius: var(--r-md); font-weight: 600; font-size: 14px;
}
.cart-btn svg { width: 17px; height: 17px; }
.cart-count {
    position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--accent); color: #fff; border-radius: var(--pill); font-size: 11px; font-weight: 800;
    display: grid; place-items: center; border: 2px solid #fff;
}

/* ---- hero ------------------------------------------------------------- */
.hero { padding: 52px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
    color: var(--accent); background: var(--accent-soft); padding: 6px 13px; border-radius: var(--pill);
}
.hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 850; letter-spacing: -0.03em; margin: 16px 0 14px; }
.hero p { font-size: 16.5px; color: var(--muted); max-width: 520px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
    background: #fff; border: 1px solid var(--line); padding: 8px 13px; border-radius: var(--pill); box-shadow: var(--shadow-sm);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip .dot.green { background: var(--ok); }
.hero-card {
    background: linear-gradient(160deg, #0f172a, #1e293b); color: #fff; border-radius: var(--r-xl);
    padding: 26px; box-shadow: var(--shadow-md);
}
.hero-card h3 { color: #fff; font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.flow-step { display: flex; gap: 13px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.flow-step:last-child { border-bottom: 0; }
.flow-step .n {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .12);
    display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff;
}
.flow-step .t { font-size: 13.5px; font-weight: 600; color: #fff; }
.flow-step .d { font-size: 12.5px; color: #aebbcd; margin-top: 2px; }

/* ---- products --------------------------------------------------------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 28px 0 18px; gap: 16px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 8px; }
.product {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column;
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product .thumb { height: 140px; display: grid; place-items: center; font-size: 52px; }
.product .body { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.product .name { font-size: 15px; font-weight: 700; color: var(--ink); }
.product .desc { font-size: 12.5px; color: var(--muted); margin: 5px 0 13px; flex: 1; }
.product .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 17px; font-weight: 800; color: var(--ink); }
.price .cur { font-size: 11.5px; font-weight: 700; color: var(--faint); margin-right: 3px; }
.add {
    background: var(--accent-soft); color: var(--accent); border: 0; font-weight: 700; font-size: 13px;
    padding: 9px 14px; border-radius: var(--r-md); transition: all .15s ease;
}
.add:hover { background: var(--accent); color: #fff; }

/* ---- footer ----------------------------------------------------------- */
footer.site { margin-top: 46px; border-top: 1px solid var(--line); background: #fff; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 16px; flex-wrap: wrap; }
.foot-inner .muted { font-size: 12.5px; color: var(--muted); }
.foot-links { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.foot-links a:hover { color: var(--accent); }

/* ---- overlay + drawers / modal --------------------------------------- */
.overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50;
    opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.overlay.open { opacity: 1; visibility: visible; }

.drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 92vw; z-index: 60;
    background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 16px; }
.icon-btn { background: var(--bg); border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 16px 20px; background: #fff; border-top: 1px solid var(--line); }

/* cart items */
.cart-line { display: flex; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; }
.cart-line .ci-thumb { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 9px; display: grid; place-items: center; font-size: 24px; }
.cart-line .ci-info { flex: 1; min-width: 0; }
.cart-line .ci-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.cart-line .ci-price { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.qty { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.qty button { width: 26px; height: 26px; background: #fff; border: 0; color: var(--muted); font-size: 15px; font-weight: 700; }
.qty button:hover { background: var(--bg); color: var(--ink); }
.qty span { min-width: 30px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink); }
.ci-remove { background: none; border: 0; color: var(--faint); font-size: 12px; align-self: flex-start; }
.ci-remove:hover { color: var(--danger); }
.cart-empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 14px; }
.cart-empty .big { font-size: 40px; margin-bottom: 10px; }

.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.summary-row.total { font-size: 17px; font-weight: 800; color: var(--ink); margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* checkout modal */
.modal {
    position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
    background: var(--bg); width: 720px; max-width: 100%; max-height: 90vh; border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; transform: translateY(12px);
    transition: transform .22s ease;
}
.modal.open .modal-card { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }

/* payment method tabs */
.pay-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pay-tab {
    text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 15px 16px; transition: all .15s ease;
}
.pay-tab:hover { border-color: #c7cde0; }
.pay-tab.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(59, 91, 219, .1); }
.pay-tab .pt-top { display: flex; align-items: center; gap: 9px; }
.pay-tab .pt-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--bg); }
.pay-tab.active .pt-ico { background: #fff; }
.pay-tab .pt-ico svg { width: 18px; height: 18px; color: var(--accent); }
.pay-tab .pt-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.pay-tab .pt-desc { font-size: 12px; color: var(--muted); margin-top: 7px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; color: var(--ink);
    background: #fff; transition: border-color .15s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 91, 219, .1); }
.hint { font-size: 12px; color: var(--muted); }

.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 1.45; }
.notice.info { background: var(--accent-soft); color: #29408f; }
.notice.ok { background: var(--ok-soft); color: #0a6b3a; }
.notice.warn { background: var(--warn-soft); color: #7a4a00; }
.notice b { font-weight: 700; }

/* wallet balance card */
.bal-card { background: linear-gradient(160deg, #0f172a, #1e293b); color: #fff; border-radius: var(--r-lg); padding: 18px 20px; }
.bal-card .lbl { font-size: 12px; color: #aebbcd; }
.bal-card .amt { font-size: 30px; font-weight: 850; letter-spacing: -.02em; margin-top: 4px; }
.bal-card .amt .cur { font-size: 14px; color: #aebbcd; font-weight: 700; margin-right: 5px; }
.bal-card .who { font-size: 12px; color: #aebbcd; margin-top: 8px; }

/* status (gateway awaiting / success) */
.status-wrap { text-align: center; padding: 8px 0 4px; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 4px auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tick { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); display: grid; place-items: center; margin: 0 auto 14px; }
.tick svg { width: 30px; height: 30px; color: var(--ok); }
.status-wrap h4 { font-size: 18px; margin-bottom: 6px; }
.status-wrap p { font-size: 13.5px; color: var(--muted); max-width: 420px; margin: 0 auto; }
.frame-wrap { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.frame-wrap .fw-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.frame-wrap iframe { width: 100%; height: 360px; border: 0; display: block; background: #fff; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* behind the scenes */
.bts { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #0f172a; overflow: hidden; }
.bts-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; cursor: pointer; color: #e2e8f0; font-size: 12.5px; font-weight: 600; }
.bts-head .dotpair { display: inline-flex; gap: 5px; }
.bts-head .dotpair i { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.bts-log { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.bts-log.open { max-height: 260px; overflow-y: auto; }
.bts-log pre { font-family: var(--mono); font-size: 11.5px; color: #cbd5e1; padding: 4px 14px 14px; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.bts-log .o { color: #7dd3fc; } /* outbound */
.bts-log .i { color: #86efac; } /* inbound */
.bts-log .m { color: #fbbf24; } /* milestone */

/* toast */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--pill); font-size: 13.5px; font-weight: 600;
    box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 9px; animation: rise .2s ease;
}
.toast.ok { background: #0a6b3a; }
.toast.err { background: #9b2222; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .pay-tabs { grid-template-columns: 1fr; }
    .powered { display: none; }
}
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
}
