/* =====================================================
   Makerbude – Design
   Warm, handgemacht, modern: Creme + Terracotta + Tannengrün
   ===================================================== */

:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #2b2420;
  --muted: #786c60;  /* WCAG AA: 4,7:1 auf --bg (vorher #82756a = 4,15) */
  --brand: #b4522c;  /* WCAG AA: weiß auf brand 5,0:1 (vorher #bc5b34 = 4,48) */
  --brand-dark: #9a4626;
  --brand-soft: #f6e3d8;
  --green: #3d6b56;
  --green-soft: #e3ede7;
  --line: #eadfd3;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(70, 50, 30, .07);
  --shadow-lg: 0 10px 30px rgba(70, 50, 30, .12);
  /* Shop-Design: Schriftpaar + Kachel-Form – Shop-Seiten übersteuern
     diese Variablen (shop_font_css()/shop_card_css() in config.php) */
  --font-head: 'Lora', Georgia, serif; /* Schrift-Wechsel 22.07. (Jessica): weg von Fraunces – Abgrenzung vom Wettbewerber */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --card-radius: var(--radius);
}

* { box-sizing: border-box; }
/* Sanftes Scrollen nur, wenn das System keine reduzierte Bewegung wünscht (WCAG 2.3.3) */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main.wrap { min-height: 58vh; padding-bottom: 60px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 250, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 20px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: 'Lora', serif; font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.search { flex: 1; display: flex; max-width: 520px; min-width: 200px; position: relative; }
/* Live-Suchvorschläge: Dropdown unterm Suchfeld (JS in layout_footer) */
.such-vorschlaege {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; max-height: min(420px, 70vh); overflow: auto;
}
.such-vorschlaege a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; color: var(--ink);
}
.such-vorschlaege a:hover, .such-vorschlaege a.aktiv { background: var(--brand-soft); text-decoration: none; }
.such-vorschlaege img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.such-vorschlaege .sv-label { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.such-vorschlaege .sv-sub { color: var(--muted); font-size: .82rem; margin-left: auto; white-space: nowrap; }
.such-vorschlaege .sv-alle { color: var(--brand-dark); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.search input {
  flex: 1; border: 2px solid var(--line); border-right: 0;
  border-radius: 999px 0 0 999px; padding: 10px 18px; font: inherit;
  background: #fff; outline: none;
}
.search input:focus { border-color: var(--brand); }
.search button {
  border: 2px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: 0 999px 999px 0; padding: 0 18px; font-size: 1.05rem; cursor: pointer;
}
.search button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 12px; border-radius: 999px; color: var(--ink); font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; }
.nav-link svg { display: block; /* Icons (Post/Herz/Korb) auf einer Linie */ }
.nav-link:hover { background: var(--brand-soft); text-decoration: none; }
.nav-sell { color: var(--green); font-weight: 600; }
.cart-link { position: relative; font-size: 1.2rem; }
.cart-badge {
  position: absolute; top: 0; right: 2px;
  background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: 999px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 4px;
}

/* ---------- Flash ---------- */
.flash {
  margin-top: 16px; padding: 12px 18px; border-radius: var(--radius);
  background: var(--green-soft); color: var(--green); font-weight: 500;
  border: 1px solid #c8dcd2;
}
/* Fehler-Variante (flash_set(…, 'fehler')): Farben wie .form-error */
.flash-fehler { background: #fbe9e4; color: #a33c1c; border-color: #efc4b5; }

/* ---------- Hero ---------- */
.hero {
  margin: 26px 0 10px;
  background: linear-gradient(120deg, #fdf1e7, #f6dcc9 60%, #f0cfb8);
  border-radius: 24px; padding: clamp(28px, 5vw, 60px);
  display: grid; gap: 8px;
}
.hero h1 { margin: 0; max-width: 15em; }
.hero p { margin: 0 0 14px; font-size: 1.1rem; color: #6d5443; max-width: 40em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.usp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 6px 14px;
  font-weight: 600; color: var(--green); box-shadow: var(--shadow);
  width: fit-content; margin-bottom: 10px; font-size: .95rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--brand); color: #fff; padding: 12px 26px; border-radius: 999px;
  /* Transparenter Rand in Ghost-Stärke: solide und ghost-Buttons sind so
     in jeder Reihe exakt gleich hoch (Jessicas Feedback 07.07.) */
  border: 2px solid transparent;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; transform: translateY(-1px); }
.btn.green { background: var(--green); }
.btn.green:hover { background: #2f5442; }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn.small { padding: 7px 16px; font-size: .9rem; }
.btn[disabled] { background: #cbc2b8; cursor: not-allowed; transform: none; }

/* ---------- Kategorien ---------- */
.cat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.cat-chip {
  /* justify-content zentriert die Schrift auch VERTIKAL: in einer Reihe
     strecken sich alle Kacheln auf die Höhe der höchsten (zweizeilige
     Beschriftung) – einzeilige Texte klebten sonst am oberen Rand */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 118px; padding: 16px 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-size: .85rem; font-weight: 500; text-align: center;
  transition: transform .12s, box-shadow .12s;
}
.cat-chip:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-chip .emoji {
  font-size: 1.6rem; background: var(--brand-soft); width: 52px; height: 52px;
  border-radius: 50%; display: grid; place-items: center;
}

/* ---------- Artikel-Grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; margin: 18px 0; }
.card {
  background: var(--card); border-radius: var(--card-radius); overflow: hidden;
  border: 1px solid var(--line); color: var(--ink);
  display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
/* min-height: 0 + overflow: hidden: sonst drücken Hochkant-Fotos das Flex-Kind über das 1:1-Raster hinaus */
.card-img { position: relative; aspect-ratio: 1; background: #f3ece3; overflow: hidden; min-height: 0; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-soldout {
  position: absolute; top: 10px; left: 10px; background: rgba(43,36,32,.85);
  color: #fff; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.card-title {
  padding: 12px 14px 0; font-weight: 600; line-height: 1.35;
  /* Lange Titel enden nach 2 Zeilen mit „…“ – Kacheln bleiben gleich hoch */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-shop { padding: 2px 14px 0; color: var(--muted); font-size: .85rem; }
/* margin-top:auto drückt den Preis an die Kachel-Unterkante – so stehen die
   Preise einer Reihe auf einer Linie, egal ob der Titel 1 oder 2 Zeilen hat */
.card-price { margin-top: auto; padding: 6px 14px 14px; font-weight: 700; font-size: 1.05rem; color: var(--brand-dark); }

/* ---------- Schritte / Verkäufer-Banner ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 20px 0 30px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand);
  color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 12px;
}
.seller-banner {
  background: var(--green); color: #fff; border-radius: 24px;
  padding: clamp(26px, 4vw, 48px); margin: 40px 0 20px;
  display: grid; gap: 10px;
}
.seller-banner h2 { margin: 0; color: #fff; }
.seller-banner p { margin: 0 0 12px; color: #dcebe2; max-width: 46em; }
.seller-banner .btn { background: #fff; color: var(--green); width: fit-content; }

/* ---------- Artikel-Detail ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; margin-top: 30px; }
/* Wisch-Galerie: Bilder liegen nebeneinander und rasten beim Wischen ein
   (scroll-snap) – mobil per Finger, am Rechner per Trackpad oder Schnellwahl */
.gallery-main {
  border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; aspect-ratio: 1;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gallery-main::-webkit-scrollbar { display: none; }
.gallery-main img {
  width: 100%; height: 100%; object-fit: cover; flex: 0 0 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
}
/* zoombar = Artikel hat echte Fotos (kein Platzhalter) → Tap öffnet Vollbild */
.gallery-main.zoombar img { cursor: zoom-in; }
.gallery-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.gallery-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.gallery-dots span.active { background: var(--brand); }
/* overflow-x: auto + flex-shrink:0 (16.07.): bei vielen Bildern lief die
   Schnellwahl-Reihe im 2-Spalten-Layout sonst über die linke Spalte hinaus
   in den Beschreibungstext – jetzt scrollt sie wie mobil im Streifen */
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery-thumbs img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 2px solid var(--line); cursor: pointer; flex-shrink: 0;
}
.gallery-thumbs img.active { border-color: var(--brand); }
/* Vollbild-Ansicht: Tap aufs Galeriebild zeigt das ganze Foto ohne Quadrat-
   Zuschnitt (wichtig bei Hochkant-Fotos) – gleiche Wisch-Mechanik wie oben */
.lightbox { position: fixed; inset: 0; z-index: 200; background: #1c1612; display: none; }
.lightbox.offen { display: block; }
.lightbox-strip {
  height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-strip img, .lightbox-strip video {
  width: 100%; height: 100%; object-fit: contain; flex: 0 0 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
}
.lightbox-close {
  position: absolute; z-index: 1;
  top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right));
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lightbox-count {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%); pointer-events: none;
  color: #fff; font-size: .9rem; background: rgba(0, 0, 0, .45);
  padding: 4px 12px; border-radius: 999px;
}
.kein-scroll, .kein-scroll body { overflow: hidden; }
.product-info h1 { margin-top: 0; }
.product-price { font-size: 1.7rem; font-weight: 700; color: var(--brand-dark); }
.product-shipping { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.buy-form { display: flex; gap: 12px; align-items: center; margin: 18px 0; }
.buy-form input[type=number] {
  width: 76px; padding: 11px; border: 2px solid var(--line); border-radius: 12px; font: inherit;
}
.shop-box {
  margin-top: 26px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.shop-box h3 { margin-top: 0; }
.product-desc { white-space: pre-line; }
.stock-hint { color: var(--green); font-size: .9rem; font-weight: 600; }
.stock-hint.low { color: var(--brand-dark); }

/* ---------- Artikel-Detail: Akkordeon für Versand/Produktsicherheit ----------
   Zugeklappte Info-Zeilen statt Textwand (Jessicas Feedback 07.07.) – die
   Kurzinfo (z. B. Lieferfenster) bleibt in der Zeile sichtbar. */
.product-acc { margin-top: 22px; border-top: 1px solid var(--line); }
.product-acc details { border-bottom: 1px solid var(--line); }
.product-acc summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: baseline; padding: 13px 2px; }
.product-acc summary::-webkit-details-marker { display: none; }
.product-acc summary h3 { margin: 0; font-size: 1.05rem; white-space: nowrap; }
.product-acc summary .acc-hint { color: var(--muted); font-size: .88rem; margin-left: auto; text-align: right; }
.product-acc summary::after { content: "+"; font-size: 1.25rem; color: var(--muted); line-height: 1; flex-shrink: 0; }
.product-acc details[open] summary::after { content: "–"; }
.product-acc summary:hover h3 { color: var(--brand-dark); }
.product-acc .acc-body { padding: 0 2px 16px; }
.product-acc .acc-body > :first-child { margin-top: 0; }

/* ---------- Formulare ---------- */
.form-card {
  max-width: 560px; margin: 30px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow);
}
.form-card.wide { max-width: 820px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
/* Abschnitts-Überschriften in langen Formularen (verkaufen/artikel.php):
   gliedern die Strecke in Etappen – Linie oben trennt vom vorigen Abschnitt */
.form-abschnitt {
  margin: 38px 0 4px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 1.3rem;
}
.form-abschnitt.erste { border-top: 0; padding-top: 0; margin-top: 10px; }
input[type=text], input[type=email], input[type=password], input[type=search],
input[type=number], textarea, select {
  width: 100%; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px;
  font: inherit; background: #fff; outline: none;
}
/* Datumsfelder in derselben Optik wie alle anderen Eingaben (native Mini-Optik
   wirkt daneben fremd); bewusst ohne width:100 % – Breiten setzen die Seiten. */
input[type=date], input[type=time], input[type=datetime-local] {
  padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px;
  font: inherit; background: #fff; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
textarea { min-height: 130px; resize: vertical; }
/* Formularfelder nie breiter als ihr Container – ein select mit langer Option
   (width:auto) würde sonst auf dem Handy den Viewport aufsprengen. Der
   100vw-Anteil greift, wenn der Eltern-Container selbst am Inhalt mitwächst
   (Flex-Spalten ohne min-width:0). */
input, textarea { max-width: 100%; }
select { max-width: min(100%, calc(100vw - 76px)); }
.form-hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
/* „Mehr dazu“ unter einem Kurz-Hinweis: lange Detail- und Rechtsinfos bleiben
   erreichbar, ohne das Formular zu fluten (natives details = tastaturbedienbar) */
.hint-mehr { margin: 2px 0 0; }
.hint-mehr summary {
  display: inline-block; color: var(--brand); font-size: .85rem; font-weight: 600;
  cursor: pointer; list-style: none; border-radius: 6px;
}
.hint-mehr summary::-webkit-details-marker { display: none; }
.hint-mehr summary::after { content: "›"; display: inline-block; margin-left: 5px; }
.hint-mehr[open] summary::after { content: "‹"; }
.hint-mehr .form-hint {
  margin: 6px 0 2px; padding: 10px 14px; background: var(--bg);
  border-radius: 12px;
}
.form-error {
  background: #fbe9e4; color: #a33c1c; border: 1px solid #efc4b5;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 500;
}
.form-actions { margin-top: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* Häkchen-Zeilen: KEIN Flex – Text und Links (z. B. „AGB … gelesen“) würden
   als einzelne Flex-Items nebeneinander liegen und könnten nicht umbrechen
   (sprengte auf dem Handy den Viewport). Checkbox absolut, Text fließt. */
.checkline { display: block; position: relative; padding-left: 31px; margin: 14px 0; font-weight: 400; }
/* Nur der Haken/Radio-Knopf sitzt absolut links – weitere Eingabefelder in
   derselben Zeile (z. B. der Aufpreis-Betrag beim Kombiversand) laufen im
   Text mit, sonst legen sie sich über die Beschriftung */
.checkline input[type="checkbox"], .checkline input[type="radio"] { position: absolute; left: 0; top: 3px; width: 19px; margin: 0; }
.checkline input[type="text"], .checkline input[type="number"] { display: inline-block; vertical-align: middle; margin: 0 2px; }
/* Häkchen & Radios: große, gut treffbare Flächen (Touch) */
input[type=checkbox], input[type=radio] {
  width: 19px; height: 19px; accent-color: var(--brand); flex-shrink: 0;
}
/* Schieberegler (z. B. Gewinn im Preisrechner) in Markenfarbe statt Browser-Blau */
input[type=range] { accent-color: var(--brand); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f7f1e8; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }

/* ---------- Warenkorb / Kasse ---------- */
.cart-shop { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; }
.cart-shop h3 { margin: 0 0 10px; }
.cart-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.cart-item > div { flex: 1; min-width: 0; /* lange Titel quetschen die Zeile nicht auseinander */ }
.cart-item .ci-title { font-weight: 600; }
.cart-item .ci-meta { color: var(--muted); font-size: .85rem; }
.cart-item form { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cart-item input[type=number] { width: 64px; padding: 7px; }
.cart-item .linkbtn { padding: 8px 10px; font-size: 1.05rem; text-decoration: none; }
.cart-total {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin: 18px 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.cart-total .sum { font-size: 1.3rem; font-weight: 700; }
.linkbtn { background: none; border: 0; color: var(--brand-dark); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* ---------- Dashboard / Admin ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.stat .val { font-size: 1.6rem; font-weight: 700; font-family: 'Lora', serif; color: var(--brand-dark); }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.pill.aktiv, .pill.bezahlt { background: var(--green-soft); color: var(--green); }
.pill.entwurf, .pill.neu, .pill.pruefung { background: #fdf0d7; color: #8a6118; }
.pill.gesperrt, .pill.storniert, .pill.abgelehnt { background: #fbe9e4; color: #a33c1c; }
.pill.versendet { background: #e3e9f5; color: #33518c; }
.pill.geschlossen, .pill.abgelaufen { background: #e8e4de; color: #6b6257; }
/* Maker-Treff: Themen-Arten – ausschließlich bereits WCAG-geprüfte Farbpaare
   von oben wiederverwendet (blau/grün/gelb/beige) */
.pill.treff-ankuendigung { background: #e3e9f5; color: #33518c; }
.pill.treff-update { background: var(--brand-soft); color: var(--brand-dark); }
.pill.treff-vorschlag { background: var(--green-soft); color: var(--green); }
.pill.treff-wunsch { background: #fdf0d7; color: #8a6118; }
.pill.treff-frage, .pill.treff-austausch { background: #e8e4de; color: #6b6257; }
/* Themen-Zeilen: Pillen + Titel dürfen umbrechen – die Nachrichten-Variante
   (kein Wrap) quetscht lange Titel auf Mobil zwischen die Pillen */
/* Navigations-Punkt: „im Maker-Treff gibt es Neues“ (Tab + Cockpit-Knopf) */
.nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: 2px; }
.treff-row .msg-name { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 700px) {
  .treff-row .msg-snippet { white-space: normal; }
}
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.section-head h2 { margin: 0; }
/* Button-/Pill-Gruppen im Kopf: gleichmäßige Abstände, sauberes Umbrechen */
.section-head > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.schnell-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Kategorien-Dropdown ---------- */
.cat-menu { position: relative; }
.cat-menu summary {
  list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 999px;
  font-weight: 600; white-space: nowrap; color: var(--ink);
}
.cat-menu summary::-webkit-details-marker { display: none; }
.cat-menu summary:hover { background: var(--brand-soft); }
.cat-menu[open] summary { background: var(--brand-soft); }
.cat-menu-list {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; min-width: 240px;
  display: flex; flex-direction: column;
}
.cat-menu-list a { padding: 9px 14px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.cat-menu-list a:hover { background: var(--brand-soft); text-decoration: none; }

/* ---------- Brotkrumen ---------- */
.crumbs { margin: 18px 0 0; color: var(--muted); font-size: .88rem; }
.crumbs a { color: var(--muted); }
.crumbs span { color: var(--ink); }

/* ---------- Filter-Leiste (Suche) ---------- */
/* Panel: am Desktop immer offen (Knopf versteckt), auf dem Handy zugeklappt
   hinter „Filtern & Sortieren“ (Script in suche.php schließt es initial) */
.filter-details { margin: 0 0 18px; }
.filter-details > summary { list-style: none; display: none; width: fit-content; margin-bottom: 10px; cursor: pointer; }
.filter-details > summary::-webkit-details-marker { display: none; }
.filter-details[open] > summary span[aria-hidden] { display: inline-block; transform: rotate(180deg); }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 0;
}
.filter-bar label { margin: 0; font-size: .88rem; }
.filter-bar input, .filter-bar select { padding: 8px 10px; }
.filter-group { display: flex; gap: 8px; align-items: center; }
.filter-check { display: flex; gap: 7px; align-items: center; font-weight: 500; cursor: pointer; }
.filter-check input { width: auto; }

/* ---------- Tabs ---------- */
.tab-row { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin: 8px 0 20px; }
.tab {
  /* oben 2px mehr als unten: die 2px-Markierungslinie zaehlt zur Box -
     so sitzt die Schrift optisch mittig (sichtbar am aktiven Reiter) */
  padding: 11px 18px 9px; font-weight: 600; color: var(--muted);
  border-radius: 12px 12px 0 0; margin-bottom: -2px; border-bottom: 2px solid transparent;
}
.tab:hover { text-decoration: none; background: var(--brand-soft); color: var(--ink); }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); background: #fff; }

/* ---------- Favoriten-Herz ---------- */
.fav-btn {
  border: 2px solid var(--line); background: #fff; color: var(--brand-dark);
  border-radius: 999px; padding: 6px 14px; font-size: 1.05rem; font-weight: 600;
  cursor: pointer; transition: transform .1s, border-color .15s;
}
.fav-btn:hover { border-color: var(--brand); transform: scale(1.05); }
.fav-btn.active { background: var(--brand-soft); border-color: var(--brand); }

/* ---------- Statistik ---------- */
.chart-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}

/* ---------- Nachrichten ---------- */
.msg-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.msg-row {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.msg-row:last-child { border-bottom: 0; }
.msg-row:hover { background: var(--brand-soft); text-decoration: none; }
.msg-row.unread { background: #fdf6ee; }
.msg-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green);
  color: #fff; font-weight: 700; display: grid; place-items: center; flex-shrink: 0;
}
.msg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.msg-name { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.msg-name small { color: var(--muted); font-weight: 400; }
.msg-snippet { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row.unread .msg-snippet { color: var(--ink); font-weight: 500; }
.msg-time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.msg-thread { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.msg-bubble {
  max-width: 70%; padding: 12px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
}
.msg-bubble.me { align-self: flex-end; background: var(--green-soft); border-color: #c8dcd2; }
.msg-bubble .msg-meta { color: var(--muted); font-size: .78rem; margin-top: 6px; }
.msg-reply { display: flex; gap: 12px; align-items: flex-end; }
.msg-reply textarea { flex: 1; }

/* ---------- Bewertungen ---------- */
.stars { color: #e0a010; letter-spacing: 2px; }
.review-box {
  background: #fdf6ee; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-top: 10px; font-size: .92rem;
}
.review-form { margin-top: 10px; }
.review-form summary { cursor: pointer; }

/* ---------- Aufgaben-Karten & Badges ---------- */
.stat.task { text-decoration: none; }
.stat.task.todo { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.card-low {
  position: absolute; top: 10px; left: 10px; background: rgba(188, 91, 52, .92);
  color: #fff; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.announce {
  background: var(--green-soft); border: 1px solid #c8dcd2; color: var(--green);
  border-radius: var(--radius); padding: 14px 18px; margin: 18px 0;
}
/* Shop-Hero: Badges unter dem Namen, Fakten und Versand-Infos als eigene
   Zeilen. Flex-Listen statt Text mit „·“: einzelne Angaben brechen nie
   mitten im Text um, Trennpunkte hängen nie am Zeilenanfang. */
.shop-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shop-meta {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0;
  padding: 0; margin: 18px 0 0; font-weight: 600; color: var(--ink);
}
.shop-meta li { white-space: nowrap; }
.shop-meta li:not(:last-child)::after { content: "·"; margin: 0 12px; color: var(--muted); font-weight: 400; }
.shop-meta.logistik { margin-top: 6px; font-weight: 400; font-size: .93rem; }
.shop-hero .shop-desc { margin: 16px 0 0; }
.shop-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 600px) {
  /* Auf dem Handy: jede Angabe eine eigene Zeile, keine hängenden Trennpunkte */
  .shop-meta { display: block; margin-top: 14px; }
  .shop-meta li { white-space: normal; margin: 4px 0; }
  .shop-meta li:not(:last-child)::after { content: none; }
  .shop-meta.logistik { margin-top: 10px; }
}

/* ---------- Shop-Seite ---------- */
.shop-hero {
  /* Folgt der Farbwelt des Shops (--brand-soft kommt aus shop_theme_css) –
     vorher stand hier ein festes Grün, das jede gewählte Palette überdeckte.
     Erste Zeile = Fallback für Browser ohne color-mix. */
  background: var(--brand-soft);
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand-soft) 45%, #ffffff), var(--brand-soft));
  border-radius: 24px; padding: clamp(24px, 4vw, 44px); margin: 26px 0;
}
.shop-hero h1 { margin: 0 0 6px; }
.shop-hero p { max-width: 52em; color: var(--muted); margin: 0; }

/* ---------- Teilen-Button mit Menü ---------- */
.share-box { position: relative; display: inline-block; margin: 14px 0; }
/* Rechtsbündige Variante (Standard-Position): Menü klappt nach links auf */
.share-box.right .share-menu { left: auto; right: 0; }
.section-head .share-box { margin: 0; }
.share-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 170px;
  display: flex; flex-direction: column;
}
.share-menu a, .share-menu button {
  text-align: left; background: none; border: 0; font: inherit; cursor: pointer;
  color: var(--ink); padding: 8px 12px; border-radius: 8px;
}
.share-menu a:hover, .share-menu button:hover { background: var(--brand-soft); text-decoration: none; }

/* ---------- Trust-Leiste (Warum Makerbude) ---------- */
.trust-bar {
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center;
  padding: 18px 20px 4px; font-size: .88rem;
}
.trust-bar a { color: #cbc0b5; white-space: nowrap; }
.trust-bar a:hover { color: #fff; text-decoration: none; }

/* ---------- Shop-Personalisierung (Themes + Logo) ---------- */
.theme-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.theme-swatch {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px;
  background: #fff; font-size: .9rem;
}
.theme-swatch input { accent-color: var(--brand); }
.theme-swatch .dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.theme-swatch:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
/* Schriftpaar-Vorschau („Aa“ in der Überschrift-Schrift) + Kachel-Form-Vorschau */
.theme-swatch .font-prev {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-size: 1.05rem; font-weight: 600; line-height: 1;
}
.theme-swatch .shape-prev {
  width: 26px; height: 26px; flex-shrink: 0;
  background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow);
}
.shop-logo {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow); flex-shrink: 0;
}
.shop-hero-head { display: flex; gap: 20px; align-items: center; }

/* ---------- Founder-Wall ---------- */
.founder-wall { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.founder-chip {
  display: flex; align-items: center; gap: 9px; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px 7px 9px;
  color: var(--ink); font-weight: 600; font-size: .92rem;
}
.founder-chip:hover { border-color: var(--brand); text-decoration: none; }
.founder-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.founder-chip .fc-city { color: var(--muted); font-weight: 400; font-size: .82rem; }

/* ---------- Footer ---------- */
.site-footer { background: #2b2420; color: #cbc0b5; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 44px 20px 20px; }
.footer-grid .footer-head { color: #fff; margin: 0 0 10px; font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.footer-grid a { display: block; color: #cbc0b5; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.footer-logo { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.footer-note { padding: 16px 20px 30px; font-size: .82rem; color: #9a938a; border-top: 1px solid #3c342e; margin-top: 10px; }

/* ---------- Passwort-Auge (Enhancement in layout_footer) ---------- */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer; line-height: 0; }
.pw-toggle:hover { color: var(--ink); background: var(--brand-soft); }
.pw-toggle .pw-strich { display: none; }
.pw-toggle.sichtbar .pw-strich { display: block; }

/* ---------- Rollen-Wahl bei der Registrierung (Kaufen / Verkaufen) ---------- */
.rolle-wahl { border: 0; padding: 0; margin: 14px 0 0; }
.rolle-wahl legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.rolle-karten { display: flex; gap: 10px; }
.rolle-karten label { flex: 1; margin: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 400; }
.rolle-karten label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.rw-kopf { display: flex; align-items: center; gap: 8px; }
.rw-text { display: block; color: var(--muted); font-size: .92rem; margin-top: 3px; }

/* ---------- Responsiv ---------- */
@media (max-width: 860px) {
  /* !important: schlägt auch Inline-Spalten wie auf /verkaufen/teilen.php.
     minmax(0,1fr) statt 1fr: sonst weitet breiter Inhalt (z. B. eine
     Tabelle in .table-wrap) die Spalte über den Viewport hinaus */
  .product { grid-template-columns: minmax(0, 1fr) !important; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .search { order: 3; max-width: none; width: 100%; }
}

/* Kompakte Bestellsumme oben an der Kasse – nur mobil sichtbar, damit
   Käufer die Summe sehen, BEVOR sie das Adressformular ausfüllen */
.kasse-summe-mobil { display: none; }

/* ---------- Mobile-Pass (Jessicas Vorgabe 07.07.: ~80 % der Besucher kommen
   mobil – Abstände, Tap-Flächen, Textlängen und Layouts fürs Handy) ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  main.wrap { padding-bottom: 44px; }

  .kasse-summe-mobil { display: block; margin: 10px 0 0; }

  /* Varianten-Editor: mobil brechen die Options-Zeilen um – die
     Spaltenüberschriften wären dann irreführend */
  .vhead { display: none !important; }

  /* Breite Verwaltungs-Tabellen (class="stack-table") werden mobil zu Karten:
     Kopfzeile weg, jede Zeile eine Karte, jede Zelle eine Beschriftung-Wert-
     Zeile (Beschriftung kommt aus dem data-l-Attribut der Zelle) */
  .table-wrap:has(> .stack-table) { background: none; border: 0; overflow: visible; }
  .stack-table tr:first-child { display: none; }
  .stack-table tr { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; padding: 6px 14px; }
  .stack-table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 0; padding: 7px 0; text-align: right; }
  .stack-table td::before { content: attr(data-l); font-weight: 600; text-align: left; }
  .stack-table td:not([data-l]) { justify-content: flex-end; }
  .stack-table td:not([data-l])::before { content: none; }

  /* Header: Zeile 1 = Logo + Navigation, Zeile 2 = ☰ Kategorien + Suche.
     Mobil NICHT sticky – drei Zeilen würden dauerhaft ~20 % des Bildschirms
     verdecken; der Header scrollt einfach mit weg. Zeile 2 mit exakt
     gleichen Höhen, damit Pill + Suchfeld wie aus einem Guss wirken. */
  .site-header { position: static; }
  .header-inner { padding: 10px 14px; gap: 8px; }
  .logo { font-size: 1.2rem; gap: 7px; }
  .logo img { width: 29px; height: 29px; }
  .main-nav { margin-left: auto; gap: 2px; }
  .nav-link { padding: 9px 8px; font-size: .92rem; }
  .nav-register { display: none; } /* mobil zu eng – Registrieren-Weg läuft dort über Anmelden-Seite + Banner */
  .rolle-karten { flex-direction: column; } /* Kaufen/Verkaufen-Karten untereinander */
  .cat-menu { order: 3; }
  .cat-menu summary {
    border: 2px solid var(--line); border-radius: 999px; background: #fff;
    height: 44px; display: flex; align-items: center; padding: 0 14px; font-size: .92rem;
  }
  .cat-menu-list { max-height: 65vh; overflow: auto; }
  .search { order: 4; flex: 1; min-width: 0; width: auto; }
  .search input { height: 44px; padding: 0 14px; }
  .search input::placeholder { font-size: .95rem; }
  .search button { height: 44px; padding: 0 16px; }
  /* Vorschläge-Dropdown: volle Bildschirmbreite statt schmaler Feldbreite */
  .such-vorschlaege { left: auto; right: 0; width: calc(100vw - 28px); }
  .such-vorschlaege .sv-sub { display: none; /* Platz für die Titel */ }

  /* Hero & Abschnitte: engere Abstände, weichere Radien */
  .hero { margin-top: 14px; padding: 22px 18px; border-radius: 18px; }
  .hero p { font-size: 1rem; }
  .usp-badge { font-size: .82rem; padding: 5px 12px; }
  .flash, .announce { padding: 10px 14px; font-size: .95rem; }
  .seller-banner { padding: 24px 18px; border-radius: 18px; margin: 28px 0 16px; }
  .shop-hero { padding: 20px 16px; border-radius: 18px; margin: 16px 0; }
  h2 { margin-top: 1.3em; }
  .section-head { margin-top: 26px; }
  .steps { gap: 12px; margin: 16px 0 22px; }
  .step { padding: 18px; }

  /* Artikel-Kacheln: 2 Spalten wie auf großen Marktplätzen üblich */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
  .card-title { padding: 10px 11px 0; font-size: .92rem; }
  .card-shop { padding: 2px 11px 0; font-size: .78rem; }
  .card-price { padding: 5px 11px 12px; font-size: .98rem; }
  .card-soldout, .card-low { top: 8px; left: 8px; font-size: .7rem; padding: 3px 8px; }

  /* Kategorie-/Anlass-Chips: EINE wischbare Reihe statt hohem Raster –
     gleiche Formsprache wie die Filter-Pills */
  .cat-row { gap: 10px 12px; margin: 14px 0; }
  .cat-row:has(> .cat-chip) { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .cat-row:has(> .cat-chip)::-webkit-scrollbar { display: none; }
  .cat-chip { width: auto; flex: 0 0 auto; flex-direction: row; padding: 11px 16px; font-size: .88rem; white-space: nowrap; }
  /* Pill-Reihen (Filter auf Suche/Shop/Dashboard): eine wischbare Zeile
     statt hohem Stapel – gilt nur für Reihen aus Buttons, nicht für die
     Kategorie-Kacheln der Startseite */
  .cat-row:has(> .btn) { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .cat-row:has(> .btn)::-webkit-scrollbar { display: none; }
  .cat-row > .btn { white-space: nowrap; flex-shrink: 0; }
  /* Ausnahme: wenige, wichtige Reiter (z. B. Shop-Einstellungen) brechen in
     zwei Reihen um, statt abgeschnitten zu wischen */
  .cat-row.wrap-mobil { flex-wrap: wrap; overflow-x: visible; }
  /* Dashboard-Schnellleiste: eine wischbare Zeile statt 4-Zeilen-Stapel;
     der wichtigste Button (+ Neuer Artikel) rückt nach vorn. Selektor mit
     .section-head davor: schlägt die Basis-Regel .section-head > div */
  .schnell-leiste, .section-head > .schnell-leiste { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .schnell-leiste::-webkit-scrollbar { display: none; }
  .schnell-leiste .btn { flex-shrink: 0; white-space: nowrap; }
  .schnell-leiste .btn.green { order: -1; }

  /* Buttons: volle Tap-Höhe; Formular-Aktionen gestapelt in voller Breite */
  .btn.small { padding: 10px 15px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { text-align: center; }
  .buy-form { flex-wrap: wrap; }
  .buy-form .btn { flex: 1 1 auto; text-align: center; }

  /* Artikelseite */
  .product { margin-top: 16px; gap: 16px; }
  .gallery-thumbs { overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .gallery-thumbs img { width: 62px; height: 62px; flex-shrink: 0; }
  .product-price { font-size: 1.45rem; }
  .crumbs { margin-top: 12px; }

  /* Warenkorb: Menge/Entfernen rutschen als eigene Zeile unters Bild */
  .cart-shop { padding: 14px; margin: 14px 0; }
  .cart-item { flex-wrap: wrap; gap: 10px 12px; }
  .cart-item > div { flex: 1 1 200px; }
  .cart-item form { margin-left: 0; }
  .cart-item form:last-of-type { margin-left: auto; }
  .cart-total { flex-direction: column; align-items: stretch; text-align: center; padding: 16px 14px; }
  .cart-total .btn { text-align: center; }

  /* Formulare, Filter, Tabs */
  .form-card { margin: 16px auto; }
  /* Filter-Panel: Aufklapp-Knopf nur auf dem Handy sichtbar */
  .filter-details > summary { display: inline-block; }
  .filter-bar { gap: 8px 12px; }
  .filter-bar .btn { width: 100%; }
  /* Selects mit width:auto (Artikel-Formular u. a.): auf dem Handy volle
     Breite, sonst sprengt eine lange Option den Viewport */
  select[style*="width:auto"] { width: 100% !important; }
  /* Varianten-Formular: gestapelte Options-Blöcke optisch trennen */
  [id^=vrows-] > div { border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 10px; }
  [id^=vrows-] > div:last-child { border-bottom: 0; }
  .filter-bar { padding: 12px 14px; gap: 10px 14px; }
  .filter-bar select, .filter-bar input { max-width: 100%; }
  .tab-row { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tab { padding: 11px 14px 9px; white-space: nowrap; }

  /* Nachrichten */
  .msg-bubble { max-width: 88%; }
  .msg-reply { flex-direction: column; align-items: stretch; }
  .msg-row { padding: 12px 14px; gap: 12px; }

  /* Shop-Seite */
  .shop-hero-head { gap: 14px; }
  .shop-logo { width: 64px; height: 64px; }
  .shop-actions .btn { flex: 1 1 auto; text-align: center; }

  /* Tabellen: kompakter, horizontales Wischen bleibt (.table-wrap) */
  th, td { padding: 10px; }
  table { font-size: .9rem; }

  /* Kennzahlen-Kacheln: feste 2 Spalten */
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 10px; }
  .stat .val { font-size: 1.35rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding-top: 32px; }
  .footer-grid a { padding: 7px 0; /* bequeme Tap-Höhe */ }
  .founder-chip { font-size: .88rem; }
  .announce { padding: 12px 14px; margin: 14px 0; }
  /* Lange Kurzlinks/Codes (z. B. makerbude.de/@slug) dürfen umbrechen */
  code { overflow-wrap: anywhere; }
}

/* Aktionspreis: Streichpreis neben dem reduzierten Preis */
.price-old { text-decoration: line-through; color: var(--muted); font-weight: 400; font-size: .92em; margin-right: 4px; }

/* ---------- Barrierefreiheit (WCAG 2.1 AA) ---------- */
/* Sichtbarer Tastatur-Fokus für ALLE bedienbaren Elemente – steht bewusst am
   Dateiende, damit er punktuelle outline:none-Regeln (z. B. Suchfeld) schlägt */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
}
.site-footer a:focus-visible, .seller-banner a:focus-visible, .seller-banner button:focus-visible {
  outline-color: #fff; /* dunkle Flächen: heller Fokusring */
}

/* Skip-Link: erster Tab-Stopp, sichtbar nur bei Tastatur-Fokus */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ---------- Datei-Upload: als solcher erkennbar (Jessicas Feedback 07.07.) ----------
   Native file-Inputs wirken wie leere Kästchen. Ein Skript in layout_footer()
   ersetzt sie durch eine gestrichelte Upload-Fläche mit echtem „Bild
   auswählen“-Button + Status-Text; ohne JS bleibt der native Input sichtbar. */
input[type=file] {
  display: block; width: 100%; max-width: 460px; padding: 10px;
  border: 2px dashed var(--line); border-radius: 12px; background: #fff;
  font: inherit; font-size: .92rem; color: var(--muted); cursor: pointer;
}
.upload-zone {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: 100%; max-width: 460px; padding: 12px;
  border: 2px dashed var(--line); border-radius: 12px; background: #fff; cursor: pointer;
}
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--brand); }
.upload-zone input[type=file] { display: none; }
.upload-status { color: var(--muted); font-size: .9rem; }

/* ---------- Artikel-Video (17.07., Beta-Wunsch): Galerie-Kachel, Formular,
   Zuschneide-Dialog. Videos laufen stumm in Schleife; Hochkant-Clips werden
   wie bei Etsy auf dunklem Grund eingepasst statt beschnitten. ---------- */
/* Video-Kachel: Hochkant-Clips füllen das Quadrat nicht – statt schwarzer
   Balken liegt das eigene Standbild weich verschwommen dahinter (Jessicas
   Feedback 18.07.); ohne Standbild bleibt ein warmer Beige-Grund */
.galerie-video-slide {
  position: relative; flex: 0 0 100%; overflow: hidden;
  scroll-snap-align: start; scroll-snap-stop: always;
  background: #ece5dc;
}
.galerie-video-slide .unschaerfe {
  position: absolute; inset: -32px;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: blur(26px) brightness(.96);
}
.galerie-video-slide video {
  position: relative; width: 100%; height: 100%;
  object-fit: contain; cursor: pointer; display: block;
}
.gallery-thumb-video {
  position: relative; width: 72px; height: 72px; flex-shrink: 0;
  border: 2px solid var(--line); border-radius: 10px; padding: 0;
  background: #1c1612; cursor: pointer; overflow: hidden;
}
.gallery-thumb-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb-video svg {
  position: absolute; inset: 0; margin: auto; color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.gallery-thumb-video.active { border-color: var(--brand); }

/* Verkäufer-Formular: vorhandenes Video; das Standbild-Feld füllt nur das
   Skript – [hidden] muss die display:block-Regel der file-Inputs schlagen */
.video-aktuell { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.video-aktuell video { width: 180px; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #ece5dc; }
input[type=file][hidden] { display: none; }

/* Zuschneide-Dialog (Vorbild Etsy): Vorschau oben, darunter der Standbild-
   Streifen mit verschiebbarem Auswahl-Fenster (Griffe an den Rändern) */
.vtrim {
  position: fixed; inset: 0; z-index: 210; background: rgba(28, 22, 18, .55);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.vtrim[hidden] { display: none; }
.vtrim-card {
  background: #fff; border-radius: 18px; padding: 18px;
  width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}
.vtrim-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vtrim-head h2 { margin: 0; font-size: 1.3rem; }
.vtrim-x { border: 0; background: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--ink); padding: 2px 8px; }
.vtrim-stage { position: relative; background: #1c1612; border-radius: 12px; margin-top: 12px; aspect-ratio: 4 / 3; }
.vtrim-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vtrim-play {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 54px;
  border-radius: 50%; border: 0; background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.vtrim-play svg { margin-left: 3px; }
.vtrim-play.an { opacity: 0; }
.vtrim-play.an:hover, .vtrim-play.an:focus-visible { opacity: 1; }
.vtrim-strip-wrap { position: relative; margin-top: 14px; height: 56px; }
.vtrim-strip { display: flex; height: 100%; border-radius: 10px; overflow: hidden; background: var(--line); }
.vtrim-strip canvas { flex: 1 1 0; min-width: 0; height: 100%; }
.vtrim-window {
  position: absolute; top: -5px; bottom: -5px;
  border: 3px solid var(--ink); border-radius: 12px;
  cursor: grab; touch-action: none; box-sizing: border-box;
}
.vtrim-griff {
  position: absolute; top: -3px; bottom: -3px; width: 16px; border: 0;
  background: var(--ink); color: #fff; cursor: ew-resize; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; line-height: 1; padding: 0;
}
.vtrim-griff.links { left: -3px; border-radius: 9px 0 0 9px; }
.vtrim-griff.rechts { right: -3px; border-radius: 0 9px 9px 0; }
.vtrim-dauer {
  position: absolute; top: 4px; left: 18px; z-index: 1;
  background: rgba(28, 22, 18, .75); color: #fff; border-radius: 7px;
  padding: 2px 7px; font-size: .82rem; pointer-events: none;
}
.vtrim-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.vtrim-balken { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.vtrim-balken > div { height: 100%; width: 0; background: var(--brand); }
.vtrim-progress span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.vtrim-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Blätter-Pfeile in Galerie + Vollbild (Jessicas Feedback 18.07.:
   am Desktop gibt es kein Wischen – Chevrons wie bei Etsy) ---------- */
.gallery-wrap { position: relative; }
.gallery-pfeil {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); z-index: 2; padding: 0;
}
.gallery-pfeil.zurueck { left: 10px; }
.gallery-pfeil.vor { right: 10px; }
.gallery-pfeil:hover { background: #fff; }
.gallery-pfeil[hidden] { display: none; }
.lightbox-pfeil {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; padding: 0;
}
.lightbox-pfeil.zurueck { left: 14px; }
.lightbox-pfeil.vor { right: 14px; }
.lightbox-pfeil:hover { background: rgba(255, 255, 255, .3); }
.lightbox-pfeil[hidden] { display: none; }
@media (max-width: 640px) {
  .gallery-pfeil { width: 36px; height: 36px; }
  .lightbox-pfeil { width: 40px; height: 40px; }
}

/* ---------- Artikelliste im Verkäufer-Dashboard (Jessicas Feedback 18.07.):
   Bild + Titel in einer Zelle, Titel auf 2 Zeilen gekürzt; mobil Karten ---------- */
.artikel-zelle { min-width: 240px; }
.artikel-link { display: flex; align-items: center; gap: 12px; }
.artikel-link .thumb { flex-shrink: 0; }
.titel-kurz {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35;
}
@media (max-width: 640px) {
  /* In der Karten-Ansicht steht Bild + Titel linksbündig über den Wert-Zeilen */
  .stack-table .artikel-zelle { justify-content: flex-start; min-width: 0; text-align: left; }
  .artikel-link { flex: 1; min-width: 0; }
  .artikel-link .thumb { width: 56px; height: 56px; }
}
