/* shop.esnervtlangsam.ch — Design-Tokens aus dem Brand-Kit, wie die Hauptseite:
   sieben Farbflächen, Faro Display für Titel, Komet für Fliesstext. */
@font-face {
  font-family: 'Faro';
  src: url('/fonts/FaroWeb-DisplayLucky.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
:root {
  --ink: #25201c;
  --rosa: #e7a89b;
  --flieder: #cdacd2;
  --blau: #4a5ba6;
  --creme: #f1e7de;
  --weiss: #fff;
  --rot: #e3051a;
  --bg: #14100e;
  --line: rgba(241, 231, 222, 0.16);
  --muted: rgba(241, 231, 222, 0.7);
  --fd: 'Faro', 'Arial Black', sans-serif;
  --fb: 'komet', 'Helvetica Neue', Arial, sans-serif;
  --titel-lh: 1.05;
  --titel-pad: 0.19em 0.32em;
  --gutter: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--creme);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.admin { font-family: 'Helvetica Neue', Arial, sans-serif; }
::selection { background: var(--rosa); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
b, strong { font-weight: 700; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }
small { font-size: 0.85em; opacity: 0.8; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.95em; }

/* ---------- Rahmen ---------- */
.top, .page, .foot { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { font-family: var(--fd); font-size: 15px; letter-spacing: 0.02em; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.nav a, .nav .linkbtn { text-decoration: none; opacity: 0.85; }
.nav a:hover, .nav .linkbtn:hover { opacity: 1; text-decoration: underline; }
.page { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-bottom: 48px; }
.foot { padding: 20px var(--gutter) 28px; border-top: 1px solid var(--line); }
.inline { display: inline; }
.linkbtn { text-decoration: underline; text-underline-offset: 3px; padding: 0; }

/* ---------- Typo-Bausteine (wie Hauptseite) ---------- */
.kicker {
  display: block; font-family: var(--fd); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.8; margin-top: 18px;
}
.kicker:first-child { margin-top: 0; }
.plate {
  display: inline-block; align-self: flex-start; font-family: var(--fd); font-weight: 400;
  font-size: clamp(34px, 7vw, 64px); line-height: var(--titel-lh); padding: var(--titel-pad);
}
h1.plate { margin-top: -6px; }
.plate-a { background: var(--blau); color: var(--creme); }
.plate-b { background: var(--creme); color: var(--ink); }
.plate-c { background: var(--flieder); color: var(--rot); }
h2 { font-family: var(--fd); font-weight: 400; font-size: clamp(19px, 2.6vw, 24px); line-height: 1.15; }
.note { font-style: italic; opacity: 0.75; font-size: 13.5px; }
.banner { align-self: flex-start; background: var(--creme); color: var(--ink); padding: 0.6em 0.9em; }
.banner.warn { background: var(--rosa); }
.flash { align-self: flex-start; background: var(--creme); color: var(--ink); padding: 0.6em 0.9em; }
.flash.warn { background: var(--rosa); }

/* ---------- Buttons & Formulare ---------- */
.cta {
  display: inline-block; font-family: var(--fd); font-size: 15px; letter-spacing: 0.02em; text-decoration: none;
  background: var(--rot); color: var(--creme); padding: 0.7em 1.1em; line-height: 1.1;
}
.cta:hover { background: var(--creme); color: var(--rot); }
.cta:disabled { opacity: 0.6; cursor: progress; }
.btn { background: var(--creme); color: var(--ink); padding: 0.55em 0.9em; font-size: 15px; }
.btn:hover { background: var(--rosa); }
select, input[type="text"], input[type="number"], input[type="password"], input[type="date"] {
  background: var(--creme); color: var(--ink); border: 0; padding: 0.45em 0.6em; font-size: 16px; min-width: 0;
}
label { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 360px; }
.stack input { width: 100%; }
.codeForm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.codeForm input { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; width: 15ch; }

/* ---------- Shop ---------- */
ul.shop { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.shopItem {
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 14px; background: rgba(241, 231, 222, 0.05); border: 1px solid var(--line);
}
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; scrollbar-width: none; aspect-ratio: 1; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: start; }
.gallery.multi { cursor: grab; }
.shopPh {
  display: flex; align-items: flex-end; aspect-ratio: 1; padding: 10px; background: var(--blau); color: var(--creme);
  font-family: var(--fd); font-size: 15px; line-height: 1.15;
}
.shopTxt { display: flex; flex-direction: column; gap: 10px; }
.shopPrice { font-family: var(--fd); font-size: 16px; }
.shopStock { align-self: flex-start; background: var(--flieder); color: var(--rot); font-family: var(--fd); font-size: 13px; letter-spacing: 0.04em; padding: 0.5em 0.8em; }
.shopStatus { font-style: italic; opacity: 0.75; }
.shopForm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
ul.rows { list-style: none; display: flex; flex-direction: column; gap: 6px; }
ul.rows li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
ul.rows li > span:last-child { flex: none; font-variant-numeric: tabular-nums; }
ul.rows li a { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-decoration: none; padding: 8px 10px; background: rgba(241, 231, 222, 0.07); }
ul.rows li a:hover { background: var(--creme); color: var(--ink); }
ul.rows.dl li a { font-size: 16px; padding: 12px 14px; }
ul.rows.dl small { display: block; font-size: 12.5px; opacity: 0.75; }
.dlcode code { display: inline-block; font-size: clamp(22px, 5vw, 34px); letter-spacing: 0.1em; background: var(--creme); color: var(--ink); padding: 0.3em 0.5em; }
.shopLegal a { text-underline-offset: 2px; }

/* ---------- Cookie-Hinweis ---------- */
.cookie {
  position: fixed; left: 12px; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 12px;
  background: var(--creme); color: var(--ink); padding: 8px 10px 8px 14px; font-size: 13px; max-width: calc(100vw - 24px);
}
.cookie button { font-size: 20px; line-height: 1; padding: 0 4px; }

/* ---------- Admin ---------- */
.placeBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.placeBar .kicker { margin: 0 6px 0 0; }
.chip { background: rgba(241, 231, 222, 0.1); color: var(--creme); padding: 0.45em 0.8em; font-size: 14px; text-decoration: none; border: 1px solid var(--line); }
.chip.on { background: var(--creme); color: var(--ink); }
.chip.csv { background: var(--blau); color: var(--creme); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.card { background: rgba(241, 231, 222, 0.05); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cardHead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cardHead h2 { font-size: 18px; }
.stockNum { flex: none; font-family: var(--fd); font-size: 34px; line-height: 1; background: var(--creme); color: var(--ink); padding: 0.15em 0.35em; min-width: 2.2em; text-align: center; }
.stockNum.low { background: var(--flieder); color: var(--rot); }
.stockNum.zero { background: var(--rot); color: var(--creme); }
.stockNum.none { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.saleForm { display: flex; flex-direction: column; gap: 10px; }
.saleRow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.saleRow input[type="number"] { width: 6ch; }
.unit { font-size: 14px; opacity: 0.8; }
.saleBtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big { font-family: var(--fd); font-size: 20px; padding: 0.8em 0.5em; line-height: 1; }
.big.cash { background: var(--creme); color: var(--ink); }
.big.twint { background: var(--ink); color: var(--creme); border: 1px solid var(--creme); }
.big:hover { background: var(--rosa); color: var(--ink); }
.corr summary { cursor: pointer; font-size: 14px; opacity: 0.8; }
.corrRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.corrRow input[type="number"] { width: 7ch; }
.corrRow input[type="text"] { flex: 1 1 10ch; min-width: 8ch; }
.createRow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.createRow input[type="number"] { width: 7ch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-family: var(--fd); font-weight: 400; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.undone td { opacity: 0.45; text-decoration: line-through; }
.tbl tr.sum td { font-weight: 700; border-bottom: 0; }
.tbl.log td:nth-child(4), .tbl.log td:nth-child(5) { word-break: break-word; }
.tbl.codes code { font-size: 14px; }

@media (max-width: 560px) {
  .shopItem { grid-template-columns: minmax(0, 1fr); }
  .gallery, .shopPh { max-width: 320px; }
  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 5px 5px; }
}
@media (min-width: 761px) {
  :root { --gutter: 32px; }
}
