/* Sidecart (KAUF-03): von rechts, Desktop 440 px, Handy volle Breite; fester Fuß mit Summe und „Zur Kasse“.
   Farben und Schrift aus der Welt der Seite (--welt, --auf, --schrift, --radius), Kasse in der sogo-Welt. */
.sg-korb { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; background: var(--weiss, #fff); color: var(--text); box-shadow: -12px 0 32px rgb(30 35 43 / 18%); font-family: var(--schrift, inherit); font-variant-numeric: tabular-nums; }
.sg-korb::backdrop { background: var(--overlay, rgb(30 35 43 / 38%)); }
.sg-korb[open] { animation: sg-korb-rein .22s var(--ease, ease-out); }
@keyframes sg-korb-rein { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sg-korb[open] { animation: none; } }
.sg-korb * { box-sizing: border-box; }
.sg-korb h2, .sg-korb h3, .sg-korb p { margin: 0; }
.sg-korb a { color: inherit; }
.sg-korb-in { display: flex; flex-direction: column; height: 100%; }

.sg-korb-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--linie); }
.sg-korb-kopf h2 { font-size: var(--fs-18, 18px); font-weight: 600; line-height: 1.2; color: var(--text); }
.sg-korb-kopf h2 span { font-weight: 400; }
.sg-korb-laedt { padding: 24px; color: var(--text-leise); }

.sg-korb-liste { list-style: none; margin: 0; padding: 0 24px; overflow-y: auto; flex: 1 1 auto; overscroll-behavior: contain; }
.sg-korb-liste[aria-busy="true"] { opacity: .6; }
.sg-korb-pos { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--linie); }
.sg-korb-pos:last-child { border-bottom: 0; }
.sg-korb-bild { display: block; width: 88px; aspect-ratio: 1; border-radius: var(--radius, 6px); overflow: hidden; background: var(--greige); }
.sg-korb-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-korb-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sg-korb-marke { font-size: var(--fs-13, 13px); color: var(--text-leise); line-height: 1.3; }
.sg-korb-text h3 { font-size: var(--fs-16, 16px); font-weight: 600; line-height: 1.3; color: var(--text); }
.sg-korb-text h3 a { text-decoration: none; }
.sg-korb-text h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sg-korb-aus { display: flex; flex-direction: column; font-size: var(--fs-14, 14px); line-height: 1.4; color: var(--text-leise); }
.sg-korb-liefer { display: flex; align-items: center; gap: 8px; font-size: var(--fs-14, 14px); line-height: 1.4; color: var(--text); }
.sg-korb-liefer i { width: 8px; height: 8px; border-radius: 50%; background: var(--lieferbar); flex: none; }
.sg-korb-reihe { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.sg-korb-menge { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--linie-bedienung); border-radius: var(--radius, 6px); }
.sg-korb-menge button { width: 40px; height: 38px; border: 0; background: none; font: inherit; font-size: 18px; color: var(--text); cursor: pointer; border-radius: var(--radius, 6px); }
.sg-korb-menge button:hover:not(:disabled) { background: var(--greige); }
.sg-korb-menge button:disabled { color: var(--linie-bedienung); cursor: default; }
.sg-korb-menge span { min-width: 24px; text-align: center; font-size: var(--fs-16, 16px); }
.sg-korb-weg { border: 0; background: none; padding: 8px 0; font: inherit; font-size: var(--fs-14, 14px); color: var(--text-leise); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.sg-korb-weg:hover { color: var(--text); }
.sg-korb-preis { margin-left: auto; font-weight: 600; font-size: var(--fs-16, 16px); white-space: nowrap; }

.sg-korb-fuss { flex: none; padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie); background: var(--weiss, #fff); display: flex; flex-direction: column; gap: 12px; }
.sg-korb-summe { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-18, 18px); }
.sg-korb-summe b { font-weight: 700; }
.sg-korb-hinweis { font-size: var(--fs-13, 13px); line-height: 1.4; color: var(--text-leise); margin-top: -6px !important; }
.sg-korb-kasse { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: var(--radius, 6px); background: var(--welt); color: var(--auf) !important; font-weight: 600; font-size: var(--fs-button, 16px); text-decoration: none; }
.sg-korb-kasse:hover { background: var(--welt-hover, var(--welt)); }
.sg-korb-zahl { display: flex; justify-content: center; gap: 8px; }
.sg-korb-zahl { flex-wrap: wrap; align-items: center; }
.sg-korb-zahl img { height: 24px; width: auto; }
.sg-korb-zahl-text { font-size: var(--fs-13, 13px); color: var(--text-leise); }

.sg-korb-leer { padding: 40px 24px; display: flex; flex-direction: column; gap: 12px; }
.sg-korb-leer p { font-size: var(--fs-18, 18px); margin-bottom: 8px !important; }
.sg-korb-weiter { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--text); border-radius: var(--radius, 6px); font-weight: 600; text-decoration: none; }
.sg-korb-weiter:hover { background: var(--greige); }

.sg-korb :focus-visible { outline: var(--fokus-breite, 2px) solid var(--fokus-farbe, currentColor); outline-offset: var(--fokus-abstand, 2px); }

@media (max-width: 760px) {
  .sg-korb { width: 100vw; box-shadow: none; }
  .sg-korb-kopf { padding-left: 18px; }
  .sg-korb-liste { padding: 0 18px; }
  .sg-korb-pos { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .sg-korb-bild { width: 76px; }
  .sg-korb-fuss { padding-left: 18px; padding-right: 18px; }
}

/* Schmaler Kopf der Kasse (KAUF-07) */
.sg-hd.sg-hd--kasse { position: static; }
.sg-hd--kasse .sg-hd-in { justify-content: space-between; }
.sg-hd--kasse .sg-wort span { color: var(--text); }
.sg-kasse-sicher { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-14, 14px); color: var(--text-leise); margin: 0; }
.sg-kasse-kopf-r { display: flex; align-items: center; gap: 16px; }
.sg-hd--kasse .sg-ib--korb { margin-right: -10px; }
