/* ============================================================
   Shop-Checkout – Warenkorb + Bestellformular
   ============================================================ */

.shop-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.shop-checkout__h {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--ink);
  margin: 0 0 18px;
}

/* ---- Warenkorb (linke Spalte, sticky) ---- */
.shop-checkout__cart {
  position: sticky;
  top: 110px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
}

.checkout-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.checkout-item__media {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow: hidden;
}
.checkout-item__media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.checkout-item__main { display: flex; flex-direction: column; gap: 4px; }
.checkout-item__name { font-weight: 600; color: var(--ink); font-size: 15px; }
.checkout-item__unit { font-size: 13px; color: var(--ink-soft); }
.checkout-item__qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.checkout-item__qty > span { min-width: 20px; text-align: center; font-weight: 600; }
.checkout-item__qty button {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  color: var(--teal-deep);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.checkout-item__qty button:hover { background: var(--teal-tint); }
.checkout-item__remove {
  width: auto !important;
  border: 0 !important;
  background: none !important;
  color: var(--ink-soft) !important;
  font-size: 12px !important;
  text-decoration: underline;
  margin-left: 4px;
}
.checkout-item__sum {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal-deep);
  white-space: nowrap;
}

.checkout-empty { text-align: center; padding: 24px 0; color: var(--ink-soft); }
.checkout-empty p { margin: 0 0 12px; }

.checkout-totals { margin: 18px 0 0; }
.checkout-totals > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  color: var(--ink-mid);
  font-size: 15px;
}
.checkout-totals dt, .checkout-totals dd { margin: 0; }
.checkout-totals__grand {
  border-top: 1.5px solid var(--border);
  margin-top: 6px;
  padding-top: 14px !important;
}
.checkout-totals__grand dt { font-weight: 700; color: var(--ink); font-size: 17px; }
.checkout-totals__grand dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}
.checkout-totals__vat { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 0; text-align: right; }

/* ---- Bestellformular ---- */
.shop-order-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.shop-order-form legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 0;
}
.shop-order-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.shop-order-form .form-field { margin-bottom: 14px; }
.shop-order-form .form-field > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mid);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: block;
}
.shop-order-form .form-field--plz { max-width: 140px; }
.shop-order-form input.is-invalid,
.shop-order-form select.is-invalid,
.shop-order-form textarea.is-invalid {
  border-color: #d6453d;
  box-shadow: 0 0 0 4px rgba(214, 69, 61, 0.10);
}
.shop-order-form__note,
.shop-order-form__hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 4px 0 0;
}
.shop-order-form__hint { margin: 16px 0; text-align: center; }

.form-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: 6px 0 18px;
}
.form-check input { margin-top: 2px; flex-shrink: 0; width: 17px; height: 17px; accent-color: var(--teal); }
.form-check a { color: var(--teal-deep); }
.form-check.is-invalid-check span { color: #d6453d; }

.form-status {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: var(--teal-tint);
  color: var(--teal-deep);
}
.form-status.is-error { background: #fcebea; color: #b53229; }
.form-status.is-ok { background: #e8f6ec; color: #1f7a3d; }

.js-checkout-submit.is-loading { opacity: 0.65; pointer-events: none; }

@media (max-width: 860px) {
  .shop-checkout { grid-template-columns: 1fr; }
  .shop-checkout__cart { position: static; order: 2; }
  .shop-checkout__form { order: 1; }
}
@media (max-width: 480px) {
  .shop-order-form .form-row { grid-template-columns: 1fr; }
}
