/* ============================================================
   Mobile-first Bestellseite
   ============================================================ */

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

:root {
  --green:        #0a7d3a;
  --green-dark:   #066027;
  --bg:           #f6f7f4;
  --card:         #ffffff;
  --text:         #1c2118;
  --muted:        #6b7166;
  --border:       #dee2d6;
  --error:        #c1272d;
  --radius:       12px;
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 14px;
  background: var(--green);
  color: #fff;
}

.topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.1px;
  flex: 1 1 auto;
}

.lang a {
  display: inline-block;
  padding: 4px 8px;
  margin-left: 4px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
}

.lang a.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

main {
  padding: 16px;
}

.subtitle {
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

/* ---- Form fields ---- */

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field input {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10,125,58,0.15);
}

/* ---- Products ---- */

.products {
  margin: 22px 0 16px;
}

.product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.product-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  object-fit: cover;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--border);
}

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

.product-name {
  font-size: 17px;
  font-weight: 600;
}

.product-price {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.muted { color: var(--muted); }

.qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.qty-btn:active { background: var(--border); }

.qty input {
  width: 44px;
  height: 36px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 17px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Total ---- */

.total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 18px;
  font-size: 17px;
}

.total strong { font-size: 22px; }

/* ---- Submit ---- */

.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.submit-btn:active { background: var(--green-dark); }
.submit-btn:disabled { opacity: 0.6; }

.error {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fceeee;
  color: var(--error);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

/* ---- Closed state ---- */

.closed {
  margin-top: 50px;
  text-align: center;
  padding: 30px 20px;
}

.closed-icon {
  font-size: 56px;
  margin-bottom: 14px;
}

.closed p {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

/* ---- Success ---- */

.success {
  margin-top: 30px;
  text-align: center;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 36px;
  line-height: 64px;
  margin: 0 auto 14px;
}

.success h2 { margin: 0 0 10px; }
.success p  { margin: 0 0 20px; color: var(--muted); }
