/* Hannes Express – dunkles Spiele-Website-Design mit Pixel-Akzenten.
   Alle Muster, Icons und die Landschaft sind selbst erstellt (keine Original-Assets). */

@font-face { font-family: 'Pixelify'; src: url('/fonts/pixelify-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pixelify'; src: url('/fonts/pixelify-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
/* Ziffern in der Pixel-Schrift sind schwer lesbar (2 sieht aus wie 8) – deshalb kommen
   alle Zahlen in Pixel-Texten aus Nunito. unicode-range gilt nur für 0–9. */
@font-face { font-family: 'Ziffern'; src: url('/fonts/nunito-700.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0030-0039; }
@font-face { font-family: 'Ziffern'; src: url('/fonts/nunito-800.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0030-0039; }

:root {
  --pat-grass: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1klEQVR42m2TyQ1CMQxEXQsnhJA4cEDiAm1QAi1QAiXQ7EcT6UWT+T44TryOl9Txfd4un+sg3UW3733yx++5YSN+eJ2mXrLSIQFB5MAdJw+CPUHKjVCSHUIHQkhoZgDPzhu4LnO0SwkdxNQ5UgUfAdLZs8sY7kGwXUrQw2vPRvp0lhJwdljZ6dTtetCNCY4OBDnqQqEMmUWGXo6PEHm5gY8sDXkr6A5BwgaRL0y3B7ovPUi42dBctIHAF8MXhR3IKTiSgSBn7n+im4onmZ8pKZeFXnR/4Q+5m9q+tG4otgAAAABJRU5ErkJggg==");
  --pat-brick: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAdUlEQVR42mOY7Kb/Hxf2MjX4T0ieIc9I6X+dlQYYI7NBGKQAXQxZLdgAXJphBmDTjCzPACIowQyk+hldjIFUJ6OLMaAHCnqYIIcNVgOoGgZkpQNcUYjuJZzRSEw6wGfBIEgH2KKJlDDBmZDQDcFmAEiM4jAAAEDl1L44zkMuAAAAAElFTkSuQmCC");
  --pat-amethyst: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAzklEQVR42m2Suw0CQQwFXQwhIcQQE5IgOkBUQA20cYUu8klzmntssNqPf2/Hrsf1Oy7H13jfl9Fn1u30+dvbj71Xv1cGYMQZG+cuZHuR0VVcIROfD8914VspiwCCqModNfgV2czATg5Cgb9WzpbACO7kCZG4msFidTX/3Uk3BpbWSQwonVHiezkAwpZqiDMu5Udz8JnezzhUtgZF7v/MhtKaDUzC9GDloG0K3F8nNCNaaiYrRD+w58xT0Sp3bcyKSZ02J4vdJKbcGQtPap9/jfL0Qe6mpKMAAAAASUVORK5CYII=");
  --pat-gold: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAzElEQVR42n2SzQ1CMQyDswEnJG7cGYgNmABWQOwAO7AHUxX5Sd+TG/w4REla13V+6nHZj+t5N563w3jfj4uX6Vy5vHIwGNgi8ccCQ5DuJ4LP6zQd6rHOZK4A38nKf+PCy0oGXpiC2ZW4/H/xQtDrgtDJ8F7GROAX3vHUOIiEUV6psz1PzfwpwR/7T4nYyyvk9oXxKaSYpk97wEhdYpoOI1x74CAWKPUB8/Kqj6XHMiclJ67OvlXO1jauq4x1MpfrRCgtAJKVfkpT8fX/AtT6JIkxvTtCAAAAAElFTkSuQmCC");
  --pat-dirt: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAyklEQVR42nWSsQ6DMAxE/Q1dmBBLmRjbDXXuzv//S5AjPet0MkMETpznsy9xnfv4f7bxO9bxfS/jWF/zv4vzP/c0DoKEAAOooNxTIPmhARUc4JcoUgpIQJ4mEvt5teA9aZ9UckVULwUK6aSnGi6Sm99ckYdekQsKZ4CqcAJ0aE5n+Rnw6YIPxv99+VkB9MGofJWudlYLPrROKvvMBnCCousdm/wRddaGPiIccGcU5E6EUl16147m1QxUVueKDlIfVtn45D8XdXgOvgEHMH/Kwy75fwAAAABJRU5ErkJggg==");

  --bg: #0f1615;
  --bg2: #0a1010;
  --surface: #151f1d;
  --surface2: #1c2826;
  --line: #24312e;
  --line2: #33443f;
  --text: #eef3ee;
  --soft: #c7d4cd;
  --muted: #8fa59c;
  --leaf: #5e9c6d;
  --cream: #e8e8c6;
  --green: #6fd35a;
  --green-d: #3f8f2e;
  --dia: #4ee6e0;
  --gold: #ffd84a;
  --red: #ef5b5b;
  --pixel: 'Ziffern', 'Pixelify', 'Courier New', monospace;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 700; line-height: 1.1; letter-spacing: .5px; }
a { color: var(--green); }
img.px { image-rendering: pixelated; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: var(--green-d); color: #fff; }

/* ---------- Kopfzeile ---------- */

.site-header { position: relative; z-index: 5; }
.hdr {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  flex: none;
}
.brand img { width: 38px; height: 30px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .4)); }
.brand span {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 19px;
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.brand span i { font-style: normal; color: var(--green); display: block; }
.brand:hover span { color: var(--cream); }

.nav { flex: 1; display: flex; justify-content: center; gap: 6px; }
.nav a {
  position: relative;
  padding: 8px 14px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 17px;
  color: var(--soft);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px;
}
.nav a:hover { color: #fff; background: var(--surface); }
.nav a.active { color: #fff; }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 3px;
  background: var(--green);
  box-shadow: 0 2px 0 var(--green-d);
}
.nav .badge { margin-left: 6px; vertical-align: 2px; }

.hdr-right { display: flex; align-items: center; gap: 10px; flex: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  max-width: 190px;
  padding: 0 14px 0 5px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: transparent;
  border: 2px solid var(--line2);
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { border-color: var(--soft); }
.chip svg { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface2); padding: 5px; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.empty-name span { color: var(--gold); }
.cart-btn svg { width: 22px; height: 22px; }

/* ---------- Seitenrahmen ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 20px 56px;
}
.page-title {
  margin: 18px 0 8px;
  font-size: clamp(30px, 5vw, 46px);
  color: var(--cream);
  text-shadow: 0 4px 0 rgba(0, 0, 0, .45);
}
.lead { margin: 0 0 24px; color: var(--muted); max-width: 640px; }

.divider { display: flex; align-items: center; gap: 14px; margin: 34px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.divider span { width: 9px; height: 9px; background: var(--leaf); transform: rotate(45deg); flex: none; }
.divider.left::before { flex: 0 0 18%; }

.section-title { text-align: center; margin: 0 0 6px; font-size: clamp(26px, 4vw, 36px); color: #fff; }
.section-sub { text-align: center; margin: 0 auto 28px; color: var(--muted); max-width: 560px; }

/* ---------- Hero mit Pixel-Landschaft ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 460px;
  padding: 78px 24px 190px;
  margin: 4px 0 26px;
  text-align: center;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(8, 22, 48, .45), rgba(8, 22, 48, .18) 45%, rgba(8, 22, 48, 0) 62%), url('/img/hero.png') center bottom / cover no-repeat, #2a69bd;
  image-rendering: pixelated;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .25);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.hero h1 {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(36px, 7vw, 70px);
  color: #fff;
  text-shadow: 0 4px 0 #1a3f7a, 0 8px 24px rgba(0, 0, 0, .35);
}
/* Gelber Spruch: eigene Zeile über der Überschrift, damit er nichts überdeckt */
.hero .splash {
  position: relative;
  display: inline-block;
  margin: 0 0 18px;
  padding: 2px 4px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(15px, 2.4vw, 20px);
  color: #ffff55;
  text-shadow: 2px 2px 0 #3f3f00;
  transform: rotate(-4deg);
  animation: splash .5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes splash { to { transform: rotate(-4deg) scale(1.07); } }
.hero p {
  position: relative;
  max-width: 560px;
  margin: 0 0 26px;
  font-size: 18px;
  font-weight: 700;
  color: #f2f7ff;
  text-shadow: 0 2px 0 rgba(20, 50, 100, .6);
}
.hero .btn-row { justify-content: center; margin: 0; position: relative; }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 18px;
  padding: 14px 20px;
  margin: 0 0 8px;
  color: #232318;
  background: var(--cream);
  border-radius: 18px;
  box-shadow: 0 5px 0 #9b9b7c;
}
.features div { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; line-height: 1.25; }
.features svg { width: 28px; height: 28px; flex: none; }

/* ---------- Buttons ---------- */

.btn {
  --b: #2a3935;
  --edge: #090e0d;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px 12px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.1;
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .28);
  background: var(--b);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--edge), inset 0 2px 0 rgba(255, 255, 255, .14);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s, filter .15s, box-shadow .08s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), inset 0 2px 0 rgba(255, 255, 255, .14); }
.btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn-green { --b: #4fae3a; --edge: #2a6a1d; }
.btn-red { --b: #c94545; --edge: #7a2222; }
.btn-dia { --b: #3fc9c3; --edge: #1d7672; color: #0b2b2a; text-shadow: none; }
.btn-gold { --b: #e6b73a; --edge: #8a6512; color: #2a1d00; text-shadow: none; }
.btn-light { --b: var(--cream); --edge: #9b9b7c; color: #1c1c14; text-shadow: none; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--soft);
  border-radius: 999px;
  box-shadow: none;
  min-height: 42px;
  padding: 6px 18px 8px;
}
.btn-outline:hover { background: rgba(255, 255, 255, .06); border-color: #fff; filter: none; }
.btn-outline:active { transform: translateY(1px); box-shadow: none; }
.btn-small { min-height: 36px; padding: 6px 14px 8px; font-size: 15px; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.btn-link {
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--green);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.more-link::after { content: '→'; font-family: var(--body); font-weight: 800; transition: transform .15s; }

.badge {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px 2px;
  font-family: var(--pixel);
  font-size: 13px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  color: #fff;
  text-shadow: none;
  background: var(--red);
  border-radius: 999px;
  box-shadow: 0 2px 0 #7a2222;
}
.badge-new { background: var(--red); }
.badge-dia { background: #1f8f8a; box-shadow: 0 2px 0 #10504d; }

/* ---------- Karten & Panels ---------- */

.panel {
  margin: 0 0 20px;
  padding: 22px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.panel h2 { margin: 0 0 14px; font-size: 26px; color: var(--cream); }
.panel h3 { margin: 20px 0 8px; font-size: 20px; color: #fff; }
.panel.dark { background: var(--bg2); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }

/* Bild-Kacheln mit selbstgemachten Block-Mustern je Kategorie */
.slot {
  --pat: var(--pat-dirt);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 18%;
  overflow: hidden;
  background: #2a2a2a var(--pat) center / 40px repeat;
  image-rendering: pixelated;
  border: 2px solid rgba(0, 0, 0, .45);
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 4px 0 rgba(0, 0, 0, .35);
}
.slot::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .25), transparent 62%); }
.slot img, .slot svg { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); }
.slot img:not(.px) { image-rendering: auto; }
.slot .count {
  position: absolute;
  right: 6px;
  bottom: 2px;
  font-family: var(--pixel);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}
.cat-items { --pat: var(--pat-grass); }
.cat-bau { --pat: var(--pat-brick); }
.cat-dienst { --pat: var(--pat-amethyst); }
.cat-sonder { --pat: var(--pat-gold); }

/* Katalog-Reiter im Stil "• Aktiv •" */
.cat-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; margin: 0 0 6px; }
.ctab {
  position: relative;
  padding: 6px 4px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 22px;
  color: var(--leaf);
  background: none;
  border: 0;
  cursor: pointer;
}
.ctab:hover { color: #9fd3a9; }
.ctab.active { color: #fff; }
.ctab.active::before, .ctab.active::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 12px 5px;
  background: #fff;
  border-radius: 50%;
}

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 34px 28px; }
.pcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.pcard .slot { aspect-ratio: 16 / 10; padding: 0; border-radius: 18px; transition: transform .15s; }
.pcard .slot img { width: 44%; height: 72%; }
.pcard .slot svg { width: 26%; height: 56%; }
.pcard:hover .slot, .pcard:focus-visible .slot { transform: translateY(-4px); }
.pcard:focus-visible { outline: none; }
.pcard:focus-visible .slot { outline: 3px solid var(--cream); outline-offset: 3px; }
.pcard h3 { margin: 6px 0 0; font-size: 25px; color: #fff; }
.pcard p { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.pcard:hover .more-link::after { transform: translateX(4px); }
.pcard-cat { font-family: var(--pixel); font-size: 14px; color: var(--leaf); }

.price { display: inline-flex; align-items: center; gap: 5px; font-family: var(--pixel); font-weight: 700; white-space: nowrap; }
.price .unit { font-family: var(--body); font-weight: 700; font-size: .85em; color: var(--muted); }
svg.dia { width: 1.1em; height: 1.1em; flex: none; }
.req-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--gold);
  background: #33280c;
  border-radius: 999px;
}

/* So funktioniert's */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { position: relative; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.step-card .num { position: absolute; top: 16px; right: 20px; font-family: var(--pixel); font-weight: 700; font-size: 34px; color: var(--line2); }
.step-card .slot { width: 64px; padding: 12px; margin-bottom: 14px; }
.step-card h3 { margin: 0 0 6px; font-size: 21px; }
.step-card p { margin: 0; color: var(--muted); }

.product-modal .slot { width: 132px; padding: 22px; flex: none; }
.product-top { display: flex; gap: 18px; align-items: flex-start; }
.product-top h2 { margin: 0 0 4px; }
.product-desc { white-space: pre-line; color: var(--soft); }

/* ---------- Formulare ---------- */

label { display: block; margin: 14px 0 6px; font-weight: 800; font-size: 15px; color: var(--soft); }
.input, select, textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg2);
  border: 1.5px solid var(--line2);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 211, 90, .18); }
.input::placeholder, textarea::placeholder { color: #5f716a; }
textarea { min-height: 88px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
input[type='number'] { -moz-appearance: textfield; }
input[type='number']::-webkit-outer-spin-button, input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { flex: 1 1 130px; min-width: 0; }
.row > .narrow { flex: 0 1 110px; }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.error-text { color: #ff8a8a; font-weight: 800; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.img-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted); }
.img-preview img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface2); }

.note-box {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--soft);
  background: rgba(232, 232, 198, .06);
  border: 1px dashed var(--line2);
  border-radius: 12px;
}

/* ---------- Warenkorb ---------- */

.cart-item { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-item .slot { width: 80px; padding: 14px; }
.cart-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cart-item-head b { font-family: var(--pixel); font-size: 21px; }
.cart-item .row { margin-top: 4px; }
.cart-item label { margin-top: 10px; }
.cart-item label .input, .cart-item label select, .cart-item label textarea { margin-top: 6px; font-weight: 400; }
.cart-item textarea { min-height: 56px; }
.cart-item .special-text { white-space: pre-line; margin: 6px 0; color: var(--soft); }
.tile-cat { font-size: 14px; color: var(--muted); }

.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; margin-top: 10px; }
.sum .total { font-family: var(--pixel); font-size: 22px; font-weight: 700; color: #fff; }
.sum hr { grid-column: 1 / -1; width: 100%; border: 0; border-top: 1px solid var(--line2); margin: 2px 0; }

/* ---------- Status ---------- */

.status {
  display: inline-block;
  padding: 3px 11px 4px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
  color: #c9d6d0;
  background: #2c3936;
}
.s-verhandlung { color: var(--gold); background: #3d3313; }
.s-vereinbart { color: var(--dia); background: #0f3a39; }
.s-in_arbeit { color: #ffa25a; background: #43260f; }
.s-geliefert { color: #c6a9ff; background: #2d2147; }
.s-bezahlt { color: #86ec72; background: #1d3b17; }
.s-abgelehnt, .s-storniert { color: #ff8a8a; background: #431c1c; }

.track { display: flex; gap: 5px; margin: 16px 0 4px; }
.track .step { flex: 1 1 0; height: 10px; background: var(--line); border-radius: 4px; }
.track .step.done { background: var(--green); box-shadow: 0 2px 0 var(--green-d); }
.track .step.current { background: var(--gold); box-shadow: 0 2px 0 #9a7418; }
.track-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.deadline { font-weight: 800; font-variant-numeric: tabular-nums; }
.deadline.soon, .deadline.late { color: #ff8a8a; }
.deadline-none { color: var(--muted); }

.banner { margin: 14px 0 0; padding: 12px 14px; font-weight: 700; border-radius: 12px; border: 1px solid; }
.banner-red { color: #ffb0b0; background: #2c1414; border-color: #6b2626; }
.banner-green { color: #b6f3a8; background: #142a14; border-color: #2f6a26; }
.banner-gold { color: #ffe68f; background: #2b240d; border-color: #6e5a12; }

/* ---------- Auftragslisten ---------- */

.olist { display: flex; flex-direction: column; gap: 12px; }
.ocard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  padding: 16px 18px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color .15s, transform .15s;
}
.ocard:hover, .ocard:focus-visible { outline: none; border-color: var(--leaf); transform: translateY(-2px); }
.ocard .o-title { font-family: var(--pixel); font-weight: 700; font-size: 19px; overflow-wrap: anywhere; }
.ocard .o-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.ocard .o-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.ocard.urgent { background: linear-gradient(90deg, #2a1414, var(--surface) 60%); border-color: #6b2626; }
.ocard.urgent::before { content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 4px; background: var(--red); border-radius: 0 4px 4px 0; }
.urgent-tag { padding: 1px 9px; font-size: 13px; font-weight: 800; color: #fff; background: var(--red); border-radius: 999px; }

/* Filter-Reiter (Owner) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs .btn {
  min-height: 34px;
  padding: 5px 14px 7px;
  font-size: 15px;
  color: var(--soft);
  background: transparent;
  border: 1.5px solid var(--line2);
  border-radius: 999px;
  box-shadow: none;
  text-shadow: none;
}
.tabs .btn:hover { color: #fff; border-color: var(--soft); filter: none; }
.tabs .btn:active { transform: none; }
.tabs .btn.active { color: #1c1c14; background: var(--cream); border-color: var(--cream); }

/* ---------- Leere Zustände ---------- */

.empty { text-align: center; padding: 34px 12px; }
.empty .slot { width: 104px; margin: 0 auto; padding: 22px; }
.empty h3 { margin: 18px 0 6px; font-size: 24px; color: var(--cream); }
.empty p { margin: 0 0 6px; color: var(--muted); }
.empty .btn-row { justify-content: center; }
.loading { padding: 40px; text-align: center; font-family: var(--pixel); color: var(--muted); }
.loading::after { content: ''; animation: dots 1s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* ---------- Auftrag & Chat ---------- */

.order-grid { display: grid; grid-template-columns: 1fr; grid-template-areas: 'head' 'chat' 'items'; gap: 0 20px; }
.order-grid .a-head { grid-area: head; }
.order-grid .a-items { grid-area: items; }
.order-grid .a-chat { grid-area: chat; }
@media (min-width: 920px) {
  .order-grid { grid-template-columns: minmax(0, 410px) minmax(0, 1fr); grid-template-areas: 'head chat' 'items chat'; align-items: start; }
}
.order-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.order-title h2 { margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 16px 0 0; }
.kv dt { color: var(--muted); font-size: 15px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.linkbox { display: flex; gap: 8px; margin-top: 6px; }
.linkbox .input { flex: 1; min-width: 0; font-size: 14px; }
details.more { margin-top: 16px; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--soft); }

.pos { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pos:last-child { border-bottom: 0; }
.pos .slot { width: 60px; padding: 10px; flex: none; border-radius: 12px; }
.pos-name { font-family: var(--pixel); font-weight: 700; font-size: 18px; }
.pos-note { white-space: pre-line; font-size: 15px; color: var(--soft); overflow-wrap: anywhere; }
.pos img.thumb { display: block; max-width: 170px; max-height: 120px; margin-top: 8px; border-radius: 10px; cursor: zoom-in; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: min(62vh, 580px);
  min-height: 300px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #070c0b;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.msg { max-width: 82%; padding: 8px 13px 10px; border-radius: 16px; overflow-wrap: anywhere; }
.msg .who { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 2px; font-family: var(--pixel); font-size: 13px; font-weight: 700; color: var(--gold); }
.msg .who time { font-family: var(--body); font-weight: 400; color: var(--muted); }
.msg .body { white-space: pre-line; }
.msg img { display: block; max-width: 100%; max-height: 280px; margin-top: 8px; border-radius: 10px; cursor: zoom-in; }
.msg.me { align-self: flex-end; background: #1f4426; border-bottom-right-radius: 4px; }
.msg.me .who { color: #9fe58e; }
.msg.them { align-self: flex-start; background: var(--surface2); border-bottom-left-radius: 4px; }
.sysmsg {
  align-self: center;
  max-width: 94%;
  padding: 5px 14px 6px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #e9d58a;
  background: #221e0e;
  border-radius: 14px;
}
.sysmsg time { display: block; font-size: 12px; font-weight: 400; color: #a3976a; }
.offer {
  align-self: center;
  width: min(100%, 430px);
  padding: 12px 14px;
  text-align: center;
  background: linear-gradient(180deg, #0f3433, #0b2423);
  border: 1.5px solid #2e9e99;
  border-radius: 16px;
}
.offer .o-head { font-size: 14px; font-weight: 800; color: #9eeeea; }
.offer .o-price { margin: 4px 0; font-family: var(--pixel); font-weight: 700; font-size: 20px; }
.offer .o-price svg.dia { vertical-align: -3px; }
.offer .o-state { font-size: 14px; color: var(--soft); }
.offer time { display: block; margin-top: 4px; font-size: 12px; color: #6fb5b1; }
.offer .btn { margin-top: 6px; }
.offer.old { opacity: .5; border-style: dashed; }
.offer.accepted { background: linear-gradient(180deg, #17361a, #102712); border-color: var(--green-d); }

.chat-form { margin-top: 12px; }
.chat-form textarea { min-height: 56px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chat-actions .send { margin-left: auto; }
.offer-form { margin-top: 12px; padding: 14px; background: #0b2423; border: 1.5px solid #2e9e99; border-radius: 16px; }
.offer-form label { margin-top: 0; }
.offer-calc { margin-top: 8px; font-family: var(--pixel); font-weight: 700; color: #9eeeea; }

/* ---------- Owner ---------- */

.stat-big { display: flex; align-items: center; gap: 14px; font-family: var(--pixel); font-size: 56px; font-weight: 700; color: #fff; }
.stat-big svg.dia { width: 52px; height: 52px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-grid div { padding: 14px; color: var(--muted); background: var(--surface2); border-radius: 14px; }
.stat-grid b { display: block; font-family: var(--pixel); font-size: 28px; color: #fff; }
.prod-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prod-row:last-child { border-bottom: 0; }
.prod-row .slot { width: 64px; padding: 10px; border-radius: 12px; }
.prod-row b { font-family: var(--pixel); font-size: 19px; }
.prod-row .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.rush-table { display: grid; grid-template-columns: 1fr 120px; gap: 10px 14px; align-items: center; max-width: 480px; }
.rush-table .input { text-align: right; }
.login-box { max-width: 440px; margin: 40px auto; }

/* ---------- Dialoge & Meldungen ---------- */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 7, 6, .78);
  backdrop-filter: blur(3px);
}
.modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  margin: 0;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.modal-close { float: right; margin: -4px -4px 0 10px; }
.lightbox { max-width: 96vw; max-height: 92vh; padding: 8px; }
.lightbox img { display: block; max-width: 100%; max-height: calc(92vh - 20px); margin: 0 auto; border-radius: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px 13px;
  color: var(--soft);
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
  animation: toast-in .2s ease-out;
  transition: opacity .4s;
}
.toast b { display: block; font-family: var(--pixel); color: var(--green); }
.toast.error b { color: #ff8a8a; }
.toast.out { opacity: 0; }
@keyframes toast-in { from { transform: translate(-50%, 30px); opacity: 0; } }

/* ---------- Fußzeile ---------- */

.site-footer { margin-top: auto; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 28px; }
.footer-inner .divider { margin: 20px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 24px; }
.footer-grid .brand img { width: 46px; height: 36px; }
.footer-grid .brand span { font-size: 22px; color: var(--leaf); }
.footer-grid .brand span i { color: var(--green); }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-family: var(--pixel); font-weight: 700; color: var(--leaf); text-decoration: none; }
.footer-col a:hover { color: var(--green); }
.footer-note { color: var(--muted); font-size: 15px; margin: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; color: #5d726b; }
.footer-bottom a { color: #7d938a; text-decoration: none; }
.footer-bottom a:hover { color: var(--soft); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Tablet & Handy ---------- */

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .hdr { flex-wrap: wrap; padding: 14px 16px 6px; gap: 10px; }
  .hdr-right { margin-left: auto; }
  .nav {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    gap: 2px;
    margin: 0 -16px;
    padding: 0 10px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 16px; padding: 8px 10px; }
  .nav a.active::after { left: 10px; right: 10px; }
  .chip { max-width: 140px; height: 40px; }
  .cart-btn .label { display: none; }
  main { padding: 8px 16px 44px; }
  .footer-inner { padding: 0 16px 24px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { min-height: 430px; padding: 64px 16px 170px; border-radius: 20px; background-size: 100% 100%, auto 100%; }
  .hero p { font-size: 16px; }
  .features { gap: 12px; padding: 14px; }
  .features div { font-size: 14px; }
  .pgrid { grid-template-columns: 1fr; gap: 30px; }
  .cat-tabs { gap: 0 14px; }
  .ctab { font-size: 18px; }
  .ctab.active::before, .ctab.active::after { margin: 0 7px 4px; width: 6px; height: 6px; }
  .panel { padding: 18px 16px; border-radius: 18px; }
  .product-top { flex-direction: column; align-items: center; text-align: center; }
  .product-top .req-tag { align-self: center; }
  .msg { max-width: 92%; }
  .prod-row { grid-template-columns: 54px 1fr; }
  .prod-row .slot { width: 54px; padding: 8px; }
  .prod-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .ocard { grid-template-columns: 1fr; }
  .ocard .o-right { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .nav a { font-size: 15px; padding: 8px 7px; }
  .nav a.active::after { left: 7px; right: 7px; }
  .nav .badge { margin-left: 4px; }
}
