/* Nova Peptid — Warenkorb und Kasse.
 *
 * The flow follows peptidraum.de; the look stays Nova Peptid. The 12 degree cut appears only on the
 * legend markers and the submit button, never on a form field: a sheared input is a form that looks
 * broken, and a checkout is the last place on a site to be clever.
 *
 * Two columns on a desktop, form left and summary right, with the summary sticky so the total stays
 * visible while the address is filled in. One column below 900px, and the summary moves ABOVE the
 * form there, because on a phone the total is what the customer is checking, not the thing they
 * scroll past.
 *
 * House rule: no em dashes.
 */

/* ---------------------------------------------- lines in the basket */
.ck-lines { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.ck-line {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.ck-line:last-child { border-bottom: 0; }
.ck-line__im { background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: var(--r); padding: 4px; }
.ck-line__im img { width: 100%; height: auto; }
.ck-line__t b { display: block; font-size: 15.5px; font-weight: 650; line-height: 1.25; }
.ck-line__t a:hover b { color: var(--signal); }
.ck-line__t span { display: block; font-size: 12.5px; color: var(--muted); }
.ck-line__q { display: flex; align-items: center; gap: 4px; }
.ck-line__q span { min-width: 28px; text-align: center; font-size: 15px; }
.ck-q {
  width: 30px; height: 30px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  color: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.ck-q:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ck-line__p { text-align: end; display: grid; gap: 3px; justify-items: end; }
.ck-line__p .mono { font-size: 16px; }
.ck-rm { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 0; text-decoration: underline; }
.ck-rm:hover { color: #c62828; }
@media (max-width: 620px) {
  .ck-line { grid-template-columns: 56px 1fr; grid-template-areas: 'im t' 'q p'; row-gap: 10px; }
  .ck-line__im { grid-area: im; }
  .ck-line__t { grid-area: t; }
  .ck-line__q { grid-area: q; }
  .ck-line__p { grid-area: p; }
}

.ck-sum { margin-top: 20px; max-width: 420px; }
.ck-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; }
.ck-sum b { font-size: 20px; font-weight: 500; }

/* ---------------------------------------------- the checkout layout */
.ck { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(20px, 4vw, 40px); align-items: start; }
@media (max-width: 900px) {
  .ck { grid-template-columns: 1fr; }
  /* on a phone the total is what is being checked, so it goes first */
  .ck-side { order: -1; }
}
.ck-side {
  position: sticky;
  top: 88px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
}
@media (max-width: 900px) { .ck-side { position: static; } }

.ck-fs { border: 0; padding: 0; margin: 0 0 28px; }
.ck-fs legend {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.ck-fs legend::before {
  content: '';
  width: 10px;
  height: 1em;
  background: var(--signal);
  transform: skewX(var(--cut));
  flex: none;
}

.ck-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ck-row--pc { grid-template-columns: 140px 1fr; }
@media (max-width: 560px) { .ck-row, .ck-row--pc { grid-template-columns: 1fr; } }

.ck-f { display: grid; gap: 5px; margin-bottom: 12px; }
.ck-f > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ck-f > span em { color: var(--signal); font-style: normal; }
.ck-f input, .ck-f select, .ck-f textarea {
  width: 100%;
  font: 400 16px/1.4 var(--sans);
  padding: 12px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
}
.ck-f textarea { font-family: var(--sans); resize: vertical; }
.ck-f input:focus-visible, .ck-f select:focus-visible, .ck-f textarea:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-color: var(--ink);
}
.ck-f input[type="file"] { padding: 9px 11px; font-size: 14px; }

/* payment methods: a radio list that behaves like the size chooser elsewhere */
.ck-pay {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  padding: 13px 15px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.ck-pay:hover { border-color: var(--ink); }
.ck-pay:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, var(--signal) 6%, transparent); }
.ck-pay input { margin-top: 3px; accent-color: var(--signal); }
.ck-pay b { display: block; font-size: 15.5px; font-weight: 650; }
.ck-pay small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.ck-check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.ck-check input { margin-top: 3px; accent-color: var(--signal); width: 18px; height: 18px; flex: none; }
.ck-check a { font-weight: 600; border-bottom: 2px solid var(--signal); }

.ck-err { color: #c62828; font-size: 14.5px; font-weight: 600; margin: 0 0 12px; }
@media (prefers-color-scheme: dark) { .ck-err { color: #ff8a80; } }
.ck-go { margin-top: 6px; }

/* ---------------------------------------------- the summary panel */
.ck-mini-list { display: grid; gap: 7px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ck-mini { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.ck-mini span:first-child { color: var(--muted); }
.ck-tot { display: grid; gap: 8px; padding: 14px 0; }
.ck-tot > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.ck-tot > div > span:first-child { color: var(--muted); }
.ck-tot__g { border-top: 1px solid var(--line); padding-top: 10px; font-size: 17px !important; font-weight: 650; }
.ck-tot__g span:first-child { color: var(--ink) !important; }
.ck-tot__g .mono { font-size: 20px; font-weight: 500; }
.ck-coupon { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.ck-coupon .btn { justify-content: center; }

/* ---------------------------------------------- after the order */
.ck-done { max-width: 62ch; }
