/* Datei: css/vorbestellungen.css */

/* Css Datei für beide Kunden Vorbestellungsseiten (im Prozess. nicht Anleitung) */

/* === Globales Box-Sizing gegen "seitlich scrollen" === */
*, *::before, *::after {
  box-sizing: border-box;
}

/* =====================================================
   Saisonale Farb-Variablen
   html.summer  → Rot-Design (Feb–Sep)
   html.winter  → Navy-Design (Okt–Jan)
   ===================================================== */

:root {
  /* Fallback neutral (vor JS-Auswertung) */
  --bg-base: #0f172a;
  --grad1:   rgba(96, 165, 250, 0.15);
  --grad2:   rgba(15,  23,  42, 0.80);
  --grad3:   rgba(30,  58, 138, 0.20);
}

html.summer {
  --bg-base: #5a150c;
  --grad1:   rgba(200, 40,  15, 0.55);
  --grad2:   rgba( 90, 20,  10, 0.70);
  --grad3:   rgba(168, 32,  18, 0.45);
}

html.winter {
  --bg-base: #051828;
  --grad1:   rgba( 26, 92, 138, 0.50);
  --grad2:   rgba(  5, 24,  40, 0.80);
  --grad3:   rgba( 14, 61,  92, 0.50);
}

html {
  background-color: var(--bg-base);
  background-image:
    linear-gradient(to bottom,
      var(--bg-base) 0px,
      transparent 180px,
      transparent calc(100% - 120px),
      var(--bg-base) 100%
    ),
    radial-gradient(ellipse 80% 55% at 50% 30%, var(--grad1) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 80%, var(--grad2) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 10% 70%, var(--grad3) 0%, transparent 60%);
  background-attachment: fixed;
}

html::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Schneeflocken nur im Winter */
.snowflakes {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
html.winter .snowflakes { display: block; }

.snowflake {
  position: absolute;
  top: -20px;
  color: rgba(255, 255, 255, 0.55);
  animation: snowfall linear infinite;
}

@keyframes snowfall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 0.8; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0;   }
}


/* === Grundlayout === */
html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: transparent;
  color: #222;

  height: 100dvh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;

  overflow: hidden;
  overscroll-behavior: none;
}

@supports not (height: 100dvh) {
  body {
    height: 100vh;
    min-height: 100vh;
  }
}

/* === Header === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
  flex: 0 0 auto;
}

/* === Header Button Gruppe === */
.header-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.back-btn,
.event-btn {
  text-decoration: none;
  font-weight: bold;
  border-radius: 12px;
  padding: 8px 16px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.back-btn {
  background: #ffffff;
  color: #000;
}

.back-btn:hover {
  background: #ddd;
}

.event-btn {
  background: #e0f0ff;
  color: #003366;
}

.event-btn:hover {
  background: #c2e0ff;
}

.clock {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
}

/* === Mobiler Warenkorb-Button === */
.cart-toggle {
  display: none;
  position: relative;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.cart-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.cart-toggle.has-items {
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.28),
    0 0 0 2px rgba(255, 255, 255, 0.16);
}

.cart-toggle-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c40000;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  border: 2px solid #ffffff;
}

.cart-badge.is-visible {
  display: flex;
}

/* === Hauptbereich === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  min-height: 0;
  overflow: hidden;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

h1 {
  text-align: center;
  color: white;
  margin-bottom: 25px;
  flex: 0 0 auto;
}

/* === Kassenbereich === */
.kasse-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow: hidden;
  overflow-x: hidden;
  width: 100%;
}

/* === Artikelliste links === */
.article-list {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

.article-list::-webkit-scrollbar {
  width: 8px;
}

.article-list::-webkit-scrollbar-thumb {
  background-color: rgba(204, 204, 204, 0.9);
  border-radius: 8px;
}

.article-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(170, 170, 170, 0.95);
}

.category {
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 10px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.article {
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  min-width: 0;
  gap: 12px;
}

.article:hover {
  background: #f7f7f7;
  transform: scale(1.02);
}

.article span:first-child {
  min-width: 0;
  word-break: break-word;
  font-weight: 700;
}

.article span:last-child {
  flex: 0 0 auto;
  font-weight: 800;
  white-space: nowrap;
}

/* === Warenkorb rechts === */
.cart {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.cart h2 {
  margin: 0;
  text-align: center;
  flex: 1 1 auto;
}

.cart-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: #ffe0e0;
  color: #8b0000;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  flex: 0 0 auto;
}

.cart-close:hover {
  background: #ffbcbc;
  transform: scale(1.02);
}

.cart ul {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 5px;
}

.cart ul::-webkit-scrollbar {
  width: 8px;
}

.cart ul::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 8px;
}

.cart ul::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

.cart li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
  min-width: 0;
}

.cart-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item-title {
  display: block;
  font-weight: 700;
  color: #222;
  word-break: break-word;
}

.cart-item-components,
.cart-item-note {
  font-weight: 400;
}

.cart-item-price {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  color: #555;
}

.cart-empty {
  justify-content: center;
  color: #666;
  text-align: center;
  border-bottom: none;
  padding: 14px 8px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.quantity-controls span {
  min-width: 22px;
  text-align: center;
  font-weight: 800;
}

.quantity-controls button {
  background: #eee;
  font-size: 0.9rem;
  padding: 2px 8px;
  border-radius: 6px;
  border: none;
  transition: background 0.25s;
  cursor: pointer;
}

.quantity-controls button:hover {
  background: #ddd;
}

/* === Sticky-Footer im Warenkorb === */
.cart-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 2px solid #eee;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
}

#totalPrice {
  text-align: left;
  font-weight: bold;
  color: #222;
}

/* 🆕 Ghost-Button */
.ghost-btn {
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  text-align: center;
}

.ghost-btn.ghost-off {
  background: #ffe0e0;
  color: #a10000;
}

.ghost-btn.ghost-on {
  background: #d4ffd4;
  color: #064e00;
}

.ghost-btn:active {
  transform: scale(0.97);
}

/* === Warenkorb Buttons === */
.cart-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  flex: 0 0 auto;
}

#clearCart,
#sendCart {
  flex: 1;
  margin: 0 5px;
  border-radius: 10px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 18px 0;
  font-size: 18px;
  min-height: 55px;
}

#clearCart {
  background: #ffe0e0;
  color: #a10000;
}

#clearCart:hover {
  background: #ffb3b3;
}

#sendCart {
  background: #d4ffd4;
  color: #064e00;
}

#sendCart:hover {
  background: #a9f3a9;
}

/* === Hintergrund hinter mobilem Drawer === */
.cart-drawer-backdrop {
  display: none;
}

/* === Overlay === */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 500;
  overflow: hidden;
  overflow-x: hidden;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: #f5f5f5;
  border-radius: 16px;
  padding: 25px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: hidden;
}

@supports not (max-height: 85dvh) {
  .overlay-content {
    max-height: 85vh;
  }
}

.overlay-content h2 {
  margin-top: 0;
  text-align: center;
  color: #333;
  flex: 0 0 auto;
}

/* Komponentenliste scrollt, wenn zu groß */
#componentList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 10px 0 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  position: relative;
  scrollbar-gutter: stable;
}

#componentList::-webkit-scrollbar {
  width: 8px;
}

#componentList::-webkit-scrollbar-thumb {
  background-color: rgba(180, 180, 180, 0.9);
  border-radius: 8px;
}

#componentList::-webkit-scrollbar-thumb:hover {
  background-color: rgba(150, 150, 150, 0.95);
}

#componentList::after {
  content: "▾";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.35);
  background: linear-gradient(
    to bottom,
    rgba(245, 245, 245, 0),
    rgba(245, 245, 245, 1)
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#componentList.scroll-hint::after {
  opacity: 1;
}

#componentList.at-bottom::after {
  opacity: 0;
}

/* === Komponenten Buttons === */
.component-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 12px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  background: #e0e0e0;
  color: #333;
  font-weight: bold;
  border: 2px solid transparent;
  transition: all 0.25s ease;
}

.component-button__label {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.component-button__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  background: rgba(255, 255, 255, 0.92);
  color: #003366;
  border: 1px solid rgba(0, 51, 102, 0.18);
}

.component-button:hover {
  background: #d5d5d5;
}

.component-button.active {
  background: #007bff;
  color: white;
  border-color: #0056b3;
}

.component-button.active .component-button__badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.component-button.locked {
  cursor: default;
  opacity: 0.92;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
}

.component-button.locked .component-button__badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
}

.component-button:hover {
  background: #d5d5d5;
}

.component-button.active {
  background: #007bff;
  color: white;
  border-color: #0056b3;
}

.component-button.locked {
  cursor: default;
  opacity: 0.92;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
}

/* === Overlay Buttons === */
.overlay-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  flex: 0 0 auto;
}

.overlay-buttons button {
  flex: 1;
  margin: 0 5px;
  border-radius: 10px;
  padding: 10px;
  border: none;
  font-weight: bold;
  transition: all 0.25s ease;
  cursor: pointer;
}

#cancelComponent {
  background: #ffcccc;
  color: #800000;
}

#cancelComponent:hover {
  background: #ff9999;
}

#addToCart {
  background: #c8f7c5;
  color: #064e00;
}

#addToCart:hover {
  background: #a3f0a0;
}

/* === Notiz Overlay === */
#noteOverlay textarea {
  width: 100%;
  margin: 10px auto;
  display: block;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  resize: none;
}

#noteOverlay .overlay-content {
  max-width: 400px;
  max-height: 85dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#noteOverlay .overlay-buttons button {
  flex: 1;
  margin: 0 5px;
  border-radius: 10px;
  padding: 10px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
}

#noteOverlay #cancelNote {
  background: #ffcccc;
  color: #800000;
}

#noteOverlay #cancelNote:hover {
  background: #ff9999;
}

#noteOverlay #saveNote {
  background: #c8f7c5;
  color: #064e00;
}

#noteOverlay #saveNote:hover {
  background: #a3f0a0;
}

/* ✅ Confirm Overlay Styling */
.overlay-content--confirm {
  max-width: 520px;
  max-height: 90dvh;
}

@supports not (max-height: 90dvh) {
  .overlay-content--confirm {
    max-height: 90vh;
  }
}

.confirm-meta {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.confirm-label {
  font-weight: 700;
  color: #333;
}

.confirm-value {
  font-weight: 700;
  color: #111;
}

.confirm-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-list::-webkit-scrollbar {
  width: 8px;
}

.confirm-list::-webkit-scrollbar-thumb {
  background-color: rgba(180, 180, 180, 0.9);
  border-radius: 8px;
}

.confirm-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(150, 150, 150, 0.95);
}

.confirm-item {
  background: #ffffff;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.confirm-item__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.confirm-item__title {
  font-weight: 800;
  color: #222;
  min-width: 0;
}

.confirm-item__qty {
  font-weight: 800;
  color: #111;
  flex: 0 0 auto;
}

.confirm-item__comps {
  margin-top: 6px;
  color: #444;
  font-size: 0.95rem;
}

.confirm-item__note {
  margin-top: 8px;
  background: #f3f7ff;
  border: 1px solid #dbe7ff;
  color: #1f3b7a;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.confirm-item__bottom {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #333;
  font-weight: 700;
}

.confirm-item__unit {
  color: #555;
  font-weight: 700;
}

.confirm-item__sum {
  color: #111;
  font-weight: 900;
}

.confirm-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.85rem;
  border-radius: 999px;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #7a5a00;
  font-weight: 800;
}

#confirmBack {
  background: #ffcccc;
  color: #800000;
}

#confirmBack:hover {
  background: #ff9999;
}

#confirmSend {
  background: #c8f7c5;
  color: #064e00;
}

#confirmSend:hover {
  background: #a3f0a0;
}

.confirm-hint {
  margin-top: 10px;
  font-size: 0.92rem;
  color: #555;
  text-align: center;
}

/* === Eigene sichtbare Scroll-Indikatoren === */
.article-list,
#componentList,
.cart ul,
.confirm-list {
  --custom-scroll-track-width: 4px;
  --custom-scroll-top-offset: 8px;
  --custom-scroll-thumb-height: 36px;
  --custom-scroll-thumb-top: 0px;

  background-repeat: no-repeat;
}

.article-list.has-scroll-indicator,
#componentList.has-scroll-indicator,
.cart ul.has-scroll-indicator,
.confirm-list.has-scroll-indicator {
  padding-right: 14px !important;
}

/* Dunkler Bereich: Artikelliste */
.article-list.has-scroll-indicator {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95));
  background-size:
    var(--custom-scroll-track-width) calc(100% - 16px),
    var(--custom-scroll-track-width) var(--custom-scroll-thumb-height);
  background-position:
    right 2px top var(--custom-scroll-top-offset),
    right 2px top calc(var(--custom-scroll-top-offset) + var(--custom-scroll-thumb-top));
}

/* Helle Bereiche: Komponentenliste, Warenkorb, Zusammenfassung */
#componentList.has-scroll-indicator,
.cart ul.has-scroll-indicator,
.confirm-list.has-scroll-indicator {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.12)),
    linear-gradient(rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.92));
  background-size:
    var(--custom-scroll-track-width) calc(100% - 16px),
    var(--custom-scroll-track-width) var(--custom-scroll-thumb-height);
  background-position:
    right 2px top var(--custom-scroll-top-offset),
    right 2px top calc(var(--custom-scroll-top-offset) + var(--custom-scroll-thumb-top));
}

/* === Touch / Selection Verhalten === */
button,
input,
selectable,
.component-button {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* === Responsive (Handy / Tablet) === */
@media (max-width: 800px) {
  main {
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }

  header {
    padding: 8px 10px;
    gap: 8px;
  }

  .header-buttons {
    gap: 6px;
  }

  .header-right {
    gap: 8px;
  }

  .back-btn,
  .event-btn {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
  }

  .clock {
    font-size: 1rem;
  }

  .cart-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .kasse-container {
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }

  .article-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }

  .cart-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 350;
  }

  .cart-drawer-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .cart {
    position: fixed;
    top: 0;
    right: 0;
    width: min(92vw, 420px);
    height: 100dvh;
    max-height: none;
    min-height: 0;
    z-index: 360;
    border-radius: 22px 0 0 22px;
    box-shadow: -12px 0 34px rgba(0, 0, 0, 0.34);
    padding:
      calc(14px + env(safe-area-inset-top))
      14px
      calc(14px + env(safe-area-inset-bottom))
      14px;
    transform: translateX(110%);
    transition: transform 0.28s ease;
  }

  @supports not (height: 100dvh) {
    .cart {
      height: 100vh;
    }
  }

  .cart.cart--open {
    transform: translateX(0);
  }

  .cart-header {
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .cart h2 {
    text-align: left;
    font-size: 1.15rem;
  }

  .cart-close {
    display: inline-flex;
  }

  .cart ul {
    min-height: 80px;
  }

  .cart-footer {
    gap: 8px;
    padding-top: 8px;
  }

  .ghost-btn {
    min-width: 95px;
    padding: 6px 8px;
    font-size: 0.9rem;
  }

  .cart-buttons {
    margin-top: 8px;
  }

  #clearCart,
  #sendCart {
    padding: 10px 0;
    font-size: 14px;
    min-height: 42px;
  }

  .overlay-content--confirm {
    padding: 18px;
    width: 92%;
  }
}

/* Extra-klein (sehr schmale Handys) */
@media (max-width: 520px) {
  .header-buttons {
    width: 100%;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .back-btn,
  .event-btn {
    flex: 1 1 calc(50% - 3px);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .back-btn,
  .event-btn {
    padding: 5px 8px;
    font-size: 0.85rem;
  }

  .clock {
    font-size: 0.95rem;
  }

  .cart-toggle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .cart-toggle-logo {
    width: 34px;
    height: 34px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .ghost-btn {
    min-width: 88px;
    font-size: 0.85rem;
  }

  #clearCart,
  #sendCart {
    padding: 9px 0;
    font-size: 13px;
    min-height: 40px;
  }

  .cart {
    width: 96vw;
  }
}

/* ================================
   ✅ Success Page (Vorbestellnummer)
   ================================ */

.success-container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.success-card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.success-title {
  text-align: center;
  font-weight: 900;
  color: #111;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.success-number {
  text-align: center;
  font-weight: 1000;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 1;
  letter-spacing: 2px;
  color: #064e00;
  margin: 8px 0 10px 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

.success-sub {
  text-align: center;
  color: #333;
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 14px;
}

.success-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.success-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f7ff;
  border: 1px solid #dbe7ff;
  color: #1f3b7a;
  font-weight: 800;
  font-size: 0.92rem;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.success-btn {
  text-decoration: none;
  font-weight: 900;
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.25s ease;
  display: inline-block;
  min-width: 180px;
  text-align: center;
}

.success-btn--primary {
  background: #d4ffd4;
  color: #064e00;
}

.success-btn--primary:hover {
  background: #a9f3a9;
}

.success-btn--secondary {
  background: #e0f0ff;
  color: #003366;
}

.success-btn--secondary:hover {
  background: #c2e0ff;
}

/* ✅ Kleiner Hinweis bei Warenkorb-Maximum */
.cart-limit-toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(14px);
  z-index: 10000;

  width: min(420px, calc(100vw - 28px));
  background: rgba(17, 24, 39, 0.96);
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;

  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.35;

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);

  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.cart-limit-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .cart-limit-toast {
    font-size: 0.88rem;
    padding: 10px 12px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

/* ✅ Fullscreen Lock Overlay (wenn Vorbestellungen geschlossen sind) */
.system-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.system-lock-overlay.hidden {
  display: none;
}

.system-lock-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  border: 1px solid rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.system-lock-title {
  font-weight: 900;
  font-size: 1.35rem;
  color: #111;
}

.system-lock-text {
  font-weight: 700;
  color: #333;
  line-height: 1.35;
}

.system-lock-btn {
  display: inline-block;
  margin-top: 6px;
  background: #ffffff;
  color: #000;
  text-decoration: none;
  font-weight: 900;
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.25s ease;
  border: 1px solid rgba(0,0,0,0.15);
}

.system-lock-btn:hover {
  background: #ddd;
}

/* Lead-Satz: auffällig, auch wenn Safari keinen echten Bold-Font hat */
.success-sub .success-sub-lead {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 900 !important;
  font-synthesis: weight;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  padding: 6px 10px;
  border-radius: 10px;
  border: 2px solid currentColor;
  background: rgba(255, 215, 0, 0.28);
  text-shadow:
    0.6px 0 currentColor,
    -0.6px 0 currentColor,
    0 0.6px currentColor,
    0 -0.6px currentColor;
}

@supports (-webkit-text-stroke: 0.6px currentColor) {
  .success-sub .success-sub-lead {
    -webkit-text-stroke: 0.6px currentColor;
    text-shadow: none;
  }
}

/* ==========================================
   Erfolgsseite – nur für diese Seite gültig
   ========================================== */


/* ── Lang-Toggle Button ── */
.lang-toggle {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 10px;
  padding: 6px 11px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  flex: 0 0 auto;
}
.lang-toggle:hover { background: rgba(255,255,255,0.24); transform: translateY(-1px); }
.lang-toggle:active { transform: scale(0.97); }


/* =========================================================
   Zusatz-CSS nur für vorbestellungen-anleitung.html
   Basis-Design kommt aus css/vorbestellungen.css
   Alles ist auf .guide-page begrenzt, damit keine andere
   Seite unbeabsichtigt beeinflusst wird.
   ========================================================= */

/* ==========================================
   Header-Ergänzung nur für diese Seite
   ========================================== */
.guide-page .guide-header-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
  flex: 0 0 auto;
}

.guide-page .guide-header-logo-link:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.guide-page .guide-header-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* ==========================================
   Buttons im weißen Bereich nur hier anpassen
   ========================================== */
.guide-page .guide-actions {
  gap: 10px;
}

.guide-page .guide-actions .success-btn {
  border: 2px solid rgba(0, 0, 0, 0.38);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.guide-page .guide-actions .success-btn--primary {
  background: #e0f0ff;
  color: #003366;
}

.guide-page .guide-actions .success-btn--primary:hover {
  background: #c2e0ff;
}

.guide-page .guide-actions .success-btn--secondary {
  background: #ffffff;
  color: #000000;
}

.guide-page .guide-actions .success-btn--secondary:hover {
  background: #dddddd;
}

/* ==========================================
   Eigene Scroll-Leiste nur für die Anleitung
   Desktop: an der Guide-Liste rechts
   Mobile: am gesamten Scrollbereich ganz rechts
   ========================================== */
.guide-page .guide-list,
.guide-page .guide-scroll-area {
  --guide-scroll-track-width: 4px;
  --guide-scroll-top-offset: 8px;
  --guide-scroll-thumb-height: 36px;
  --guide-scroll-thumb-top: 0px;
  background-repeat: no-repeat;
}

.guide-page .guide-list.guide-has-scroll-indicator {
  padding-right: 14px !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95));
  background-size:
    var(--guide-scroll-track-width) calc(100% - 16px),
    var(--guide-scroll-track-width) var(--guide-scroll-thumb-height);
  background-position:
    right 2px top var(--guide-scroll-top-offset),
    right 2px top calc(var(--guide-scroll-top-offset) + var(--guide-scroll-thumb-top));
}

.guide-page .guide-scroll-area.guide-has-scroll-indicator {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95));
  background-size:
    var(--guide-scroll-track-width) calc(100% - 16px),
    var(--guide-scroll-track-width) var(--guide-scroll-thumb-height);
  background-position:
    right 2px top var(--guide-scroll-top-offset),
    right 2px top calc(var(--guide-scroll-top-offset) + var(--guide-scroll-thumb-top));
}

/* ==========================================
   Step Cards im Look der Artikel-Cards
   ========================================== */
.guide-page .guide-step {
  cursor: default;
}

.guide-page .guide-step-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-page .guide-step-title {
  font-weight: 900;
  color: #111;
  font-size: 1.05rem;
}

.guide-page .guide-step-desc {
  color: #333;
  font-weight: 500;
  line-height: 1.35;
}

/* Rechte Badge-Zahl */
.guide-page .guide-step-badge {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  font-size: 1.1rem;
  background: #e0f0ff;
  color: #003366;
  border: 1px solid rgba(0,0,0,0.10);
}

.guide-page .guide-step-badge--green {
  background: #d4ffd4;
  color: #064e00;
}

/* Kleine Pill rechts (bei Tipps) */
.guide-page .guide-pill {
  flex: 0 0 auto;
  align-self: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 0.9rem;
  border: 1px solid rgba(0,0,0,0.12);
  background: #f3f7ff;
  color: #1f3b7a;
}

.guide-page .guide-tip .guide-pill {
  display: none;
}

.guide-page .guide-pill--blue {
  background: #f3f7ff;
  border-color: #dbe7ff;
  color: #1f3b7a;
}

.guide-page .guide-pill--gold {
  background: #fff3cd;
  border-color: #ffe69c;
  color: #7a5a00;
}

/* Callout oben rechts */
.guide-page .guide-callout {
  background: #f3f7ff;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  padding: 12px 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.guide-page .guide-callout-title {
  font-weight: 1000;
  color: #1f3b7a;
  margin-bottom: 6px;
}

.guide-page .guide-callout-text {
  color: #1f3b7a;
  font-weight: 560;
  line-height: 1.35;
}

/* Checkliste */
.guide-page .guide-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-page .guide-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 800;
  color: #222;
}

.guide-page .guide-check {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #d4ffd4;
  color: #064e00;
  border: 1px solid rgba(0,0,0,0.10);
  flex: 0 0 auto;
}

/* FAQ im gleichen Card-Look */
.guide-page .guide-faq {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  border: 1px solid rgba(0,0,0,0.08);
}

.guide-page .guide-faq + .guide-faq {
  margin-top: 10px;
}

.guide-page .guide-faq-summary {
  cursor: pointer;
  font-weight: 900;
  color: #111;
}

.guide-page .guide-faq-body {
  margin-top: 10px;
  color: #333;
  font-weight: 560;
  line-height: 1.35;
}

/* ==========================================
   MOBILE-VERHALTEN:
   - „Kurz & Wichtig“ soll oben stehen
   - und beim Scrollen „weg“ sein, um zur langen Anleitung zu kommen
   => Ein gemeinsamer Scrollbereich (kasse-container) statt zwei
   ========================================== */
@media (max-width: 800px) {
  .guide-page .guide-header-logo-link {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .guide-page .guide-header-logo {
    width: 38px;
    height: 38px;
  }

  .guide-page .guide-step-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .guide-page .guide-side {
    order: 0;
  }

  .guide-page .guide-list {
    order: 1;
  }

  .guide-page .kasse-container.guide-scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
  }

  .guide-page .guide-list,
  .guide-page .guide-side {
    flex: 0 0 auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .guide-page .guide-side {
    max-height: none !important;
  }

  .guide-page .guide-side .success-actions {
    display: none;
  }

  .guide-page .guide-list.guide-has-scroll-indicator {
    background-image: none;
    padding-right: 0 !important;
  }
}

@media (max-width: 480px) {
  .guide-page .guide-header-logo-link {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .guide-page .guide-header-logo {
    width: 34px;
    height: 34px;
  }
}