/* Artikelseite und Warenkorb – ergänzt portal.css */

.seitenkopf { background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s-6) 0; }
.seitenkopf .pt-container { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.seitenkopf h1 { font: var(--t-h2); margin: 0; }
.seitenkopf .anzahl { color: var(--ink-3); margin-top: var(--s-2); }
.suche { position: relative; flex: 0 0 420px; max-width: 100%; }
.suche input {
  width: 100%; padding: 14px 18px 14px 46px;
  border: 1px solid #cfccc5; border-radius: var(--r-button);
  font: var(--t-body); background: var(--white);
}
.suche input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.suche svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }

.artikel-raster { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-6); padding: var(--s-6) 0 160px; }

/* ---------- Seitenleiste ---------- */
.leiste { display: flex; flex-direction: column; gap: var(--s-5); position: sticky; top: 104px; align-self: start; }
.leiste .block { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.leiste h3 { font: 500 0.95rem/1.3 var(--font); margin: 0 0 var(--s-4); }
.leiste .wahl { display: flex; flex-direction: column; gap: 2px; }
.leiste .wahl label { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.leiste .wahl label:hover { background: var(--surface); }
.leiste .wahl label.an { background: rgba(191,0,0,0.07); color: var(--brand-primary); font-weight: 500; }
.leiste .wahl small { color: var(--ink-3); font-weight: 400; }
.leiste select { width: 100%; padding: 10px 12px; border: 1px solid #cfccc5; border-radius: var(--r-input); font: var(--t-body); background: var(--white); }
.leiste textarea { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid #cfccc5; border-radius: var(--r-input); font: var(--t-small); resize: vertical; }
.leiste .hinweis { font: var(--t-small); color: var(--ink-3); margin: 0 0 var(--s-3); }
.leiste .knopfzeile { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }
.link-knopf { display: flex; align-items: center; gap: var(--s-2); padding: 8px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.link-knopf:hover { color: var(--brand-primary); }

/* ---------- Aktive Filter ---------- */
.filterzeile { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-5); color: var(--ink-3); font: var(--t-small); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-button); background: var(--surface); color: var(--ink); font: 500 0.85rem/1 var(--font); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 1rem; line-height: 1; padding: 0; }

/* ---------- Artikelkarte ---------- */
.artikel { display: grid; grid-template-columns: 120px minmax(0, 1fr) 300px; gap: var(--s-5); padding: var(--s-5); margin-bottom: var(--s-4); }
.artikel .bild { width: 120px; height: 160px; border-radius: var(--r-image, 8px); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink-3); overflow: hidden; }
.artikel .bild img { width: 100%; height: 100%; object-fit: cover; }
.artikel .kopf { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
.artikel .artnr { font: 500 0.85rem/1 var(--font); color: var(--ink-3); letter-spacing: 0.02em; }
.artikel h2 { font: var(--t-h3); margin: 0 0 var(--s-2); }
.artikel h2 a { color: var(--ink); text-decoration: none; }
.artikel h2 a:hover { color: var(--brand-primary); }
.artikel .meta { font: var(--t-small); color: var(--ink-3); margin: 0 0 var(--s-4); }
.artikel .meta span + span::before { content: '·'; margin: 0 8px; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-button); font: 500 0.75rem/1.2 var(--font); }
.tag.lager   { background: #eef5ef; color: var(--success); }
.tag.druck   { background: #fdf0e6; color: #a35a10; }
.tag.paket   { background: #eceff5; color: #3d4f75; }
.tag.leer    { background: rgba(191,0,0,0.08); color: var(--brand-primary); }
.tag.offen   { background: var(--surface); color: var(--ink-2); }
.tag.aktion  { background: var(--ink); color: var(--white); }

.staffel { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; max-width: 360px; }
.staffel .stufe { border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; text-align: center; }
.staffel .stufe small { display: block; color: var(--ink-3); font: var(--t-small); }
.staffel .stufe strong { font-weight: 500; }
.staffel .stufe.aktiv { border-color: var(--brand-primary); background: rgba(191,0,0,0.04); }
.staffel .stufe.aktiv strong { color: var(--brand-primary); }

.inhalt { grid-column: 2 / -1; border: 1px solid var(--line); border-radius: var(--r-input); overflow: hidden; }
.inhalt summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding: 10px 14px; background: var(--surface); cursor: pointer; list-style: none;
}
.inhalt summary::-webkit-details-marker { display: none; }
.inhalt summary .titel { font-weight: 500; color: var(--ink); white-space: nowrap; }
.inhalt summary .titel::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--ink-3); transition: transform .2s; }
.inhalt[open] summary .titel::before { transform: rotate(90deg); }
.inhalt .bilanz { display: inline-flex; align-items: center; gap: 6px; font: var(--t-small); color: var(--ink-3); white-space: nowrap; }
.inhalt .punkt { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.inhalt .punkt.ok { background: var(--success); }
.inhalt .punkt.nein { background: var(--brand-primary); margin-left: 6px; }
.bestandteile { list-style: none; margin: 0; padding: 0; }
.bestandteile li {
  display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3);
  padding: 9px 14px; border-top: 1px solid var(--line); font: var(--t-small);
}
.bestandteile li.fehlt { background: rgba(191,0,0,0.035); }
.bestandteile .anzahl { font-weight: 500; color: var(--ink-3); }
.bestandteile .nr { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bestandteile .name { color: var(--ink); }
.bestandteile .status { padding: 3px 9px; border-radius: var(--r-button); font: 500 0.75rem/1.2 var(--font); white-space: nowrap; }
.bestandteile .status.ok { background: #eef5ef; color: var(--success); }
.bestandteile .status.nein { background: rgba(191,0,0,0.08); color: var(--brand-primary); }

/* ---------- Bestellbereich rechts ---------- */
.bestellen { border-left: 1px solid var(--line); padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.bestellen .preis { font: var(--t-small); color: var(--ink-3); }
.bestellen .preis strong { display: block; font: 500 1.5rem/1.2 var(--font); color: var(--ink); }
.menge { display: flex; align-items: stretch; border: 1px solid #cfccc5; border-radius: var(--r-input); overflow: hidden; background: var(--white); }
.menge button { width: 42px; border: 0; background: var(--surface); font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.menge button:hover { background: var(--line); }
.menge input { flex: 1; min-width: 0; border: 0; text-align: center; font: 500 1rem/1 var(--font); padding: 10px 4px; }
.menge .einheit { padding: 10px 12px; background: var(--surface); color: var(--ink-3); font: var(--t-small); display: flex; align-items: center; }
.druckmengen { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.druckmengen label { font: var(--t-small); color: var(--ink-3); display: block; margin-bottom: 4px; }
.druckmengen input { width: 100%; padding: 9px 10px; border: 1px solid #cfccc5; border-radius: var(--r-input); font: var(--t-body); text-align: center; }
.summe-druck { display: flex; justify-content: space-between; font: var(--t-small); color: var(--ink-2); background: var(--surface); border-radius: 6px; padding: 8px 10px; }
.summe-druck strong { color: var(--ink); }
.nebenaktionen { display: flex; gap: var(--s-4); font: var(--t-small); }
.nebenaktionen a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.nebenaktionen a:hover { color: var(--brand-primary); }
.im-korb { display: flex; justify-content: space-between; align-items: center; font: var(--t-small); color: var(--success); }
.im-korb a { color: var(--ink-3); }

/* ---------- Seiten ---------- */
.seiten { display: flex; justify-content: center; align-items: center; gap: var(--s-2); margin-top: var(--s-6); }
.seiten a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.seiten a:hover { background: var(--surface); }
.seiten a.an { background: var(--ink); color: var(--white); }

/* ---------- Warenkorbleiste ---------- */
.korbleiste { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: var(--white); z-index: 50; box-shadow: 0 -8px 24px rgba(0,0,0,0.12); }
.korbleiste .pt-container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 76px; }
.korbleiste .info { display: flex; align-items: center; gap: var(--s-4); }
.korbleiste .zahl { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 50%; background: var(--brand-primary); font-weight: 500; }
.korbleiste .text small { display: block; color: var(--fg-on-dark-2); font: var(--t-small); }
.korbleiste .rechts { display: flex; align-items: center; gap: var(--s-5); }
.korbleiste .rechts a.ansehen { color: var(--fg-on-dark-2); text-decoration: none; }

@media (max-width: 1100px) {
  .artikel { grid-template-columns: 100px minmax(0, 1fr); }
  .artikel .bild { width: 100px; height: 134px; }
  .bestellen { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: var(--s-4) 0 0; }
}
@media (max-width: 900px) {
  .artikel-raster { grid-template-columns: 1fr; }
  .leiste { position: static; }
}

/* ---------- Druckproduktion (Eigenfertigung) ---------- */
.feldtitel { font: 500 0.85rem/1.2 var(--font); color: var(--ink-2); margin-bottom: -4px; }
.druckblock { background: var(--surface); border-radius: var(--r-input); padding: var(--s-3) var(--s-4); }
.druckkopf { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); font: var(--t-small); }
.druckkopf strong { font-weight: 500; color: var(--ink); }
.druckkopf span { color: var(--ink-3); }
.druckkopf small { color: var(--ink-3); }
.druckfelder { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.druckfelder label { display: block; font: var(--t-small); color: var(--ink-3); margin-bottom: 4px; }
.druckfelder output, .druckfelder input {
  display: block; width: 100%; padding: 8px 6px; border-radius: 6px; text-align: center;
  font: 500 1rem/1.2 var(--font);
}
.druckfelder output { background: rgba(0,0,0,0.04); color: var(--ink-2); }
.druckfelder output.gesamt { background: var(--ink); color: var(--white); }
.druckfelder input { border: 1px solid #cfccc5; background: var(--white); }
.druckfelder input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.druckhinweis { font: var(--t-small); color: var(--ink-3); margin: var(--s-3) 0 0; }
.druckhinweis.warnung { color: #a35a10; }

:root { --success: #2f7a3d; }

/* ---------- Schnellbestellung als Leiste ---------- */
.schnellleiste { background: var(--white); border-bottom: 1px solid var(--line); padding: var(--s-4) 0; position: sticky; top: 0; z-index: 40; box-shadow: 0 6px 16px rgba(0,0,0,0.04); }
.schnellleiste .pt-container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.schnell-eingabe { display: flex; align-items: center; gap: var(--s-4); flex: 1 1 560px; }
.schnell-eingabe label { display: flex; flex-direction: column; white-space: nowrap; }
.schnell-eingabe label strong { font-weight: 500; }
.schnell-eingabe label small { font: var(--t-small); color: var(--ink-3); }
.schnell-eingabe input {
  flex: 1; min-width: 160px; padding: 12px 16px;
  border: 1px solid #cfccc5; border-radius: var(--r-button); font: var(--t-body);
}
.schnell-eingabe input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.schnell-datei { display: flex; gap: var(--s-3); padding-left: var(--s-5); border-left: 1px solid var(--line); }
.schnell-datei .pt-btn { white-space: nowrap; }
@media (max-width: 900px) {
  .schnell-eingabe { flex-wrap: wrap; }
  .schnell-datei { border-left: 0; padding-left: 0; }
}

/* ---------- Schnellbestellung im Seitenkopf, Suche in der Leiste ---------- */
.seitenkopf .pt-container { align-items: center; }
.schnell { flex: 0 1 560px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: var(--s-4) var(--s-5); }
.schnell-titel { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.schnell-titel strong { font-weight: 500; }
.schnell-titel small { font: var(--t-small); color: var(--ink-3); }
.schnell .schnell-eingabe { display: flex; gap: var(--s-3); flex: none; }
.schnell .schnell-eingabe input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid #cfccc5; border-radius: var(--r-button); font: var(--t-body); }
.schnell .schnell-eingabe input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.schnell .schnell-eingabe .pt-btn { white-space: nowrap; }
.schnell .schnell-datei { display: flex; gap: var(--s-5); margin-top: var(--s-3); padding: 0; border: 0; font: var(--t-small); }
.schnell .schnell-datei a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.schnell .schnell-datei a:hover { color: var(--brand-primary); }
.leiste .suche { display: block; flex: none; max-width: none; }
.leiste .suche input { padding: 11px 14px 11px 42px; font: var(--t-body); }
.leiste .suche svg { left: 15px; }
.leiste { top: var(--s-5); }

/* Schnellbestellung als durchgehende Leiste direkt unter dem Menüband */
.schnellleiste { background: var(--surface); box-shadow: none; padding: var(--s-5) 0; }
.schnellleiste .schnell-eingabe input { background: var(--white); }
.filterzeile .treffer { color: var(--ink); font-weight: 500; }
.filterzeile .trenner { width: 1px; height: 18px; background: var(--line); margin: 0 var(--s-2); }
.druckkosten { display: flex; justify-content: space-between; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); font: var(--t-small); color: var(--ink-2); }
.druckkosten strong { font: 500 1rem/1.2 var(--font); color: var(--ink); }

/* ---------- Bestellzeile unter der Karte (ersetzt den Kasten rechts) ---------- */
.artikel { grid-template-columns: 120px minmax(0, 1fr); }
.artikel .nebenaktionen { margin-top: var(--s-3); }
.bestellzeile {
  grid-column: 1 / -1;
  display: flex; align-items: flex-end; gap: var(--s-5); flex-wrap: wrap;
  background: var(--surface); border-radius: var(--r-input);
  padding: var(--s-4) var(--s-5);
}
.bestellzeile .zelle { display: flex; flex-direction: column; gap: 4px; }
.bestellzeile .lbl { font: var(--t-small); color: var(--ink-3); }
.bestellzeile .zelle .menge { width: 190px; }
.bestellzeile .info .wert { font: 500 1.05rem/1.2 var(--font); padding: 8px 0 4px; }
.bestellzeile .info small, .bestellzeile .kosten small { font: var(--t-small); color: var(--ink-3); }
.bestellzeile .druck { display: flex; flex-direction: column; gap: 4px; padding-left: var(--s-5); border-left: 1px solid var(--line); }
.bestellzeile .drucktitel { font: 500 0.8rem/1.2 var(--font); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.bestellzeile .rechnung { display: flex; align-items: flex-end; gap: var(--s-2); }
.bestellzeile .rechnung output, .bestellzeile .rechnung input {
  width: 74px; padding: 9px 6px; border-radius: 6px; text-align: center; font: 500 1rem/1.2 var(--font);
}
.bestellzeile .rechnung output { background: rgba(0,0,0,0.05); color: var(--ink-2); display: block; }
.bestellzeile .rechnung output.gesamt { background: var(--ink); color: var(--white); }
.bestellzeile .rechnung input { border: 1px solid #cfccc5; background: var(--white); }
.bestellzeile .rechnung input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.bestellzeile .op { padding-bottom: 10px; color: var(--ink-3); font-weight: 500; }
.bestellzeile .kosten strong { font: 500 1.25rem/1.2 var(--font); padding-top: 6px; }
.bestellzeile > .pt-btn { margin-left: auto; }
.bestellzeile .pt-btn[disabled] { opacity: .5; cursor: default; }
.bestellzeile .zelle-text { flex: 1 1 220px; margin: 0; padding-bottom: 8px; font: var(--t-small); color: var(--ink-3); }
.bestellzeile .zeilenhinweis { flex-basis: 100%; margin: 0; font: var(--t-small); color: var(--ink-3); }
.bestellzeile .zeilenhinweis.warnung { color: #a35a10; }
@media (max-width: 1100px) {
  .bestellzeile .druck { border-left: 0; padding-left: 0; }
  .bestellzeile > .pt-btn { margin-left: 0; }
}
.bestellzeile { gap: var(--s-4); }
.bestellzeile .zelle .menge { width: 150px; }
.bestellzeile .menge button { width: 34px; }
.bestellzeile .druck { padding-left: var(--s-4); }
.bestellzeile .rechnung output, .bestellzeile .rechnung input { width: 60px; }

/* Eigenfertigung: feste Ordnung in zwei Reihen */
.bestellzeile.mit-druck {
  display: grid; align-items: end; column-gap: var(--s-5); row-gap: var(--s-4);
  grid-template-columns: auto auto auto 1fr;
  grid-template-areas: "menge frei druck kosten" "hinweis hinweis hinweis knopf";
}
.bestellzeile.mit-druck > .zelle:first-child { grid-area: menge; }
.bestellzeile.mit-druck > .info { grid-area: frei; }
.bestellzeile.mit-druck > .druck { grid-area: druck; }
.bestellzeile.mit-druck > .kosten { grid-area: kosten; justify-self: end; text-align: right; }
.bestellzeile.mit-druck > .zeilenhinweis { grid-area: hinweis; align-self: center; }
.bestellzeile.mit-druck > .pt-btn { grid-area: knopf; justify-self: end; margin: 0; }
@media (max-width: 1100px) {
  .bestellzeile.mit-druck { grid-template-columns: 1fr 1fr; grid-template-areas: "menge frei" "druck druck" "kosten knopf" "hinweis hinweis"; }
}
.bestellzeile .lbl, .bestellzeile .info small, .bestellzeile .info .wert, .bestellzeile .pt-btn, .bestellzeile .drucktitel { white-space: nowrap; }
.bestellzeile .zelle .menge { width: 170px; }
.bestellzeile .menge input { min-width: 48px; }
.bestellzeile.mit-druck { grid-template-columns: max-content max-content max-content 1fr; column-gap: var(--s-4); }
/* Hinweis darf die Spaltenbreiten nicht bestimmen */
.bestellzeile.mit-druck > .zeilenhinweis { width: 0; min-width: 100%; }
.bestellzeile.mit-druck { column-gap: 14px; padding: var(--s-4); }
.bestellzeile .zelle .menge { width: 156px; }
.bestellzeile .rechnung { gap: 6px; }
.bestellzeile .rechnung output, .bestellzeile .rechnung input { width: 54px; }
.bestellzeile .druck { padding-left: 14px; }
/* Paketinhalt so breit wie die Bestellzeile */
.artikel .inhalt { grid-column: 1 / -1; }

/* ---------- App: Warenkorb unten (Leiste + aufklappbare Ansicht) ---------- */
.korb-fix { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; }
.korb-fix .korbleiste { position: static; }
.korb-ansicht { background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -12px 32px rgba(0,0,0,0.12); max-height: 60vh; overflow-y: auto; padding: var(--s-5) 0; }
.korb-kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-4); }
.korb-kopf h3 { font: var(--t-h3); margin: 0; }
.korb-leeren { color: var(--brand-primary); font: var(--t-small); }
.korb-leer { color: var(--ink-3); font: var(--t-small); margin: 0; }
.korb-teile { display: grid; grid-template-columns: 1fr; gap: var(--s-6); }
.korb-teil h4 { font: 500 1rem/1.3 var(--font); margin: 0 0 var(--s-3); display: flex; flex-direction: column; }
.korb-teil h4 small { font: var(--t-small); color: var(--ink-3); }
.korb-teil h5 { font: 500 0.9rem/1.3 var(--font); color: var(--ink-2); margin: var(--s-4) 0 var(--s-2); display: flex; gap: var(--s-2); align-items: baseline; }
.korb-teil h4 + h5 { margin-top: 0; }
.korb-teil h5 small { font: var(--t-small); color: var(--ink-3); }
.korb-teil table { width: 100%; border-collapse: collapse; font: var(--t-small); }
.korb-teil th { text-align: right; font-weight: 400; color: var(--ink-3); padding: 4px 6px; }
.korb-teil td { padding: 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.korb-teil td.nr { color: var(--ink-3); width: 56px; }
.korb-teil td.zahl { text-align: right; white-space: nowrap; }
.korb-teil td.aktion { width: 24px; text-align: center; }
.korb-teil tr.paketteil td { border-top: 0; padding-top: 2px; padding-bottom: 2px; color: var(--ink-3); }
.korb-teil tr.paketteil td:nth-child(2) { padding-left: 18px; }
.korb-teil td.aktion a { color: var(--ink-3); text-decoration: none; font-size: 1.1rem; }
.korb-teil td.aktion a:hover { color: var(--brand-primary); }
.korb-teil input { width: 70px; padding: 5px 6px; border: 1px solid #cfccc5; border-radius: 6px; text-align: right; font: var(--t-small); }
.korbleiste .ansehen { color: var(--fg-on-dark-2); text-decoration: none; }
.korbleiste .ansehen:hover { color: var(--white); }
@media (max-width: 900px) { .korb-teile { grid-template-columns: 1fr; } }

/* ---------- App: Artikelseite ---------- */
.artikelseite .schnellleiste { top: 0; }
.artikelseite .artikel-raster { padding-bottom: 140px; }
.artikelseite .keine-artikel { color: var(--ink-3); padding: var(--s-6) 0; }
.artikelseite .artikel h2 { font: var(--t-h3); margin: 0 0 var(--s-2); }
.artikelseite .menge input { -moz-appearance: textfield; }
.artikelseite .menge input::-webkit-outer-spin-button, .artikelseite .menge input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bestellzeile .im-korb { font: var(--t-small); color: var(--success); white-space: nowrap; align-self: center; }
.bestellzeile.mit-druck > .im-korb { grid-area: knopf; justify-self: end; }
.bestellzeile .im-korb a { color: var(--ink-3); }
.leiste .wahl label { margin: 0; font-weight: 400; }
.leiste select { height: auto; }

/* ---------- Dialoge (uib-modal) ---------- */
.pt-dialog { padding: var(--s-6); font: var(--t-body); }
.pt-dialog h3 { font: var(--t-h3); margin: 0 0 var(--s-3); }
.pt-dialog-knoepfe { display: flex; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-5); }
.artikelseite input[type=number], .korb input[type=number] { -moz-appearance: textfield; }
.artikelseite input[type=number]::-webkit-outer-spin-button, .artikelseite input[type=number]::-webkit-inner-spin-button,
.korb input[type=number]::-webkit-outer-spin-button, .korb input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Detailansicht (uib-modal) ---------- */
.pt-fenster .modal-dialog { width: min(1040px, calc(100vw - 32px)); }
.pt-fenster .modal-content, .modal-content { border-radius: var(--r-card); border: 0; box-shadow: var(--shadow-overlay, 0 20px 60px rgba(0,0,0,0.15)); }
.pt-detail { font: var(--t-body); color: var(--ink); }
.pt-detail-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); padding: var(--s-6) var(--s-6) var(--s-4); }
.pt-detail-kopf h2, .pt-detail-kopf h3 { font: var(--t-h3); margin: 0; text-transform: none; border: 0; }
.pt-detail-kopf .eyebrow { margin-bottom: 4px; }
.pt-schliessen { border: 0; background: var(--surface); width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--ink-2); cursor: pointer; flex: none; }
.pt-schliessen:hover { background: var(--line); }
.pt-tabs { display: flex; gap: var(--s-6); padding: 0 var(--s-6); border-bottom: 1px solid var(--line); }
.pt-tabs a { padding: var(--s-3) 0; color: var(--ink-3); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pt-tabs a:hover { color: var(--ink); }
.pt-tabs a.aktiv { color: var(--ink); border-bottom-color: var(--brand-primary); }
.pt-tabs small { background: var(--surface); border-radius: var(--r-button); padding: 1px 7px; font-size: 0.75rem; color: var(--ink-3); }
.pt-laedt { padding: var(--s-6); color: var(--ink-3); }
.pt-detail-inhalt { padding: var(--s-5) var(--s-6) var(--s-6); display: grid; gap: var(--s-5); }
.pt-meldung.hinweis { background: #fdf0e6; color: #a35a10; margin: 0; }
.pt-block { border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.pt-block h3 { font: 500 1rem/1.3 var(--font); margin: 0 0 var(--s-4); text-transform: none; border: 0; }
.pt-block textarea { width: 100%; padding: 12px 16px; border: 1px solid #cfccc5; border-radius: var(--r-input); font: var(--t-body); resize: vertical; }
.pt-block textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.pt-knoepfe { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-3); }
.pt-datei { font: var(--t-small); color: var(--ink-2); word-break: break-all; }
.pt-leer { color: var(--ink-3); font: var(--t-small); margin: 0; }
.pt-tabelle { width: 100%; border-collapse: collapse; font: var(--t-small); }
.pt-tabelle th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pt-tabelle td { padding: 8px; border-bottom: 1px solid var(--line); }
.pt-tabelle .zahl { text-align: right; white-space: nowrap; }
.pt-seiten-klein { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); font: var(--t-small); color: var(--ink-3); }
.pt-seiten-klein .pagination { margin: 0; }
.pt-seiten-klein .pagination > .active > a { background: var(--ink); border-color: var(--ink); }
.pt-seiten-klein .pagination > li > a { color: var(--ink-2); }
.pt-bilder { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.pt-bilder figure { position: relative; margin: 0; }
.pt-bilder img { width: 120px; height: 120px; object-fit: contain; background: var(--surface); border-radius: var(--r-input); cursor: zoom-in; border: 1px solid var(--line); }
.pt-bild-loeschen { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.92); color: var(--brand-primary); cursor: pointer; font-size: 1rem; line-height: 1; box-shadow: var(--shadow-card); }
.pt-bild-neu { width: 120px; height: 120px; border: 2px dashed #cfccc5; border-radius: var(--r-input); background: none; color: var(--ink-3); font-size: 2rem; line-height: 1; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pt-bild-neu small { font: var(--t-small); }
.pt-bild-neu:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.pt-infos { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s-5); margin: 0; font: var(--t-small); }
.pt-infos dt { color: var(--ink-3); font-weight: 400; }
.pt-infos dd { margin: 0; }
.pt-bildgross { position: relative; padding: var(--s-5); text-align: center; }
.pt-bildgross img { max-width: 100%; max-height: 75vh; margin: 0 auto; }
.pt-bildgross .pt-schliessen { position: absolute; top: var(--s-3); right: var(--s-3); }
.pt-dateiansicht iframe { width: 100%; height: 75vh; border: 0; display: block; }
.artikelseite .artikel .bild { cursor: pointer; }

/* app.css färbt jedes nav rot; Seitennavigation und Tabs neutral halten */
.artikelseite .seiten, .pt-detail .pt-tabs { background: none; position: static; }

/* ---------- Checkout ---------- */
.checkout { padding: var(--s-6) 0 var(--s-9); }
.checkout-kopf { margin-bottom: var(--s-6); }
.pt-seite .checkout-kopf h1 { font: var(--t-h2); margin: 0 0 var(--s-4); }
.schritte-leiste { list-style: none; display: flex; gap: var(--s-2); padding: 0; margin: 0; flex-wrap: wrap; }
.schritte-leiste li { padding: 6px 14px; border-radius: var(--r-button); background: var(--surface); color: var(--ink-3); font: 500 0.85rem/1.2 var(--font); }
.schritte-leiste li.aktiv { background: var(--ink); color: var(--white); }
/* Schrittanzeige: Kreise mit Verbindungslinie; erledigt = Häkchen, wählbare Schritte anklickbar */
.stepper { list-style: none; display: flex; margin: 0 0 var(--s-6); padding: 0; width: 100%; }
.stepper li { flex: 1; position: relative; }
.stepper li + li::before {
  content: ''; position: absolute; top: 17px; left: calc(-50% + 26px); right: calc(50% + 26px);
  height: 2px; background: var(--line); border-radius: 1px;
}
.stepper li.erledigt + li::before, .stepper li.erledigt + li.aktiv::before { background: var(--brand-primary); }
.stepper button {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  background: none; border: 0; padding: 0; text-align: center; font: inherit; color: inherit; cursor: pointer;
}
.stepper button[disabled] { cursor: default; opacity: 1; }
.stepper .kreis {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); background: var(--white); color: var(--ink-3); font: 500 0.95rem/1 var(--font);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.stepper .etikett { font: var(--t-small); color: var(--ink-3); max-width: 180px; }
.stepper li.erledigt .kreis { border-color: var(--brand-primary); color: var(--brand-primary); }
.stepper li.erledigt .etikett { color: var(--ink-2); }
.stepper li.aktiv .kreis { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--white); box-shadow: 0 0 0 4px rgba(191,0,0,0.12); }
.stepper li.aktiv .etikett { color: var(--ink); font-weight: 500; }
.stepper li.waehlbar:not(.erledigt) .kreis { border-color: var(--ink-3); color: var(--ink-2); }
.stepper li.waehlbar:not(.erledigt) .etikett { color: var(--ink-2); }
.stepper li.waehlbar button:hover .kreis { border-color: var(--brand-primary); box-shadow: 0 0 0 4px rgba(191,0,0,0.08); }
.stepper li.waehlbar button:hover .etikett { color: var(--ink); text-decoration: underline; }
.stepper li.waehlbar button:focus-visible .kreis { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
@media (max-width: 700px) {
  .stepper li:not(.aktiv) .etikett { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.checkout-raster { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.checkout-raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--s-5); }
.checkout-block { padding: var(--s-5) var(--s-6); margin-bottom: var(--s-5); }
.pt-seite .checkout-block h2, .pt-seite .checkout-korb h2 { font: var(--t-h3); margin: 0 0 var(--s-4); }
.checkout-block .klein { font: var(--t-small); color: var(--ink-3); }
.feldgruppe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
.feldgruppe .breit { grid-column: 1 / -1; }
.feldgruppe .pt-feld { margin-bottom: var(--s-4); }
.checkout .pt-feld select, .checkout .pt-feld textarea { width: 100%; padding: 11px 14px; border: 1px solid #cfccc5; border-radius: var(--r-input); font: var(--t-body); background: var(--white); height: auto; }
.adresssuche { position: relative; }
.adresssuche .treffer { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-input); box-shadow: var(--shadow-card-hover); max-height: 280px; overflow-y: auto; }
.adresssuche .treffer li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font: var(--t-small); }
.adresssuche .treffer li:hover { background: var(--surface); }
.checkout-korb { padding: var(--s-5) var(--s-6); }
.checkout-korb .korb-teile { gap: var(--s-5); }
.checkout-summe { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: var(--s-3); margin: var(--s-4) 0 var(--s-3) !important; }
.checkout-aktionen { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-5); }
@media (max-width: 900px) {
  .checkout-raster, .checkout-raster.drei, .feldgruppe { grid-template-columns: 1fr; }
}
