/* =========================================================
   Dreamworks Development Store – nach Brandbook v1.0
   „Traum vorne, Ordnung dahinter“: Los Santos bei Nacht und Pacifico im Hero,
   dahinter eine ruhige, dunkle, präzise Oberfläche.

   Farben  Nachtschwarz 60 · Bone 20 · Rot 12 · Creme/Gold 5 · Orange/Pflaume 3
           Rot nur dort, wo es etwas bedeutet (Hauptaktion, aktiver Zustand, Auswahl).
   Schrift Space Grotesk (Text & Interface) · Pacifico mit roter Kontur (große,
           emotionale Überschriften) · JetBrains Mono (Labels & Zahlen) · Kalam (Slogan)
   Logo    horizontal ≥ 240 px, Icon ≥ 32 px, keine Effekte, ruhiger Hintergrund.
   Eckklammern rahmen Bilder (Galerie, hervorgehobenes Produkt) und markieren die
           Auswahl – wie im Inventar. Keine Deko ohne Funktion.
   ========================================================= */

:root {
  --night: #0C0C0D;
  --ink: #140608;
  --red: #C1121F;
  --signal: #E0313D;
  --wine: #6E0A13;
  --cream: #F6EAD0;
  --bone: #E9E4DC;
  --gold: #FFCF4A;
  --orange: #FF8A2E;
  --plum: #3D0B1E;

  --panel: #121214;
  --panel-2: #18181B;
  --panel-3: #202024;
  --line: rgba(233, 228, 220, .09);
  --line-2: rgba(233, 228, 220, .17);
  --muted: rgba(233, 228, 220, .64);
  --faint: rgba(233, 228, 220, .42);
  --red-soft: rgba(193, 18, 31, .14);

  --f-ui: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-script: "Pacifico", cursive;
  --f-hand: "Kalam", cursive;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --bar: 92px;
  --bracket: 18px;
  --ease: cubic-bezier(.25, .1, .25, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 16px/1.6 var(--f-ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
main { flex: 1; outline: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
::selection { background: var(--red); color: var(--cream); }
.icon { flex: none; display: block; }

/* Schutz: Bilder nicht markier-/zieh-/long-press-bar */
img, [data-protect] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
@media print { body { display: none !important; } }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--red); color: var(--cream); padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Typografie ---------- */

h1, h2, h3 { font-family: var(--f-ui); color: var(--cream); margin: 0; }
h1 { font-weight: 700; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
h2 { font-weight: 700; font-size: clamp(24px, 2.8vw, 30px); line-height: 1.15; letter-spacing: -.015em; }
h3 { font-weight: 600; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }

/* Pacifico – nur große, emotionale Überschriften, immer mit roter Kontur (+ Weinrot-Kante wie im Schriftzug) */
.script {
  font-family: var(--f-script);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow:
    -2px -2px 0 var(--red), 2px -2px 0 var(--red), -2px 2px 0 var(--red), 2px 2px 0 var(--red),
    0 -2.5px 0 var(--red), 0 2.5px 0 var(--red), -2.5px 0 0 var(--red), 2.5px 0 0 var(--red),
    3px 4px 0 var(--wine), 4px 6px 0 var(--wine);
}

/* JetBrains Mono – Labels: Großbuchstaben, gesperrt */
.label {
  font: 500 11px/1.4 var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}
.label-red { color: var(--signal); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.slogan { font: 700 19px/1.2 var(--f-hand); color: var(--cream); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* Eckklammern oben links / unten rechts */
.frame { position: relative; }
.frame::before, .frame::after {
  content: ""; position: absolute; width: var(--bracket); height: var(--bracket);
  pointer-events: none; z-index: 4; transition: opacity .25s var(--ease);
}
.frame::before { top: 0; left: 0; border-top: 2px solid var(--red); border-left: 2px solid var(--red); border-top-left-radius: var(--r-lg); }
.frame::after { bottom: 0; right: 0; border-bottom: 2px solid var(--red); border-right: 2px solid var(--red); border-bottom-right-radius: var(--r-lg); }

/* Chips: Mono, Großbuchstaben, dünner Rahmen. Rot nur für den wichtigsten. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--bone); text-decoration: none;
  padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 3px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
a.chip:hover { border-color: var(--bone); color: var(--cream); }
.chip-red { border-color: var(--red); background: rgba(110, 10, 19, .5); color: var(--cream); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot-green { background: var(--gold); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1.2 var(--f-ui);
  padding: 11px 20px; border-radius: var(--r-sm); border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--cream); }
.btn-red:hover { background: var(--signal); border-color: var(--signal); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone); color: var(--cream); }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none; padding: 0;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--muted);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--bone); color: var(--cream); }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.link:hover { color: var(--cream); }

/* „Mehr ›“ */
.link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--cream); text-decoration: none; font-weight: 500; }
.link-more .icon { color: var(--signal); transition: transform .2s var(--ease); }
.link-more:hover .icon, a:hover > .link-more .icon, .feature:hover .link-more .icon { transform: translateX(3px); }

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

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12, 12, 13, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 32px; height: var(--bar); }
.brand { display: block; flex: none; }
.brand-full { width: 240px; height: auto; }          /* Brandbook: horizontal min. 240 px */
.brand-icon { display: none; width: 40px; height: 40px; }

.nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; padding: 8px 12px; text-decoration: none; white-space: nowrap;
  font-size: 15px; font-weight: 500; color: var(--muted); transition: color .2s var(--ease);
}
.nav a:hover { color: var(--cream); }
.nav a.active { color: var(--cream); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--red); }

.actions { display: flex; align-items: center; gap: 8px; flex: none; }
.user-chip, .cart-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--bone); transition: border-color .2s var(--ease);
}
.user-chip:hover, .cart-btn:hover { border-color: var(--bone); }
.user-chip:empty { visibility: hidden; }
.user-chip .icon, .cart-btn .icon { color: var(--muted); }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-btn { position: relative; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: var(--red); color: var(--cream); font: 700 11px/1 var(--f-mono);
}
.cart-count[hidden], .demo-bar[hidden] { display: none; }
.burger { display: none; width: 38px; height: 38px; background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { display: block; width: 17px; height: 1.6px; background: var(--bone); transition: transform .25s var(--ease), opacity .2s; }

.demo-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 10px var(--gutter); text-align: center;
  background: var(--ink); border-bottom: 1px solid rgba(193, 18, 31, .3);
  font-size: 13px; color: var(--muted);
}
.demo-bar .dot { background: var(--orange); }
.demo-bar code { font-family: var(--f-mono); color: var(--gold); }

/* ---------- Sale-Banner (Laufschrift über dem Header) ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Theme-Variablen gelten für Banner und Warenkorb-Hinweis */
[data-sale] {
  --sale-bg: var(--wine);
  --sale-scan: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px);
  --sale-fg: var(--cream);
  --sale-accent: var(--gold);
  --sale-icon: var(--sale-accent);
  --sale-title: var(--sale-accent);
  --sale-title-shadow: 0 2px 0 rgba(0, 0, 0, .45);
  --sale-badge: var(--gold);
  --sale-badge-fg: var(--ink);
  --sale-edge: var(--red);
  --sale-pattern: none;
  --sale-pattern-opacity: 1;
  --sale-sep: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.sale-bar {
  position: relative; z-index: 41; isolation: isolate; overflow: hidden;
  height: 46px; display: flex; align-items: center;
  background: var(--sale-scan), var(--sale-bg);
  color: var(--sale-fg);
  font: 500 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
}
.sale-bar[hidden] { display: none; }
/* Höhe der sichtbaren Banner (--ann-h, gesetzt in app.js) → Toasts darunter */
body .toasts { top: calc(var(--bar) + 12px + var(--ann-h, 0px)); }
/* Muster (Schnee, Konfetti …) unter der Schrift */
.sale-bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--sale-pattern); opacity: var(--sale-pattern-opacity);
}
/* Kante unten */
.sale-bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none;
  background: var(--sale-edge);
}
.sale-marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.sale-track { display: flex; width: max-content; animation: sale-scroll 40s linear infinite; padding-bottom: 2px; }
.sale-bar:hover .sale-track { animation-play-state: paused; }
.sale-group, .sale-unit { display: flex; align-items: center; flex: none; }
.sale-unit { gap: 22px; padding-right: 22px; white-space: nowrap; }
.sale-item { display: inline-flex; align-items: center; gap: 10px; }
.sale-icon { width: 24px; height: 24px; flex: none; color: var(--sale-icon); }
.sale-title {
  font: 400 20px/1 var(--f-script); letter-spacing: 0; text-transform: none;
  color: var(--sale-title); text-shadow: var(--sale-title-shadow);
  padding: 2px 2px 5px;
}
.sale-off {
  font: 700 13px/1 var(--f-mono); letter-spacing: .12em;
  padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--sale-badge); color: var(--sale-badge-fg);
}
.sale-left { color: var(--sale-accent); font-weight: 700; }
.sale-sep { width: 10px; height: 11px; flex: none; background: var(--sale-accent); clip-path: var(--sale-sep); opacity: .85; }
@keyframes sale-scroll { to { transform: translateX(-50%); } }

/* Hinweis im Warenkorb */
.sale-note {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--sale-scan), var(--sale-bg); color: var(--sale-fg);
  border: 1px solid var(--sale-accent);
  font-size: 13px; line-height: 1.4;
}
.sale-note strong { color: var(--sale-title); font-weight: 700; }

/* Halloween: Pflaume/Schwarz, Kürbis-Orange, flackernder Titel */
[data-sale="halloween"] {
  --sale-bg: linear-gradient(90deg, #12060C 0%, #3D0B1E 50%, #12060C 100%);
  --sale-accent: var(--orange);
  --sale-title: #FFB066;
  --sale-title-shadow: 0 0 10px rgba(255, 138, 46, .75), 0 2px 0 #12060C;
  --sale-badge: var(--orange);
  --sale-badge-fg: #12060C;
  --sale-edge: repeating-linear-gradient(-45deg, var(--orange) 0 8px, #12060C 8px 16px);
  --sale-pattern: repeating-linear-gradient(-45deg, rgba(255, 138, 46, .06) 0 12px, transparent 12px 24px);
}
.sale-bar[data-sale="halloween"] .sale-title { animation: sale-flicker 4.5s infinite; }
@keyframes sale-flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20%, 63% { opacity: .55; }
}

/* Christmas: Tannengrün, Gold, rote Badge, Zuckerstangen-Kante, fallender Schnee */
[data-sale="christmas"] {
  --sale-bg: linear-gradient(90deg, #0A2214 0%, #124A2C 50%, #0A2214 100%);
  --sale-accent: var(--gold);
  --sale-icon: #F4FBFF;
  --sale-title: var(--cream);
  --sale-title-shadow: -1px -1px 0 var(--red), 1px -1px 0 var(--red), -1px 1px 0 var(--red), 1px 1px 0 var(--red), 2px 3px 0 var(--wine);
  --sale-badge: var(--red);
  --sale-badge-fg: var(--cream);
  --sale-edge: repeating-linear-gradient(-45deg, var(--red) 0 7px, #F6F1E7 7px 14px);
  --sale-pattern:
    radial-gradient(circle, rgba(255, 255, 255, .75) 0 1px, transparent 1.6px) 0 0 / 34px 22px,
    radial-gradient(circle, rgba(255, 255, 255, .45) 0 1px, transparent 1.6px) 17px 11px / 34px 22px;
  --sale-sep: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.sale-bar[data-sale="christmas"]::before { animation: sale-snow 5s linear infinite; }
@keyframes sale-snow { to { background-position: 0 22px, 17px 33px; } }

/* Easter: Pastell-Verlauf, dunkle Schrift, Punkte, Ei-Trenner */
[data-sale="easter"] {
  --sale-bg: linear-gradient(90deg, #F9D9E8 0%, #E4DDFF 35%, #D3F2E3 70%, #FFF0C2 100%);
  --sale-scan: none;
  --sale-fg: #2A0D1C;
  --sale-accent: #B4407A;
  --sale-title: #8E2A5E;
  --sale-title-shadow: 0 1px 0 #fff, 0 2px 6px rgba(255, 255, 255, .8);
  --sale-badge: var(--plum);
  --sale-badge-fg: #FFF0C2;
  --sale-edge: repeating-linear-gradient(90deg, #F48FB1 0 18px, #B39DDB 18px 36px, #80CBC4 36px 54px, #FFE082 54px 72px);
  --sale-pattern: radial-gradient(circle, rgba(255, 255, 255, .7) 0 1.6px, transparent 2.2px) 0 0 / 26px 18px;
  --sale-sep: ellipse(42% 50% at 50% 55%);
}

/* Summer: Sonnenuntergang, Brand-Schriftzug (Creme + rote Kontur), Wellen-Kante */
[data-sale="summer"] {
  --sale-bg: linear-gradient(90deg, #E8473A 0%, #FF7A2E 50%, #FFA43A 100%);
  --sale-scan: none;
  --sale-fg: #1C0709;
  --sale-accent: #1C0709;
  --sale-icon: #FFE38A;
  --sale-title: var(--cream);
  --sale-title-shadow: -1px -1px 0 var(--red), 1px -1px 0 var(--red), -1px 1px 0 var(--red), 1px 1px 0 var(--red), 2px 3px 0 var(--wine);
  --sale-badge: #1C0709;
  --sale-badge-fg: var(--gold);
  --sale-edge: radial-gradient(circle at 50% 0, transparent 3px, #12B5C9 3.6px) 0 0 / 10px 3px;
  --sale-pattern: radial-gradient(120% 220% at 50% 100%, rgba(255, 227, 138, .35), transparent 60%);
  --sale-sep: circle(50%);
}
.sale-bar[data-sale="summer"] .sale-icon { filter: drop-shadow(0 0 6px rgba(255, 227, 138, .8)); animation: sale-spin 14s linear infinite; }
@keyframes sale-spin { to { transform: rotate(360deg); } }

/* Release: Nachtschwarz → Weinrot, Brand-Schriftzug, roter Lichtlauf auf der Kante, ganze Leiste klickbar */
[data-sale="release"] {
  --sale-bg: linear-gradient(90deg, #0C0C0D 0%, #3A0710 50%, #0C0C0D 100%);
  --sale-accent: var(--signal);
  --sale-icon: var(--cream);
  --sale-title: var(--cream);
  --sale-title-shadow: -1px -1px 0 var(--red), 1px -1px 0 var(--red), -1px 1px 0 var(--red), 1px 1px 0 var(--red), 2px 3px 0 var(--wine);
  --sale-badge: var(--gold);
  --sale-badge-fg: var(--ink);
  --sale-edge: linear-gradient(90deg, var(--wine) 0%, var(--wine) 38%, var(--signal) 50%, var(--wine) 62%, var(--wine) 100%) 0 0 / 200% 100%;
  --sale-pattern:
    radial-gradient(circle, rgba(246, 234, 208, .5) 0 .8px, transparent 1.4px) 0 0 / 56px 46px,
    radial-gradient(circle, rgba(246, 234, 208, .3) 0 .8px, transparent 1.4px) 28px 20px / 56px 46px;
}
.sale-bar[data-sale="release"]::after { animation: release-sweep 3.2s linear infinite; }
@keyframes release-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sale-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 9px; border-radius: var(--r-sm);
  background: var(--red); color: var(--cream);
  font: 700 11px/1 var(--f-mono); letter-spacing: .16em;
}
.sale-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cream);
  animation: release-pulse 1.6s ease-in-out infinite;
}
@keyframes release-pulse { 50% { opacity: .25; } }
.sale-cta { color: var(--cream); font-weight: 700; }
.sale-cta .icon { color: var(--signal); }
/* unsichtbarer Link über der ganzen Leiste */
.sale-hit { position: absolute; inset: 0; z-index: 2; }
.sale-hit:focus-visible { outline: 2px solid var(--cream); outline-offset: -4px; }
.sale-bar:hover .sale-cta .icon { transform: translateX(2px); }
/* mehrere Releases: jeder Abschnitt ist ein eigener Link */
.sale-link { color: inherit; text-decoration: none; position: relative; z-index: 2; cursor: pointer; }
.sale-bar.is-multi:hover .sale-cta .icon { transform: none; }
.sale-link:hover .sale-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sale-link:hover .sale-cta .icon { transform: translateX(2px); }
.sale-bar.is-multi:focus-within { box-shadow: inset 0 0 0 2px var(--cream); }
/* "New"-Chip auf der Produktkarte während des Releases */
.card-chips .chip.chip-new { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* Black Friday: Schwarz, rot-schwarze Warnstreifen, rote Badge, fette Großbuchstaben statt Pacifico */
[data-sale="blackfriday"] {
  --sale-bg: linear-gradient(90deg, #050506 0%, #16090C 50%, #050506 100%);
  --sale-accent: var(--gold);
  --sale-icon: var(--signal);
  --sale-title: var(--cream);
  --sale-title-shadow: none;
  --sale-badge: var(--red);
  --sale-badge-fg: var(--cream);
  --sale-edge: repeating-linear-gradient(-45deg, var(--red) 0 8px, #050506 8px 16px);
  --sale-pattern: repeating-linear-gradient(-45deg, rgba(193, 18, 31, .08) 0 14px, transparent 14px 28px);
  --sale-sep: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.sale-bar[data-sale="blackfriday"] .sale-title {
  font: 700 19px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .02em; padding: 2px 0;
}
.sale-bar[data-sale="blackfriday"] .sale-off { box-shadow: 0 0 14px rgba(224, 49, 61, .55); }
.sale-note[data-sale="blackfriday"] strong { text-transform: uppercase; }

/* Birthday: Weinrot, Gold, Konfetti, Regenbogen-Kante */
[data-sale="birthday"] {
  --sale-bg: linear-gradient(90deg, #2A0716 0%, #6E0A13 50%, #2A0716 100%);
  --sale-accent: var(--gold);
  --sale-title: var(--gold);
  --sale-title-shadow: 0 0 10px rgba(255, 207, 74, .45), 0 2px 0 #2A0716;
  --sale-badge: var(--gold);
  --sale-badge-fg: #2A0716;
  --sale-edge: linear-gradient(90deg, #E0313D, #FF8A2E, #FFCF4A, #3BD16F, #3FA9F5, #A46CF0, #E0313D);
  --sale-pattern:
    radial-gradient(circle, #FFCF4A 0 1.4px, transparent 2px) 0 0 / 46px 30px,
    radial-gradient(circle, #3FA9F5 0 1.4px, transparent 2px) 23px 15px / 46px 30px,
    radial-gradient(circle, #3BD16F 0 1.2px, transparent 1.8px) 11px 22px / 38px 34px,
    radial-gradient(circle, #FF8A2E 0 1.2px, transparent 1.8px) 30px 6px / 52px 26px;
  --sale-pattern-opacity: .55;
  --sale-sep: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ---------- Startseite ---------- */

/* Hero: Los Santos bei Nacht – Text steht im ruhigen Himmel, nie über der Skyline */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 12, 13, .9) 0%, rgba(12, 12, 13, .55) 42%, rgba(12, 12, 13, 0) 75%),
    linear-gradient(0deg, var(--night) 0%, rgba(12, 12, 13, 0) 38%),
    url("../img/scene-los-santos.jpg") center 58% / cover no-repeat;
}
.hero-in { min-height: clamp(460px, 62vh, 640px); display: grid; align-content: center; padding-top: 56px; padding-bottom: 96px; }
.hero-text { max-width: 560px; }
.hero h1.script { font-size: clamp(50px, 7.4vw, 92px); margin: 0 0 18px; }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--bone); margin: 0; max-width: 32em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero .chips { margin-top: 26px; }

/* hervorgehobenes Produkt */
.feature {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; gap: 0;
  margin-top: -40px; position: relative; z-index: 1; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: border-color .25s var(--ease);
}
.feature:hover { border-color: rgba(193, 18, 31, .55); }
.feature-media { aspect-ratio: 16/10; background: var(--panel-2) center/cover no-repeat; }
.feature-body { padding: clamp(24px, 4vw, 44px); display: grid; gap: 10px; justify-items: start; }
.feature-body h2 { font-size: clamp(24px, 2.6vw, 32px); }
.feature-body .price-row { margin: 2px 0 10px; }

#shop { scroll-margin-top: calc(var(--bar) + 16px); }
.section { padding-top: clamp(48px, 6vw, 80px); }
.section:last-of-type { padding-bottom: clamp(64px, 8vw, 104px); }
.hero:last-child, .feature-wrap:last-child { padding-bottom: clamp(64px, 8vw, 104px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; color: var(--cream); text-decoration: none; white-space: nowrap; }
.more .icon { color: var(--signal); transition: transform .2s var(--ease); }
.more:hover .icon { transform: translateX(3px); }

/* Kategorien */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-tile {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding: 18px 18px 18px 20px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.cat-tile:hover { border-color: rgba(193, 18, 31, .55); background: var(--panel-2); }
.cat-name { font-size: 17px; font-weight: 600; color: var(--cream); }
.cat-count { grid-column: 1; }
.cat-tile .icon { grid-row: 1 / span 2; grid-column: 2; color: var(--faint); transition: color .2s, transform .2s var(--ease); }
.cat-tile:hover .icon { color: var(--signal); transform: translateX(2px); }

/* ---------- Paket-Karten ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: border-color .25s var(--ease);
}
.card:hover { border-color: rgba(193, 18, 31, .55); }
.card-media { display: block; aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--panel-2); }
/* Auswahl wie im Inventar: Eckklammern erscheinen beim Überfahren */
.card .frame::before, .card .frame::after { opacity: 0; }
.card:hover .frame::before, .card:hover .frame::after, .card:focus-within .frame::before, .card:focus-within .frame::after { opacity: 1; }
.card-img { position: absolute; inset: 0; background: center/cover no-repeat; transition: transform .6s var(--ease); }
.card:hover .card-img { transform: scale(1.03); }
.card-chips { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; z-index: 2; }
.card-chips .chip { background: rgba(12, 12, 13, .78); }
.card-chips .chip-red { background: var(--red); border-color: var(--red); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 a { text-decoration: none; }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
.price { font: 600 17px/1.2 var(--f-mono); color: var(--cream); }
/* Externe Produkte: Button mit Pfeil nach außen */
.card-ext .btn .icon { color: var(--muted); transition: transform .2s var(--ease), color .2s var(--ease); }
.card-ext:hover .btn .icon { color: var(--signal); transform: translate(1px, -1px); }
.old { font: 400 13px/1 var(--f-mono); color: var(--faint); }
.per { font: 400 13px/1 var(--f-mono); color: var(--muted); }

.skeleton { pointer-events: none; }
.skeleton .card-media, .skeleton .card-body span {
  background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton .card-body span { display: block; height: 12px; border-radius: 2px; }
.skeleton .card-body span:first-child { width: 36%; }
.skeleton .card-body span:last-child { width: 72%; height: 18px; margin-top: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Seitenkopf ---------- */

.page-head { padding: clamp(32px, 4.5vw, 56px) 0 4px; }
.page-head h1 { margin: 14px 0 8px; }
.page-head .chips { margin-top: 18px; }
.page-head .prose-lead { margin-top: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--faint); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--cream); }
.crumbs .icon { color: var(--faint); }
.crumbs .cur { color: var(--bone); }

/* ---------- Produktseite ---------- */

.product { padding-top: 26px; padding-bottom: clamp(64px, 8vw, 104px); }
.product .crumbs { margin-bottom: 20px; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr); gap: 28px; align-items: start; }

.gallery { min-width: 0; }
.stage { aspect-ratio: 16/10; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.stage-media { position: absolute; inset: 0; }
.stage-media.is-image { cursor: zoom-in; }
.stage-media .img, .lb-fig .img { position: absolute; inset: 0; background: center/contain no-repeat; }
.stage-media iframe, .stage-media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
/* transparente Schutzebene über Bildern */
.shield { position: absolute; inset: 0; z-index: 1; background: transparent; }
.stage-empty { display: grid; place-items: center; }
.stage-empty img { width: 26%; max-width: 160px; opacity: .5; }

.nav-btn {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  background: rgba(12, 12, 13, .74); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--bone);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav-btn:hover { border-color: var(--bone); color: var(--cream); }
.stage .prev { left: 14px; }
.stage .next { right: 14px; }
.zoom-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  background: rgba(12, 12, 13, .74); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--bone);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.zoom-btn:hover { border-color: var(--bone); color: var(--cream); }
.counter {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  padding: 8px 10px; border-radius: var(--r-sm); font: 500 12px/1 var(--f-mono); color: var(--bone);
  background: rgba(12, 12, 13, .74); border: 1px solid var(--line);
}

.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: none; width: 96px; aspect-ratio: 16/10; position: relative;
  background: var(--panel) center/cover no-repeat; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0;
  opacity: .55; transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.thumb:hover { opacity: .9; }
.thumb.active { opacity: 1; border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cream); background: rgba(0, 0, 0, .3); }

.buy { padding: 26px; position: sticky; top: calc(var(--bar) + 20px); }
.buy h1 { font-size: clamp(26px, 2.8vw, 34px); margin: 8px 0 12px; }
.buy-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
.buy-price .price { font-size: 26px; }
.buy-price .old { font-size: 16px; }
.buy-price .per { font-size: 14px; }
.buy .chip { margin-bottom: 8px; }
.buy-row { display: flex; gap: 10px; margin: 20px 0 22px; }
.perks { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.perks .icon { color: var(--bone); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); height: 34px; }
.qty button { width: 32px; height: 100%; display: grid; place-items: center; background: none; border: 0; color: var(--bone); padding: 0; }
.qty button:hover { color: var(--signal); }
.qty span { min-width: 26px; text-align: center; font: 600 14px/1 var(--f-mono); }
.qty-lg { height: 50px; }
.qty-lg button { width: 42px; }

.desc { margin-top: 28px; padding: clamp(22px, 3.5vw, 40px); }
.desc > .label { margin: 0 0 14px; }

/* HTML aus Tebex-Beschreibungen und Markdown der Doku */
.prose { color: var(--bone); font-size: 16px; line-height: 1.7; max-width: 76ch; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--cream); margin: 1.7em 0 .55em; line-height: 1.25; }
.prose h1 { font-size: 30px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 19px; }
.prose h4 { font: 500 12px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--signal); text-underline-offset: 3px; }
.prose a:hover { color: var(--cream); }
.prose strong, .prose b { color: var(--cream); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.35em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose ul li::marker { color: var(--red); }
.prose ol li::marker { color: var(--signal); font-family: var(--f-mono); font-size: .9em; }
.prose blockquote { margin: 1.3em 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--wine); color: var(--muted); }
.prose code { font-family: var(--f-mono); font-size: .86em; padding: .12em .4em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; color: var(--cream); }
.prose pre { background: var(--panel-2); border: 1px solid var(--line); padding: 14px; overflow-x: auto; border-radius: var(--r); }
.prose pre code { background: none; border: 0; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2.2em 0; }
.prose .table-scroll { overflow-x: auto; margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font: 500 11px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom-color: var(--line-2); }
@media (max-width: 560px) {
  /* zweispaltige Info-Tabellen auf dem Handy untereinander */
  .prose td[style*="width:50%"], .prose td[style*="width: 50%"] { display: block; width: auto !important; }
}
.prose iframe, .prose video { width: 100%; aspect-ratio: 16/9; height: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 1em 0; background: #000; }
.prose img { height: auto; border-radius: var(--r); }
.prose .inline-img { display: block; position: relative; margin: 1.3em 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: zoom-in; background: var(--panel-2); }
.prose .inline-img .img { display: block; width: 100%; aspect-ratio: 16/9; background: center/cover no-repeat; transition: transform .5s var(--ease); }
.prose .inline-img:hover { border-color: rgba(193, 18, 31, .55); }
.prose .inline-img:hover .img { transform: scale(1.01); }
.prose-lead { font-size: 18px; color: var(--muted); }

/* ---------- Großansicht ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: none; grid-template-rows: auto 1fr auto auto;
  background: rgba(8, 8, 9, .96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lightbox.open { display: grid; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lb-top { display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); }
.lb-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--cream); }
.lb-count { font: 500 12px/1 var(--f-mono); color: var(--muted); }
.lb-stage { position: relative; overflow: hidden; margin: clamp(8px, 2vw, 20px) clamp(10px, 7vw, 96px); }
.lb-fig { position: absolute; inset: 0; overflow: hidden; cursor: zoom-in; }
.lb-fig .img { transition: transform .3s var(--ease); }
.lb-fig.zoomed { cursor: zoom-out; }
.lb-fig.zoomed .img { transform: scale(2.4); transition: transform .3s var(--ease), transform-origin .05s linear; }
.lb-video { cursor: default; display: grid; place-items: center; }
.lb-video iframe, .lb-video video { width: min(100%, calc((100vh - 220px) * 16 / 9)); aspect-ratio: 16/9; height: auto; border: 0; background: #000; }
.lb-prev, .lb-next { top: 50%; }
.lb-prev { left: max(10px, calc(var(--gutter) - 6px)); }
.lb-next { right: max(10px, calc(var(--gutter) - 6px)); }
.lb-thumbs { display: flex; justify-content: center; gap: 8px; padding: 10px var(--gutter); overflow-x: auto; }
.lb-thumbs .thumb { width: 84px; }
.lb-hint { text-align: center; padding: 4px 0 16px; font-size: 12px; color: var(--faint); }

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

.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .3s var(--ease); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  display: flex; flex-direction: column;
  background: var(--night); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .35s cubic-bezier(.32, .72, 0, 1);
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 22px; }
.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 12px; background: var(--panel); }
.drawer-foot:empty { display: none; }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-thumb { width: 64px; aspect-ratio: 1; background: var(--panel-2) center/cover no-repeat; border: 1px solid var(--line); border-radius: var(--r-sm); }
.line-info { min-width: 0; display: grid; gap: 3px; }
.line-name { font-weight: 600; color: var(--cream); text-decoration: none; line-height: 1.3; }
.line-name:hover { color: var(--signal); }
.line-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.line .price { font-size: 15px; }
.line .icon-btn { width: 30px; height: 30px; }

.code-form { display: flex; gap: 8px; }
.code-form input, .field {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  background: var(--night); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: 400 15px/1 var(--f-ui); color: var(--cream);
}
.code-form input { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.code-form input::placeholder { letter-spacing: .04em; }
.code-form input::placeholder, .field::placeholder { color: var(--faint); }
.code-form input:focus, .field:focus { outline: none; border-color: var(--signal); }
.applied { display: flex; align-items: center; justify-content: space-between; }
.totals { display: flex; align-items: baseline; justify-content: space-between; padding-top: 4px; }
.total { font: 700 22px/1 var(--f-mono); color: var(--cream); }
.fine { margin: 0; text-align: center; font-size: 12px; color: var(--faint); }

.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 56px 12px; }
.empty p { margin: 0; }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); margin-bottom: 12px; }
.empty .btn { margin-top: 18px; }

/* ---------- Benachrichtigungen ---------- */

.toasts { position: fixed; top: calc(var(--bar) + 12px); right: 16px; z-index: 90; display: grid; gap: 10px; width: min(360px, calc(100% - 32px)); pointer-events: none; }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  background: rgba(18, 18, 20, .97); border: 1px solid var(--line-2); border-left: 2px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  transform: translateX(16px); opacity: 0; transition: transform .3s var(--ease), opacity .3s;
  pointer-events: auto;
}
.toast.in { transform: none; opacity: 1; }
.toast div { display: grid; gap: 2px; font-size: 14px; line-height: 1.4; }
.toast strong { color: var(--cream); font-weight: 600; }
.toast span:not(.toast-icon) { color: var(--muted); }
.toast-icon { flex: none; width: 20px; height: 20px; display: grid; place-items: center; color: var(--bone); }
.toast-ok { border-left-color: var(--gold); }
.toast-ok .toast-icon { color: var(--gold); }
.toast-error { border-left-color: var(--signal); }
.toast-error .toast-icon { color: var(--signal); }
.toast-warn { border-left-color: var(--orange); }
.toast-warn .toast-icon { color: var(--orange); }

/* ---------- Dialog ---------- */

.modal { position: fixed; inset: 0; z-index: 85; display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); }
.modal-panel { position: relative; width: min(440px, 100%); padding: 28px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); animation: fade .2s var(--ease); }
.modal-panel h2 { font-size: 22px; margin: 0 0 8px; }
.modal-panel p { margin: 0 0 20px; }
.stack { display: grid; gap: 10px; }

/* Login-Schritte (FiveM + Discord) */
.steps { display: grid; gap: 8px; margin: 0 0 20px; }
.step {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--night); border: 1px solid var(--line-2); border-radius: var(--r);
}
.step.done { border-color: rgba(255, 207, 74, .35); }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 12px/1 var(--f-mono); background: var(--wine); color: var(--cream);
}
.step.done .step-num { background: var(--gold); color: var(--night); }
.step-body { display: grid; gap: 1px; min-width: 0; }
.step-body strong { color: var(--cream); font-weight: 600; }
.step-body b { color: var(--bone); font-weight: 600; }
.chip-avatar { width: 22px; height: 22px; border-radius: 50%; flex: none; }
@media (max-width: 420px) {
  .step { grid-template-columns: auto 1fr; }
  .step .btn { grid-column: 1 / -1; }
}
.stack-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px 0 6px; }

/* ---------- Zentrierte Ansichten (Danke, 404, Fehler) ---------- */

.center-view { min-height: 62vh; display: grid; place-items: center; padding: 64px var(--gutter); }
.center-panel { width: min(580px, 100%); text-align: center; display: grid; justify-items: center; gap: 12px; }
.center-panel h1 { margin: 4px 0; }
.center-panel h1.script { font-size: clamp(52px, 8vw, 80px); margin: 0 0 8px; }
.center-panel p { margin: 0; max-width: 32em; }
.center-panel .slogan { margin-top: 18px; }

/* ---------- Rechtstexte ---------- */

.legal .prose h2 { font-size: 20px; margin-top: 1.9em; }
.legal .prose h2:first-child { margin-top: 0; }
mark.todo { background: var(--red-soft); color: var(--signal); border: 1px dashed var(--signal); border-radius: 3px; padding: 0 5px; font-family: var(--f-mono); font-size: .86em; }

/* ---------- Dokumentation ---------- */

.docs {
  display: grid; grid-template-columns: 248px minmax(0, 1fr) 200px; gap: 44px;
  padding-top: 32px; padding-bottom: clamp(64px, 8vw, 104px); align-items: start;
  max-width: 1360px;
}
.docs-side, .docs-toc { position: sticky; top: calc(var(--bar) + 24px); max-height: calc(100vh - var(--bar) - 40px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--wine) transparent; }
.docs-head { margin-bottom: 14px; }
.docs-title { font-weight: 700; font-size: 19px; color: var(--cream); margin-top: 4px; line-height: 1.25; }
.docs-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--faint);
}
.docs-search:focus-within { border-color: var(--signal); }
.docs-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--cream); font: 400 14px var(--f-ui); }
.docs-search input::-webkit-search-cancel-button { display: none; }
.docs-search kbd { font: 500 11px/1 var(--f-mono); padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--muted); }
.docs-results { margin-top: 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.docs-results a { display: grid; gap: 2px; padding: 10px 12px; text-decoration: none; border-bottom: 1px solid var(--line); }
.docs-results a:last-child { border-bottom: 0; }
.docs-results a:hover { background: var(--panel-2); }
.docs-results strong { color: var(--cream); font-weight: 600; font-size: 14px; }
.docs-results .snip { font-size: 12px; color: var(--muted); line-height: 1.45; }
.docs-results mark { background: rgba(193, 18, 31, .35); color: var(--cream); border-radius: 2px; }
.docs-results .none { padding: 12px; font-size: 13px; color: var(--muted); }
.docs-nav { margin-top: 20px; display: grid; gap: 20px; }
.docs-group { display: grid; gap: 1px; }
.docs-group .label { margin: 0 0 6px 12px; }
.docs-group a {
  display: block; padding: 6px 12px; border-left: 2px solid transparent; border-radius: 0 var(--r-sm) var(--r-sm) 0; text-decoration: none;
  font-size: 14px; color: var(--muted); transition: color .15s, background .15s;
}
.docs-group a:hover { color: var(--cream); background: rgba(233, 228, 220, .04); }
.docs-group a.active { color: var(--cream); border-left-color: var(--red); background: var(--red-soft); font-weight: 500; }

/* Kategorien (z. B. Free / Paid Scripts) mit aufklappbaren Scripts */
.docs-cat { gap: 2px; }
.docs-script summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px 7px 12px; border-radius: var(--r-sm);
  list-style: none; cursor: pointer; user-select: none; font-size: 14px; font-weight: 600; color: var(--bone); transition: color .15s, background .15s;
}
.docs-script summary::-webkit-details-marker { display: none; }
.docs-script summary:hover { color: var(--cream); background: rgba(233, 228, 220, .04); }
.docs-script summary:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.docs-script summary.has-active { color: var(--cream); }
.docs-script summary .icon { flex: none; color: var(--faint); transition: transform .18s; }
.docs-script[open] > summary .icon { transform: rotate(90deg); }
.docs-script-pages { display: grid; gap: 1px; margin: 2px 0 8px 12px; padding-left: 8px; border-left: 1px solid var(--line); }
.docs-script-pages a { font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .docs-script summary .icon { transition: none; } }

.docs-main { min-width: 0; }
.docs-menu { display: none; margin-bottom: 16px; }
.docs-h1 { margin: 12px 0 22px; font-size: clamp(30px, 4vw, 40px); }
.docs-content { max-width: 740px; }
.docs-content h2, .docs-content h3 { scroll-margin-top: calc(var(--bar) + 24px); }
.docs-content h2 { padding-top: 24px; border-top: 1px solid var(--line); }
.docs-content img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); margin: 1em 0; }

.code { margin: 1.3em 0; border: 1px solid var(--line); border-radius: var(--r); background: #0f0f11; overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.code-copy { background: none; border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.code-copy:hover { border-color: var(--bone); color: var(--cream); }
.prose .code pre { margin: 0; border: 0; border-radius: 0; background: none; padding: 14px 16px; }
.prose .code code { font-size: 13.5px; line-height: 1.65; color: var(--bone); }

.hint { display: flex; gap: 12px; margin: 1.3em 0; padding: 14px 16px; border: 1px solid var(--line); border-left: 2px solid var(--line-2); border-radius: var(--r); background: var(--panel); }
.hint > div { min-width: 0; }
.hint > div > :last-child { margin-bottom: 0; }
.hint-icon { flex: none; margin-top: 2px; }
.hint-info { border-left-color: var(--bone); }
.hint-info .hint-icon { color: var(--bone); }
.hint-tip { border-left-color: var(--gold); }
.hint-tip .hint-icon { color: var(--gold); }
.hint-warning { border-left-color: var(--orange); }
.hint-warning .hint-icon { color: var(--orange); }
.hint-danger { border-left-color: var(--signal); background: rgba(110, 10, 19, .2); }
.hint-danger .hint-icon { color: var(--signal); }
.prose li.task { list-style: none; margin-left: -1.25em; display: flex; gap: 10px; align-items: baseline; }
.check { flex: none; width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 3px; transform: translateY(2px); }
.check.on { background: var(--red); border-color: var(--red); }

.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 52px; max-width: 740px; }
.pager { display: grid; gap: 4px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: var(--panel); transition: border-color .2s var(--ease); }
.pager:hover { border-color: rgba(193, 18, 31, .55); }
.pager strong { color: var(--cream); font-weight: 600; }
.pager.next { text-align: right; }

.docs-toc .label { margin-bottom: 10px; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border-left: 1px solid var(--line); }
.docs-toc button { display: block; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; margin-left: -1px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.docs-toc .lvl3 button { padding-left: 24px; font-size: 12.5px; }
.docs-toc button:hover { color: var(--cream); }
.docs-toc button.active { color: var(--cream); border-left-color: var(--red); }

/* Doku-Editor */
.docs-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.docs-topline:has(.docs-tools:empty) .docs-menu { margin-bottom: 0; }
.docs-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.docs-tools:empty { display: none; }
/* bleibt unten in der Seitenleiste sichtbar, auch wenn das Menü länger ist */
.docs-side-foot { position: sticky; bottom: 0; margin-top: 24px; padding: 12px 0 6px; border-top: 1px solid var(--line); background: var(--night); font-size: 14px; }
.docs-side-foot:empty { display: none; }
.docs-side-foot .label { display: inline-flex; align-items: center; gap: 8px; }
.docs.is-editing { grid-template-columns: 232px minmax(0, 1fr); }
.docs.is-editing .docs-toc { display: none; }

.ed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ed-head .docs-h1 { margin: 6px 0 0; }
.ed-actions { display: flex; gap: 8px; }
.ed-toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 6px;
  background: var(--panel); border: 1px solid var(--line-2); border-bottom: 0; border-radius: var(--r) var(--r) 0 0;
}
.ed-tb { min-width: 32px; height: 28px; padding: 0 8px; background: transparent; border: 1px solid transparent; border-radius: 3px; font: 600 12px/1 var(--f-mono); color: var(--bone); }
.ed-tb:hover { border-color: var(--line-2); background: var(--panel-2); color: var(--cream); }
.ed-spacer { flex: 1; }
.ed-tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; }
.ed-tab { background: none; border: 0; padding: 6px 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ed-tab.active { background: var(--red); color: var(--cream); }
.ed-panes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: 0 0 var(--r) var(--r); overflow: hidden; min-height: 62vh; }
.ed-panes[data-view="write"] { grid-template-columns: 1fr; }
.ed-panes[data-view="write"] .ed-preview { display: none; }
.ed-panes[data-view="preview"] { grid-template-columns: 1fr; }
.ed-panes[data-view="preview"] .ed-text { display: none; }
.ed-text {
  width: 100%; min-height: 62vh; resize: vertical; padding: 16px; border: 0; outline: none;
  background: #0f0f11; color: var(--bone); font: 400 13.5px/1.7 var(--f-mono); tab-size: 2;
  -webkit-user-select: text; user-select: text;
}
.ed-text:focus { box-shadow: inset 0 0 0 1px var(--signal); }
.ed-json { border: 1px solid var(--line-2); border-radius: var(--r); min-height: 60vh; }
.ed-preview { padding: 16px 22px; border-left: 1px solid var(--line-2); overflow: auto; max-height: 75vh; background: var(--night); }
.ed-panes[data-view="preview"] .ed-preview { border-left: 0; max-height: none; }
.ed-preview .docs-h1 { font-size: 28px; margin-top: 0; }
.ed-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.ed-delete { color: var(--signal); }
.ed-form { display: grid; gap: 14px; }
.ed-form label { display: grid; gap: 6px; }
.ed-form .field { width: 100%; }
.ed-form select.field { appearance: auto; }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 232px minmax(0, 1fr); gap: 40px; }
  .docs-toc { display: none; }
}
@media (max-width: 960px) {
  .ed-panes { grid-template-columns: 1fr; }
  .ed-preview { border-left: 0; border-top: 1px solid var(--line-2); }
}
@media (max-width: 820px) {
  .docs, .docs.is-editing { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .docs-menu { display: inline-flex; }
  .docs-side { position: static; max-height: none; display: none; margin-bottom: 20px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .docs-side.open { display: block; }
  .docs-side-foot { position: static; background: none; }
  .docs-pager { grid-template-columns: 1fr; }
}

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

.footer { border-top: 1px solid var(--line); background: #0a0a0b; margin-top: auto; }
.footer-in { display: grid; grid-template-columns: auto 1fr; gap: 22px 40px; padding-top: 32px; padding-bottom: 26px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 48px; height: 48px; }
.footer-name { font-weight: 700; color: var(--cream); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; }
.footer-links a { text-decoration: none; color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--cream); }
.footer-legal { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); line-height: 1.7; }
.footer-legal a { color: var(--muted); }

/* ---------- Kleinere Bildschirme ---------- */

@media (max-width: 960px) {
  .product-grid { grid-template-columns: 1fr; }
  .buy { position: static; }
  .feature { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar-in { gap: 12px; }
  .burger { display: inline-flex; }
  .nav {
    position: fixed; top: var(--bar); left: 0; right: 0; z-index: 39;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 18px;
    background: rgba(12, 12, 13, .98); border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none;
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a.active::after { left: 0; right: auto; width: 24px; bottom: -1px; }
  .actions { margin-left: auto; }
  body.nav-open .nav { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  body.nav-open .burger span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  body.nav-open .burger span:nth-child(2) { opacity: 0; }
  body.nav-open .burger span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
  .hero-bg {
    background:
      linear-gradient(0deg, var(--night) 0%, rgba(12, 12, 13, .72) 45%, rgba(12, 12, 13, .35) 100%),
      url("../img/scene-los-santos.jpg") 58% 62% / cover no-repeat;
  }
}

@media (max-width: 560px) {
  :root { --bar: 64px; }
  .brand-full { display: none; }
  .brand-icon { display: block; }                    /* Brandbook: Icon unter 160 px, min. 32 px */
  .user-chip { padding: 0 10px; }
  .user-name { max-width: 90px; }
  .cart-label { display: none; }
  .cart-btn { padding: 0 10px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .grid, .cat-grid { grid-template-columns: 1fr; }
  .hero-in { min-height: 0; padding-top: 48px; padding-bottom: 80px; }
  .nav-btn { width: 36px; height: 36px; }
  .zoom-btn span { display: none; }
  .zoom-btn { width: 34px; padding: 0; justify-content: center; }
  .thumb { width: 80px; }
  .buy { padding: 20px; }
  .buy-row { flex-direction: column; }
  .qty-lg { align-self: flex-start; }
  .footer-in { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .lb-stage { margin: 8px 4px; }
  .sale-bar { height: 42px; font-size: 11px; }
  .sale-title { font-size: 17px; }
  .sale-off { font-size: 12px; padding: 6px 8px; }
  .sale-icon { width: 20px; height: 20px; }
  .sale-unit { gap: 16px; padding-right: 16px; }
  .sale-kicker { font-size: 10px; padding: 5px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  /* Sale-Banner: nur ein Durchlauf, zentriert und statisch */
  .sale-track, .sale-bar::before, .sale-bar::after, .sale-bar .sale-title, .sale-bar .sale-icon, .sale-kicker::before { animation: none !important; }
  .sale-track { width: 100%; justify-content: center; }
  .sale-group + .sale-group, .sale-unit + .sale-unit { display: none; }
  .sale-marquee { -webkit-mask-image: none; mask-image: none; }
}
