/* OxiSeller demo (oxiseller.com/demo): the Oxi-Pay demo's layout. A guided story on the left, a working phone on the right.
   On a phone the story comes first and the shop fills the screen width. Each kind of business sets its own accent. */
:root {
  --stage: #1B140F; --panel: #2A2019; --line: #4A3A2E; --cream: #F4EDE3; --grey: #B9AA98;
  --accent: #C2401E; --accent-ink: #8E2C12; --accent-soft: #FBE9E2;
  --paper: #FFFFFF; --surface: #F6F3EE; --ink: #1D1B18; --muted: #6B645B; --hair: #E6E0D6; --good: #1F7A45; --warn: #9A5B00; --bad: #B3261E;
  --f-display: "Inter Tight", "Segoe UI", system-ui, sans-serif; --f-body: "Inter Tight", "Segoe UI", system-ui, sans-serif; --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--stage); }
body { margin: 0; color: var(--cream); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.stage { max-width: 1180px; margin: 0 auto; padding: 32px 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: start; }
@media (max-width: 920px) { .stage { grid-template-columns: 1fr; gap: 28px; padding: 20px 16px 40px; } }

/* Story side */
.brandrow { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; }
.brandname { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: #fff; letter-spacing: -0.01em; }
.brandname b { color: var(--accent); font-weight: 800; }
.backlink { margin-left: auto; color: var(--grey); font-size: 13px; text-decoration: none; }
.backlink:hover { color: #fff; }
.pill { font-family: var(--f-mono); font-size: 11.5px; color: #E8B93C; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.story h1 { font-family: var(--f-display); font-weight: 800; color: #fff; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -0.03em; margin: 32px 0 16px; text-wrap: balance; }
.story h1 em { font-style: normal; color: var(--accent); }
.story .lead { font-size: 17px; color: var(--cream); max-width: 56ch; margin: 0; }
.guide-h { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 30px 0 12px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.types button { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.types button b { font-size: 15px; color: #fff; }
.types button span { font-size: 12.5px; color: var(--grey); }
.types button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.types button:hover { border-color: var(--accent); }
.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guide button { width: 100%; text-align: left; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.guide button:hover { border-color: var(--accent); }
.guide .gn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--f-mono); font-size: 13px; color: var(--grey); }
.guide .done .gn { background: var(--accent); border-color: var(--accent); color: #fff; }
.guide .gt { color: #fff; font-weight: 600; }
.guide .gs { display: block; font-size: 13px; color: var(--grey); }
.guide .go { font-size: 13px; color: var(--accent); font-weight: 700; }
.ctarow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.cta { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; font-size: 16px; text-decoration: none; }
.reset { background: none; border: 0; color: var(--grey); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.fine { font-size: 12.5px; color: var(--grey); margin-top: 22px; max-width: 64ch; }

/* The phone */
.phonewrap { position: sticky; top: 16px; display: grid; justify-items: center; gap: 12px; }
@media (max-width: 920px) { .phonewrap { position: static; } }
.phone { width: 100%; max-width: 390px; height: 780px; max-height: calc(100vh - 80px); min-height: 620px; background: #0E0A07; border-radius: 44px; padding: 10px; box-shadow: 0 0 0 1.5px var(--line), 0 30px 80px rgba(0,0,0,.5); }
@media (max-width: 480px) { .phone { border-radius: 26px; padding: 6px; height: 82vh; min-height: 560px; } .screen { border-radius: 21px !important; } }
.screen { position: relative; height: 100%; border-radius: 35px; overflow: hidden; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; color-scheme: light; }
.views { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.views button { border: 0; background: none; color: var(--grey); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.views button[aria-selected="true"] { background: var(--accent); color: #fff; }

/* Inside the phone: the shop */
.bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; background: var(--paper); border-bottom: 3px solid var(--accent); }
.bar .back { border: 0; background: none; font-size: 20px; line-height: 1; padding: 4px 6px 4px 0; color: var(--ink); }
.bar .tt { flex: 1; min-width: 0; }
.bar .tt b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .tt span { font-size: 12px; color: var(--muted); }
.cartbtn { position: relative; border: 1px solid var(--hair); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--accent-ink); white-space: nowrap; }
.cartbtn .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; margin-left: 6px; padding: 0 5px; }
.body { flex: 1; overflow-y: auto; padding: 12px 14px 90px; -webkit-overflow-scrolling: touch; }
.status { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin: 0 0 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.chips button { flex: none; border: 1px solid var(--hair); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sect { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 2px 6px; }
.card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--hair); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.card:hover { border-color: var(--accent); }
.thumb { flex: none; width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--accent-soft); }
.card .ci { flex: 1; min-width: 0; }
.card .ci b { display: block; font-size: 14.5px; }
.card .ci small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.card .pr { font-weight: 800; font-size: 14px; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #EAF5EE; color: var(--good); margin-top: 3px; }
.tag.grey { background: #EEE; color: var(--muted); }
.tag.fit { background: #E8F0FE; color: #1A56C2; }
.card.off { opacity: .55; }
.hero { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; padding: 16px; text-align: center; }
.hero .big { font-size: 64px; line-height: 1; }
.hero h2 { margin: 10px 0 4px; font-size: 20px; }
.hero p { margin: 0; color: var(--muted); font-size: 13px; }
.opt { background: var(--paper); border: 1px solid var(--hair); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.opt h3 { margin: 0 0 6px; font-size: 14px; }
.opt .hint { font-size: 12px; color: var(--muted); margin: -2px 0 6px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--hair); font-size: 14px; }
.choice:first-of-type { border-top: 0; }
.choice span { flex: 1; }
.choice em { font-style: normal; color: var(--muted); font-size: 13px; }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.step { display: inline-flex; align-items: center; border: 1px solid var(--hair); border-radius: 999px; overflow: hidden; }
.step button { border: 0; background: var(--paper); width: 32px; height: 32px; font-size: 18px; }
.step b { min-width: 28px; text-align: center; font-size: 14px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.slots button { border: 1px solid var(--hair); background: var(--paper); border-radius: 10px; padding: 8px 4px; font-size: 13px; }
.slots button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.slots button:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.fld { display: block; margin-top: 8px; font-size: 13px; }
.fld span { display: block; font-weight: 600; margin-bottom: 3px; }
.fld input, .fld select { width: 100%; font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid #CFC7BB; border-radius: 10px; background: #fff; color: var(--ink); }
.foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 14px; background: linear-gradient(transparent, var(--surface) 30%); }
.primary { width: 100%; border: 0; background: var(--accent); color: #fff; border-radius: 14px; padding: 14px; font-weight: 800; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.ghost { width: 100%; border: 1px solid var(--hair); background: var(--paper); border-radius: 14px; padding: 12px; font-weight: 700; margin-top: 8px; }
.line { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border: 1px solid var(--hair); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.line .li { flex: 1; min-width: 0; }
.line .li b { font-size: 14px; }
.line .li small { display: block; color: var(--muted); font-size: 12px; }
.sum { background: var(--paper); border: 1px solid var(--hair); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.sum .tot { border-top: 1px solid var(--hair); margin-top: 4px; padding-top: 8px; font-weight: 800; font-size: 16px; }
.pay { display: grid; gap: 6px; }
.pay label { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border: 1px solid var(--hair); border-radius: 12px; padding: 10px; font-size: 13.5px; }
.pay label b { display: block; font-size: 14px; }
.pay label small { color: var(--muted); }
.pay input { margin-top: 3px; accent-color: var(--accent); }
.pay label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.track { list-style: none; margin: 10px 0 0; padding: 0; }
.track li { position: relative; padding: 0 0 14px 26px; font-size: 13.5px; color: var(--muted); }
.track li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #CFC7BB; background: #fff; }
.track li::after { content: ""; position: absolute; left: 11px; top: 16px; bottom: 0; width: 2px; background: #E2DBD0; }
.track li:last-child::after { display: none; }
.track li.on { color: var(--ink); font-weight: 600; }
.track li.on::before { border-color: var(--accent); background: var(--accent); }
.note { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.toast { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(10px); background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 999px; font-size: 13px; opacity: 0; transition: .2s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--paper); border: 1px solid var(--hair); border-radius: 14px; padding: 10px; }
.kpi b { display: block; font-size: 18px; }
.kpi span { font-size: 12px; color: var(--muted); }
.ord { background: var(--paper); border: 1px solid var(--accent); border-radius: 14px; padding: 12px; margin-top: 10px; }
.ord .row { display: flex; justify-content: space-between; font-size: 13.5px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.small { font-size: 12.5px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
