/* Demo shop — own stylesheet, no external fonts or CDNs. */
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #17201d;
  --muted: #5f6b66;
  --line: #e2e6e1;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #e3f3f0;
  --accent: #c2410c;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #a16207;
  --warn-soft: #fdf5dc;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .05), 0 6px 20px rgba(16, 24, 20, .06);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412; --surface: #171e1b; --ink: #e7ece9; --muted: #9aa8a2; --line: #26302c;
    --brand: #2dd4bf; --brand-ink: #062521; --brand-soft: #123430; --ok-soft: #12301e; --warn-soft: #33290f; --bad-soft: #3a1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: 64px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-word; }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 18px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 24px; padding-bottom: 40px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.right { margin-left: auto; }

.sandbox-banner { background: repeating-linear-gradient(135deg, #fde68a, #fde68a 12px, #fcd34d 12px, #fcd34d 24px); color: #422006; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo span { display: flex; flex-direction: column; line-height: 1.15; }
.logo small { color: var(--muted); font-size: 12px; }
.logo-mark { width: 34px; height: 34px; fill: var(--brand); stroke: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"], .nav a.active { color: var(--ink); background: var(--brand-soft); }
.nav .lang { border: 1px solid var(--line); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; }
.cart-link svg { width: 20px; height: 20px; stroke: currentColor; fill: currentColor; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 12px; text-align: center; line-height: 20px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.empty { text-align: center; padding: 48px 20px; }
.center { text-align: center; }
.narrow { max-width: 520px; margin: 40px auto; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 92px; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } .sticky { position: static; } }

.hero h1 { font-size: 32px; }
.grid.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product h2 { margin: 2px 0 4px; font-size: 18px; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 12px; padding-top: 12px; }
.price { white-space: nowrap; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 600; }
.art { height: 170px; display: grid; place-items: center; }
.art svg { width: 70%; height: 100%; }
.art-cups { background: linear-gradient(135deg, #fde7d9, #f8cdb4); }
.art-board { background: linear-gradient(135deg, #f3ead2, #e5d3a6); }
.art-earbuds { background: linear-gradient(135deg, #dfe7f5, #b9c8e8); }
.art-wallet { background: linear-gradient(135deg, #efe0d6, #d7b49c); }
.art-blanket { background: linear-gradient(135deg, #e2f0e8, #b7dcc7); }
.art-thermos { background: linear-gradient(135deg, #e3eef0, #bcd6db); }
.a-shadow { fill: rgba(0, 0, 0, .10); }
.a-main { fill: #ffffff; stroke: rgba(0, 0, 0, .12); stroke-width: 1.5; }
.a-alt { fill: #0f766e; opacity: .85; }
.a-line { stroke: rgba(0, 0, 0, .25); stroke-width: 2; }
.a-line-fill { fill: rgba(0, 0, 0, .18); }
.a-hole { fill: rgba(0, 0, 0, .25); }
.a-steam { stroke: rgba(0, 0, 0, .25); stroke-width: 2; stroke-linecap: round; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.3; transition: filter .15s, background .15s; }
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn-link { background: none; color: var(--brand); padding-left: 4px; padding-right: 4px; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-lg { padding: 13px 18px; font-size: 16px; }

.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-error { background: var(--bad-soft); color: var(--bad); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.span-2 { grid-column: span 2; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
input[type="radio"] { width: auto; accent-color: var(--brand); }
.qty { width: 72px; }
.inline, .inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { flex: 1; }
.note { display: flex; gap: 10px; background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.icon { width: 18px; height: 18px; flex: none; fill: var(--brand); stroke: var(--brand); margin-top: 2px; }
.options { border: 0; padding: 0; margin: 0 0 14px; }
.options legend { font-weight: 600; margin-bottom: 6px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; cursor: pointer; }
.plans { display: grid; gap: 8px; }
.plan { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.plan:has(input:checked), .opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.card-brand { margin-top: 10px; font-size: 13px; text-transform: capitalize; min-height: 18px; }
.testcards { font-size: 13px; }
.testcards summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.testcards ul { list-style: none; padding: 0; margin: 8px 0; max-width: 420px; }
.testcards li { margin: 4px 0; }
.chip { display: inline-block; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 2px 8px; cursor: pointer; font: inherit; color: var(--ink); }
.chip.static { cursor: default; margin: 0 6px 6px 0; }
.chips { display: flex; flex-wrap: wrap; }

.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 18px; }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.table.compact td, .table.compact th { padding: 6px 6px; font-size: 13px; }
.num { text-align: right !important; white-space: nowrap; }

.result { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: var(--radius); margin-bottom: 20px; }
.result h1 { margin: 0 0 4px; }
.result-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.result-icon svg { width: 30px; height: 30px; stroke: #fff; }
.result-success { background: var(--ok-soft); } .result-success .result-icon { background: var(--ok); }
.result-failed, .result-canceled { background: var(--bad-soft); } .result-failed .result-icon, .result-canceled .result-icon { background: var(--bad); }
.result-authorized, .result-processing, .result-action { background: var(--warn-soft); } .result-authorized .result-icon, .result-processing .result-icon, .result-action .result-icon { background: var(--warn); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); }
.pill-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-failed, .pill-canceled { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill-authorized, .pill-processing, .pill-action { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-method { background: var(--brand-soft); color: var(--brand); border-color: transparent; font-family: var(--mono); }
.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: 4px 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.call { padding: 0; }
.call summary { display: flex; gap: 10px; align-items: center; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.call > :not(summary) { margin: 0 16px 16px; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .io { grid-template-columns: 1fr; } }
.tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.tag-server { background: #e0e7ff; color: #3730a3; }
.tag-browser { background: #fde7d9; color: #9a3412; }
.status { font-weight: 700; font-family: var(--mono); font-size: 12.5px; padding: 1px 8px; border-radius: 6px; }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.row-actions { margin-top: 14px; display: flex; gap: 10px; }

.debugbar { position: fixed; left: 0; right: 0; bottom: 0; background: #111a17; color: #d9e3df; z-index: 20; max-height: 55vh; overflow: auto; border-top: 1px solid #24302b; }
.debugbar summary { cursor: pointer; padding: 10px 20px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.debugbar .dot { width: 8px; height: 8px; border-radius: 50%; background: #2dd4bf; }
.debugbar .calls { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.debugbar .calls td { padding: 6px 8px; border-top: 1px solid #24302b; }
.debugbar a { color: #5eead4; }
.debugbar .muted { color: #8fa39b; }
.debugbar .wrap { padding-bottom: 12px; }

.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); margin: 8px auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.footer { color: var(--muted); font-size: 13px; padding-top: 12px; padding-bottom: 24px; }
