/* ============================================================
   korb.css — /warenkorb/

   Setzt brand.css (Tokens) und layout.css (Rahmen) voraus.

   Kein Kasten um die Liste: die Positionen trennen sich durch
   Haarlinien, wie die Abschnitte der Startseite. Was hervorhebt, ist
   Licht und Linie, nicht Rahmen.
   ============================================================ */

.korb-seite { padding: var(--s-8) 0 var(--s-9); min-height: 52vh; }
.korb-seite h1 {
  font-size: var(--t-3xl); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.05;
  margin-bottom: var(--s-7);
}
.etikett {
  display: inline-block;
  font-family: var(--mono); font-size: var(--t-xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); margin-bottom: var(--s-3);
}

/* ---- Die Liste ---- */
.korb-liste { list-style: none; border-top: 1px solid var(--line); }

.korb-posten {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}

.korb-bild {
  width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
  background: var(--lack-tief);
  border: 1px solid var(--line);
}
.korb-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }

.korb-text { min-width: 0; }
.korb-marke {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint);
}
.korb-marke::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ic, var(--faint));
}
.korb-titel {
  font-size: var(--t-sm); font-weight: 600; line-height: 1.4;
  margin: 3px 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.korb-titel a:hover { text-decoration: underline; text-underline-offset: 3px; }
.korb-stueck { font-family: var(--mono); font-size: var(--t-xs); color: var(--faint); }

.korb-menge input {
  width: 58px; padding: 7px 8px;
  background: none; border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text); font-family: var(--mono); font-size: 13px;
  text-align: center;
}
.korb-menge input:focus-visible { outline: none; border-color: var(--brand); }

.korb-preis {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.02em; white-space: nowrap; min-width: 82px; text-align: right;
}

.korb-weg {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font-family: inherit; font-size: var(--t-xs); color: var(--faint);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.18s;
}
.korb-weg:hover { color: var(--text); }
.korb-weg:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }

/* ---- Summe ---- */
.korb-summe { margin-top: var(--s-6); max-width: 420px; margin-left: auto; }
.korb-summe-zeile {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-3);
}
.korb-summe-zeile span { color: var(--muted); font-size: var(--t-sm); }
.korb-summe-zeile b {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.02em;
}
/* § 312j Abs. 2 BGB verlangt Gesamtpreis und Folgekosten unmittelbar
   ueber dem Bestellknopf — hier steht die Vorstufe davon, damit die
   Angabe nicht erst in der Kasse auftaucht. */
.korb-hinweis {
  font-size: var(--t-xs); color: var(--faint); line-height: 1.6;
  margin-bottom: var(--s-4);
}
.korb-summe .btn { width: 100%; }
.korb-weiter {
  display: block; text-align: center; margin-top: var(--s-4);
  font-size: var(--t-sm); color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.korb-weiter:hover { color: var(--text); }

/* ---- Leerer Korb ---- */
.korb-leer-text { color: var(--muted); margin-bottom: var(--s-5); }

@media (max-width: 640px) {
  /* Bild links, alles andere rechts daneben — die fuenfspaltige Zeile
     passt auf einem Handy nicht, und ein waagerechter Scroller in
     einem Warenkorb ist eine Zumutung. */
  .korb-posten {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "bild text"
      "bild menge"
      "weg  preis";
    row-gap: var(--s-2);
  }
  .korb-bild { grid-area: bild; width: 64px; height: 64px; }
  .korb-text { grid-area: text; }
  .korb-menge { grid-area: menge; justify-self: start; }
  .korb-preis { grid-area: preis; text-align: right; }
  .korb-weg { grid-area: weg; justify-self: start; }
  .korb-summe { max-width: none; }
}
