/* ─────────────────────────────────────────────────────────────────────────────
   Bon de commande — Le Comptoir Africain
   Charte : sable / terracotta / brun foncé / or / vert
   ───────────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --sand:#f5efe6; --sand-2:#faf6ef; --terra:#b5563a; --terra-d:#9a3a28; --dark:#1a1208;
  --gold:#c8973a; --lgold:#f0e0c0; --green:#3a6b45; --green-d:#2a5234; --green-l:#eef8f0;
  --border:#d4c4a8; --line:#ede5d6; --muted:#8a8078; --muted-2:#bba; --white:#fff;
  --red:#c62828; --red-l:#ffeaea;
  --radius:8px; --shadow:0 2px 12px rgba(0,0,0,.08);
  --bar-h:66px;
}
* { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-text-size-adjust:100%; }
body {
  font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif; background:var(--sand);
  color:var(--dark); font-size:13px; line-height:1.4; padding-bottom:calc(var(--bar-h) + 24px);
}
button, input, select, textarea { font-family:inherit; font-size:inherit; color:inherit; }
button { cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:rgba(181,86,58,.25); }
[hidden] { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.muted { color:var(--muted); }
.mono { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.nowrap { white-space:nowrap; }
.r { text-align:right; } .c { text-align:center; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  background:var(--dark); color:#fff; padding:10px 24px; display:flex; align-items:center; gap:16px;
  position:sticky; top:0; z-index:100; box-shadow:0 2px 12px rgba(0,0,0,.4);
}
.header img { width:52px; height:52px; background:#fff; border-radius:50%; padding:1px; flex:none; }
.header-text { flex:1; min-width:0; }
.header-text h1 { font-family:'Playfair Display',Georgia,serif; font-size:19px; line-height:1.1; }
.h1-sub { font-family:'DM Sans',sans-serif; font-size:12px; font-weight:400; }
.header-text p { color:var(--muted-2); font-size:10.5px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.header-actions { display:flex; gap:8px; align-items:center; flex:none; }
.hbtn {
  background:transparent; color:#ddd; border:1.5px solid #555; border-radius:20px; padding:5px 11px;
  font-size:11.5px; font-weight:600; display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
.hbtn:hover { border-color:#aaa; color:#fff; }
.hbtn.on { background:var(--gold); border-color:var(--gold); color:var(--dark); }

/* ── Blocs ──────────────────────────────────────────────────────────────── */
.wrap { padding:0 24px; }
.card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); }
.client-block { margin:14px 24px 10px; padding:14px 18px; }
.client-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.client-head h2 { font-family:'Playfair Display',Georgia,serif; font-size:15px; color:var(--terra); }
.client-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px 18px; }
.field { display:flex; flex-direction:column; gap:3px; min-width:0; }
.field label { font-size:10px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.field label .req { color:var(--terra); }
.field input, .field select {
  width:100%; border:none; border-bottom:1.5px solid var(--border); background:transparent;
  padding:5px 0; outline:none; transition:border-color .2s; border-radius:0; font-size:13px;
}
.field input:focus, .field select:focus { border-color:var(--terra); }
.field input.invalid { border-color:var(--red); }
@keyframes fieldBlink {
  0%, 100% { border-color:var(--red); background:transparent; }
  50% { border-color:rgba(198,40,40,.15); background:rgba(198,40,40,.09); }
}
.field input.blink { animation:fieldBlink .65s ease-in-out 5; }
.field-hint { font-size:11px; color:var(--muted); }

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.toolbar { margin:0 24px 10px; display:flex; flex-direction:column; gap:8px; }
.trow { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.inwrap { position:relative; flex:1; display:flex; min-width:0; }
.inwrap input { width:100%; }
.inwrap .clear { position:absolute; right:6px; top:50%; transform:translateY(-50%); border:none; background:none; color:var(--muted); font-size:16px; padding:4px 6px; }
.mob-ico { display:none; }
.chips { display:flex; gap:5px; flex-wrap:wrap; }
.chip {
  padding:5px 12px; border-radius:20px; border:1.5px solid var(--border); background:#fff; font-size:11.5px;
  transition:all .15s; white-space:nowrap; display:inline-flex; align-items:center; gap:6px;
}
.chip:hover { border-color:var(--terra); color:var(--terra); }
.chip.active { background:var(--terra); border-color:var(--terra); color:#fff; }
.chip.off { opacity:.45; text-decoration:line-through; }
.chip.fav.active { background:var(--gold); border-color:var(--gold); color:#fff; }
.chip .n { font-size:10px; opacity:.75; }
.dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.dot-Kraft{background:#c8a060}.dot-Bocal{background:#3a7ad4}.dot-Verrine{background:#8a4ad4}
.dot-Vrac250g{background:#d47a2a}.dot-Vrac500g{background:#d45a0a}.dot-Autre{background:#d42a8a}
.chipscroll { position:relative; min-width:0; }
.scroll-hint, .scroll-hint-left { display:none; }
.tlabel { font-size:10px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.06em; white-space:nowrap; }
.step-wrap { display:flex; align-items:center; gap:6px; background:#fff; border:1.5px solid var(--border); border-radius:8px; padding:4px 10px; }
.scan-wrap .step-wrap { border:none; border-left:1.5px solid var(--line); border-radius:0; padding:0 0 0 12px; }
.step-wrap label { font-size:11px; color:#666; font-weight:600; white-space:nowrap; }
.step-input { width:54px; border:1.5px solid var(--border); border-radius:5px; padding:4px 6px; font-size:14px; font-weight:700; text-align:center; outline:none; }
.step-input:focus { border-color:var(--terra); }
.step-input.active { border-color:var(--green); background:var(--green-l); color:var(--green); }
.minibtn { padding:4px 9px; border-radius:5px; border:1.5px solid #ccc; background:#fff; color:#666; font-size:11.5px; }
.minibtn:hover { border-color:#888; color:var(--dark); }

/* séparateur « ou » entre recherche et douchette (bureau) */
.ou-row { gap:14px; align-items:center; margin:-3px 0; }
.ou-line { flex:1; height:1px; background:var(--border); }
.ou-text { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.12em; }

/* scanner (douchette + caméra) */
.scan-wrap { display:flex; align-items:center; gap:8px; background:#fff; border:2px solid var(--terra); border-radius:8px; padding:6px 10px; flex:1; min-width:280px; }
.scan-wrap label { font-weight:700; color:var(--terra); white-space:nowrap; font-size:12.5px; }
.scan-input { flex:1; min-width:120px; border:1.5px solid var(--border); border-radius:6px; padding:7px 10px; outline:none; font-size:14px; }
.scan-input:focus { border-color:var(--terra); }
.scan-fb { font-size:12px; font-weight:600; padding:5px 10px; border-radius:6px; min-width:140px; }
.scan-fb.ok { background:var(--green-l); color:#2e7d32; } .scan-fb.err { background:var(--red-l); color:var(--red); } .scan-fb.idle { color:#aaa; font-weight:400; }

/* ── Catalogue (bureau) ─────────────────────────────────────────────────── */
.catalogue { margin:0 24px 20px; }
.cat-section { margin-bottom:22px; }
.cat-title {
  font-family:'Playfair Display',Georgia,serif; font-size:15px; font-weight:700; color:var(--terra);
  padding:9px 0 6px; border-bottom:2px solid var(--lgold); display:flex; align-items:center; gap:8px;
  position:sticky; top:72px; background:var(--sand); z-index:5;
}
.cat-badge { font-family:'DM Sans',sans-serif; font-size:10px; background:var(--lgold); color:#7a5c30; padding:2px 7px; border-radius:10px; font-weight:600; }
table.grid { width:100%; border-collapse:collapse; background:#fff; }
.grid thead tr { background:var(--lgold); }
.grid th { text-align:left; padding:6px 8px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#7a5c30; white-space:nowrap; }
.grid td { padding:4px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.grid tr.pr:nth-child(even) { background:var(--sand-2); }
.grid tr.pr:hover { background:#eee8dc; }
.grid tr.pr.has { background:var(--green-l); }
.grid tr.first td { border-top:2px solid var(--line); }
.pname { font-weight:600; }
.pean { font-size:10.5px; color:#aaa; font-family:ui-monospace,Menlo,Consolas,monospace; }
.badge { display:inline-block; padding:1px 7px; border-radius:10px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; white-space:nowrap; }
.b-Kraft{background:#f0e8d0;color:#7a5c30}.b-Bocal{background:#d8eaff;color:#1a4a8a}.b-Verrine{background:#e8d8ff;color:#5a1a8a}
.b-Vrac250g{background:#ffe8d0;color:#8a4a1a}.b-Vrac500g{background:#ffd8b0;color:#8a3a0a}.b-Autre{background:#f0d8e8;color:#7a1a5a}
.tva21 { font-size:9.5px; color:var(--muted); margin-left:4px; }
.pu { text-align:right; font-weight:600; white-space:nowrap; }
.qty { width:64px; text-align:center; border:1.5px solid var(--border); border-radius:5px; padding:5px 4px; font-weight:600; background:#fff; outline:none; font-size:13px; -moz-appearance:textfield; }
.qty::-webkit-outer-spin-button, .qty::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.qty:focus { border-color:var(--terra); }
.qty.filled { border-color:var(--green); background:var(--green-l); color:var(--green); }
.ltot { text-align:right; font-weight:700; color:var(--green); white-space:nowrap; }
.ltot.zero { color:#ccc; font-weight:400; }
.fav-star {
  background:none; border:none; font-size:19px; line-height:1; padding:2px 6px; display:block; margin:0 auto;
  color:#d5ccbe; transition:color .15s, transform .1s; cursor:pointer;
}
.fav-star:hover { color:var(--gold); }
.fav-star:active { transform:scale(1.2); }
.fav-star.on { color:var(--gold); text-shadow:0 0 4px rgba(200,151,58,.45); }
.empty { text-align:center; padding:40px 20px; color:#aaa; font-size:14px; }

/* stepper */
.stepper { display:inline-flex; align-items:center; border:1.5px solid var(--border); border-radius:6px; background:#fff; overflow:hidden; }
.stepper button { width:36px; height:34px; border:none; background:#fff; font-size:18px; font-weight:700; color:var(--terra); }
.stepper button:active { background:var(--lgold); }
.stepper .qty { width:52px; height:34px; border:none; border-left:1px solid var(--line); border-right:1px solid var(--line); border-radius:0; }
.stepper .qty.filled { background:var(--green-l); }
.stepper.has { border-color:var(--green); }

/* stepper compact dans le tableau bureau */
html:not(.m-mobile) .grid .stepper { margin:0 auto; }
html:not(.m-mobile) .grid .stepper button { width:26px; height:27px; font-size:15px; }
html:not(.m-mobile) .grid .stepper .qty { width:46px; height:27px; padding:2px 3px; }

/* ── Barre de synthèse ──────────────────────────────────────────────────── */
.sbar {
  position:fixed; bottom:0; left:0; right:0; background:var(--dark); color:#fff; padding:10px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:14px; box-shadow:0 -3px 16px rgba(0,0,0,.35);
  z-index:200; flex-wrap:wrap; min-height:var(--bar-h);
}
.sitems { display:flex; gap:22px; flex-wrap:wrap; align-items:flex-end; }
.sitem { display:flex; flex-direction:column; }
.slabel { font-size:10px; color:var(--muted-2); text-transform:uppercase; letter-spacing:.08em; }
.sval { font-size:17px; font-weight:700; font-family:'Playfair Display',Georgia,serif; line-height:1.2; }
.sval.main { color:var(--gold); font-size:22px; }
.sdetail { font-size:10px; color:var(--muted-2); }
.snote { font-size:11px; color:var(--gold); font-style:italic; line-height:1.35; max-width:210px; display:inline-block; }
.snote-item { align-self:center; }
html.m-mobile .snote { font-size:10.5px; max-width:none; margin-top:1px; }
.sbtns { display:flex; gap:8px; flex-wrap:wrap; }
.sbtns-row { display:flex; gap:8px; flex-wrap:wrap; }
.reset-link { background:none; border:none; color:var(--muted-2); font-size:11.5px; text-decoration:underline; padding:1px 4px; align-self:center; }
.btn { padding:10px 16px; border-radius:6px; border:none; font-size:13px; font-weight:600; transition:all .15s; display:inline-flex; align-items:center; gap:6px; justify-content:center; }
.btn:disabled { opacity:.45; cursor:not-allowed; }
.btn-green { background:var(--green); color:#fff; } .btn-green:hover:not(:disabled) { background:var(--green-d); }
.btn-terra { background:var(--terra); color:#fff; } .btn-terra:hover:not(:disabled) { background:var(--terra-d); }
.btn-gold  { background:var(--gold); color:var(--dark); } .btn-gold:hover:not(:disabled) { filter:brightness(.93); }
.btn-ghost { background:transparent; color:#bba; border:1.5px solid #555; } .btn-ghost:hover { color:#fff; border-color:#aaa; }
.btn-light { background:#fff; color:var(--dark); border:1.5px solid var(--border); } .btn-light:hover { border-color:var(--terra); color:var(--terra); }
.btn-lg { padding:13px 20px; font-size:15px; }

/* ── Modales ────────────────────────────────────────────────────────────── */
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:500; align-items:center; justify-content:center; padding:12px; }
.overlay.open { display:flex; }
.modal { background:#fff; border-radius:12px; width:min(780px,100%); max-height:92vh; display:flex; flex-direction:column; box-shadow:0 8px 40px rgba(0,0,0,.35); overflow:hidden; }
.modal.narrow { width:min(560px,100%); }
.modal-hdr { background:var(--dark); color:#fff; padding:14px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.modal-hdr h2 { font-family:'Playfair Display',Georgia,serif; font-size:17px; }
.modal-hdr .sub { color:var(--muted-2); font-size:12px; }
.modal-close { background:none; border:none; color:#fff; font-size:24px; line-height:1; padding:0 6px; opacity:.75; }
.modal-close:hover { opacity:1; }
.modal-body { overflow-y:auto; padding:16px 20px; flex:1; -webkit-overflow-scrolling:touch; }
.modal-footer { padding:12px 20px; border-top:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; background:var(--sand-2); flex-wrap:wrap; gap:10px; }
.mtable { width:100%; border-collapse:collapse; font-size:13px; }
.mtable th { text-align:left; padding:6px 8px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#7a5c30; background:var(--lgold); white-space:nowrap; }
.mtable td { padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.mtable tr:nth-child(even) td { background:var(--sand-2); }
.mtable td.r { font-weight:600; }
.del { border:none; background:none; color:#bbb; font-size:16px; padding:2px 6px; } .del:hover { color:var(--red); }
.totals { display:flex; gap:20px; flex-wrap:wrap; }
.tot { display:flex; flex-direction:column; }
.tot-label { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.tot-val { font-size:17px; font-weight:700; font-family:'Playfair Display',Georgia,serif; }
.tot-val.main { color:var(--terra); font-size:21px; }
.tot-sub { font-size:10.5px; color:var(--muted); }

.ask-q { font-size:15px; font-weight:600; margin:6px 0 16px; line-height:1.5; }
.ord-notes { width:100%; min-height:90px; border:1.5px solid var(--border); border-radius:8px; padding:10px 12px; font-family:inherit; font-size:14px; outline:none; resize:vertical; background:#fff; }
.ord-notes:focus { border-color:var(--terra); }
.callout { border-left:4px solid var(--gold); background:#fff8e8; padding:10px 12px; border-radius:6px; font-size:12.5px; margin-bottom:12px; }
.callout.red { border-color:var(--red); background:var(--red-l); }
.callout.green { border-color:var(--green); background:var(--green-l); }
.ref { font-family:ui-monospace,Menlo,Consolas,monospace; font-weight:700; color:var(--terra); }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position:fixed; bottom:calc(var(--bar-h) + 18px); left:50%; transform:translateX(-50%); background:var(--green); color:#fff;
  padding:10px 18px; border-radius:8px; font-weight:600; font-size:13px; box-shadow:0 4px 16px rgba(0,0,0,.25);
  opacity:0; transition:opacity .25s; pointer-events:none; z-index:999; max-width:92vw; text-align:center;
}
.toast.show { opacity:1; } .toast.err { background:var(--red); } .toast.info { background:var(--dark); }

/* ── Caméra ─────────────────────────────────────────────────────────────── */
.cam { display:none; position:fixed; inset:0; background:#000; z-index:1000; flex-direction:column; }
.cam.open { display:flex; }
.cam-top { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; color:#fff; background:rgba(0,0,0,.6); position:absolute; top:0; left:0; right:0; z-index:2; }
.cam-top h3 { font-size:15px; font-weight:600; flex:1; display:flex; align-items:center; gap:8px; }
.cam-ctls { display:flex; align-items:center; gap:10px; margin-right:10px; }
.cam-ctl { background:rgba(255,255,255,.15); color:#fff; border:1.5px solid rgba(255,255,255,.5); border-radius:20px; padding:6px 12px; font-weight:600; font-size:12.5px; }
.cam-ctl.on { background:var(--gold); border-color:var(--gold); color:var(--dark); }
.cam-zoom { display:flex; align-items:center; gap:6px; color:#fff; font-size:14px; }
.cam-zoom input { width:110px; accent-color:var(--gold); }
.cam-video-wrap { flex:1; position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.cam video { width:100%; height:100%; object-fit:cover; }
#cam-snap { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1; }
.cam-badge { position:absolute; top:58px; left:50%; transform:translateX(-50%); z-index:3; background:rgba(0,0,0,.7); color:#fff; padding:8px 16px; border-radius:20px; font-weight:600; font-size:14px; }
.cam-badge.ok { background:var(--green); } .cam-badge.err { background:var(--red); }
.cam.analyzing .cam-frame { border-color:var(--gold); animation:camPulse 1s ease-in-out infinite; }
@keyframes camPulse { 0%,100% { box-shadow:0 0 0 2000px rgba(0,0,0,.35); } 50% { box-shadow:0 0 0 2000px rgba(0,0,0,.55); } }
.cam-shoot { width:100%; margin-top:10px; transition:transform .08s, filter .08s; }
.cam .btn:active, .cam .btn.pressed, .cam-close:active, .cam-close.pressed, .cam-ctl:active { transform:scale(.96); filter:brightness(.85); }
.cam-diag { margin-top:8px; font-size:11px; color:var(--muted); font-family:ui-monospace,Menlo,Consolas,monospace; min-height:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cam-shoot:disabled { opacity:.6; }
.cam-frame { position:absolute; left:8%; right:8%; top:50%; height:34%; transform:translateY(-50%); border:3px solid rgba(255,255,255,.85); border-radius:12px; box-shadow:0 0 0 2000px rgba(0,0,0,.35); pointer-events:none; z-index:2; }
.cam-frame::after { content:''; position:absolute; left:6%; right:6%; top:50%; height:2px; background:var(--terra); opacity:.9; }
.cam-hint { position:absolute; z-index:3; bottom:12px; left:0; right:0; text-align:center; color:#eee; font-size:13px; text-shadow:0 1px 3px #000; padding:0 12px; }
.cam-panel { background:#fff; padding:12px 14px calc(12px + env(safe-area-inset-bottom)); border-top:3px solid var(--terra); }
.cam-last { display:flex; align-items:center; gap:10px; min-height:44px; }
.cam-last .info { flex:1; min-width:0; }
.cam-last .info b { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cam-last .info span { font-size:12px; color:var(--muted); }
.cam-close { background:#fff; color:var(--dark); border:none; border-radius:6px; padding:8px 14px; font-weight:700; }

/* ── Login ──────────────────────────────────────────────────────────────── */
.login { position:fixed; inset:0; background:var(--sand); z-index:9999; display:flex; align-items:center; justify-content:center; padding:16px; }
.login-box { background:#fff; border-radius:16px; padding:40px 32px; box-shadow:0 8px 40px rgba(0,0,0,.12); text-align:center; width:min(380px,100%); }
.login-box img { width:96px; margin-bottom:14px; }
.login-box h2 { font-family:'Playfair Display',Georgia,serif; font-size:22px; margin-bottom:6px; }
.login-box p { font-size:13px; color:var(--muted); margin-bottom:22px; }
.login-box input { width:100%; border:2px solid var(--border); border-radius:8px; padding:12px 16px; font-size:16px; text-align:center; outline:none; margin-bottom:12px; letter-spacing:2px; }
.login-box input:focus { border-color:var(--terra); }
.login-box button { width:100%; background:var(--terra); color:#fff; border:none; border-radius:8px; padding:13px; font-size:15px; font-weight:700; }
.login-err { color:var(--red); font-size:13px; margin-top:8px; min-height:20px; font-weight:600; }

/* ── Mode MOBILE / TABLETTE ─────────────────────────────────────────────── */
html.m-mobile body { font-size:14px; padding-bottom:calc(var(--bar-h) + 30px); }
html.m-mobile .header { padding:8px 12px; gap:10px; }
html.m-mobile .header img { width:40px; height:40px; }
html.m-mobile .header-text h1 { font-size:16px; }
html.m-mobile .header-text p, html.m-mobile .h1-sub { display:none; }
html.m-mobile .client-block { margin:10px 12px; padding:12px 14px; }
html.m-mobile .client-grid { grid-template-columns:1fr 1fr; gap:10px 12px; }
html.m-mobile .client-grid .field.wide { grid-column:1 / -1; }
html.m-mobile .field input, html.m-mobile .field select { font-size:16px; padding:7px 0; }
html.m-mobile .client-block.collapsed .client-grid { display:none; }
/* fond pleine largeur : sans quoi le liseré vert des cartes réapparaît dans les marges
   et l'interstice transparents quand elles défilent sous la barre collante */
html.m-mobile .toolbar { margin:0 0 2px; position:sticky; top:54px; z-index:50; background:var(--sand); padding:8px 12px; box-shadow:0 2px 6px rgba(26,18,8,.06); }   /* top:54px : chevauche l'en-tête de 2 px pour supprimer le joint sous-pixel où le contenu transparaît */
html.m-mobile .trow.desk { display:none; }
html.m-mobile #search-box { border:none; background:transparent; padding:0; }
html.m-mobile #search-box label { display:none; }
html.m-mobile .mob-ico { display:block; position:absolute; left:11px; top:50%; transform:translateY(-50%); font-size:14px; pointer-events:none; z-index:1; }
html.m-mobile #search { font-size:16px; padding:11px 36px; }
html.m-mobile .chipscroll { flex:0 0 100%; }
html.m-mobile .chipscroll .chips { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding-bottom:2px; padding-right:30px; scroll-padding-left:30px; }
html.m-mobile .chipscroll .chips::-webkit-scrollbar { display:none; }
html.m-mobile .scroll-hint {
  display:flex; position:absolute; right:0; top:0; bottom:2px; width:38px;
  align-items:center; justify-content:flex-end; padding-right:2px;
  color:var(--terra); font-size:26px; font-weight:700; line-height:1;
  text-shadow:0 0 3px var(--sand);
  background:linear-gradient(to right, rgba(245,239,230,0), var(--sand) 55%);
  pointer-events:none; transition:opacity .25s;
}
html.m-mobile .chipscroll.at-end .scroll-hint { opacity:0; }
html.m-mobile .scroll-hint-left {
  display:flex; position:absolute; left:0; top:0; bottom:2px; width:38px;
  align-items:center; justify-content:flex-start; padding-left:2px;
  color:var(--terra); font-size:26px; font-weight:700; line-height:1;
  text-shadow:0 0 3px var(--sand);
  background:linear-gradient(to left, rgba(245,239,230,0), var(--sand) 55%);
  pointer-events:none; transition:opacity .25s;
}
html.m-mobile .chipscroll.at-start .scroll-hint-left { opacity:0; }
html.m-mobile .chip { padding:8px 14px; font-size:13px; }
html.m-mobile .catalogue { margin:0 12px 20px; }
html.m-mobile .cat-title { position:static; font-size:16px; }
html.m-mobile .pcard { background:#fff; border:1px solid var(--border); border-radius:10px; margin:10px 0; overflow:hidden; }
html.m-mobile .pcard.has { border-color:var(--green); box-shadow:0 0 0 1px var(--green); }
html.m-mobile .pcard-h { display:flex; align-items:center; gap:10px; padding:10px 12px 6px; }
html.m-mobile .pcard-h .pname { flex:1; font-size:15px; }
html.m-mobile .vrow { display:flex; align-items:center; gap:8px; padding:7px 12px; border-top:1px solid var(--line); }
html.m-mobile .vrow.has { background:var(--green-l); }
html.m-mobile .vrow .vinfo { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
html.m-mobile .vrow .vline { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
html.m-mobile .vrow .vqte { font-size:12px; color:var(--muted); }
html.m-mobile .vrow .pu { font-size:14px; }
html.m-mobile .vrow .ltot { font-size:12.5px; margin-left:auto; }
html.m-mobile .fav-star { font-size:24px; padding:6px 8px; margin:0; }
html.m-mobile .sbar { padding:8px 12px calc(8px + env(safe-area-inset-bottom)); gap:8px; flex-wrap:nowrap; }
html.m-mobile .sitems { gap:14px; }
html.m-mobile .sitem.desk { display:none; }
html.m-mobile .sval.main { font-size:20px; }
html.m-mobile .sbtns .btn.desk { display:none; }
html.m-mobile .sbtns { flex-wrap:nowrap; flex-direction:column; gap:3px; align-items:stretch; }
html.m-mobile .sbtns-row { flex-wrap:nowrap; }
html.m-mobile .sitems { flex:1; min-width:0; }
html.m-mobile .btn { padding:11px 14px; font-size:14px; }
html.m-mobile .fab {
  position:fixed; right:14px; bottom:calc(var(--bar-h) + 22px + env(safe-area-inset-bottom)); z-index:210;
  width:60px; height:60px; border-radius:50%; background:var(--terra); color:#fff; border:none; font-size:26px;
  box-shadow:0 6px 18px rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center;
}
html.m-mobile .fab:active { background:var(--terra-d); }
html.m-mobile .modal { width:100%; max-height:calc(100vh - 12px); border-radius:14px; }
html.m-mobile .overlay { align-items:flex-end; padding:6px; }
html.m-mobile .mtable .hide-m { display:none; }
html.m-mobile .mtable td, html.m-mobile .mtable th { padding:6px 4px; }
html.m-mobile .mtable .stepper button { width:28px; height:30px; font-size:16px; }
html.m-mobile .mtable .stepper .qty { width:38px; height:30px; font-size:13px; }
html.m-mobile .mtable .sub-m { display:block; font-size:11px; color:var(--muted); font-weight:400; }
html.m-mobile .mtable .del { padding:2px 2px; }
html:not(.m-mobile) .mtable .sub-m { display:none; }
html.m-mobile .totals { gap:12px; }
html:not(.m-mobile) .fab, html:not(.m-mobile) .mob { display:none !important; }
html.m-mobile .desk-only { display:none !important; }

/* ── Impression ─────────────────────────────────────────────────────────── */
@media print {
  body { padding:0; background:#fff; font-size:11px; }
  .header, .toolbar, .sbar, .fab, .client-block, .catalogue, .toast, .cam { display:none !important; }
  .overlay.open { position:static; display:block; background:none; padding:0; }
  .overlay:not(.open) { display:none !important; }
  .modal { box-shadow:none; max-height:none; width:100%; border-radius:0; }
  .modal-close, .modal-footer .btn, .del, .stepper button, .no-print { display:none !important; }
  .print-only { display:block !important; }
}
.print-only { display:none; }
