/* PayRecover demo stores: one look for all three; the theme class on <body> sets the store's colour. */
:root {
  --ink: #1d2433; --ink-2: #4a5268; --muted: #6b7386; --line: #e4e7ee; --bg: #f5f6f9; --card: #fff;
  --accent: #1f8a4c; --accent-soft: #e5f4ea; --accent-ink: #14603a;
}
body.theme-vuln { --accent: #c8323b; --accent-soft: #fbe8e9; --accent-ink: #8f2128; }
body.theme-risky { --accent: #c27b0a; --accent-soft: #fbf0db; --accent-ink: #855405; }

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 1000px; margin: 0 auto; padding: 0 16px 40px; }

.store-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 -16px 24px; padding: 18px 16px; border-bottom: 4px solid var(--accent); background: var(--card); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; }
.logo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1 { margin: 0; font-size: 1.35rem; }
.tagline { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; }
.ribbon { padding: 5px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: .78rem; font-weight: 700; }

section, aside { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
h2 { margin: 0 0 12px; font-size: 1.05rem; }
.note { margin: 0 0 12px; color: var(--ink-2); font-size: .9rem; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.product { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbfd; }
.product[data-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.product-art { display: grid; place-items: center; height: 110px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.product-art svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.product h3 { margin: 0; font-size: .98rem; }
.product .price { margin: 0; font-size: 1.1rem; font-weight: 700; }
.product label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: .85rem; }
select, input[type="number"], input[type="search"] { height: 34px; padding: 0 8px; border: 1px solid #cfd4de; border-radius: 8px; background: #fff; font: inherit; }
input[type="number"] { width: 100px; }
button { height: 34px; padding: 0 14px; border: 1px solid #cfd4de; border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }
button:hover { border-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.checkout { position: sticky; top: 16px; }
.lines { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .9rem; }
.lines li { display: flex; justify-content: space-between; gap: 8px; }
.lines .empty { color: var(--muted); }
.total { display: flex; justify-content: space-between; margin: 0 0 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 700; }
#checkout-status { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #f1f2f7; font-size: .9rem; }
#checkout-status[data-state="paid"] { background: #e3f4e8; color: #1d6b37; }
#checkout-status[data-state="cancelled"] { background: #fff4dc; color: #7a5600; }
#checkout-status[data-state="error"] { background: #fbe7e8; color: #a24045; }
.order { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: .85rem; }
.order dt { color: var(--muted); }
.order dd { margin: 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }

.demo-controls { margin-bottom: 20px; border-style: dashed; border-color: var(--accent); background: var(--accent-soft); }
.demo-controls h2 { color: var(--accent-ink); }
.bugs { display: grid; gap: 8px; }
.bugs label { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.bugs input { width: 18px; height: 18px; accent-color: var(--accent); }
.search { margin-bottom: 20px; }
form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#search-results { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #f1f2f7; }
#new-cart { margin-top: 12px; }
.footnote { margin: 20px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
.product label.price-field { flex-direction: column; align-items: stretch; gap: 4px; }
.product label.price-field input { width: 100%; }
