:root{--wine:#820000;--ink:#352c28;--muted:#71635d;--line:#e8ded6;--paper:#fffaf5}*{box-sizing:border-box}body.commerce{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 system-ui,sans-serif}.commerce a{color:var(--wine)}.shop-header{background:#fff;border-bottom:1px solid var(--line);padding:18px max(5vw,20px);display:flex;align-items:center;justify-content:space-between;gap:20px}.shop-header img{width:130px;display:block}.shop-header nav{display:flex;gap:22px}.shop-header a{text-decoration:none;font-weight:600}.commerce main{max-width:1160px;margin:45px auto;padding:0 24px}.eyebrow{font-size:12px;font-weight:750;letter-spacing:.16em;text-transform:uppercase;color:var(--wine)}.commerce h1{font-size:clamp(30px,5vw,46px);line-height:1.15;margin:12px 0}.commerce h2{font-size:21px;margin:0 0 22px}.lead{color:var(--muted);margin-bottom:30px}.steps{display:flex;flex-wrap:wrap;gap:12px;margin:28px 0;color:var(--muted);font-size:13px}.steps span{padding:8px 14px;border-radius:20px;background:#f2e8df}.steps .active{background:var(--wine);color:white}.purchase-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,1fr);gap:26px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:18px;padding:28px;margin-bottom:22px;box-shadow:0 8px 28px #352c2805}.fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.fields .wide{grid-column:1/-1}.commerce label{display:block;font-weight:600;font-size:14px}.commerce input,.commerce select,.commerce textarea{display:block;width:100%;border:1px solid #cdbfb5;border-radius:8px;background:white;color:var(--ink);padding:12px;margin:7px 0 0;font:inherit;min-width:0}.commerce input:focus,.commerce select:focus,.commerce textarea:focus{outline:3px solid #82000022;border-color:var(--wine)}.commerce button,.commerce .button{border:0;border-radius:9px;padding:13px 20px;cursor:pointer;background:var(--wine);color:white;font:600 15px system-ui;text-decoration:none;display:inline-block;min-height:46px}.commerce button.secondary{background:#f2e8df;color:var(--wine)}.commerce button:disabled{opacity:.5;cursor:wait}.commerce .full{width:100%;margin-top:20px}.muted,.commerce small{color:var(--muted)}.amount-row,.item-row{display:flex;justify-content:space-between;gap:20px;padding:10px 0}.item-row{border-bottom:1px solid var(--line)}.amount-row.total{border-top:1px solid var(--line);font-size:22px;font-weight:750;margin-top:12px}.message{border-radius:8px;padding:12px 16px;background:#fff0dc;color:#673b00;margin:18px 0}.message:empty{display:none}.service{display:flex!important;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;margin:10px 0;cursor:pointer}.service input{width:auto;margin:0;accent-color:var(--wine)}.service:has(input:checked){border-color:var(--wine);background:#fff8f1}.status-pill{display:inline-block;padding:4px 12px;border-radius:20px;background:#f4e9df;font-size:13px;font-weight:700}.commerce table{width:100%;border-collapse:collapse}.commerce th,.commerce td{text-align:left;padding:12px 8px;border-bottom:1px solid var(--line)}.table-scroll{overflow:auto}.commerce footer{text-align:center;color:var(--muted);padding:35px}.timeline{padding-left:22px}.timeline li{padding:6px 0}.actions{display:flex;gap:12px;flex-wrap:wrap}.summary{position:sticky;top:24px}.commerce [hidden]{display:none!important}@media(max-width:760px){.purchase-grid,.fields{grid-template-columns:1fr}.fields .wide{grid-column:auto}.commerce main{margin:28px auto;padding:0 16px}.panel{padding:20px}.shop-header img{width:100px}.shop-header nav{gap:14px;font-size:13px}.summary{position:static}}@media print{.shop-header,.actions,footer,.steps,button,.message{display:none!important}.commerce main{margin:0;max-width:none}.panel{box-shadow:none;break-inside:avoid}.purchase-grid{display:block}}

/* Checkout and invoice share the storefront theme preference. */
:root { color-scheme: light; --panel: #fff; --soft: #f2e8df; --accent: #820000; --field-border: #b5a498; }
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111015; --panel: #1c1a21; --ink: #f5f0eb; --muted: #bfb5af;
  --line: #49414a; --soft: #302731; --accent: #ffc3b5; --field-border: #7c6c79;
}
.commerce :is(.shop-header,.panel) { background: var(--panel); }
.commerce a,.commerce .eyebrow { color: var(--accent); }
.commerce .button { color: white; }
.commerce :is(input,select,textarea) { background: var(--panel); border-color: var(--field-border); color: var(--ink); }
.commerce :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
.commerce :is(input,select,textarea):disabled { opacity: 1; color: var(--muted); background: var(--soft); cursor: not-allowed; }
.commerce :is(button.secondary,.status-pill,.steps span) { background: var(--soft); color: var(--ink); }
.commerce .steps .active { background: var(--wine); color: white; }
.commerce .service:has(input:checked) { background: var(--soft); border-color: var(--accent); }
.commerce :is(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.commerce button:disabled { opacity: 1; background: var(--soft); color: var(--muted); cursor: not-allowed; }
[data-theme="dark"] .shop-header img { filter: brightness(0) invert(1); }
[data-theme="dark"] .message { background: #392a17; color: #ffdca1; }
.commerce .shop-header nav { align-items: center; flex-wrap: wrap; }
.commerce #themeToggle { background: var(--soft); color: var(--ink); font-size: 13px; padding: 8px 12px; }
.item-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.amount-row > :last-child,.item-row > :last-child { flex-shrink: 0; }
@media(max-width:760px) { .shop-header { flex-wrap: wrap; gap: 12px; } .shop-header nav { gap: 12px; } }
@media print {
  body.commerce { --paper: #fff; --panel: #fff; --ink: #18181b; --muted: #52525b; --line: #ccc; --soft: #eee; --accent: #820000; color-scheme: light; }
}
