/* ============================================================
   Shop Checkout — Helles Theme (Die Unfassbaren Branding)
   Angelehnt an /Freikarten Design
   ============================================================ */

:root {
  --bg:           #f7f7f8;
  --bg-card:      #fff;
  --bg-input:     #fafafa;
  --border:       #e8e8e8;
  --border-focus: #ddd;
  --text:         #333;
  --text-muted:   #888;
  --text-dim:     #aaa;
  --primary:      #f16521;
  --primary-hover:#e05a1a;
  --primary-light:rgba(241, 101, 33, 0.08);
  --success:      #22c55e;
  --success-bg:   rgba(34, 197, 94, 0.08);
  --danger:       #dc2626;
  --danger-bg:    #fef2f2;
  --radius:       16px;
  --radius-sm:    8px;
  --font:         'Inter', -apple-system, sans-serif;
}

/* ── RESET ── */

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── APP LAYOUT ── */

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 3px solid var(--primary);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 600px;
  margin: 0 auto;
}

.logo-img {
  height: 72px;
  width: auto;
}

.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.screen-container {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.app-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  background: #fff;
}

/* ── SCREENS ── */

.screen {
  display: none;
  width: 100%;
  max-width: 480px;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.screen-inner {
  width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CARDS ── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* ── PRODUCT CARD ── */

.product-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  border: 1px solid rgba(241, 101, 33, 0.15);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.product-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.product-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 8px;
  font-weight: 400;
}

.product-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.product-price .currency {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── ORDER FORM ── */

.order-form h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

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

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: #fff;
}

.form-group input::placeholder {
  color: var(--text-dim);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── BUTTONS ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(241, 101, 33, 0.3);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn-primary:disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-dim);
}

.btn-lg {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
}

.btn-icon {
  font-size: 18px;
}

/* ── ERROR / LOADING STATES ── */

.error-msg {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  text-align: center;
}

.loading-state,
.error-state {
  text-align: center;
  padding: 60px 20px;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-state h3 {
  margin-bottom: 8px;
  color: var(--text);
}
.error-state p {
  color: var(--text-muted);
}

/* ── SPINNER ── */

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #eee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── CHECKOUT CARD ── */

.checkout-header {
  text-align: center;
  margin-bottom: 24px;
}

.checkout-header h2 {
  margin-bottom: 8px;
}

.checkout-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.checkout-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.summary-row strong {
  color: var(--text);
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 16px;
}

.summary-row.total strong {
  color: var(--primary);
  font-size: 18px;
}

/* ── PROCESSING CARD ── */

.processing-card {
  text-align: center;
  padding: 48px 32px;
}

.processing-card h2 {
  margin-bottom: 8px;
}

.processing-card p {
  color: var(--text-muted);
}

/* ── SUCCESS CARD ── */

.success-card {
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--success);
}

.success-card h2 {
  color: var(--success);
  margin-bottom: 8px;
}

.order-number {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.order-number strong {
  color: var(--text);
}

.success-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.success-summary .summary-row {
  font-size: 14px;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.email-hint {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.bookmark-hint {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

/* ── RESPONSIVE ── */

@media (max-width: 480px) {
  .card {
    padding: 1.5rem 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .product-header h2 {
    font-size: 18px;
  }

  .product-price {
    font-size: 24px;
  }

  .screen-container {
    padding: 16px 12px;
  }
}
