/* Online-Shop Checkout – oeffentliches, gebrandetes Layout (Vanilla, kein Framework) */
:root {
  --shop-primary: #1d4ed8;
  --shop-accent: #f59e0b;
  --shop-bg: #f1f5f9;
  --shop-card: #ffffff;
  --shop-text: #0f172a;
  --shop-muted: #64748b;
  --shop-border: #e2e8f0;
  --shop-danger: #dc2626;
  --shop-ok: #16a34a;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--shop-bg);
  color: var(--shop-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.shop-checkout-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.shop-header {
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--shop-border);
  box-shadow: none;
  padding: 20px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  flex: none;
}
.shop-header-logo,
.shop-header img {
  display: block;
  margin: 0 auto;
  max-height: 64px;
  max-width: min(320px, 72vw);
  width: auto;
  height: auto;
  object-fit: contain;
}
.shop-header .shop-title {
  color: #374151;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Footer: alles in einer Zeile, zentriert */
.shop-footer {
  border-top: 1px solid #e5e7eb;
  background: transparent;
  padding: 20px 16px 28px;
  margin-top: auto;
}
.shop-footer-inner {
  max-width: none;
  width: 100%;
  padding: 0 clamp(16px, 3vw, 40px);
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: #6b7280;
}
.shop-footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.shop-footer-company {
  font-weight: 600;
  color: #4b5563;
}
.shop-footer-line a {
  color: #6b7280;
  text-decoration: none;
}
.shop-footer-line a:hover {
  color: #4b5563;
  text-decoration: underline;
}
.shop-footer-sep {
  margin: 0 8px;
  color: #d1d5db;
  font-size: 11px;
  user-select: none;
}

.shop-wrap {
  max-width: none;
  margin: 0;
  padding: 24px clamp(16px, 3vw, 40px) 48px;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(400px, 34%);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.shop-main,
.shop-side {
  min-width: 0;
}
@media (max-width: 900px) {
  .shop-wrap {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 16px 96px;
  }
  .shop-side { order: -1; }
}

.shop-card {
  background: var(--shop-card);
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.shop-card h2 { margin: 0 0 14px; font-size: 17px; }

.shop-field { margin-bottom: 14px; }
.shop-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #334155; }
.shop-field input, .shop-field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--shop-border);
  border-radius: 9px; font-size: 15px; background: #fff; color: var(--shop-text);
}
.shop-field input:focus, .shop-field select:focus { outline: 2px solid color-mix(in srgb, var(--shop-primary) 40%, transparent); border-color: var(--shop-primary); }
.shop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .shop-row { grid-template-columns: 1fr; } }
.shop-field .shop-error-msg { color: var(--shop-danger); font-size: 12px; margin-top: 4px; display: none; }
.shop-field.has-error input { border-color: var(--shop-danger); }
.shop-field.has-error .shop-error-msg { display: block; }

.shop-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--shop-border); gap: 12px; }
.shop-item:last-child { border-bottom: none; }
.shop-item .meta { flex: 1; }
.shop-item .name { font-weight: 600; }
.shop-item .desc { font-size: 13px; color: var(--shop-muted); }
.shop-item .qty { width: 64px; }
.shop-item .price { font-weight: 600; white-space: nowrap; }

.shop-summary { margin-bottom: 0; }
.shop-summary-heading {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--shop-text);
  line-height: 1.3;
}
.shop-sum-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; gap: 12px; }
.shop-sum-block {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--shop-border);
}
.shop-sum-line.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--shop-border); margin-top: 8px; padding-top: 12px; }
.sum-interval-suffix { font-size: 13px; font-weight: 500; color: var(--shop-muted); margin-left: 3px; }
.shop-rc-hint { background: #fef3c7; color: #92400e; padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-top: 10px; }

/* ---- Bestellübersicht (Sidebar) – Desktop sticky, mobil einklappbar ------ */
.shop-side { position: sticky; top: 16px; }
.shop-summary-wrap { border: 0; margin: 0; }
.shop-summary-wrap > summary { display: none; }

.shop-side-field { margin: 14px 0; }
.shop-side-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #334155; }

.shop-side-choices {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--shop-border);
}
.shop-side-choice { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; }
.shop-side-choice > span { color: var(--shop-muted); }
.shop-side-choice > strong { text-align: right; word-break: break-word; color: #334155; }
.shop-side-net-hint {
  font-size: 11.5px;
  color: var(--shop-muted);
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--shop-border);
}

/* Shop-Produktbild oben in der Sidebar */
.shop-side-hero { margin: 0 0 14px; text-align: center; }
.shop-side-hero-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--shop-border);
  background: #f8fafc;
}

/* Geplante Rechnungen (Abo) */
.shop-billing-schedule {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--shop-border);
  border-radius: 9px;
  font-size: 13px;
}
.shop-billing-schedule-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}
.shop-billing-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shop-billing-schedule-list li {
  padding: 3px 0;
  color: var(--shop-muted);
}
.shop-billing-schedule-list li strong {
  color: var(--shop-text);
}

@media (max-width: 900px) {
  .shop-side { position: static; top: auto; }
  .shop-summary-wrap { background: var(--shop-card); border: 1px solid var(--shop-border); border-radius: 14px; overflow: hidden; margin-bottom: 4px; }
  .shop-summary-wrap > summary {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 14px 16px; font-size: 15px; font-weight: 600; list-style: none;
  }
  .shop-summary-wrap > summary::-webkit-details-marker { display: none; }
  .shop-summary-toggle-label {
    flex: 1;
    color: var(--shop-text);
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .shop-summary-toggle-total { font-weight: 700; }
  .shop-summary-toggle-caret { transition: transform .2s; color: var(--shop-muted); }
  .shop-summary-wrap[open] .shop-summary-toggle-caret { transform: rotate(180deg); }
  .shop-summary-wrap .shop-summary { border: 0; border-top: 1px solid var(--shop-border); border-radius: 0; margin: 0; }
  .shop-summary-heading { display: none; }
}

.shop-coupon { display: flex; gap: 8px; align-items: stretch; }
.shop-coupon input { flex: 1; min-width: 0; }
.shop-coupon button,
.shop-btn-inline {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.2;
  border-radius: 9px;
  white-space: nowrap;
}
.shop-coupon-msg { font-size: 13px; margin-top: 6px; }
.shop-coupon-msg.ok { color: var(--shop-ok); }
.shop-coupon-msg.err { color: var(--shop-danger); }

.shop-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--shop-primary); color: #fff; border: none; cursor: pointer;
  padding: 12px 18px; border-radius: 10px; font-size: 15px; font-weight: 600;
}
.shop-btn.secondary { background: #fff; color: var(--shop-primary); border: 1px solid var(--shop-primary); }
.shop-btn:disabled { opacity: .55; cursor: not-allowed; }
.shop-pay { width: 100%; padding: 15px; font-size: 16px; margin-top: 10px; }

.shop-legal { font-size: 12px; color: var(--shop-muted); margin-top: 14px; }
.shop-legal a { color: var(--shop-primary); }
.shop-legal label { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-size: 13px; color: #334155; }

.shop-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 14px; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 50; }
.shop-toast.show { opacity: .95; }
.shop-error-banner { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; padding: 12px 14px; border-radius: 10px; margin: 16px; }

/* ---- Multi-Step-Wizard ---------------------------------------------------- */
.wz-intro { margin-bottom: 14px; }

.wz-progress {
  list-style: none;
  display: flex;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 4px 0;
  counter-reset: none;
}
.wz-progress-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  color: var(--shop-muted);
  font-size: 12px;
  text-align: center;
}
/* Verbindungslinie zwischen den Schritten */
.wz-progress-item::before {
  content: "";
  position: absolute;
  top: 15px; left: -50%; right: 50%;
  height: 2px;
  background: var(--shop-border);
  z-index: 0;
}
.wz-progress-item:first-child::before { display: none; }
.wz-progress-item .wz-progress-num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--shop-border);
  color: #475569;
  font-weight: 700;
  font-size: 14px;
  flex: none;
  transition: background .15s, border-color .15s, color .15s;
}
.wz-progress-item .wz-progress-label {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
.wz-progress-item.active { color: var(--shop-primary); font-weight: 700; }
.wz-progress-item.active .wz-progress-num { background: var(--shop-primary); border-color: var(--shop-primary); color: #fff; }
.wz-progress-item.done { cursor: pointer; color: var(--shop-text); }
.wz-progress-item.done::before { background: var(--shop-ok); }
.wz-progress-item.done .wz-progress-num { background: var(--shop-ok); border-color: var(--shop-ok); color: #fff; font-size: 0; }
.wz-progress-item.done .wz-progress-num::after { content: "✓"; font-size: 15px; }

@media (max-width: 560px) {
  .wz-progress { gap: 0; }
  .wz-progress-item { font-size: 0; gap: 0; }
  .wz-progress-item .wz-progress-label { display: none; }
  .wz-progress-item.active .wz-progress-label {
    display: block; font-size: 12px; position: absolute; top: 38px; left: 50%;
    transform: translateX(-50%); white-space: nowrap;
  }
  .wz-progress-item .wz-progress-num { width: 28px; height: 28px; font-size: 13px; }
  .wz-progress-item::before { top: 13px; }
  .wz-progress { margin-bottom: 34px; }
}

.wz-step { display: none; }
.wz-step.active { display: block; }
.wz-block { margin-bottom: 18px; }
.wz-block:last-child { margin-bottom: 0; }

.wz-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.wz-nav #wzNext { margin-left: auto; }
.wz-nav .shop-pay { width: auto; min-width: 240px; margin-top: 0; }
@media (max-width: 560px) {
  .wz-nav { gap: 8px; }
  .wz-nav .shop-btn { padding: 13px 14px; }
  .wz-nav .shop-pay { min-width: 0; flex: 1; }
}

.wz-review { border: 1px solid var(--shop-border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.wz-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: 14px; }
.wz-review-row:nth-child(odd) { background: #f8fafc; }
.wz-review-row span:first-child { color: var(--shop-muted); }
.wz-review-row span:last-child { font-weight: 600; text-align: right; }
.wz-review-total { border-top: 2px solid var(--shop-border) !important; background: #fff !important; }
.wz-review-total span:first-child { color: var(--shop-text) !important; font-weight: 700; }
.wz-review-total span:last-child { color: var(--shop-primary); font-size: 16px; }

.shop-vat-msg { font-size: 12px; margin-top: 4px; display: block; min-height: 15px; }
.shop-vat-msg.ok { color: var(--shop-ok); }
.shop-vat-msg.err { color: var(--shop-danger); }

.shop-item-img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--shop-border); flex: none; }

/* Sidebar-Artikelliste */
.shop-side-items { margin-bottom: 12px; }
.shop-side-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--shop-border); }
.shop-side-thumb-wrap {
  width: 72px;
  height: 72px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  overflow: hidden;
}
.shop-side-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.shop-side-thumb.noimg {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--shop-primary), var(--shop-accent));
  border-radius: 8px;
  border: 1px solid var(--shop-border);
  flex: none;
}
.shop-side-meta { flex: 1; min-width: 0; }
.shop-side-qty { font-size: 13px; color: #334155; font-weight: 500; }

.shop-item-qty-standalone {
  max-width: 88px;
  margin-bottom: 12px;
}

.shop-legal .shop-error-msg { display: none; color: var(--shop-danger); font-size: 12px; }
.shop-legal .shop-error-msg.show { display: block; }

/* ---- Baustein: Design-Auswahl ------------------------------------------- */
.wz-block-hint { color: var(--shop-muted); font-size: 14px; margin: -6px 0 14px; }
.wz-block > .shop-error-msg { display: none; color: var(--shop-danger); font-size: 12px; margin-top: 6px; }
.wz-block > .shop-error-msg.show { display: block; }

/* ---- Produktvarianten (Auswahl-Kacheln) --------------------------------- */
.shop-variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 16px);
  margin: 4px 0 8px;
  width: 100%;
}
.shop-variant-tile {
  position: relative; display: flex; flex-direction: column; text-align: left;
  background: #fff; border: 2px solid var(--shop-border); border-radius: 12px;
  padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, box-shadow .15s; height: 100%;
  min-width: 0;
}
.shop-variant-tile:hover { border-color: color-mix(in srgb, var(--shop-primary) 45%, transparent); }
.shop-variant-tile.selected { border-color: var(--shop-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-primary) 20%, transparent); }
.shop-variant-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  flex-shrink: 0;
  overflow: hidden;
}
.shop-variant-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.shop-variant-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; flex: 1; min-width: 0; }
.shop-variant-name { font-weight: 700; font-size: clamp(13px, 1.1vw, 15px); line-height: 1.3; }
.shop-variant-desc { font-size: clamp(11px, 0.95vw, 13px); color: var(--shop-muted); line-height: 1.4; margin-top: 2px; }
.shop-variant-features {
  list-style: none; margin: 6px 0 4px; padding: 0; font-size: 12px; color: #334155; line-height: 1.35;
}
.shop-variant-features li {
  position: relative; padding-left: 14px; margin-bottom: 3px;
}
.shop-variant-features li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--shop-primary); font-size: 11px; font-weight: 700;
}
.shop-variant-sku { font-size: 12px; color: var(--shop-muted); }
.shop-variant-price { font-weight: 700; font-size: clamp(12px, 1vw, 14px); color: var(--shop-primary); margin-top: auto; padding-top: 6px; }
.shop-variant-check {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--shop-primary); color: #fff; font-size: 15px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.shop-variant-tile.selected .shop-variant-check { display: flex; }

@media (max-width: 720px) {
  .shop-header {
    padding: 16px;
  }
  .shop-header-logo,
  .shop-header img {
    max-height: 48px;
    max-width: min(260px, 60vw);
  }
  .shop-variant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .shop-variant-body { padding: 8px 10px 10px; }
  .shop-variant-features { font-size: 11px; }
  .shop-variant-check { width: 22px; height: 22px; font-size: 13px; top: 8px; right: 8px; }
}

@media (max-width: 480px) {
  .shop-wrap { padding: 12px 12px 88px; }
  .shop-card { padding: 16px; border-radius: 12px; }
  .shop-variant-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .shop-variant-img-wrap { aspect-ratio: 16 / 10; }
  .shop-variant-name { font-size: 15px; }
  .shop-variant-desc { font-size: 13px; }
  .shop-variant-price { font-size: 14px; }
}

/* ---- Baustein: Domain-Bestellung ---------------------------------------- */
.shop-domain-row { display: flex; gap: 8px; }
.shop-domain-row input {
  flex: 1; padding: 11px 12px; border: 1px solid var(--shop-border);
  border-radius: 9px; font-size: 15px; background: #fff; color: var(--shop-text);
}
.shop-domain-row input:focus { outline: 2px solid color-mix(in srgb, var(--shop-primary) 40%, transparent); border-color: var(--shop-primary); }
.shop-domain-row button { white-space: nowrap; }
.shop-domain-status { font-size: 13.5px; margin-top: 10px; min-height: 1px; padding: 0; border-radius: 9px; }
.shop-domain-status.loading { color: var(--shop-muted); }
.shop-domain-status.ok { background: #dcfce7; color: #166534; padding: 10px 12px; }
.shop-domain-status.warn { background: #fef3c7; color: #92400e; padding: 10px 12px; }
.shop-domain-status.err { background: #fee2e2; color: #991b1b; padding: 10px 12px; }
.shop-domain-authinfo { margin-top: 12px; }
.shop-domain-authinfo label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #334155; }
.shop-domain-authinfo input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--shop-border);
  border-radius: 9px; font-size: 15px; background: #fff; color: var(--shop-text);
}
.shop-field-hint { display: block; font-size: 12px; color: var(--shop-muted); margin-top: 5px; }
.shop-domain-hint { margin-top: 14px; font-size: 12.5px; color: var(--shop-muted); background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 12px 14px; }
.shop-domain-hint-title { font-weight: 700; color: #92400e; margin-bottom: 6px; font-size: 13px; }
.shop-domain-hint p { margin: 0 0 6px; }
.shop-domain-examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.shop-domain-examples span { background: #fff; border: 1px solid #fcd34d; border-radius: 6px; padding: 3px 10px; font-family: monospace; font-size: 12.5px; color: #1d4ed8; font-weight: 600; }
