/* ============================================================
   HEPLA Webshop – Hauptstylesheet
   Markenfarben: #ffdf06 (Gelb), #1a1a1a (Dunkel), #ffffff (Hell)
   ============================================================
   HINWEIS Bug 13 (Firefox lädt CSS nicht):
   Firefox blockiert CSS wenn der Server text/plain statt text/css sendet.
   Fix in /etc/nginx/nginx.conf oder der Site-Config:
     include /etc/nginx/mime.types;
     types { text/css css; }
   Alternativ in der Django-settings.py sicherstellen dass
   django.contrib.staticfiles korrekt eingebunden ist.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');

/* ── CSS-Variablen ─────────────────────────────────────────── */
:root {
  --hepla-gelb:       #ffdf06;
  --hepla-gelb-dark:  #e6c800;
  --hepla-schwarz:    #1a1a1a;
  --hepla-grau:       #f4f4f4;
  --hepla-grau-mid:   #e0e0e0;
  --hepla-grau-text:  #111111;
  /* Shopadmin-Variablen-Aliase (Light Mode) */
  --gelb:    #ffdf06;
  --border:  #e0e0e0;
  --fg:      #1a1a1a;
  --fg2:     #555555;
  --fg3:     #888888;
  --bg:      #f4f4f4;
  --bg2:     #ffffff;
  --hepla-weiss:      #ffffff;
  --hepla-dunkel-bg:  #1e1e1e;
  --hepla-dunkel-card:#2a2a2a;
  --hepla-dunkel-text:#e8e8e8;
  --hepla-accent:     #ff5500;   /* Auslauf / Warnung */
  --hepla-gruen:      #2d8a4e;   /* verfügbar */

  --navbar-h:         64px;
  --topbar-h:         36px;
  --border-r:         6px;
  --shadow-sm:        0 2px 8px rgba(0,0,0,.08);
  --shadow-md:        0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:        0 8px 40px rgba(0,0,0,.16);
  --transition:       all .2s ease;

  --font-main:       'Barlow', sans-serif;
  --font-display:    'Barlow Condensed', sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
  --hepla-weiss:     #121212;
  --hepla-grau:      #1e1e1e;
  --hepla-grau-mid:  #2e2e2e;
  --hepla-grau-text: #e8e8e8;
  /* Shopadmin-Aliase dark */
  --gelb:   var(--hepla-gelb);
  --border: var(--hepla-grau-mid);
  --fg:     #e8e8e8;
  --fg2:    var(--hepla-grau-text);
  --fg3:    #666666;
  --bg:     var(--hepla-grau);
  --bg2:    #1a1a1a;
  --hepla-schwarz:   #f0f0f0;
  --shadow-sm:       0 2px 8px rgba(0,0,0,.5);
  --shadow-md:       0 4px 20px rgba(0,0,0,.6);
}

/* ── Reset & Basis ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--font-main);
  background: var(--hepla-weiss);
  color: var(--hepla-schwarz);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ══════════════════════════════════════════════════════════════
   SITE-HEADER – neu aufgebaut April 2026
   Drei Ebenen:
     .sh-main       – Logo · Suche · Aktionen (sticky)
     .sh-sub        – Warenkorb rechtsbündig
     .sh-yellow-bar – Burger-Menü (gelber Balken)
   Beim Scrollen: .sh-scrolled → Logo kleiner, sh-sub verschwindet
   ══════════════════════════════════════════════════════════════ */

/* ── Grundgerüst ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hepla-weiss);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  transition: box-shadow .2s ease;
}
.site-header.sh-scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,.13);
}

/* ── Zeile 1: Logo · Suche · Aktionen ───────────────────────── */
.sh-main {
  background: var(--hepla-weiss);
  overflow: visible;
}
.sh-main-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: .5rem;
  padding-bottom: .4rem;
  min-height: 64px;
  transition: min-height .2s ease, padding .2s ease;
}
.sh-scrolled .sh-main-inner {
  min-height: 48px;
  padding-top: .25rem;
  padding-bottom: .25rem;
}

/* Logo */
.sh-logo-link {
  flex-shrink: 0;
  display: flex;
  line-height: 0;
}
.sh-logo {
  height: 52px;
  width: auto;
  display: block;
  transition: height .2s ease;
}
.sh-scrolled .sh-logo {
  height: 34px;
}

/* Suchfeld */
.sh-search {
  flex: 1;
  max-width: 520px;
}

/* Aktionen rechts */
.sh-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Icon-Buttons (Dark Mode, Abmelden) */
.sh-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hepla-schwarz);
  font-size: 1.05rem;
  padding: .3rem .4rem;
  border-radius: 4px;
  line-height: 1;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
}
.sh-icon-btn:hover {
  background: var(--hepla-grau-mid);
}

/* Account-Link */
.sh-account-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--hepla-schwarz);
  text-decoration: none;
  padding: .3rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: background .15s;
}
.sh-account-link:hover { background: var(--hepla-grau-mid); }
.sh-account-name {
  display: none;
}
@media (min-width: 640px) {
  .sh-account-name { display: inline; }
}

/* Abmelden: nur Icon */
.sh-logout-btn { font-size: 1rem; }

/* Firma-Wechsler */
.sh-firmawechsler { display: inline; margin: 0; }
.sh-firmawechsler-select {
  background: transparent;
  border: 1px solid var(--hepla-grau-mid);
  border-radius: 4px;
  padding: .2rem .4rem;
  font-size: .8rem;
  cursor: pointer;
  color: var(--hepla-schwarz);
  max-width: 160px;
}

/* Flaggen-Button */
.sh-flag-btn {
  font-size: 1.5rem;
  padding: .1rem .3rem;
}

/* Flaggen-Dropdown – position:fixed, wird per JS ein/ausgeblendet (display:none initial) */
.sh-lang-wrap { position: relative; }
.sh-lang-menu {
  display: none;   /* JS setzt display:block beim Öffnen */
  position: fixed;
  z-index: 9999;
  background: var(--hepla-weiss);
  border: 1px solid var(--hepla-grau-mid);
  border-top: 2px solid var(--hepla-gelb);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  min-width: 160px;
  border-radius: 0 0 6px 6px;
}
.sh-lang-item {
  width: 100%;
  border: none;
  cursor: pointer;
  padding: .45rem .85rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .85rem;
  background: transparent;
  color: var(--hepla-schwarz);
  border-bottom: 1px solid var(--hepla-grau-mid);
  transition: background .1s;
}
.sh-lang-item:last-child { border-bottom: none; }
.sh-lang-item:hover,
.sh-lang-item.sh-lang-active { background: #fffbe6; font-weight: 700; }

/* ── Warenkorb im gelben Balken ──────────────────────────────── */
.sh-warenkorb {
  position: relative;
  display: flex;
  align-items: center;
  color: #000;
  font-size: 1.5rem;
  line-height: 1;
  padding: .1rem .3rem;
  border-radius: 4px;
  transition: background .15s;
  flex-shrink: 0;
}
.sh-warenkorb:hover { background: rgba(0,0,0,.08); }
.sh-warenkorb .warenkorb-badge {
  top: -4px;
  right: -6px;
}

/* ── Zeile 2 (sh-sub) entfernt – Warenkorb jetzt im gelben Balken ── */

/* ── Gelber Balken ───────────────────────────────────────────── */
.sh-yellow-bar {
  background: var(--hepla-gelb);
  position: relative;
  z-index: 999;
  overflow: visible;
}
.sh-yellow-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 40px;
  position: relative;
}

/* Burger-Button */
.sh-burger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #000;
  font-size: 1.9rem;
  line-height: 1;
  padding: 0 .3rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background .15s;
}
.sh-burger-btn:hover { background: rgba(0,0,0,.08); }

/* Dark Mode ─────────────────────────────────────────────────── */
[data-theme="dark"] .site-header,
[data-theme="dark"] .sh-main,
[data-theme="dark"] .sh-sub { background: #121212; }
[data-theme="dark"] .sh-main-inner { border-color: #2e2e2e; }
[data-theme="dark"] .sh-sub { border-top-color: #2e2e2e; }
[data-theme="dark"] .sh-icon-btn,
[data-theme="dark"] .sh-account-link { color: #e8e8e8; }
[data-theme="dark"] .sh-icon-btn:hover,
[data-theme="dark"] .sh-account-link:hover { background: #2e2e2e; }
[data-theme="dark"] .sh-firmawechsler-select { color: #e8e8e8; border-color: #2e2e2e; }
[data-theme="dark"] .sh-lang-menu { background: #1e1e1e; border-color: #2e2e2e; }
[data-theme="dark"] .sh-lang-item { color: #e8e8e8; border-color: #2e2e2e; }
[data-theme="dark"] .sh-lang-item:hover,
[data-theme="dark"] .sh-lang-item.sh-lang-active { background: #2a2400; }
[data-theme="dark"] .sh-yellow-bar { background: var(--hepla-gelb); }
[data-theme="dark"] .sh-warenkorb { color: #000; }

/* Mobile-Menü-Button: auf Desktop ausgeblendet ──────────────── */
/* Auf Mobilgeräten: sh-sub ausgeblendet, Warenkorb im mobilen Header */
@media (max-width: 767px) {
  .sh-search { max-width: none; }
  .sh-actions { gap: .25rem; }
}

/* ── Mobile-Header (nur Smartphone < 768px) ─────────────────── */
/* Desktop-Header auf Mobile ausblenden */
@media (max-width: 767px) {
  .sh-main        { display: none !important; }
  .sh-yellow-bar  { display: none !important; }
}

/* Mobile-Header selbst: auf Desktop ausblenden */
.sh-mobile-bar,
.sh-mobile-search { display: none !important; }

@media (max-width: 767px) {
  .sh-mobile-bar    { display: flex !important; }
  .sh-mobile-search { display: block !important; }
}

@media (max-width: 767px) {
  /* Kompakte obere Zeile: Logo · Warenkorb · Burger */
  .sh-mobile-bar {
    display: flex !important;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    background: var(--hepla-weiss);
    border-bottom: 1px solid var(--hepla-grau-mid);
    min-height: 52px;
  }

  /* Logo auf Mobile: kleiner */
  .sh-mobile-logo {
    height: 36px !important;
    width: auto;
  }

  /* Warenkorb im Mobile-Header */
  .sh-mobile-warenkorb {
    font-size: 1.5rem;
    color: var(--hepla-schwarz);
    position: relative;
    padding: .2rem .3rem;
  }

  /* Burger im Mobile-Header */
  .sh-mobile-burger {
    padding: .2rem .3rem;
  }

  /* Suchzeile unterhalb des Logo-Balkens */
  .sh-mobile-search {
    display: block !important;
    padding: .4rem .75rem .5rem;
    background: var(--hepla-weiss);
    border-bottom: 3px solid var(--hepla-gelb);
  }
}

/* Dark Mode für Mobile-Header */
[data-theme="dark"] .sh-mobile-bar,
[data-theme="dark"] .sh-mobile-search {
  background: #121212;
  border-color: #2e2e2e;
}
[data-theme="dark"] .sh-mobile-warenkorb,
[data-theme="dark"] .sh-mobile-burger { color: #e8e8e8; }

/* Altes .hepla-navbar-nav (gelber Balken) – Compat ─────────── */
.hepla-navbar-nav {
  background: var(--hepla-gelb);
  position: relative;
  z-index: 999;
  overflow: visible;
}

/* ── Suchfeld ───────────────────────────────────────────────── */
.hepla-search {
  position: relative;
  flex: 1;
  max-width: 480px;
}
.hepla-search input {
  width: 100%;
  border: 2px solid var(--hepla-grau-mid);
  border-radius: 24px;
  padding: .45rem 1rem .45rem 2.8rem;
  font-family: var(--font-main);
  font-size: .9rem;
  background: var(--hepla-grau);
  color: var(--hepla-schwarz);
  transition: var(--transition);
  outline: none;
}
.hepla-search input:focus {
  border-color: var(--hepla-gelb);
  background: var(--hepla-weiss);
  box-shadow: 0 0 0 3px rgba(255,223,6,.2);
}
.hepla-search .search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hepla-grau-text);
  pointer-events: none;
}
.hepla-search .search-clear {
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--hepla-grau-text);
  cursor: pointer;
  display: none;
  font-size: 1rem;
}

/* Live-Suche Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--hepla-weiss);
  border: 2px solid var(--hepla-gelb);
  border-radius: var(--border-r);
  box-shadow: var(--shadow-md);
  max-height: 420px;
  overflow-y: auto;
  z-index: 2000;
  display: none;
}
.search-dropdown.active { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--hepla-grau-mid);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--hepla-grau); }
.search-result-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--hepla-grau);
}
.search-result-item .sri-name {
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.3;
}
.search-result-item .sri-artnr {
  font-size: .76rem;
  color: var(--hepla-grau-text);
}
.search-result-item .sri-preis {
  margin-left: auto;
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
  color: var(--hepla-schwarz);
}

/* ── Haupt-Navigation ───────────────────────────────────────── */
.hepla-navbar-nav {
  background: var(--hepla-gelb);
  position: relative;
  z-index: 999;
}

.hepla-mainnav-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-item > a {
  display: block;
  padding: .65rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #000;           /* immer schwarz auf gelbem Grund */
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-item > a:hover,
.nav-item.active > a,
.nav-item.dropdown-offen > a {
  background: #000;
  color: var(--hepla-gelb);
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  max-width: 300px;
  background: var(--hepla-weiss);
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--hepla-gelb);
  border-radius: 0 0 var(--border-r) var(--border-r);
  z-index: 1100;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-item.dropdown-offen .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block;
  padding: .5rem 1.1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--hepla-schwarz);
  border-bottom: 1px solid var(--hepla-grau-mid);
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition);
}
.nav-dropdown li:last-child a { border-bottom: none; }
.nav-dropdown li a:hover {
  background: var(--hepla-grau);
  padding-left: 1.5rem;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.hepla-breadcrumb {
  padding: .17rem 0;
  font-size: .82rem;
  color: var(--hepla-grau-text);
}
.hepla-breadcrumb a { color: var(--hepla-grau-text); }
.hepla-breadcrumb a:hover { color: var(--hepla-schwarz); text-decoration: underline; }
.hepla-breadcrumb .sep { margin: 0 .4rem; }
.hepla-breadcrumb .current { font-weight: 600; color: var(--hepla-schwarz); }

/* ── Artikel-Kacheln ────────────────────────────────────────── */
.artikel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.artikel-kachel {
  background: var(--hepla-weiss);
  border: 1px solid var(--hepla-grau-mid);
  border-radius: var(--border-r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}
.artikel-kachel:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--hepla-gelb);
}

.kachel-bild {
  aspect-ratio: 1;
  background: var(--hepla-grau);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: .75rem;
  position: relative;
}
.kachel-bild img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}
.artikel-kachel:hover .kachel-bild img { transform: scale(1.04); }
.artikel-kachel:hover .kachel-bild.hat-clip img { transform: none; opacity: 0; }
.artikel-kachel:hover .kachel-bild.hat-clip video { opacity: 1; }
.kachel-bild.hat-clip img { transition: opacity .2s ease; }
.kachel-bild.hat-clip:hover img { opacity: 0; transform: none; }
.kachel-bild.hat-clip video {
  position: absolute;
  inset: .75rem;
  width: calc(100% - 1.5rem);
  height: calc(100% - 1.5rem);
  object-fit: contain;
  background: var(--hepla-weiss);
  opacity: 0;
  transition: opacity .2s ease;
}
.kachel-bild.hat-clip:hover video { opacity: 1; }

.kachel-body {
  padding: .75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.kachel-artnr {
  font-size: .72rem;
  color: var(--hepla-grau-text);
  font-weight: 500;
  letter-spacing: .03em;
}
.kachel-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.25;
  color: var(--hepla-schwarz);
  flex: 1;
}

/* Sticker-Reihe */
.kachel-sticker {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: .2rem;
}
.kachel-sticker img {
  height: 44px;
  width: auto;
}

/* Farbpunkte */
.kachel-farben {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: .3rem;
  align-items: center;
}
/* Eine Variantengruppe = mehrere überlappende Punkte */
.farb-gruppe {
  display: flex;
  flex-direction: row;
}
.farb-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.2);
  display: inline-block;
  flex-shrink: 0;
  margin-left: -4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6);
}
.farb-dot--regenbogen {
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
}
.farb-dot--groesse {
  background: var(--hepla-grau-mid);
  font-size: 6px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #333;
  line-height: 1;
}
.farb-dot--textur-F {
  background-image: url('/static/img/F.png');
  background-size: cover;
  background-blend-mode: screen;
}
.farb-dot--textur-T {
  background-image: url('/static/img/T.png');
  background-size: cover;
  background-blend-mode: screen;
}
.farb-dot--textur-S {
  background-image: url('/static/img/S.png');
  background-size: cover;
  background-blend-mode: multiply;
}
.farb-dot--textur-G {
  background-image: url('/static/img/G.png');
  background-size: cover;
  background-blend-mode: multiply;
}
.farb-gruppe .farb-dot:first-child { margin-left: 0; }
.farb-dot.mehr {
  background: var(--hepla-grau-mid);
  font-size: .55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hepla-grau-text);
  font-weight: 700;
  border: 1.5px solid var(--hepla-grau-mid);
  margin-left: 2px;
}

/* Preis */
.kachel-preis {
  margin-top: auto;
  padding-top: .5rem;
  border-top: 1px solid var(--hepla-grau-mid);
  font-size: .78rem;
  color: var(--hepla-grau-text);
}
.kachel-preis .ab { font-size: .7rem; }
.kachel-preis .preis-wert {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hepla-schwarz);
}
.kachel-preis .netto-hint {
  font-size: .7rem;
  color: var(--hepla-grau-text);
}

/* Neuheit-Badge */
.kachel-badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

/* ── Artikeldetail-Seite ────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* Bildgalerie */
.galerie-haupt {
  aspect-ratio: 1;
  background: var(--hepla-grau);
  border-radius: var(--border-r);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='7' fill='none' stroke='%23333' stroke-width='2'/%3E%3Cline x1='15' y1='15' x2='21' y2='21' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='10' y1='7' x2='10' y2='13' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='7' y1='10' x2='13' y2='10' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, zoom-in;
}
.galerie-haupt img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}
.galerie-haupt video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: default;
}
.galerie-thumbs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}
.galerie-thumb {
  width: 96px;
  height: 96px;
  background: var(--hepla-grau);
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.galerie-thumb.active,
.galerie-thumb:hover { border-color: var(--hepla-gelb); }
.galerie-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.galerie-thumb-clip { position: relative; }
.galerie-thumb-clip video { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.clip-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--hepla-gelb);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  pointer-events: none;
  opacity: .85;
}
.galerie-thumb-clip:hover .clip-play-icon { opacity: 1; }

/* Varianten-Auswahl */
.varianten-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .75rem 0;
  /* Chrome streckt flex-items sonst auf volle Höhe → Oval statt Kreis */
  align-items: flex-start;
}
.variante-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 3px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  background: transparent;
  color: inherit;
  line-height: 0;
  /* Verhindert Oval in Chrome: flex-shrink auf 0, kein width-stretch */
  flex-shrink: 0;
  align-self: flex-start;
}
.variante-btn.active {
  border-color: var(--hepla-schwarz);
}
.variante-btn:hover { border-color: var(--hepla-grau-text); }

/* Farbpunkte in Varianten-Buttons */
.variante-btn .farb-gruppe {
  display: flex;
  flex-direction: row;
  /* Negativer margin über gap statt margin-left auf Dots –
     konsistenter zwischen Chrome und Firefox */
  gap: 0;
}
.variante-btn .farb-dot {
  width: 26px;
  height: 26px;
  /* Normaler negativer margin ohne position:relative –
     funktioniert in Chrome und Firefox identisch */
  margin-left: -6px;
  /* Trennring zwischen überlappenden Dots (halbtransparent, hintergrundsicher) */
  box-shadow: 0 0 0 2px rgba(255,255,255,.8);
}
.variante-btn .farb-gruppe .farb-dot:first-child {
  margin-left: 0;
  box-shadow: none;
}

/* ── Detail-Tabs ────────────────────────────────────────────── */
.detail-tabs {
  margin-top: 2rem;
}
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--hepla-grau-mid);
  overflow-x: auto;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  padding: .6rem 1.2rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
  color: var(--hepla-grau-text);
  transition: var(--transition);
}
.tab-btn.active {
  border-bottom-color: var(--hepla-gelb);
  color: var(--hepla-schwarz);
}
.tab-btn:hover { color: var(--hepla-schwarz); }
.tab-panel { display: none; padding: 1.25rem 0; }
.tab-panel.active { display: block; }

/* ── Druckkonfigurator ──────────────────────────────────────── */
.druck-panel {
  background: var(--hepla-grau);
  border-radius: var(--border-r);
  padding: 1.25rem;
  border: 1px solid var(--hepla-grau-mid);
}
.druck-panel h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.druck-kalkulation {
  background: var(--hepla-grau-mid);
  color: var(--fg);
  border-radius: var(--border-r);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.druck-kalkulation .kalk-zeile {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  margin-bottom: .1rem;
}
.druck-kalkulation .kalk-gesamt {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 800;
  padding-top: .5rem;
  border-top: 2px solid var(--fg);
  margin-top: .2rem;
}

/* ── Warenkorb-Button ───────────────────────────────────────── */
.btn-warenkorb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem;
  background: var(--hepla-gelb) !important;
  color: #000 !important;
  border: none;
  border-radius: var(--border-r);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  transition: var(--transition);
  margin-top: .75rem;
}
.btn-warenkorb:hover {
  background: #000 !important;
  color: var(--hepla-gelb) !important;
}
[data-theme="dark"] .btn-warenkorb {
  background: var(--hepla-gelb) !important;
  color: #000 !important;
}
[data-theme="dark"] .btn-warenkorb:hover {
  background: #fff !important;
  color: #000 !important;
}

/* ── sa-btn: Shop-Aktions-Buttons (Warenkorb, 3D-Vorschau) ───── */
.sa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem;
  border: none;
  border-radius: var(--border-r);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.sa-btn-primary {
  background: var(--hepla-gelb);
  color: #000;
}
.sa-btn-primary:hover {
  background: #000;
  color: var(--hepla-gelb);
}
[data-theme="dark"] .sa-btn-primary {
  background: var(--hepla-gelb);
  color: #000;
}
[data-theme="dark"] .sa-btn-primary:hover {
  background: #fff;
  color: #000;
}
.sa-btn-secondary {
  background: var(--hepla-schwarz);
  color: var(--hepla-gelb);
  border: 2px solid var(--hepla-schwarz);
}
.sa-btn-secondary:hover {
  background: var(--hepla-gelb);
  color: #000;
  border-color: var(--hepla-gelb);
}
[data-theme="dark"] .sa-btn-secondary {
  background: #2a2a2a;
  color: var(--hepla-gelb);
  border-color: #444;
}
[data-theme="dark"] .sa-btn-secondary:hover {
  background: var(--hepla-gelb);
  color: #000;
  border-color: var(--hepla-gelb);
}
/* sa-btn-sm: kleine Variante für Inline-Buttons (Drehen, Reset, etc.) */
.sa-btn.sa-btn-sm {
  width: auto;
  padding: .32rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 6px;
  display: inline-flex;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  background: transparent;
  color: var(--hepla-schwarz);
  border: 2px solid var(--hepla-grau-mid);
  border-radius: var(--border-r);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover {
  border-color: var(--hepla-gelb);
  background: var(--hepla-gelb);
  color: #000; /* immer schwarz auf gelb */
}
/* Aktiver Kategorie-Button: gelber Hintergrund → schwarze Schrift */
.btn-secondary[style*="hepla-gelb"] {
  color: #000 !important;
}

/* ── Warenkorb-Icon ─────────────────────────────────────────── */
.warenkorb-icon {
  position: relative;
  display: flex;
  align-items: center;
  align-self: flex-end;
  color: var(--hepla-schwarz);
  cursor: pointer;
  transition: var(--transition);
}
.warenkorb-icon:hover { color: var(--hepla-gelb); }
.warenkorb-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--hepla-schwarz);
  color: var(--hepla-gelb);
  font-size: .65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Tabellen ───────────────────────────────────────────────── */
.hepla-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.hepla-table th {
  background: var(--hepla-grau);
  font-weight: 700;
  text-align: left;
  padding: .55rem .75rem;
  border-bottom: 2px solid var(--hepla-gelb);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hepla-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--hepla-grau-mid);
  vertical-align: middle;
}
.hepla-table tr:last-child td { border-bottom: none; }
.hepla-table tr:hover td { background: var(--hepla-grau); }
.hepla-table .ampel-gruen { color: var(--hepla-gruen); font-weight: 700; }
.hepla-table .ampel-gelb  { color: #d4840a; font-weight: 700; }
.hepla-table .ampel-rot   { color: var(--hepla-accent); font-weight: 700; }
.hepla-table .ampel-grau  { color: var(--hepla-grau-text); }

/* ── Staffelpreistabelle ────────────────────────────────────── */
.staffel-table {
  width: 100%;
  border-collapse: collapse;
}
.staffel-table th {
  background: var(--hepla-schwarz);
  color: var(--hepla-gelb);
  padding: .45rem .75rem;
  text-align: right;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.staffel-table th:first-child { text-align: left; }
.staffel-table td {
  padding: .45rem .75rem;
  text-align: right;
  border-bottom: 1px solid var(--hepla-grau-mid);
}
.staffel-table td:first-child { text-align: left; font-weight: 600; }
.staffel-table tr.highlight td {
  background: rgba(255,223,6,.15);
  font-weight: 700;
}

/* ── Formulare ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: .3rem;
  color: var(--hepla-schwarz);
}
.form-group label .req { color: var(--hepla-accent); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: .55rem .85rem;
  border: 2px solid var(--hepla-grau-mid);
  border-radius: var(--border-r);
  font-family: var(--font-main);
  font-size: .9rem;
  background: var(--hepla-weiss);
  color: var(--hepla-schwarz);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--hepla-gelb);
  box-shadow: 0 0 0 3px rgba(255,223,6,.2);
}
.form-control.is-invalid { border-color: var(--hepla-accent); }
.form-error { color: var(--hepla-accent); font-size: .78rem; margin-top: .25rem; }
.form-hint { color: var(--hepla-grau-text); font-size: .78rem; margin-top: .25rem; }

select.form-control { cursor: pointer; }

/* ── Cards / Boxen ──────────────────────────────────────────── */
.hepla-card {
  background: var(--hepla-weiss);
  border: 1px solid var(--hepla-grau-mid);
  border-radius: var(--border-r);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.hepla-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--hepla-gelb);
}

/* ── Ampel ──────────────────────────────────────────────────── */
.ampel { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .85rem; }
.ampel::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ampel-gruen::before { background: var(--hepla-gruen); }
.ampel-gelb::before  { background: #d4840a; }
.ampel-rot::before   { background: var(--hepla-accent); }
.ampel-grau::before  { background: var(--hepla-grau-text); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--border-r);
  font-size: .88rem;
  margin-bottom: 1rem;
}
.alert-success { background: rgba(45,138,78,.1); border-left: 4px solid var(--hepla-gruen); color: var(--hepla-gruen); }
.alert-error   { background: rgba(255,85,0,.08); border-left: 4px solid var(--hepla-accent); color: var(--hepla-accent); }
.alert-info    { background: rgba(255,223,6,.15); border-left: 4px solid var(--hepla-gelb); color: var(--hepla-schwarz); }

/* ── Footer ─────────────────────────────────────────────────── */
.hepla-footer {
  background: #1a1a1a;   /* immer dunkel, unabhängig vom Theme */
  color: #aaa;
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
  font-size: .85rem;
}
.hepla-footer h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--hepla-gelb);
  margin-bottom: .75rem;
}
.hepla-footer p { color: #aaa; }
.hepla-footer a { color: #aaa; transition: var(--transition); }
.hepla-footer a:hover { color: var(--hepla-gelb); }
.hepla-footer .footer-bottom {
  border-top: 1px solid #333;
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
  font-size: .78rem;
  color: #777;
}

/* ── Utilities ──────────────────────────────────────────────── */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--hepla-grau-text); }
.text-gelb  { color: var(--hepla-gelb); }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.ms-auto { margin-left: auto; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .hepla-mainnav { display: none; }
}
@media (max-width: 576px) {
  .artikel-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
}
@media (max-width: 400px) {
  .sh-search { min-width: 0; }
  .sh-actions { gap: .15rem; }
}

/* ── Mobile-Menü ────────────────────────────────────────────── */
/* .mobile-menu-btn entfernt – Burger im gelben Balken übernimmt */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--hepla-weiss);
  z-index: 2000;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 3px solid var(--hepla-gelb);
  position: sticky;
  top: 0;
  background: var(--hepla-weiss);
  z-index: 1;
}
.mobile-nav-item {
  border-bottom: 1px solid var(--hepla-grau-mid);
}
.mobile-nav-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
}
.mobile-nav-sub { display: none; background: var(--hepla-grau); }
.mobile-nav-sub.open { display: block; }
.mobile-nav-sub a {
  display: block;
  padding: .65rem 1.75rem;
  font-size: .9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--hepla-grau-mid);
}

/* ── Upload-Bereich ─────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--hepla-grau-mid);
  border-radius: var(--border-r);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--hepla-grau);
  /* Bug 7: 2–3× breiter/höher für Standskizzen */
  min-height: 220px;
  width: 100%;
  box-sizing: border-box;
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--hepla-gelb);
  background: rgba(255,223,6,.08);
}
.upload-preview {
  max-width: 96px;
  max-height: 80px;
  object-fit: contain;
  margin: .5rem auto 0;
  border-radius: 4px;
}
/* Bug 7: Standskizze und Upload-Thumbnail größer anzeigen */
.upload-area .standskizze-img,
.upload-area .upload-thumbnail {
  max-height: 180px;
  max-width: 100%;
  object-fit: contain;
}

/* ── HTMX Loading ───────────────────────────────────────────── */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator  { opacity: 1; }

/* Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--hepla-grau-mid);
  border-top-color: var(--hepla-schwarz);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Lager-Ampel in Tabellen ─────────────────────────────────── */
.lager-ampel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 600;
}
.lager-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lager-dot.gruen  { background: var(--hepla-gruen); }
.lager-dot.gelb   { background: #d4840a; }
.lager-dot.rot    { background: var(--hepla-accent); }
.lager-dot.grau   { background: var(--hepla-grau-text); }

/* ── Page-Transitions (HTMX) ────────────────────────────────── */
/* page-fade-in deaktiviert */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Druckmindestmengen-Hinweis ─────────────────────────────── */
#druck-mindest-hinweis {
  color: #222;
  font-size: .78rem;
  margin-top: .3rem;
}
[data-theme="dark"] #druck-mindest-hinweis {
  color: var(--hepla-gelb);
}

/* ── Kalkulation: Kontrast-Fixes ────────────────────────────── */
.druck-kalkulation .kalk-zeile,
.druck-kalkulation .kalk-gesamt,
.druck-kalkulation p,
.druck-kalkulation span,
.druck-kalkulation div {
  color: var(--fg);
}
.druck-kalkulation .kalk-zeile span[style*="opacity"] {
  color: rgba(26,26,26,.6);
}
[data-theme="dark"] .druck-kalkulation .kalk-zeile span[style*="opacity"] {
  color: rgba(232,232,232,.6);
}

/* ── Banner (Startseite) ────────────────────────────────────── */
.banner-container {
  width: 100%;
  margin-bottom: 2rem;
  /* Bei mehreren Bannern: nebeneinander scrollbar (Karussell-Alternative) */
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.banner-container::-webkit-scrollbar { display: none; }

.banner-link {
  display: block;
  text-decoration: none;
  flex-shrink: 0;
  width: 100%;
  scroll-snap-align: start;
}

.banner-slide {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: var(--border-r);
  overflow: hidden;
  background: var(--hepla-grau);
}

.banner-bild {
  width: 100%;
  height: auto;
  /* Responsives Seitenverhältnis statt fester max-height:
     Banner skaliert beim Zoomen mit, kein Abschneiden. */
  aspect-ratio: 16 / 5;
  object-fit: cover;
  display: block;
}

.banner-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
}

.banner-ueberschrift {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 .25rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.banner-unterzeile {
  font-size: clamp(.85rem, 1.5vw, 1rem);
  color: rgba(255,255,255,.9);
  margin: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

@media (max-width: 640px) {
  .banner-bild { aspect-ratio: 4 / 3; }
  .banner-text { padding: 1rem; }
}

/* Dark Mode: code/badge lesbar */
[data-theme="dark"] code { color: #e8e8e8; background: #2a2a2a; }
[data-theme="dark"] .sa-table td code { color: #e8e8e8; background: #333; }

/* ── Dark Mode: Lesbarkeit ──────────────────────────────────── */
[data-theme="dark"] code {
  color: #e8e8e8 !important;
  background: #333 !important;
}
[data-theme="dark"] .sa-table td code,
[data-theme="dark"] table td code {
  color: #e8e8e8 !important;
  background: #2a2a2a !important;
}
/* Texte mit Grey-Farben → schwarz (Light) / weiß (Dark) */
.muted,
[style*="color:#aaa"],[style*="color:#888"],[style*="color:#888888"],
[style*="color:#666"],[style*="color:#666666"],[style*="color:#555"],
[style*="color:#555555"],[style*="color:#444"],[style*="color:#999"] {
  color: #111 !important;
}
[data-theme="dark"] .muted,
[data-theme="dark"] [style*="color:#aaa"],[data-theme="dark"] [style*="color:#888"],
[data-theme="dark"] [style*="color:#888888"],[data-theme="dark"] [style*="color:#666"],
[data-theme="dark"] [style*="color:#666666"],[data-theme="dark"] [style*="color:#555"],
[data-theme="dark"] [style*="color:#555555"],[data-theme="dark"] [style*="color:#444"],
[data-theme="dark"] [style*="color:#999"] {
  color: #e8e8e8 !important;
}
/* Status-Badges im Dark Mode lesbar */
[data-theme="dark"] [style*="background:#fff3cd"] {
  background: #3a2e00 !important;
  color: #ffd54f !important;
}
[data-theme="dark"] [style*="background:#cfe2ff"] {
  background: #0a1628 !important;
  color: #90caf9 !important;
}
[data-theme="dark"] [style*="background:#d1e7dd"] {
  background: #0a2018 !important;
  color: #81c995 !important;
}
[data-theme="dark"] [style*="background:#f8d7da"] {
  background: #2a0a0a !important;
  color: #f48fb1 !important;
}
[data-theme="dark"] [style*="background:#ffe5d0"] {
  background: #2a1500 !important;
  color: #ffab76 !important;
}

/* ── Farbreduzier-Hinweis ───────────────────────────────────────────────── */
.farbreduzier-hinweis {
  color: #000;
  font-size: .75rem;
  font-weight: 700;
}
[data-theme="dark"] .farbreduzier-hinweis {
  color: var(--hepla-gelb);
}

/* druck-kalkulation dark via --fg/--hepla-grau-mid */

/* ── Farbveränderungspanel ───────────────────────────────────────────────── */
.bild-werkzeuge {
  background: var(--bg2) !important;
  border-color: var(--hepla-grau-mid) !important;
  color: var(--fg);
}
.bild-werkzeuge span,
.bild-werkzeuge .bild-adj-wert,
.bild-werkzeuge .transp-toleranz-wert,
.bild-werkzeug-status {
  color: var(--fg2) !important;
}
.bild-werkzeuge .bild-adj-slider,
.bild-werkzeuge .transp-toleranz {
  accent-color: var(--hepla-gelb);
}

/* ── Kalkulations-Hinweis (gesperrt / Menge fehlt) ─────────────────────── */
.druck-kalkulation--hinweis {
  color: var(--fg2) !important;
}

/* ── Kalkulations-Box Dark Mode explizit ───────────────────────────────── */
[data-theme="dark"] .druck-kalkulation {
  background: #2a2a2a !important;
  color: #e8e8e8 !important;
  border: 1px solid #444;
}
[data-theme="dark"] .druck-kalkulation .kalk-zeile,
[data-theme="dark"] .druck-kalkulation .kalk-gesamt,
[data-theme="dark"] .druck-kalkulation p,
[data-theme="dark"] .druck-kalkulation span,
[data-theme="dark"] .druck-kalkulation div {
  color: #e8e8e8 !important;
}
[data-theme="dark"] .druck-kalkulation .kalk-gesamt {
  border-top-color: #888 !important;
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE – Nachträglich ergänzte Korrekturen
   ══════════════════════════════════════════════════════════════ */

/* ── 3D-Vorschau-Modal ──────────────────────────────────────── */
/* Das Modal setzt background:var(--hepla-bg,#fff) – im Dark Mode
   greift der Fallback #fff. Wir überschreiben mit CSS-Variablen. */
[data-theme="dark"] #vorschau-hinweis-overlay > div,
[data-theme="dark"] [id^="vorschau-hinweis"] > div {
  background: var(--hepla-grau, #1e1e1e) !important;
  color: var(--fg, #e8e8e8) !important;
}
[data-theme="dark"] #vorschau-hinweis-overlay p,
[data-theme="dark"] #vorschau-hinweis-overlay strong {
  color: var(--fg, #e8e8e8) !important;
}
[data-theme="dark"] #vorschau-hinweis-overlay span[style*="color:#888"],
[data-theme="dark"] #vorschau-hinweis-overlay .bi-hourglass-split {
  color: #aaa !important;
}

/* ── "Bild entfernen"-Button ────────────────────────────────── */
/* color:#000 ist inline gesetzt – CSS-Variable kann es nicht
   direkt überschreiben, daher expliziter dark-Selektor */
[data-theme="dark"] .upload-loeschen {
  color: var(--fg, #e8e8e8) !important;
}

/* ── sa-btn-secondary / btn-secondary allgemein ─────────────── */
/* Falls noch nicht abgedeckt: helle Buttons mit dunklem Text */
[data-theme="dark"] .btn-secondary {
  background: #2e2e2e;
  color: #e8e8e8;
  border-color: #444;
}
[data-theme="dark"] .btn-secondary:hover {
  background: #3a3a3a;
  color: #fff;
}

/* ── Inline background:#f8f9fa / #f5f5f5 / #f0f0f0 ─────────── */
[data-theme="dark"] [style*="background:#f8f9fa"],
[data-theme="dark"] [style*="background:#f5f5f5"],
[data-theme="dark"] [style*="background:#f0f0f0"],
[data-theme="dark"] [style*="background:#fafafa"],
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background:#fff"] {
  background: var(--hepla-grau, #1e1e1e) !important;
  color: var(--fg, #e8e8e8) !important;
}

/* ── Inline color:#000 / color:#111 / color:#222 ────────────── */
/* Schwarze Schrift auf dunklem Hintergrund */
[data-theme="dark"] [style*="color:#000"],
[data-theme="dark"] [style*="color:#111"],
[data-theme="dark"] [style*="color:#222"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color:black"],
[data-theme="dark"] [style*="color:#000000"] {
  color: var(--fg, #e8e8e8) !important;
}

/* Ausnahme: Knöpfe mit Themenfarbe (gelb) und Tabellenheader –
   dort soll schwarz auf gelb/themenfarbe bleiben */
[data-theme="dark"] .btn-warenkorb [style*="color:#000"],
[data-theme="dark"] .btn-warenkorb [style*="color:#111"],
[data-theme="dark"] th[style*="color:#000"],
[data-theme="dark"] th[style*="color:#111"],
[data-theme="dark"] [style*="background:var(--hepla-gelb)"] [style*="color:#000"],
[data-theme="dark"] [style*="background:var(--hepla-gelb)"] [style*="color:#111"] {
  color: #000 !important;
}

/* ── Modal-Backdrops generell ───────────────────────────────── */
/* Alle per JS erzeugten Modals mit background:#fff / white */
[data-theme="dark"] .modal-inhalt,
[data-theme="dark"] .hepla-modal > div,
[data-theme="dark"] [id$="-modal"] > div:not([style*="background:var(--hepla-gelb)"]) {
  background: var(--hepla-grau, #1e1e1e) !important;
  color: var(--fg, #e8e8e8) !important;
  border-color: var(--hepla-grau-mid, #2e2e2e) !important;
}

/* ── Galerie-Overlay / Upload-Bereich ───────────────────────── */
[data-theme="dark"] .galerie-overlay,
[data-theme="dark"] .upload-bereich,
[data-theme="dark"] .logo-upload-label {
  background: #2a2a2a !important;
  color: var(--fg, #e8e8e8) !important;
  border-color: #444 !important;
}

/* ── Druckflächen-Block ─────────────────────────────────────── */
[data-theme="dark"] .flaeche-details {
  background: var(--bg2, #1a1a1a) !important;
  border-color: var(--hepla-grau-mid, #2e2e2e) !important;
  color: var(--fg, #e8e8e8) !important;
}

/* ── Status-Badges (inline helle Hintergründe) ──────────────── */
/* z.B. Bestellstatus-Badges – werden bereits durch
   [style*="background:#fff3cd"] etc. oben abgedeckt */

/* ── account.html Bestelltabelle ────────────────────────────── */
[data-theme="dark"] .bestellung-tabelle td,
[data-theme="dark"] .bestellung-tabelle th {
  border-color: var(--hepla-grau-mid, #2e2e2e) !important;
}
[data-theme="dark"] .bestellung-tabelle tr:hover td {
  background: #252525 !important;
}

/* ── Hauptmenü Dark Mode ────────────────────────────────────── */
[data-theme="dark"] .sh-burger-menu,
[data-theme="dark"] .burger-e2-panel {
  background: #2a2a2a !important;
  border-color: #3a3a3a !important;
}
[data-theme="dark"] .burger-e1-link,
[data-theme="dark"] .burger-e2-link {
  color: #e8e8e8 !important;
  border-bottom-color: #3a3a3a !important;
}
[data-theme="dark"] .burger-e1-link:hover,
[data-theme="dark"] .burger-e2-link:hover {
  background: #383838 !important;
  color: #fff !important;
}
[data-theme="dark"] .burger-active {
  color: var(--hepla-gelb) !important;
}
/* Silberpfote SVG: im Dark Mode invertieren */
[data-theme="dark"] .burger-e1-link img[alt="Silberpfote"],
[data-theme="dark"] .mobile-nav-item img[alt="Silberpfote"] {
  filter: invert(1);
}

/* ── Warenkorb-Badge Dark Mode ──────────────────────────────── */
[data-theme="dark"] .warenkorb-badge {
  background: #111 !important;
  color: var(--hepla-gelb) !important;
}

/* ── Warenkorb-Badge Dark Mode (erhöhte Spezifität) ────────── */
[data-theme="dark"] .sh-yellow-bar .warenkorb-badge,
[data-theme="dark"] .sh-mobile-bar .warenkorb-badge,
[data-theme="dark"] .sh-warenkorb .warenkorb-badge {
  background: #111 !important;
  color: var(--hepla-gelb) !important;
}
