:root {
  --color-primary:        #C8342C;
  --color-primary-dark:   #991F1F;
  --color-secondary:      #6B8E23;
  --color-secondary-dark: #4A6617;
  --color-background:     #FAF6F0;
  --color-background-alt: #F5EFE3;
  --color-surface:        #FFFFFF;
  --color-text:           #2B2B2B;
  --color-text-muted:     #6B6B6B;
  --color-text-hint:      #888888;
  --color-border:         #E5D9C5;
  --color-divider-dashed: #D3C9B8;
  --color-shadow:         rgba(43, 43, 43, 0.08);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Platz für sticky Order-Bar */
  padding-bottom: 320px;
}

/* ── Event-Banner ────────────────────────────────────────────── */
.event-banner {
  background: var(--color-primary);
  color: #FAF6F0;
  text-align: center;
  padding: 10px var(--space-md);
}

.event-banner__kicker {
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: .75;
}

.event-banner__name {
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  margin-top: 2px;
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  background: var(--color-background-alt);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px dashed var(--color-divider-dashed);
}

.site-logo { height: 36px; width: auto; }

.logo-text {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
}
.logo-text span { color: var(--color-primary); }

.admin-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid var(--color-divider);
  border-radius: 6px;
  opacity: 0.5;
}
.admin-link:hover { opacity: 1; }

/* ── Menü ────────────────────────────────────────────────────── */
.menu { max-width: 480px; margin: 0 auto; padding: var(--space-md); }

/* ── Bestellstatus-Bar ───────────────────────────────────────── */
.order-status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px var(--space-sm) 10px var(--space-md);
  margin-bottom: var(--space-md);
  transition: border-color .3s, background .3s;
}

.order-status-bar--ready {
  border-color: #16A34A;
  background: #F0FDF4;
}

.order-status-bar__icon { font-size: 20px; flex-shrink: 0; }

.order-status-bar__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.order-status-bar__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-status-bar__desc {
  font-size: 11px;
  color: var(--color-text-muted);
}

.order-status-bar__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 4px 6px;
}

.order-status-bar__close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--color-text-hint);
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Sektion-Separator ───────────────────────────────────────── */
.section-separator {
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 2px;
  margin: var(--space-md) 0 var(--space-lg);
}

/* ── Produkt-Karte ───────────────────────────────────────────── */
.product-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  gap: var(--space-md);
  transition: border-color .15s;
  position: relative;
}

.product-card--selected {
  border-left-color: var(--color-secondary);
}

.product-card--soldout {
  opacity: .55;
}

/* Bild */
.product-card__image {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-background-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__emoji { font-size: 26px; }

/* Body */
.product-card__body { flex: 1; min-width: 0; }

.product-card__name {
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.3;
}

.product-card__ingredients {
  font-size: 11px;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.3;
  margin-top: 3px;
}

.product-card__allergens {
  font-size: 10px;
  color: var(--color-secondary);
  font-weight: 500;
  margin-top: 3px;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-sm);
}

.product-card__price {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.product-card__stock-hint {
  font-size: 11px;
  color: #D97706;
  font-weight: 500;
  margin-top: var(--space-xs);
}

/* Ausverkauft-Badge */
.badge-soldout {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #FEE2E2;
  color: var(--color-primary-dark);
}

/* ── Stepper ─────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, opacity .12s;
  -webkit-tap-highlight-color: transparent;
}

.stepper-plus {
  background: var(--color-secondary);
  color: #fff;
}
.stepper-plus:active { background: var(--color-secondary-dark); }

.stepper-minus {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-divider-dashed);
}
.stepper-minus:active { background: var(--color-background-alt); }
.stepper-minus:disabled { opacity: .35; cursor: default; }

.stepper-count {
  min-width: 22px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

/* ── Order-Bar (sticky bottom) ───────────────────────────────── */
.order-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-md);
  box-shadow: 0 -4px 16px var(--color-shadow);
  z-index: 100;
}

@media (min-width: 480px) {
  .order-bar {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }
}

.order-items {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 5px 0;
}

.order-item + .order-item {
  border-top: 1px dashed var(--color-divider-dashed);
}

.order-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.order-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-item__meta {
  font-size: 11px;
  color: var(--color-text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-item__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.order-item__price {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  min-width: 44px;
  text-align: right;
}

.order-item__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
}

.order-item__edit   { color: var(--color-secondary-dark); }
.order-item__remove { color: var(--color-primary); }

.order-bar__total {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
  margin-bottom: var(--space-sm);
}

.order-bar__name input {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-background);
  outline: none;
  transition: border-color .15s;
  margin-bottom: var(--space-sm);
}

.order-bar__name input:focus {
  border-color: var(--color-primary);
}

.order-bar__name input.input-error {
  border-color: var(--color-primary);
  background: #FEF2F2;
}

.order-bar__btn {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}

.order-bar__btn:hover   { background: var(--color-primary-dark); }
.order-bar__btn:active  { opacity: .85; }
.order-bar__btn:disabled { opacity: .5; cursor: not-allowed; }

.order-bar__error {
  margin-top: var(--space-sm);
  font-size: 13px;
  color: var(--color-primary-dark);
  text-align: center;
}

/* ── Extras-Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-sheet {
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-lg);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp .2s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-header { margin-bottom: var(--space-lg); }

.modal-title {
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.extras-list { margin-bottom: var(--space-lg); }

.extras-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-divider-dashed);
  cursor: pointer;
}

.extras-option:last-child { border-bottom: none; }

.extras-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-secondary);
  flex-shrink: 0;
  cursor: pointer;
}

.extra-name { flex: 1; font-size: 15px; }

.extra-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-secondary-dark);
}

.modal-btn-confirm {
  width: 100%;
  padding: 14px;
  background: var(--color-secondary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: var(--space-sm);
  -webkit-tap-highlight-color: transparent;
}

.modal-btn-cancel {
  width: 100%;
  padding: 12px;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
}

/* ── Notiz-Feld im Modal ─────────────────────────────────────── */
.notes-section {
  margin: var(--space-md) 0 var(--space-lg);
  border-top: 1px dashed var(--color-divider-dashed);
  padding-top: var(--space-md);
}

.notes-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.notes-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-background);
  resize: none;
  outline: none;
  transition: border-color .15s;
  line-height: 1.5;
}

.notes-input:focus { border-color: var(--color-primary); }

.notes-counter {
  font-size: 11px;
  color: var(--color-text-hint);
  text-align: right;
  margin-top: 4px;
}

/* ── Utilities ───────────────────────────────────────────────── */
[hidden] { display: none !important; }
