/* ========== Variabili & base ========== */
:root{
  --radius:14px;
  --border:#e5e7eb;
  --muted:#6b7280;
  --bg:#fff;
  --ink:#111827;
  --shadow:0 1px 2px rgba(0,0,0,.06),0 8px 24px rgba(0,0,0,.06);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  background:var(--bg);
  color:var(--ink);
}

/* Header / Footer stickies */
header,footer{
  position:sticky;
  top:0;
  background:rgba(255,255,255,.8);
  backdrop-filter:saturate(180%) blur(8px);
  border-bottom:1px solid var(--border);
  z-index:10;
}
header .wrap, main .wrap, footer .wrap{ max-width:1120px; margin:auto; padding:16px; }

/* Typo */
h1{ font-size:22px; margin:0; }
.muted{ color:var(--muted); }
.mini{ font-size:12px; color:var(--muted); }
a.mini{ color:#6b7280; }

/* Layout */
.grid{ display:grid; gap:24px; }
@media(min-width:1024px){ #cart-columns{ grid-template-columns:2fr 1fr; } }
.row{ display:flex; gap:16px; align-items:center; }
.row.between{ justify-content:space-between; }
.wrap{ width:100%; }

/* Cards / UI */
.card{ border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); background:#fff; }
.card .pad{ padding:16px; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 12px; border-radius:12px; border:1px solid var(--border);
  background:#fff; cursor:pointer;
}
.btn:hover{ background:#f9fafb; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }
.btn.primary{ background:#111827; color:#fff; border-color:#111827; }

/* Lista articoli */
.item{
  display:grid; grid-template-columns:96px 1fr auto; gap:16px; align-items:center;
  border:1px solid var(--border); border-radius:16px; padding:12px;
}
.thumb{ width:96px; height:96px; border-radius:12px; overflow:hidden; background:#f3f4f6; }
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.qty{ display:inline-flex; align-items:center; border:1px solid var(--border); border-radius:12px; }
.qty button{ padding:8px 12px; font-size:18px; line-height:1; border:0; background:transparent; cursor:pointer; }
.qty span{ padding:8px 12px; min-width:32px; text-align:center; font-variant-numeric:tabular-nums; }

.sep{ height:1px; background:var(--border); margin:12px 0; }
.list{ display:grid; gap:12px; }
.right{ text-align:right; }
.empty{ border:2px dashed var(--border); border-radius:16px; padding:40px; text-align:center; color:var(--muted); }
dialog{ border:1px solid var(--border); border-radius:16px; max-width:420px; box-shadow:var(--shadow); }
.strike{ text-decoration:line-through; color:#9ca3af; margin-right:6px; }
.hidden{ display:none; }

/* Step panels */
.step-card{
  border:1px solid #e5e7eb; border-radius:16px; background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  max-width:680px; margin:16px auto; padding:18px;
}
.step-card h3{ margin:0 0 8px 0; font-size:20px; }
.step-row{ display:flex; gap:12px; flex-wrap:wrap; margin:10px 0; }
.step-card input{ width:100%; padding:12px; border:1px solid #e5e7eb; border-radius:12px; }
.step-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:12px; }
.note{ font-size:13px; color:#6b7280; }
.note.err{ color:#b91c1c; }

/* Totale */
.total-chip{ font-weight:700; padding:8px 12px; border:1px solid #e5e7eb; border-radius:12px; background:#f9fafb; }

/* ========== Utility (ex-inline) ========== */
/* Spaziature */
.m-0{ margin:0; }
.mb-2{ margin-bottom:2px; }
.mb-8{ margin-bottom:8px; }
.mb-12{ margin-bottom:12px; }
.mt-4{ margin-top:4px; }
.mt-8{ margin-top:8px; }
.mt-10{ margin-top:10px; }
.mt-12{ margin-top:12px; }
.mt-20{ margin-top:20px; }
.my-12{ margin-top:12px; margin-bottom:12px; }

/* Dimensioni fisse / display */
.h-6{ height:6px; }
.h-8{ height:8px; }
.fs-12{ font-size:12px; }
.fs-13{ font-size:13px; }
.fs-14{ font-size:14px; }
.fs-16{ font-size:16px; }
.fs-18{ font-size:18px; }
.fs-32{ font-size:32px; }
.fw-600{ font-weight:600; }
.w-100{ width:100%; }
.d-none{ display:none; }

/* Flex / grid helpers */
.gap-8{ gap:8px; }
.gap-12{ gap:12px; }
.wrap-flex{ flex-wrap:wrap; }
.ai-stretch{ align-items:stretch; }
.ai-end{ align-items:flex-end; }
.align-start{ align-content:start; }

/* Input generico usato nel coupon */
.input{
  flex:1;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
}
