/* =============================================================
   Checkout — calm, familiar, fast. Two columns on desktop
   (form | summary), a folding summary bar on mobile.
   ============================================================= */
:root {
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --sunken: #F2F0EA;
  --ink: #121212;
  --ink-2: #45443F;
  --ink-3: #77756E;
  --line: #E5E2DA;
  --line-2: #D6D2C8;
  --accent: #4F6F63;
  --accent-soft: #E6EDE9;
  --danger: #B42318;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
h1, h2 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.ck-hdr { border-bottom: 1px solid var(--line); background: var(--bg); }
.ck-hdr__in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.ck-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -.04em; text-decoration: none; }
.ck-hdr__secure { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }

/* layout */
.ck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 64px); }
.ck-main { padding: 36px 48px 64px max(24px, calc(50vw - 560px)); }
.ck-main > * { max-width: 520px; margin-left: auto; }
.ck-sum { background: var(--sunken); border-left: 1px solid var(--line); }
.ck-sum__in { position: sticky; top: 0; box-sizing: content-box; max-width: 420px; padding: 36px max(24px, calc(50vw - 560px)) 48px 48px; }

/* mobile summary toggle */
.ck-toggle { display: none; }
@media (max-width: 899px) {
  .ck { grid-template-columns: 1fr; }
  .ck-main { padding: 24px 20px 48px; }
  .ck-main > * { margin: 0 auto; }
  .ck-sum { order: -1; border-left: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
  .ck-sum.is-open { grid-template-rows: 1fr; }
  .ck-sum > .ck-sum__in { box-sizing: border-box; overflow: hidden; min-height: 0; padding: 0 20px; max-width: 560px; margin: 0 auto; width: 100%; position: static; }
  .ck-sum.is-open > .ck-sum__in { padding: 8px 20px 24px; }
  .ck-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line); background: var(--sunken); color: var(--ink); font-size: 14px; }
  .ck-toggle__lbl { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; }
  .ck-toggle__chev { transition: transform .3s var(--ease); }
  .ck-toggle[aria-expanded="true"] .ck-toggle__chev { transform: rotate(180deg); }
  .ck-toggle strong { font-size: 17px; }
}

/* sections */
.ck-sec { margin-top: 32px; }
.ck-sec__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.ck-sec h2 { font-size: 20px; font-weight: 600; }
.ck-note { font-size: 13.5px; color: var(--ink-3); margin: -6px 0 14px; }
.ck-mount { min-height: 60px; }

/* express */
.ck-express { margin-top: 4px; }
.ck-express__lbl { text-align: center; font-size: 13.5px; color: var(--ink-3); margin-bottom: 12px; }
.ck-or { display: flex; align-items: center; gap: 14px; margin: 26px 0 0; font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }
.ck-or::before, .ck-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* floating-label field (email) — matches the Stripe elements below it */
.ck-field { position: relative; }
.ck-field input { width: 100%; height: 52px; padding: 20px 14px 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font: 400 15px var(--sans); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ck-field label { position: absolute; left: 15px; top: 16px; font-size: 15px; color: var(--ink-3); pointer-events: none; transition: transform .15s var(--ease), font-size .15s; transform-origin: left; }
.ck-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18,18,18,.08); }
.ck-field input:focus + label, .ck-field input:not(:placeholder-shown) + label { transform: translateY(-9px); font-size: 12px; }
.ck-field.is-bad input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180,35,24,.1); }
.ck-field label i { font-style: normal; color: var(--danger); margin-left: 2px; }

/* shipping address: own fields (same set as the scooter store) */
.ck-fields { display: grid; gap: 12px; }
.ck-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ck-field select { width: 100%; height: 52px; padding: 20px 36px 6px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2377756E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; font: 400 15px var(--sans); color: var(--ink); -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.ck-field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18,18,18,.08); }
.ck-field select:focus + label, .ck-field select.has-val + label { transform: translateY(-9px); font-size: 12px; }
.ck-field.is-bad select { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180,35,24,.1); }

.ck-check { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.ck-check input, .ck-bump input { position: absolute; opacity: 0; pointer-events: none; }
.ck-check__box { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--line-2); border-radius: 5px; background: var(--surface); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.ck-check__box::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .15s var(--ease); }
input:checked + .ck-check__box { background: var(--ink); border-color: var(--ink); }
input:checked + .ck-check__box::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
input:focus-visible + .ck-check__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* shipping method */
.ck-ship { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--ink); border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.ck-ship__dot { width: 18px; height: 18px; border-radius: 50%; border: 5px solid var(--ink); flex: none; }
.ck-ship__txt { flex: 1; font-weight: 500; }
.ck-ship__txt small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-3); }

/* order bump */
.ck-bump { position: relative; display: grid; grid-template-columns: auto 56px 1fr; align-items: center; gap: 14px; margin-top: 24px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.ck-bump:hover { border-color: var(--ink-3); }
.ck-bump:has(input:checked) { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.ck-bump img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #fff; }
.ck-bump__txt strong { display: block; font-size: 14.5px; }
.ck-bump__txt span { font-size: 13px; color: var(--ink-2); }
.ck-bump__txt b { color: var(--ink); }
.ck-bump__txt s { color: var(--ink-3); }

/* errors + pay */
.ck-err { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #FEF3F2; color: var(--danger); font-size: 14px; }
.ck-err:empty { display: none; }
.ck-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border: 0; border-radius: 12px; font-size: 16.5px; font-weight: 600; text-decoration: none; transition: background .2s, opacity .2s, transform .15s; }
.ck-btn--pay { margin-top: 20px; background: var(--ink); color: #fff; }
.ck-btn--pay:hover { background: #2B2B2A; }
.ck-btn--pay:active { transform: scale(.992); }
.ck-btn[disabled] { opacity: .55; cursor: not-allowed; }
.ck-btn.is-busy span::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -3px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ck-legal { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.ck-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.ck-trust span { display: inline-flex; align-items: center; gap: 6px; }
.ck-powered { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.ck-powered strong { color: #635BFF; }

/* summary */
.ck-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; }
.ck-line__img { position: relative; }
.ck-line__img img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.ck-line__qty { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--ink-2); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 21px; text-align: center; }
.ck-line__name { font-weight: 500; font-size: 14px; line-height: 1.3; }
.ck-line__var { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ck-line__price { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.ck-line__price s { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }

.ck-totals { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); }
.ck-totals > div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.ck-totals dt { color: var(--ink-2); }
.ck-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.ck-free { font-weight: 600; color: var(--accent); }
.ck-totals__save dt, .ck-totals__save dd { color: var(--accent); font-weight: 500; }
.ck-totals__total { margin-top: 10px; padding-top: 14px !important; border-top: 1px solid var(--line-2); align-items: baseline; }
.ck-totals__total dt { color: var(--ink); font-size: 17px; font-weight: 600; }
.ck-totals__total dd { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ck-totals__total small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-right: 4px; }

.ck-review { margin-top: 28px; padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ck-review__stars { letter-spacing: 2px; font-size: 14px; }
.ck-review p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.ck-review__by { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.ck-assure { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.ck-assure li { padding-left: 22px; position: relative; }
.ck-assure li::before { content: ''; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%234F6F63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.ck-assure strong { color: var(--ink); font-weight: 600; }

/* loading skeletons */
.ck-skel { display: grid; gap: 10px; }
.ck-skel i { display: block; height: 50px; border-radius: 10px; background: linear-gradient(90deg, var(--sunken) 0%, #F8F7F3 50%, var(--sunken) 100%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty */
.ck-empty { text-align: center; padding: 64px 0; }
.ck-empty h1 { font-size: 26px; }
.ck-empty p { color: var(--ink-3); margin-top: 8px; }
.ck-empty .ck-btn { max-width: 280px; margin: 24px auto 0; }

.ck-ftr { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; padding: 22px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.ck-ftr a { text-decoration: none; }
.ck-ftr a:hover { text-decoration: underline; }

/* thank-you page */
.ty { max-width: 640px; margin: 0 auto; padding: 56px 20px 80px; }
.ty__badge { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.ty__badge svg { width: 28px; height: 28px; }
.ty h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -.035em; margin-top: 22px; line-height: 1.1; }
.ty__lede { margin-top: 12px; color: var(--ink-2); font-size: 16px; }
.ty__card { margin-top: 32px; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ty__row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 14.5px; }
.ty__row span:first-child { color: var(--ink-3); }
.ty__steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; }
.ty__steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.ty__steps b { color: var(--ink); display: block; }
.ty__steps i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); font-style: normal; font-size: 12px; display: grid; place-items: center; color: var(--ink-3); }
.ty__steps li.is-done i { background: var(--ink); border-color: var(--ink); color: #fff; }
.ty .ck-btn { margin-top: 28px; }
.ty__pending { color: var(--ink-3); }
