:root {
  --fred-green-900: #0f3d2e;
  --fred-green-700: #17593f;
  --fred-green-600: #1d7a4c;
  --fred-green-500: #279660;
  --fred-green-100: #e6f2ea;
  --fred-cream: #f7f8f5;
  --white: #ffffff;
  --gray-900: #1c2420;
  --gray-700: #45524c;
  --gray-500: #74807a;
  --gray-300: #d8ddd8;
  --gray-200: #e9ece8;
  --border-radius: 10px;
  --shadow-card: 0 1px 2px rgba(15, 61, 46, 0.06), 0 1px 8px rgba(15, 61, 46, 0.06);
  --shadow-elevated: 0 12px 32px rgba(15, 61, 46, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fred-cream);
  color: var(--gray-900);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--fred-green-600); }

/* Topbar */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo { height: 44px; width: auto; display: block; }
.topbar-title {
  font-weight: 600;
  color: var(--fred-green-900);
  font-size: 15px;
  letter-spacing: 0.01em;
  border-left: 1px solid var(--gray-300);
  padding-left: 14px;
}

/* Layout */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Steps */
.steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
}
.step.is-active { color: var(--fred-green-900); }
.step.is-done { color: var(--fred-green-700); }
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.step.is-active .step-num,
.step.is-done .step-num {
  border-color: var(--fred-green-600);
  background: var(--fred-green-600);
  color: var(--white);
}
.step-label { font-size: 14px; font-weight: 500; }
.step-divider {
  width: 40px;
  height: 1px;
  background: var(--gray-300);
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--fred-green-900);
  margin: 0 0 6px;
}
.page-sub {
  color: var(--gray-700);
  margin: 0 0 28px;
  font-size: 15px;
}

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .col-summary { order: -1; }
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  margin-bottom: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.product-card:has(.product-check:checked) {
  border-color: var(--fred-green-600);
  box-shadow: 0 0 0 1px var(--fred-green-600) inset;
}
.product-card.is-disabled {
  background: var(--gray-200);
  opacity: 0.75;
}

.product-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  cursor: pointer;
}
.product-card.is-disabled .product-row { cursor: not-allowed; }

.product-check {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.checkbox-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
}
.product-check:checked + .checkbox-box,
.checkbox-line input:checked + .checkbox-box {
  background: var(--fred-green-600);
  border-color: var(--fred-green-600);
}
.product-check:checked + .checkbox-box::after,
.checkbox-line input:checked + .checkbox-box::after {
  content: "";
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg) translate(-1px, -1px);
}
.product-check:disabled + .checkbox-box {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.product-info { display: flex; flex-direction: column; gap: 5px; }
.product-name { font-weight: 600; font-size: 15.5px; color: var(--gray-900); }
.product-desc { font-size: 13.5px; color: var(--gray-700); line-height: 1.5; }
.product-note { font-size: 12.5px; color: var(--fred-green-700); font-weight: 500; margin-top: 2px; }

.product-price {
  font-weight: 700;
  font-size: 16px;
  color: var(--fred-green-900);
  white-space: nowrap;
  text-align: right;
}
.price-period { font-weight: 400; font-size: 12.5px; color: var(--gray-500); display: block; }

/* Summary */
.summary-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 24px;
  position: sticky;
  top: 24px;
}
.summary-title {
  font-size: 15px;
  text-transform: none;
  font-weight: 700;
  color: var(--fred-green-900);
  margin: 0 0 16px;
}
.summary-list { list-style: none; margin: 0 0 16px; padding: 0; }
.summary-empty { color: var(--gray-500); font-size: 13.5px; }
.summary-list li.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}
.summary-list li.summary-item span:first-child { color: var(--gray-700); }
.summary-list li.summary-item span:last-child { font-weight: 600; color: var(--gray-900); white-space: nowrap; }

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1.5px solid var(--gray-300);
  font-size: 20px;
  font-weight: 700;
  color: var(--fred-green-900);
}
.summary-note { font-size: 12px; color: var(--gray-500); margin: 6px 0 20px; }

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-primary {
  background: var(--fred-green-600);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--fred-green-700); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
}
.btn-block { width: 100%; }

.btn-back {
  background: none;
  border: none;
  color: var(--fred-green-700);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
}
.btn-back:hover { text-decoration: underline; }

/* Form */
.form-wrap { max-width: 640px; margin: 0 auto; }

.form-section {
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  background: var(--white);
  padding: 22px 24px 8px;
  margin: 0 0 20px;
}
.form-section legend {
  font-weight: 700;
  color: var(--fred-green-900);
  font-size: 15px;
  padding: 0 6px;
}

.field { margin-bottom: 16px; }
.field-row { display: flex; gap: 14px; }
.field-small { flex: 0 0 120px; }
.field-grow { flex: 1; }

label { display: block; font-size: 13.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }

input[type="text"], input[type="email"], select {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  padding: 11px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-900);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--fred-green-600);
  box-shadow: 0 0 0 3px var(--fred-green-100);
}
input:invalid:not(:placeholder-shown) { }

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
  padding: 6px 0 18px;
}
.checkbox-line input { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox-agb {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 16px 18px;
}

.submit-row { margin-top: 24px; margin-bottom: 40px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 61, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay[hidden] {
  display: none;
}
.modal {
  background: var(--white);
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-elevated);
}
.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--fred-green-100);
  color: var(--fred-green-600);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.modal h2 { margin: 0 0 10px; color: var(--fred-green-900); font-size: 20px; }
.modal p { margin: 0 0 8px; color: var(--gray-700); font-size: 14.5px; }
.modal-fallback { font-size: 13px; color: var(--gray-500); }

/* Toast (Fehleranzeige) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  max-width: 90%;
}
