/* scooterride Kasse – Optik wie der Shopify-Standard-Checkout (One-Page).
   Farben kommen als CSS-Variablen aus config/checkout.json. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--c-primary); }
[hidden] { display: none !important; }
.muted { color: var(--c-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Raster: links Formular (500px), rechts Übersicht (400px) ---------- */
:root { --col-main: 540px; --col-side: 440px; --gap: 40px; --pad: 20px; }

/* ---------- Header ---------- */
.hdr { background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.hdr__inner {
  max-width: calc(var(--col-main) + var(--col-side)); margin: 0 auto; padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.hdr__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hdr__logo { font-size: 20px; font-weight: 600; line-height: 1.2; text-transform: uppercase; letter-spacing: 0; }
.hdr__logo a { color: var(--c-text); text-decoration: none; }
.hdr__cart { color: var(--c-primary); display: inline-flex; }
.hdr__cart svg { width: 22px; height: 22px; }
.test-badge {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .04em; line-height: 1;
  padding: 4px 7px; border-radius: 999px; background: #fff3c4; color: #6b5200; white-space: nowrap;
}

/* ---------- Seitenaufbau ---------- */
.co { display: block; }
.co__main { padding: 20px var(--pad) 0; min-width: 0; }
.co__form { display: block; }
.narrow { max-width: 540px; margin: 0 auto; padding: 38px var(--pad) 48px; display: flex; flex-direction: column; gap: 24px; }

@media (min-width: 1000px) {
  .co {
    display: grid; min-height: calc(100vh - 71px);
    grid-template-columns: minmax(var(--pad), 1fr) minmax(0, var(--col-main)) minmax(0, var(--col-side)) minmax(var(--pad), 1fr);
  }
  .co__main { grid-column: 2; grid-row: 1; padding: 38px var(--gap) 0 0; }
  .summary { grid-column: 3 / 5; grid-row: 1; }
}
@media (max-width: 1019px) {
  .hdr__inner { padding-left: var(--pad); padding-right: var(--pad); }
}

/* ---------- Abschnitte ---------- */
.sec { margin-bottom: 32px; }
.sec__h { font-size: 20px; font-weight: 600; line-height: 1.2; margin-bottom: 14px; }
.sec__h--tight { margin-bottom: 4px; }
.sec__sub { color: var(--c-muted); font-size: 14px; margin-bottom: 14px; }
.sec__sub--after { margin: 12px 0 0; }
.sec__h3 { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 22px 0 12px; }
.sec__h3--billing { margin-top: 28px; }
.lead { font-size: 14px; }

/* ---------- Felder mit schwebendem Label ---------- */
.field { margin-bottom: 12px; min-width: 0; }
.field__box { position: relative; }
.field__box input, .field__box select {
  display: block; width: 100%; height: 49px; margin: 0;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--c-text); background: #fff;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 13.5px 10px; outline: none; transition: box-shadow .1s, border-color .1s;
}
.field__box label {
  position: absolute; left: 11px; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 14px; line-height: 1.4; color: var(--c-muted); pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field__box input:not(:placeholder-shown) { padding: 21px 10px 6px; }
.field__box input:not(:placeholder-shown) + label,
.field__box--select label { top: 5px; transform: none; font-size: 12px; }
.field__box select { appearance: none; -webkit-appearance: none; padding: 21px 34px 6px 10px; cursor: pointer; }
.field__box--icon input { padding-right: 40px !important; }
.field__chev, .field__icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--c-muted); display: inline-flex; }
.field__chev { pointer-events: none; }
.field__icon { cursor: help; }
.field__box input:focus, .field__box select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--c-error); box-shadow: 0 0 0 1px var(--c-error); }
.field__error { display: block; font-size: 13px; line-height: 1.4; color: var(--c-error); margin-top: 5px; }
.field__error:empty { display: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* ---------- Checkbox ---------- */
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 2px; }
.check input {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 0;
  border: 1px solid var(--c-border); border-radius: 5px; background: #fff; display: grid; place-content: center; cursor: pointer;
}
.check input:checked { background: var(--c-primary); border-color: var(--c-primary); }
.check input:checked::before { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ---------- Auswahl-Gruppen (Versand, Zahlung, Rechnung, Raten) ---------- */
.group { border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; margin: 0; padding: 0; min-width: 0; }
.opt { position: relative; }
.opt + .opt { border-top: 1px solid var(--c-border); }
.opt__row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 12px 14px;
  cursor: pointer; color: var(--c-text); text-decoration: none;
}
.opt:first-child .opt__row { border-radius: 11px 11px 0 0; }
.opt:last-child:not(.is-open) .opt__row { border-radius: 0 0 11px 11px; }
.opt:only-child:not(.is-open) .opt__row { border-radius: 11px; }
.opt.is-selected .opt__row { background: var(--c-selected); }
.opt.is-selected .opt__row::after {
  content: ''; position: absolute; inset: -1px; border: 1px solid var(--c-primary); border-radius: inherit;
  pointer-events: none; z-index: 1;
}
.opt:first-child.is-selected .opt__row::after { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.opt:last-child.is-selected:not(.is-open) .opt__row::after { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.opt__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.opt__title { font-weight: 600; font-size: 14px; }
.opt__desc { font-size: 13px; color: var(--c-muted); }
.opt__price { font-weight: 600; font-size: 14px; white-space: nowrap; text-transform: uppercase; }
.opt__aside { color: var(--c-muted); font-size: 14px; white-space: nowrap; }
.opt__chev { color: var(--c-muted); font-size: 20px; line-height: 1; }
.opt__logos { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.logo { display: block; }
.logo--more {
  display: inline-grid; place-items: center; height: 24px; min-width: 24px; padding: 0 4px; border-radius: 4px;
  border: 1px solid var(--c-border); background: #fff; font-size: 10px; font-weight: 600; color: var(--c-primary);
}
.opt__panel { background: var(--c-summary); padding: 16px 20px; text-align: center; font-size: 14px; }
.opt__panel--card, .opt__panel--form { text-align: left; }
.opt__panel--form { padding: 16px 14px 6px; border-top: 1px solid var(--c-border); }
.opt:last-child .opt__panel { border-radius: 0 0 11px 11px; }

.radio {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 0;
  border: 1px solid var(--c-border); border-radius: 50%; background: #fff; cursor: pointer;
}
.radio:checked { border: 6px solid var(--c-primary); }
/* Nur eine Versandart: wie Shopify ohne Radio-Kreis */
.group--single .radio { position: absolute; opacity: 0; pointer-events: none; }
.radio:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ---------- Hinweise ---------- */
.notice { border-radius: var(--radius); padding: 14px 16px; font-size: 14px; margin-bottom: 20px; }
.notice--error { background: #fff4f4; color: var(--c-error); border: 1px solid var(--c-error); }

/* ---------- Buttons ---------- */
.submit { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.btn {
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 14px 24px; border-radius: var(--radius); border: 0; cursor: pointer; text-decoration: none; width: 100%;
  transition: background-color .15s;
}
.btn--primary { background: var(--c-primary); color: var(--c-primary-text); }
.btn--primary:hover { background: #004aab; }
.btn--primary[disabled] { opacity: .7; cursor: progress; }
.btn--secondary { background: #fff; color: var(--c-text); border: 1px solid var(--c-border); }
.btn--auto { width: auto; }
.link-center { text-align: center; font-size: 14px; text-underline-offset: 2px; padding: 6px 0; }
.legal { font-size: 12px; color: var(--c-muted); text-align: left; }
.legal a { color: var(--c-primary); }
.mock-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- Fußzeile ---------- */
.co-footer { margin-top: 56px; border-top: 1px solid var(--c-border); padding: 16px 0 24px; }
.co-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.co-footer a { color: var(--c-primary); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Bestellübersicht ---------- */
.summary { background: var(--c-summary); border-bottom: 1px solid var(--c-border); }
.summary-toggle {
  font: inherit; color: var(--c-text); width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px var(--pad); background: var(--c-summary); border: 0; cursor: pointer; text-align: left;
}
.summary-toggle__label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--c-primary); }
.summary-toggle .chev { display: inline-flex; transition: transform .2s; }
.summary-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.summary-toggle__total { font-weight: 600; font-size: 18px; }
.summary__panel { display: none; border-top: 1px solid var(--c-border); }
.summary.is-open .summary__panel, .summary--static .summary__panel { display: block; }
.summary__inner { padding: 20px var(--pad); }

@media (min-width: 1000px) {
  .summary { border-bottom: 0; border-left: 1px solid var(--c-border); }
  .summary-toggle { display: none; }
  .summary__panel { display: block; border-top: 0; height: 100%; }
  .summary__inner { position: sticky; top: 0; max-width: var(--col-side); padding: 38px 0 40px var(--gap); }
}

.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.line { display: flex; align-items: center; gap: 14px; }
.line__img { position: relative; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 12px; border: 2px solid #fff; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.line__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.line__placeholder { display: block; width: 100%; height: 100%; border-radius: 10px; background: linear-gradient(135deg, #ececec, #f8f8f8); }
.line__qty {
  position: absolute; top: -9px; right: -9px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #000; color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center;
}
.line__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.line__title { font-size: 14px; }
.line__variant { font-size: 12px; color: var(--c-muted); }
.line__price { font-size: 14px; white-space: nowrap; }

.totals { margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.totals__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.totals__row dt { display: inline-flex; align-items: center; gap: 4px; }
.totals__row dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.totals__row--grand { margin-top: 10px; }
.totals__row--grand dt { font-weight: 600; font-size: 18px; }
.totals__row--grand dd { display: inline-flex; align-items: baseline; gap: 6px; }
.totals__cur { font-size: 12px; color: #666; }
.totals__amount { font-weight: 600; font-size: 19px; }
.totals__vat { font-size: 14px; color: var(--c-muted); margin-top: -4px; }
.help { display: inline-flex; color: var(--c-muted); cursor: help; }
.help svg { width: 15px; height: 15px; }

/* ---------- Danke-Seite & Boxen ---------- */
.ty-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ty-head__icon { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--c-primary); color: var(--c-primary); }
.ty-head__no { color: var(--c-muted); font-size: 14px; }
.ty-head__title { font-size: 24px; font-weight: 600; line-height: 1.25; }
.box { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; background: #fff; }
.box p + p, .box p + .kv, .box .kv + p { margin-top: 10px; }
.box__h { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 12px; }
.info-grid h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.info-grid p { color: var(--c-muted); overflow-wrap: anywhere; }
.kv { margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.kv__row { display: flex; justify-content: space-between; gap: 12px; }
.kv__row dt { color: var(--c-muted); }
.kv__row dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv__row--grand dd { font-weight: 600; font-size: 18px; }
.reference { font-weight: 600; }
.ty-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 999px) {
  .co-footer { margin-top: 40px; }
}
@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
  .ty-actions .btn { width: 100%; }
}
