:root {
  --bg: #0f1419;
  --paper: #161b22;
  --paper-2: #1c2330;
  --text: #e6edf3;
  --muted: #9ba7b4;
  /* Fließtext / Labels — an Produktbeschreibung (links) angeglichen, dunkler als reines --muted */
  --text-body: color-mix(in srgb, var(--text) 88%, var(--muted));
  --border: #2a3441;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --danger: #f87171;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, "Segoe UI", Roboto, sans-serif;
  /* Header / Logo (Admin Design → logoHeight, logoMaxWidth, headerPadY) */
  --logo-height: 2.1rem;
  --logo-max-width: 14rem;
  --header-pad-y: 0.85rem;
  --header-bg: color-mix(in srgb, var(--bg) 88%, transparent);
  /* Text on accent gradients / solid pills */
  --on-accent: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { width: min(1280px, calc(100% - 2rem)); margin: 0 auto; }

.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: var(--header-pad-y) 0;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; min-width: 0; }
.brand strong { font-size: 1.15rem; letter-spacing: 0.02em; }
.brand span, .brand .brand-tag { color: var(--muted); font-size: 0.9rem; }
.brand-logo {
  display: block;
  height: var(--logo-height);
  width: auto;
  max-width: min(100%, var(--logo-max-width));
  object-fit: contain;
}
/* Alternativ-Logo Dunkelmodus */
.brand-logo--dark { display: none; }
html[data-theme="dark"] .brand-logo--light { display: none; }
html[data-theme="dark"] .brand-logo--dark { display: block; }
html[data-theme="light"] .brand-logo--light { display: block; }
html[data-theme="light"] .brand-logo--dark { display: none; }
.header-note {
  padding: 0 0 0.65rem;
  color: var(--text-body);
  font-size: 0.85rem;
}
.top-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  z-index: 2;
}
.site-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text);
  text-decoration: none !important;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent-2); }
.site-nav a[aria-current="page"] { color: var(--accent-2); }

/* Burger */
.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--text);
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
body.nav-open .nav-toggle-bars { background: transparent; }
body.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.nav-backdrop {
  display: none;
}

.cart-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); font-weight: 700; border-radius: 999px;
  padding: 0.35rem 0.75rem; text-decoration: none !important;
}
.cart-pill .cart-icon {
  display: block;
  flex: 0 0 auto;
  color: var(--on-accent);
  fill: currentColor;
}
.cart-pill #cart-count { min-width: 1.1rem; text-align: center; color: var(--on-accent); }

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .top-inner {
    flex-wrap: nowrap;
  }
  .brand .brand-tag,
  .brand > span:not(.brand-tag) {
    display: none;
  }
  .site-nav {
      display: none;
      position: absolute;
      left: 0;
      right: 0;
      top: calc(100% - 1px);
      margin: 0;
      padding: 0.75rem 1rem 1rem;
      flex-direction: column;
      align-items: stretch;
      gap: 0.25rem;
      background: color-mix(in srgb, var(--paper) 96%, var(--bg));
      border-bottom: 1px solid var(--border);
      box-shadow: var(--shadow);
      z-index: 25;
    }
  .site-nav[data-open="true"] {
    display: flex;
  }
  .site-nav a {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid transparent;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: var(--paper);
    border-color: var(--border);
    text-decoration: none !important;
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 15;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }
  .nav-backdrop[hidden] { display: none !important; }
  body.nav-open {
    overflow: hidden;
  }
}

@media (min-width: 801px) {
  .top-actions-bar {
    order: 3;
  }
  .site-nav {
    order: 2;
    margin-left: auto;
    margin-right: 0.75rem;
  }
  .top-actions-bar .cart-pill {
    /* cart sits after nav on desktop via flex order on parent */
  }
  .top-inner {
    display: flex;
  }
  /* desktop: brand | nav links | cart (no burger) */
  .top-actions-bar { margin-left: 0; }
  .site-nav { margin-left: auto; }
}

.hero {
  padding: 1.75rem 0 0.5rem;
  background:
    radial-gradient(900px 320px at 12% -10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 62%),
    radial-gradient(700px 280px at 92% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 58%);
}
.hero-panel {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.9fr);
  align-items: stretch;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow, 0 8px 28px color-mix(in srgb, #000 12%, transparent));
}
@media (max-width: 900px) {
  .hero-panel {
    grid-template-columns: 1fr;
    padding: 1.25rem 1.15rem;
  }
}
.hero-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-copy > p#home-hero-text {
  margin: 0 0 1.15rem;
  color: var(--text-body);
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
  align-items: center;
}
.hero-usps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.hero-usps li {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
  background: var(--paper-2);
}
.hero-usps strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.hero-usps span {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-body);
}
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}
.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-lead {
  margin: 0;
  max-width: 40rem;
  line-height: 1.5;
}
.section-cats {
  padding-top: 1.25rem;
}
.section-catalog {
  padding-top: 1rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 0; cursor: pointer; border-radius: var(--radius);
  padding: 0.7rem 1.1rem; font-weight: 600; font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none !important;
}
.btn:hover, .btn:focus, a.btn:hover, a.btn:focus {
  text-decoration: none !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { text-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: #7f1d1d; color: #fecaca; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.breadcrumb {
  margin: 0 0 1rem;
}
.breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.15rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-body);
}
.crumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.crumb-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}
.crumb-link:hover,
.crumb-link:focus {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.crumb-sep {
  color: var(--border);
  font-weight: 500;
  user-select: none;
  margin-right: 0.15rem;
}
.crumb-current {
  color: var(--text-body);
  max-width: min(100%, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section { padding: 1.75rem 0 2.5rem; }
.section h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.home-intro {
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
}
.home-intro .content-body {
  max-width: 52rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}
/* Katalog: eine Kategorie = eine Zeile (volle Breite), darunter Karten 2er-Raster */
.grid.catalog-rows {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.catalog-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
}
.catalog-group--row {
  width: 100%;
}
.catalog-group-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
  align-items: stretch;
}
/* 1 Produkt: halbe Breite (linke Spalte) */
.catalog-group[data-count="1"] .catalog-group-cards {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.catalog-group[data-count="1"] .catalog-group-cards > .card {
  grid-column: 1;
}
.catalog-group-head {
  margin: 0;
  padding: 0.55rem 0 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
}
.catalog-group-head-main {
  min-width: 0;
  flex: 1 1 12rem;
}
.catalog-group-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.catalog-group-desc {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  max-width: 40rem;
}
.catalog-group-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex-shrink: 0;
}
.catalog-group-count {
  font-size: 0.85rem;
  color: var(--text-body);
  font-weight: 600;
}
.catalog-group:first-child .catalog-group-head {
  padding-top: 0.15rem;
  margin-top: 0;
}
@media (max-width: 720px) {
  .grid,
  .catalog-group-cards,
  .catalog-group[data-count="1"] .catalog-group-cards {
    grid-template-columns: 1fr;
  }
  .catalog-group[data-count="1"] .catalog-group-cards > .card {
    grid-column: 1;
  }
}
/* Produktkarte: Thumbnail links (festes Quadrat), Text rechts */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: visible; /* Button nicht abschneiden */
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  height: auto;
  min-height: 0;
  padding: 0.65rem 0.85rem 0.75rem 0.65rem;
  box-sizing: border-box;
}
.card-media {
  box-sizing: border-box;
  width: 5.75rem;
  height: 5.75rem;
  min-width: 5.75rem;
  min-height: 5.75rem;
  max-width: 5.75rem;
  max-height: 5.75rem;
  aspect-ratio: 1 / 1;
  align-self: center;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
}
html[data-theme="dark"] .card-media {
  background: color-mix(in srgb, var(--paper-2) 70%, #fff 12%);
}
.card-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}
.card-media .product-tile {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  border-radius: 8px;
  padding: 0.35rem;
  gap: 0.25rem;
}
.card-media .product-tile-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.35rem;
}
.card-media .product-tile-label {
  font-size: 0.68rem;
  max-width: 4.8rem;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body {
  padding: 0.1rem 0.1rem 0.05rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  justify-content: center;
  overflow: visible;
}
.card-body h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 0;
}
.card-body > p.muted,
.card-body .card-short {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  min-height: 0;
  line-height: 1.35;
  margin: 0;
  font-size: 0.84rem;
}
.card-price {
  min-height: 0;
  line-height: 1.35;
  font-size: 0.88rem;
}
.card-body .actions {
  margin-top: 0.2rem;
  padding-top: 0;
  margin-bottom: 0;
  overflow: visible;
  flex-shrink: 0;
}
.card-body .actions .btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.2;
  min-height: 2.15rem;
  box-sizing: border-box;
}
.card-body .product-badges {
  margin-bottom: 0;
}
@media (max-width: 720px) {
  .card {
    gap: 0.55rem;
    padding: 0.55rem 0.65rem 0.6rem 0.5rem;
  }
  .card-media {
    width: 4.75rem;
    height: 4.75rem;
    min-width: 4.75rem;
    min-height: 4.75rem;
    max-width: 4.75rem;
    max-height: 4.75rem;
    padding: 0.22rem;
    border-radius: 9px;
  }
}

/* Farbkachel-Töne (global, auch Detail) — card-media overrides above */
.product-tile {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 0.85rem;
  text-align: center;
  border: none;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  background: linear-gradient(145deg, #334155, #64748b);
}
.product-tile-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, #fff 22%, transparent);
  border: 1px solid color-mix(in srgb, #fff 35%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 25%, transparent);
}
.product-tile-label {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 12rem;
  letter-spacing: 0.01em;
}
.product-tile--blue { background: linear-gradient(145deg, #1d4ed8, #3b82f6); }
.product-tile--cyan { background: linear-gradient(145deg, #0e7490, #06b6d4); }
.product-tile--green { background: linear-gradient(145deg, #047857, #10b981); }
.product-tile--amber { background: linear-gradient(145deg, #b45309, #f59e0b); color: #1c1917; text-shadow: none; }
.product-tile--violet { background: linear-gradient(145deg, #6d28d9, #8b5cf6); }
.product-tile--rose { background: linear-gradient(145deg, #be123c, #f43f5e); }
.product-tile--slate { background: linear-gradient(145deg, #334155, #64748b); }
.product-media .product-tile,
.product-media-tile {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
}
.product-media .product-tile-label {
  font-size: 1.05rem;
  max-width: 16rem;
}

/* Produkt-Detail-Galerie: Hauptbild + Thumbs */
.product-gallery {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.product-gallery .product-media {
  background: var(--paper-2);
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.product-gallery .product-media img,
.product-gallery .product-media .product-tile {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: opacity 0.15s ease;
}
.product-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  width: 100%; /* gleiche Breite wie Hauptbild */
  box-sizing: border-box;
}
.product-thumb {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
  background: var(--paper-2);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.product-thumb:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  transform: translateY(-1px);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.product-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.product-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Fallback ohne Galerie-Wrapper (falls alt) */
.product-media {
  background: var(--paper-2);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  box-sizing: border-box;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  border: 1px solid transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  line-height: 1;
  vertical-align: middle;
}
/* Produkt-Badges: Dunkel = kräftige Fläche + heller Text */
.badge-tone-blue {
  color: var(--on-accent);
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border-color: color-mix(in srgb, #60a5fa 55%, transparent);
}
.badge-tone-cyan {
  color: var(--on-accent);
  background: linear-gradient(135deg, #0e7490, #06b6d4);
  border-color: color-mix(in srgb, #22d3ee 50%, transparent);
}
.badge-tone-green {
  color: var(--on-accent);
  background: linear-gradient(135deg, #047857, #10b981);
  border-color: color-mix(in srgb, #34d399 50%, transparent);
}
.badge-tone-amber {
  color: #1c1917;
  text-shadow: none;
  background: linear-gradient(135deg, #d97706, #fbbf24);
  border-color: color-mix(in srgb, #f59e0b 55%, transparent);
}
.badge-tone-violet {
  color: var(--on-accent);
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  border-color: color-mix(in srgb, #a78bfa 50%, transparent);
}
.badge-tone-rose {
  color: var(--on-accent);
  background: linear-gradient(135deg, #be123c, #f43f5e);
  border-color: color-mix(in srgb, #fb7185 50%, transparent);
}
.badge-tone-slate {
  color: var(--on-accent);
  background: linear-gradient(135deg, #334155, #64748b);
  border-color: color-mix(in srgb, #94a3b8 45%, transparent);
}
/* Hellmodus: getönte Chips + dunkler Text (kein Pastell-auf-Weiß) */
html[data-theme="light"] .badge {
  text-shadow: none;
}
html[data-theme="light"] .badge-tone-blue {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #93c5fd;
}
html[data-theme="light"] .badge-tone-cyan {
  color: #155e75;
  background: #cffafe;
  border-color: #67e8f9;
}
html[data-theme="light"] .badge-tone-green {
  color: #065f46;
  background: #d1fae5;
  border-color: #6ee7b7;
}
html[data-theme="light"] .badge-tone-amber {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}
html[data-theme="light"] .badge-tone-violet {
  color: #5b21b6;
  background: #ede9fe;
  border-color: #c4b5fd;
}
html[data-theme="light"] .badge-tone-rose {
  color: #9f1239;
  background: #ffe4e6;
  border-color: #fda4af;
}
html[data-theme="light"] .badge-tone-slate {
  color: #1e293b;
  background: #e2e8f0;
  border-color: #94a3b8;
}
.product-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}
.product-badges:empty { display: none; }
.product-badges .badge { margin: 0; }
.product-layout > .panel .product-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
}
.product-layout > .panel .product-short {
  margin: 0 0 1rem;
  font-size: 0.94rem;
  line-height: 1.45;
}
.card h3 { margin: 0; font-size: 1.05rem; }
.muted { color: var(--text-body); }
.price-line { font-size: 1.05rem; font-weight: 700; }
.price-line small { font-weight: 500; color: var(--text-body); }
.price-gross-paren {
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
}
.cart-min-callout .price-gross-paren,
.min-order-hint .price-gross-paren {
  color: rgba(254, 243, 199, 0.78);
  font-weight: 500;
}
.product-min-callout {
  margin-top: 0.95rem;
}
.price-box .cart-min-callout,
.price-box .product-min-callout {
  margin-top: 0.95rem;
}
.price-box .big .price-gross-paren {
  display: block;
  font-size: 0.55em;
  font-weight: 600;
  margin-top: 0.15rem;
  color: var(--text-body);
}
.price-sub { font-size: 0.85rem; }
.price-note { font-size: 0.8rem; line-height: 1.35; }
.price-sample { font-size: 0.78rem; opacity: 0.9; }

/* Produktlayout: mobil 1 Spalte ohne Sticky; Desktop ab 1101px 20/60/20 + sticky L/R */
.product-layout {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: 1fr;
  align-items: start;
}
.product-col-media,
.product-col-buy {
  position: static;
  z-index: auto;
}
.product-buy-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.product-buy-actions .btn {
  width: auto;
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
@media (min-width: 1101px) {
  .product-layout {
    gap: 1.35rem 1.5rem;
    /* Bild 20% · Konfig 60% · Sticky-Kauf 20% */
    grid-template-columns: minmax(0, 0.2fr) minmax(0, 0.6fr) minmax(12rem, 0.2fr);
  }
  .product-col-media {
    position: sticky;
    top: 5.25rem; /* unter sticky .top Header */
    align-self: start;
    z-index: 4;
  }
  .product-col-buy {
    position: sticky;
    top: 5.25rem;
    align-self: start;
    z-index: 5;
  }
  .product-buy-actions {
    flex-direction: column;
  }
  .product-buy-actions .btn {
    width: 100%;
    flex: none;
  }
}
/* Linkes Produkt-Panel: ohne Karte, oben bündig mit rechter Karte */
.product-layout > .panel:first-child,
.product-layout > .panel.panel-bare,
.product-layout > .product-col-media.panel-bare {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  padding: 0; /* kein Versatz nach unten */
}
.product-layout > .panel.panel-bare .product-gallery {
  margin: 0 0 0.85rem;
  padding: 0;
  gap: 0.65rem;
}
.product-layout > .panel.panel-bare .product-media {
  margin: 0;
}
.product-layout > .panel.panel-bare > .muted {
  margin-top: 0.15rem;
}

/* Kauf-Karte (Preis + Buttons) */
.product-col-buy {
  min-width: 0;
}
.product-buy-sticky {
  position: static;
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
  background: var(--paper);
  box-shadow: var(--shadow, 0 1px 0 color-mix(in srgb, var(--border) 55%, transparent));
}
.product-col-buy .price-box {
  margin-top: 0;
  padding: 0.7rem 0.75rem;
}
.product-col-buy .price-box .big {
  font-size: 1.15rem;
  word-break: break-word;
}
.product-col-buy #add-msg {
  margin: 0;
  font-size: 0.82rem;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.15rem;
}
.panel h1 { margin: 0 0 0.4rem; font-size: 1.45rem; }
.features { margin: 0.8rem 0 0; padding-left: 1.1rem; color: var(--text-body); }
.features li { margin: 0.25rem 0; }

label { display: block; font-size: 0.85rem; color: var(--text-body); margin-bottom: 0.3rem; }
.field { margin-bottom: 0.9rem; }
input, select, textarea {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
/* Hellmodus: Formularfelder/Dropdowns weiß (lesbarer auf paper-2-Panels) */
html[data-theme="light"] input,
html[data-theme="light"] textarea {
  background: #ffffff;
}

html[data-theme="light"] select {
  background-color: #ffffff;
}
html[data-theme="light"] .extra-fields-panel select,
html[data-theme="light"] .print-data-panel select,
html[data-theme="light"] .panel select {
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.75rem center;
  background-size: 0.95em;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  border-color: var(--accent);
}

/* Custom dropdown arrow with better spacing */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 0.95em;
  padding-right: 2.25rem;
}


.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.price-box {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px dashed var(--border);
  /* gleiche Textbasis wie Produktbeschreibung unter dem Bild */
  color: var(--text-body);
  font-size: 0.94rem;
  line-height: 1.55;
}
.price-box .big {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.price-box .big small {
  font-size: 0.55em;
  font-weight: 600;
  color: inherit;
}
.price-box .price-meta,
.price-box .price-extras,
.price-box .price-qty {
  margin: 0.35rem 0 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.price-box .muted {
  color: inherit;
  font-size: inherit;
}
.price-breakdown {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.price-breakdown .pb-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: flex-start;
  font-size: inherit;
  line-height: 1.45;
  color: inherit;
}
.price-breakdown .pb-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  color: inherit;
}
.price-breakdown .pb-row > span:last-child {
  flex: 0 0 auto;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  color: inherit;
  font-size: inherit;
}
.price-breakdown .pb-row small,
.price-breakdown .pb-row .price-gross-paren {
  font-size: 0.92em;
  font-weight: 500;
  color: inherit;
  opacity: 0.92;
}
.price-breakdown .pb-muted {
  color: inherit;
  opacity: 0.9;
  font-size: inherit;
}
.price-breakdown .pb-muted span:last-child { font-weight: 500; }
.min-order-hint {
  font-size: 0.92rem;
  line-height: 1.55;
}
.min-order-hint .min-order-gap {
  display: inline;
}
.min-order-hint .min-order-actions {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: inherit;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
}
.min-order-hint .min-order-actions a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

/* Warenkorb / Kasse: Summenblock */
.cart-footer {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 1rem;
  max-width: 28rem;
  margin-left: auto;
}
.checkout-summary-footer {
  margin-left: 0;
  max-width: none;
}

/* Checkout: Formular links, Zusammenfassung sticky rechts; schmal zuerst Summe */
.checkout-layout {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 24rem);
  align-items: start;
}
.checkout-summary-panel {
  position: sticky;
  top: 1rem;
  align-self: start;
}
.checkout-submit-note {
  font-size: 0.85rem;
  margin: 0.85rem 0 0.75rem;
  line-height: 1.45;
}

.entrepreneur-confirm {
  width: 100%;
  box-sizing: border-box;
  margin: 0.65rem 0 0.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper-2);
  font-size: 0.88rem;
  color: var(--text-body);
}

.entrepreneur-confirm label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.35;
}

.entrepreneur-confirm label span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.entrepreneur-confirm input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--accent);
  border: 1px solid #9ca3af;
  border-radius: 3px;
  background: #fff;
}

.entrepreneur-confirm .entrepreneur-note {
  margin-top: 0.35rem;
  margin-left: 1.75rem;
  font-size: 0.74rem;
  opacity: 0.85;
  line-height: 1.3;
  color: var(--muted-foreground, #9ca3af);
}
.checkout-summary-panel .btn-block,
.checkout-submit-mobile .btn-block {
  width: 100%;
  display: block;
  text-align: center;
  box-sizing: border-box;
}
/* Desktop: Absenden in der sticky Zusammenfassung; Mobile-Doppel ausblenden */
.checkout-submit-mobile {
  display: none;
}
@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  /* Reihenfolge: Zusammenfassung → Kontaktdaten → Absenden */
  .checkout-summary-panel {
    order: -1;
    position: static;
  }
  .checkout-submit-desktop {
    display: none !important;
  }
  .checkout-submit-mobile {
    display: block;
    order: 99;
  }
  .checkout-summary-panel .checkout-submit-note {
    margin-bottom: 0;
  }
}
.cart-summary {
  display: grid;
  gap: 0.75rem;
}
.cart-summary-rows {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  font-size: 0.92rem;
}
.cs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.cs-row span:last-child,
.cs-row .cs-pair {
  font-weight: 600;
  text-align: right;
  white-space: normal;
  max-width: 14rem;
  line-height: 1.35;
}
.checkout-summary-footer .totals .cs-row.sum > span:last-child {
  max-width: none;
}
.cs-row.cs-target {
  color: var(--text-body);
  font-size: 0.82rem;
  padding-top: 0.25rem;
  border-top: 1px dashed var(--border);
  margin-top: 0.15rem;
}
.cs-row.cs-target span:last-child { font-weight: 500; }
.cs-row small {
  font-weight: 500;
  color: var(--text-body);
  margin-left: 0.2rem;
}
.cs-row.cs-gap span:last-child {
  color: #fbbf24;
}
.cs-row.cs-muted {
  color: var(--text-body);
  font-size: 0.82rem;
}
.cs-row.cs-muted span:last-child { font-weight: 500; }
.cs-row.sum {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.15rem;
  padding-top: 0;
  border-top: none;
}
.cart-min-callout {
  margin: 0;
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}
/* In der Preisbox: Abstand zum Preisblock darüber */
.price-box > .min-order-hint,
.price-box > .cart-min-callout {
  margin-top: 0.95rem;
}
.cart-min-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 0.45rem;
  line-height: 1.4;
}
.cart-min-amount {
  font-weight: 700;
  color: #fef3c7;
  line-height: inherit;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}
.cart-min-amount .price-gross-paren {
  font-weight: 500;
  line-height: inherit;
  white-space: nowrap;
}
.cart-min-gap {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #fef3c7;
  overflow-wrap: normal;
  word-break: normal;
}
.cart-min-gap:last-of-type {
  margin-bottom: 0.65rem;
}
.cart-min-callout .min-order-actions {
  margin: 0;
}
.cart-min-note {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.35;
  flex: 1 1 12rem;
}
.cart-min-ok {
  margin: 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #a7f3d0;
  background: color-mix(in srgb, #059669 18%, var(--paper-2));
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 10px;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 8px;
  text-decoration: none !important;
}
.cart-min-callout .btn-sm {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
  background: rgba(0, 0, 0, 0.2);
}
.cart-min-callout .btn-sm:hover {
  border-color: #fbbf24;
  color: #fff;
}

/* Light mode: dunkle Schrift auf pastell — lesbar */
html[data-theme="light"] .cart-min-callout {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}
html[data-theme="light"] .cart-min-title {
  color: #78350f;
}
html[data-theme="light"] .cart-min-amount,
html[data-theme="light"] .cart-min-gap {
  color: #92400e;
}
html[data-theme="light"] .cart-min-amount .price-gross-paren,
html[data-theme="light"] .cart-min-callout .price-gross-paren {
  color: #a16207;
}
html[data-theme="light"] .cart-min-callout .btn-sm {
  color: #92400e;
  border-color: #f59e0b;
  background: #fff;
}
html[data-theme="light"] .cart-min-callout .btn-sm:hover {
  color: #78350f;
  border-color: #d97706;
  background: #fef3c7;
}
html[data-theme="light"] .cart-min-ok {
  color: #065f46;
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.table th { color: var(--text-body); font-weight: 600; font-size: 0.85rem; }
.qty-input { width: 4.5rem; }

/* Menge + / − */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px transparent;
}
.qty-stepper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}
.qty-stepper button {
  appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  width: 2.65rem;
  min-height: 2.65rem;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}
.qty-stepper button:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-2);
}
.qty-stepper button:active:not(:disabled) {
  background: rgba(59, 130, 246, 0.28);
}
.qty-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.qty-stepper input[type="number"] {
  width: 3.4rem;
  min-width: 3.2rem;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.55rem 0.25rem;
  background: var(--bg);
  -moz-appearance: textfield;
}
.qty-stepper input[type="number"]::-webkit-outer-spin-button,
.qty-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-stepper input:focus {
  outline: none;
}
.qty-stepper.qty-stepper-sm button {
  width: 2.25rem;
  min-height: 2.25rem;
  font-size: 1.1rem;
}
.qty-stepper.qty-stepper-sm input[type="number"] {
  width: 2.85rem;
  padding: 0.4rem 0.15rem;
}
.table td .qty-stepper {
  vertical-align: middle;
}
.qty-stepper-unit {
  /* unit sits between input and + */
}
.qty-stepper .qty-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 0.45rem 0 0.15rem;
  color: var(--text-body);
  font-size: 0.82rem;
  font-weight: 600;
  border-right: 1px solid var(--border);
  background: var(--bg);
  user-select: none;
}
.qty-stepper-unit input[type="number"] {
  border-right: 0;
  width: 3.1rem;
}
.field .qty-stepper {
  width: 100%;
  max-width: 16rem;
}
.field .qty-stepper input[type="number"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 2.8rem;
}

.totals {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
}
.totals .sum { font-size: 1.15rem; font-weight: 700; }

.alert {
  padding: 0.75rem 0.9rem; border-radius: 10px; margin: 0.75rem 0;
  border: 1px solid var(--border); background: var(--paper-2);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}
/* Dark: helle Schrift auf dunklem Panel */
.alert.ok {
  border-color: rgba(52, 211, 153, 0.5);
  color: #a7f3d0;
  background: color-mix(in srgb, #059669 18%, var(--paper-2));
}
.alert.err {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
  background: color-mix(in srgb, #ef4444 16%, var(--paper-2));
}
.alert.warn {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fde68a;
  background: color-mix(in srgb, #f59e0b 16%, var(--paper-2));
}
/* Light: dunkle Schrift, lesbar auf pastelligem Hintergrund */
html[data-theme="light"] .alert.ok {
  color: #065f46;
  background: #ecfdf5;
  border-color: #6ee7b7;
}
html[data-theme="light"] .alert.err {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}
html[data-theme="light"] .alert.warn {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

.content-page h1 { margin: 0 0 1rem; }
.content-body { line-height: 1.6; }
.content-body p { margin: 0 0 0.85rem; }
.content-body a { text-decoration: underline; }
.product-desc,
ul.features {
  color: var(--text-body);
  margin: 0.15rem 0 0;
  font-size: 0.94rem;
  line-height: 1.55;
}
.product-desc {
  margin-bottom: 0.85rem;
}
.product-desc p:last-child { margin-bottom: 0; }
ul.features {
  margin-top: 0.35rem;
  padding: 0 0 0 1.15rem;
}
ul.features li { margin: 0.2rem 0; }
.footer {
  margin-top: 2rem; border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem; color: var(--text-body); font-size: 0.9rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer nav { display: flex; gap: 1rem; }
.footer nav a { color: var(--text-body); }
.print-data-hint {
  font-size: 0.82rem;
  margin: 0.35rem 0 0;
  color: var(--text-body);
  line-height: 1.45;
}
.print-data-hint-extra {
  display: block;
  margin-top: 0.2rem;
  opacity: 0.95;
}
.print-format-info {
  margin: 0 0 0.35rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--paper);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 55%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
html[data-theme="dark"] .print-format-info {
  background: color-mix(in srgb, var(--paper) 88%, var(--paper-2));
  box-shadow: none;
}
.print-format-row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  align-items: start;
}
@media (max-width: 480px) {
  .print-format-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}
.print-format-label {
  color: var(--text-body);
  font-weight: 600;
  white-space: nowrap;
}
.print-format-value {
  min-width: 0;
  word-break: break-word;
}
.print-format-value strong {
  font-weight: 700;
}
.print-format-data .print-format-value strong {
  color: var(--accent-2);
  font-size: 1.05em;
}
.print-format-mm {
  font-size: 0.85em;
  white-space: nowrap;
}
.print-format-note {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}
.print-data-panel {
  margin: 1rem 0 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--paper-2, rgba(255,255,255,0.03));
}
.extra-fields-panel {
  margin: 0.85rem 0 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--paper-2, rgba(255,255,255,0.03));
  display: grid;
  gap: 0.75rem;
}
.extra-fields-title {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.extra-fields-lead {
  margin: -0.35rem 0 0.15rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-body);
}
.extra-field-info {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-body);
}
.extra-fields-panel .field {
  margin: 0;
}
.extra-fields-panel select {
  width: 100%;
}
.print-data-msg {
  margin: 0.65rem 0 0;
}
.print-data-msg[hidden] {
  display: none !important;
}
.print-data-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}
.print-data-compact .print-data-hint {
  margin-top: 0.35rem;
}
.print-status {
  font-size: 0.82rem;
  margin-top: 0.35rem;
  line-height: 1.35;
}
.print-status-ok {
  color: var(--accent-2);
  font-weight: 600;
}
.print-status-ok a {
  color: var(--accent-2);
}
.print-status-open .print-status-hint {
  font-weight: 400;
  opacity: 0.85;
}

.print-data-list {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0 1.25rem;
}
.print-data-card {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--paper-2);
  display: grid;
  gap: 0.75rem;
}
.print-data-head strong {
  display: block;
  margin-bottom: 0.2rem;
}
.print-data-fields {
  display: grid;
  gap: 0.65rem;
}
.field-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-body);
  margin-bottom: 0.4rem;
}
.file-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  cursor: pointer;
  margin: 0;
}
.print-data-preview {
  margin-top: 0.15rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.print-preview-block {
  display: grid;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
  padding: 0.55rem 0.65rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--paper-2) 70%, var(--paper));
}
.print-preview-block-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.1rem;
}
.print-preview-block--format {
  border-color: color-mix(in srgb, #f59e0b 35%, var(--border));
}
.print-preview-block--dpi {
  border-color: color-mix(in srgb, var(--accent-2) 28%, var(--border));
}
.print-preview-block--extra {
  margin-top: 0.55rem;
}
.print-preview-block .print-preview-crop-warn,
.print-preview-block .print-preview-dpi-warn,
.print-preview-block .print-adjust-opt,
.print-preview-block .print-preview-adjust-ok,
.print-preview-block .print-expert-opt {
  margin-top: 0;
}
.field .print-data-hint {
  margin-top: 0.45rem;
}
.print-data-preview[hidden] {
  display: none !important;
}
.print-preview-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.65rem;
  align-items: start;
  position: relative;
  width: 100%;
}
.print-preview-pages--wide {
  grid-template-columns: 1fr;
}
@media (max-width: 560px) {
  .print-preview-pages {
    grid-template-columns: 1fr;
  }
}
.print-preview-pages .print-preview-frame {
  max-width: 100%;
  width: 100%;
}
.print-preview-page {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.print-preview-page .print-preview-frame {
  flex: 0 0 auto;
}
.print-preview-page-cap {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--text-body);
  text-align: left;
}
.print-preview-frame {
  max-width: min(100%, 24rem);
  border-radius: 0;
  border: 1px solid var(--border);
  background: #0a0e14;
  overflow: hidden;
  line-height: 0;
  position: relative;
}
.print-preview-clear {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 6;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 2px solid #111;
  border-radius: 999px;
  background-color: #fff;
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.95);
}
.print-preview-clear:hover,
.print-preview-clear:focus-visible {
  background-color: #b91c1c;
  color: #fff;
  border-color: #fff;
  outline: none;
}
/* Datenformat-Rahmen: eckig — Hellmodus weiß (transparentes PNG), sonst dunkel */
.print-preview-frame--format {
  position: relative;
  background-color: #0a0e14;
  background-image: none;
  border: 2px solid var(--accent-2);
  box-shadow: none;
  border-radius: 0;
  /* height comes from aspect-ratio */
  height: auto;
}
html[data-theme="light"] .print-preview-frame,
html[data-theme="light"] .print-preview-frame--format {
  background-color: #ffffff;
}
html[data-theme="light"] .print-preview-frame--adjust-extend {
  background-color: transparent;
}
/* Gebuchte Anpassung: Papierfarbe kommt aus dem Canvas (Randfarbe), nicht CSS-Weiß */
.print-preview-frame--adjust-extend {
  background-color: transparent;
}
.print-preview-stage {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  display: block;
  line-height: 0;
  position: relative;
}
.print-preview-frame img,
.print-preview-canvas,
.print-preview-media {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}
.print-preview-frame:not(.print-preview-frame--format) img,
.print-preview-frame:not(.print-preview-frame--format) .print-preview-media {
  max-height: 16rem;
}
.print-preview-meta {
  font-size: 0.8rem;
  line-height: 1.4;
  word-break: break-word;
}
.print-preview-legend {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-body);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.65rem 0.75rem;
  align-items: start;
  box-sizing: border-box;
}
.print-preview-legend strong {
  color: var(--text);
  font-weight: 600;
}
.print-preview-swatch {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  /* Nur Häkchen — keine Box */
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.1L6.5 11.3L12.8 4.4' stroke='%230891b2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 1.1rem 1.1rem;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  box-sizing: border-box;
}
html[data-theme="dark"] .print-preview-swatch {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.1L6.5 11.3L12.8 4.4' stroke='%2322d3ee' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.print-preview-swatch--crop {
  border: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.1L6.5 11.3L12.8 4.4' stroke='%23f59e0b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 1.1rem 1.1rem;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
}
.print-preview-swatch--fill {
  border: none;
  background-color: transparent;
  box-shadow: none;
}
.print-preview-legend-text {
  min-width: 0;
  margin: 0;
  padding: 0.05rem 0;
  line-height: 1.55;
  word-break: break-word;
}
.print-preview-loading {
  font-size: 0.85rem;
  padding: 0.35rem 0;
}
.print-data-compact .print-preview-frame {
  max-width: min(100%, 18rem);
}
.print-data-compact .print-preview-frame--format {
  max-width: min(100%, 18rem);
}
.file-pick-btn {
  pointer-events: none;
  flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(34, 211, 238, 0.18));
  color: var(--text);
  border: 1px solid rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08);
}
.file-pick:hover .file-pick-btn {
  border-color: var(--accent-2);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(34, 211, 238, 0.28));
  filter: brightness(1.06);
}
.file-pick:focus-within .file-pick-btn {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(34, 211, 238, 0.32));
}
.file-pick-name {
  font-size: 0.88rem;
  line-height: 1.35;
  min-width: 0;
  flex: 1 1 10rem;
  word-break: break-word;
}
.file-pick-name.file-pick-chosen {
  color: var(--accent-2);
  font-weight: 600;
}
.order-item-card {
  margin-bottom: 0.65rem;
}
.spinner {
  width: 1rem; height: 1rem; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--accent-2);
  display: inline-block; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 2rem 0; color: var(--text-body); text-align: center; }


/* Kategorien */
.section-cats {
  padding-top: 1.35rem;
  padding-bottom: 0.85rem;
}
.section-head-row {
  margin-bottom: 1rem;
}
.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-lead {
  margin: 0;
  font-size: 0.92rem;
  max-width: 40rem;
  line-height: 1.5;
}
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (max-width: 900px) {
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .cat-tiles { grid-template-columns: 1fr; }
}
.cat-tile {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--paper);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.cat-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 12%, transparent);
}
.cat-tile.is-active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 35%, transparent);
}
.cat-tile-media {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cat-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.cat-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.cat-tile-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.25;
}
.cat-tile-desc {
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-tile-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-top: 0.1rem;
}
html[data-theme="light"] .cat-tile-meta {
  color: #0e7490;
}

.catalog-top {
  margin-bottom: 0.65rem;
}
.catalog-top-lead {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}
.linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--accent-2);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cat-filters-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 1rem;
  padding: 0.45rem 0 0.55rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.cat-filters {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin: 0;
}
.cat-chip {
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--text-body);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.cat-chip-count {
  opacity: 0.75;
  font-weight: 600;
  font-size: 0.82em;
  margin-left: 0.15rem;
}
.cat-chip:hover { color: var(--text); border-color: var(--accent); }
.cat-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  border-color: transparent;
}
.cat-chip.active .cat-chip-count { opacity: 0.9; color: inherit; }
.cat-chip--sub {
  font-weight: 600;
  padding-left: 0.75rem;
  border-style: dashed;
  color: var(--text-body);
}
.cat-chip--depth-1 { margin-left: 0.15rem; }
.cat-chip--depth-2 { margin-left: 0.35rem; }
.cat-chip--depth-3 { margin-left: 0.55rem; }
.cat-chip--sub.active {
  border-style: solid;
}
.catalog-group-title {
  letter-spacing: 0.01em;
}
.catalog-group-title .cat-path-sep,
.catalog-group-head .cat-path-muted {
  color: var(--muted);
  font-weight: 600;
}
.card-short {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Header: ein Produkte-Dropdown (statt Produkte + Kategorien) */
.nav-item--home {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.nav-item--home > .nav-home-link[hidden] {
  display: none !important;
}
.nav-cats-slot {
  display: inline-flex;
  align-items: center;
}
.nav-cats {
  position: relative;
}
.nav-cats-sum {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-body);
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.nav-cats-sum::-webkit-details-marker { display: none; }
.nav-cats-sum::after {
  content: "▾";
  margin-left: 0.3rem;
  font-size: 0.75em;
  opacity: 0.7;
}
.nav-cats[open] .nav-cats-sum {
  color: var(--accent-2);
  border-color: var(--border);
  background: var(--paper);
}
.nav-cats-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: min(42rem, calc(100vw - 2rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 0.45rem 0.5rem 0.55rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 80;
}
.nav-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.55rem 0.85rem;
  min-width: min(11.5rem, 100%);
  width: min(36rem, max(11.5rem, 100%));
}
/* Wenige Gruppen: nicht unnötig breit */
.nav-cats-grid:has(> :only-child) {
  width: 14rem;
  grid-template-columns: 1fr;
}
.nav-cats-grid:has(> :nth-child(2):last-child) {
  width: 26rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.nav-cat-group {
  min-width: 0;
  padding: 0.15rem 0.2rem 0.35rem;
  border-radius: 8px;
}
.nav-cat-link {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
}
.nav-cat-link--all {
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  padding: 0.45rem 0.55rem 0.55rem;
  margin: 0 0 0.1rem;
  font-weight: 700;
}
.nav-cat-link--parent {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}
.nav-cat-children {
  display: grid;
  gap: 0.05rem;
  margin-top: 0.1rem;
  padding-left: 0.15rem;
}
.nav-cat-link--child {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-body, var(--text));
  padding: 0.32rem 0.55rem;
}
.nav-cat-link:hover {
  background: var(--paper-2);
  color: var(--accent-2);
}
.nav-cat-link[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 14%, var(--paper-2));
  color: var(--text);
}
/* Desktop: Dropdown; Mobile-Drawer: flache Liste */
.nav-cats-flat { display: none; }
@media (max-width: 800px) {
  .nav-item--home {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }
  .nav-cats { display: none; }
  .nav-cats-flat {
    display: grid;
    gap: 0.2rem;
    padding: 0.15rem 0 0.35rem 0.65rem;
    border-left: 2px solid var(--border);
    margin: 0.15rem 0 0.35rem 0.35rem;
  }
  .nav-cats-flat .nav-cat-link {
    font-weight: 600;
    font-size: 0.92rem;
  }
  .nav-cats-flat .nav-cat-link--all {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
    padding-bottom: 0.5rem;
  }
}

.badge-cat {
  background: color-mix(in srgb, var(--accent) 14%, var(--paper-2)) !important;
  color: color-mix(in srgb, var(--accent) 72%, var(--text)) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)) !important;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
  text-shadow: none !important;
}
html[data-theme="light"] .badge-cat {
  background: #e8eef8 !important;
  color: #1e3a8a !important;
  border-color: #bfdbfe !important;
}
.card-body .badge + .badge { margin-left: 0; }
.card-body > .badge,
.card-body > .product-badges {
  align-self: flex-start;
}

/* Cover fill: stage fills frame completely; media object-fit cover centered */
.print-preview-frame--cover,
.print-preview-frame--format.print-preview-frame--cover {
  overflow: hidden;
  border-radius: 0;
  position: relative;
  display: block;
  line-height: 0;
  /* aspect-ratio comes from inline style (Datenformat) */
  min-height: 0;
}
.print-preview-frame--format.print-preview-frame--cover {
  min-height: 4.5rem;
  /* avoid subpixel gap under absolute stage */
  isolation: isolate;
}
/* Stage = full bleed of frame (no second aspect box that leaves a bottom gap) */
.print-preview-frame--format.print-preview-frame--cover .print-preview-stage--cover,
.print-preview-stage--cover {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: hidden;
  display: block;
  line-height: 0;
  margin: 0 !important;
  padding: 0 !important;
}
.print-preview-media--cover {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  vertical-align: top;
}
.print-preview-frame--crop {
  border-color: #f59e0b !important;
  box-shadow: none;
  /* solid edge, no hairline gap under media */
  background-clip: padding-box;
}
.print-preview-frame--adjust-extend {
  border-color: #34d399 !important;
}
.print-preview-media--extend {
  image-rendering: auto;
  background: transparent;
}
.print-preview-crop-warn {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #78350f;
  background: color-mix(in srgb, #f59e0b 22%, #fffbeb);
  border: 1px solid #f59e0b;
  border-radius: 8px;
}
html[data-theme="dark"] .print-preview-crop-warn {
  color: #fef3c7;
  background: color-mix(in srgb, #f59e0b 28%, #1c1410);
  border-color: #f59e0b;
}
.print-preview-sides-warn {
  color: #7f1d1d;
  background: color-mix(in srgb, #ef4444 16%, #fef2f2);
  border-color: #ef4444;
}
html[data-theme="dark"] .print-preview-sides-warn {
  color: #fecaca;
  background: color-mix(in srgb, #ef4444 28%, #1c1010);
  border-color: #f87171;
}
.print-preview-dpi-warn {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.75rem;
  align-items: start;
  margin: 0.35rem 0 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  border: 1px solid;
  border-radius: 8px;
}
.print-preview-dpi-text {
  min-width: 0;
}
.print-dpi-ampel {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.2rem 0.28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 70%, #0a0e14);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.print-dpi-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  opacity: 0.28;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.print-dpi-dot.is-on {
  opacity: 1;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 35%, transparent);
}
.print-dpi-dot--red {
  background: #ef4444;
  color: #ef4444;
}
.print-dpi-dot--yellow {
  background: #f59e0b;
  color: #f59e0b;
}
.print-dpi-dot--green {
  background: #22c55e;
  color: #22c55e;
}
/* Rot: < 50 % Ideal */
.print-preview-dpi-warn--red {
  color: #7f1d1d;
  background: color-mix(in srgb, #ef4444 16%, #fef2f2);
  border-color: #ef4444;
}
html[data-theme="dark"] .print-preview-dpi-warn--red {
  color: #fecaca;
  background: color-mix(in srgb, #ef4444 22%, #1c1010);
  border-color: #f87171;
}
/* Gelb: 50–<100 % Ideal */
.print-preview-dpi-warn--yellow {
  color: #92400e;
  background: color-mix(in srgb, #f59e0b 18%, #fffbeb);
  border-color: #f59e0b;
}
html[data-theme="dark"] .print-preview-dpi-warn--yellow {
  color: #fde68a;
  background: color-mix(in srgb, #f59e0b 22%, #1c1410);
  border-color: #fbbf24;
}
/* Grün: ≥ 100 % Ideal */
.print-preview-dpi-warn--green {
  color: #065f46;
  background: color-mix(in srgb, #22c55e 14%, #ecfdf5);
  border-color: #34d399;
}
html[data-theme="dark"] .print-preview-dpi-warn--green {
  color: #a7f3d0;
  background: color-mix(in srgb, #22c55e 18%, #0f1a14);
  border-color: #34d399;
}
.print-preview-dpi-warn strong {
  font-weight: 700;
}
.print-preview-legend--crop {
  border-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 14%, var(--paper));
  color: #92400e;
  padding: 0.8rem 0.95rem;
  line-height: 1.55;
}
html[data-theme="dark"] .print-preview-legend--crop {
  color: #fde68a;
  background: color-mix(in srgb, #f59e0b 18%, #1c1410);
}
.print-preview-legend--crop strong {
  color: inherit;
}
.print-preview-legend--adjust:not(.print-preview-legend--crop) {
  padding: 0.8rem 0.95rem;
}
/* Varianten: Farbe des Häkchens (kein background-shorthand — sonst fällt das SVG weg) */
.print-preview-swatch--crop {
  border: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.1L6.5 11.3L12.8 4.4' stroke='%23f59e0b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 1rem 1rem;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
}
.print-preview-swatch--fill {
  border: none;
  background-color: transparent;
  box-shadow: none;
}

/* Option-Karten + einheitliche Checkbox mit Häkchen (Seitenverhältnis / Expertenkontrolle) */
.print-adjust-opt,
.print-expert-opt {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0.55rem 0 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
  background: color-mix(in srgb, var(--accent-2) 8%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--accent-2) 42%, var(--border));
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
}
/* Expert bleibt 2-Spalten-Label; Adjust = Spalte + Modus-Radios */
.print-expert-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem 0.85rem;
}
.print-adjust-opt.is-checked,
.print-expert-opt.is-checked {
  background: color-mix(in srgb, var(--accent-2) 16%, var(--paper));
  border-color: var(--accent-2);
}
.print-adjust-control {
  position: relative;
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}
.print-adjust-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
/* Leere Box — immer gleiche Form/Randfarbe */
.print-adjust-box {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  box-sizing: border-box;
  border-radius: 6px;
  border: 2px solid color-mix(in srgb, var(--accent-2) 70%, var(--border));
  background-color: color-mix(in srgb, var(--paper) 70%, #0a0e14);
  background-image: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.print-adjust-opt:hover .print-adjust-box,
.print-expert-opt:hover .print-adjust-box {
  border-color: var(--accent-2);
}
/* Checked: Akzentfüllung + weißes Häkchen (background-color, damit image nicht gekillt wird) */
.print-adjust-opt.is-checked .print-adjust-box,
.print-expert-opt.is-checked .print-adjust-box,
.print-adjust-input:checked + .print-adjust-box {
  background-color: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.1L6.5 11.3L12.8 4.4' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 0.9rem 0.9rem;
  background-position: center;
  background-repeat: no-repeat;
}
html[data-theme="light"] .print-adjust-opt:not(.is-checked) .print-adjust-box,
html[data-theme="light"] .print-expert-opt:not(.is-checked) .print-adjust-box {
  background-color: color-mix(in srgb, var(--paper) 88%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}
.print-adjust-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
.print-adjust-title {
  display: block;
  font-weight: 650;
  color: var(--text);
}
.print-adjust-price {
  display: block;
  color: var(--accent-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.print-adjust-price .price-gross-paren {
  color: var(--text-body);
  font-weight: 500;
  white-space: nowrap;
}
.print-adjust-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-body);
  line-height: 1.4;
}
.print-adjust-opt {
  /* container: main row + optional modes */
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
}
.print-adjust-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem 0.85rem;
  cursor: pointer;
  min-width: 0;
}
.print-adjust-modes {
  margin: 0 0 0 calc(1.35rem + 0.85rem);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--accent-2));
  background: color-mix(in srgb, var(--paper) 88%, var(--accent-2));
  display: grid;
  gap: 0.4rem;
}
.print-adjust-modes[hidden] {
  display: none !important;
}
.print-adjust-modes-label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-body);
  margin-bottom: 0.1rem;
}
.print-adjust-mode {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: start;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}
.print-adjust-mode input {
  margin-top: 0.2rem;
  accent-color: var(--accent-2);
  width: 1rem;
  height: 1rem;
}
.print-preview-adjust-ok--crop {
  color: #fde68a;
  background: color-mix(in srgb, #f59e0b 18%, var(--paper));
  border-color: color-mix(in srgb, #f59e0b 55%, var(--border));
}
html[data-theme="light"] .print-preview-adjust-ok--crop {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}
html[data-theme="light"] .print-adjust-price {
  color: color-mix(in srgb, var(--accent-2) 75%, #0f172a);
}

.print-preview-adjust-ok {
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #d1fae5;
  background: rgba(6, 78, 59, 0.45);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 10px;
}
.print-data-preview {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.checkout-lines { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.checkout-line {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--paper-2, rgba(0,0,0,0.15));
  min-width: 0;
}
/* Kopf: Titel + Thumb; darunter Body volle Breite */
.checkout-line-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem 0.85rem;
  align-items: start;
  margin-bottom: 0.55rem;
}
.checkout-line-title {
  display: block;
  min-width: 0;
  line-height: 1.3;
  margin: 0;
  font-size: 0.98rem;
}
.checkout-line-body {
  min-width: 0;
  width: 100%;
}
.checkout-line-meta {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}
.checkout-line-file {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  word-break: break-word;
}
/* Legacy (Warenkorb-Zelle o.ä.) */
.checkout-line-main { min-width: 0; }
.checkout-line-top {
  display: block;
  margin-bottom: 0.15rem;
}
.checkout-line-main > .muted {
  margin: 0.12rem 0 0;
  line-height: 1.35;
}
/* Positions-Aufschlüsselung: Label | feste Preisspalte (immer gleiche Kante) */
.checkout-price-break {
  margin: 0.45rem 0 0.2rem;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-body, var(--text));
  width: 100%;
}
.checkout-pb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 0.65rem;
  align-items: start;
  margin: 0.28rem 0;
}
.checkout-pb-lab {
  color: var(--text-body, var(--muted));
  min-width: 0;
  padding-top: 0.05rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
.checkout-pb-val {
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}
.checkout-pb-val .pb-amt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
}
.checkout-pb-val .pb-net {
  white-space: nowrap;
  color: var(--text);
}
.checkout-pb-val .pb-gross {
  white-space: nowrap;
  font-size: 0.9em;
  color: var(--muted);
}
.checkout-pb-sum {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border);
  font-weight: 600;
  color: var(--text);
}
.checkout-pb-sum .checkout-pb-lab {
  color: var(--text);
  font-weight: 600;
}
.checkout-pb-sum .checkout-pb-val .pb-net {
  font-weight: 600;
}
.cart-price-break {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-body, var(--text));
  min-width: 12rem;
}
.cart-price-break .checkout-pb-row {
  margin: 0.18rem 0;
  grid-template-columns: minmax(0, 1fr) max-content;
}
.price-box .product-price-break {
  margin-top: 0.55rem;
}
/* Endsumme: Label links, Betrag rechts — kein Überlauf */
.checkout-summary-footer .totals .cs-row.sum {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  column-gap: 0.75rem;
  align-items: start;
  justify-content: space-between;
  width: 100%;
}
.checkout-summary-footer .totals .cs-row.sum > span:first-child {
  flex-shrink: 0;
  padding-right: 0.25rem;
}
.checkout-summary-footer .totals .cs-row.sum > span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  min-width: 0;
}
.checkout-summary-footer .totals .cs-row.sum .pb-amt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
}
.checkout-summary-footer .totals .cs-row.sum .pb-net {
  white-space: nowrap;
  font-weight: 700;
}
.checkout-summary-footer .totals .cs-row.sum .pb-gross {
  white-space: nowrap;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--muted);
}
/* Druckdaten-Thumb in der Kopfzeile (nicht absolut über dem ganzen Block) */
.checkout-line-head .checkout-print-thumb {
  position: static;
  top: auto;
  right: auto;
  width: 5.5rem;
  flex-shrink: 0;
  justify-self: end;
}
.checkout-print-thumb {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 5.5rem;
  height: auto;
  aspect-ratio: auto;
  max-height: none;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  box-sizing: border-box;
  padding: 0;
  place-items: initial;
}
.checkout-print-thumb-frame {
  width: 100%;
  flex: 0 0 auto;
  max-height: 5.5rem;
  border-radius: 0;
  border: 2px solid var(--accent-2, #22d3ee);
  background: var(--paper-2, #0a0e14);
  overflow: hidden;
  display: block;
  box-sizing: border-box;
  aspect-ratio: 2 / 1;
  line-height: 0;
}
.checkout-print-thumb-frame--ok,
.checkout-print-thumb-frame--full {
  border-color: var(--accent-2, #22d3ee);
}
.checkout-print-thumb-frame--crop {
  border-color: #f59e0b !important;
}
.checkout-print-thumb-frame--adjust {
  border-color: #34d399 !important; /* grün wie Anpassung OK */
  /* AR kommt inline vom Datenformat; max-height lässt Höhe mitwachsen */
  max-height: 6.5rem;
}
.checkout-print-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}
/* Blob ist schon im Format gerendert (Cover oder Edge-Extend) → immer füllen */
.checkout-print-thumb-img--full {
  object-fit: cover;
}
.checkout-print-thumb-img--crop {
  object-fit: cover;
}
.checkout-print-thumb-hint {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  background: transparent;
  border: none;
  white-space: normal;
  text-align: center;
}
.checkout-print-thumb-hint--ok {
  color: var(--accent-2, #22d3ee);
}
.checkout-print-thumb-hint--crop {
  color: #fbbf24;
}
.checkout-print-thumb-hint--adjust {
  color: #34d399;
}
/* Host: kein eigener Rahmen */
.checkout-print-thumb--ok,
.checkout-print-thumb--full,
.checkout-print-thumb--crop,
.checkout-print-thumb--adjust,
.checkout-print-thumb--stack {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  aspect-ratio: auto !important;
  max-height: none !important;
}

.checkout-print-thumb-ph {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* Warenkorb: Thumb links vom Artikeltext */
.cart-table .cart-item-td {
  min-width: 14rem;
  vertical-align: top;
}
.cart-item-cell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.75rem;
  align-items: start;
}
.cart-item-body { min-width: 0; }
.cart-item-title {
  display: block;
  line-height: 1.25;
  margin: 0 0 0.15rem;
}
.cart-print-thumb {
  position: static;
  top: auto;
  right: auto;
  width: 5.5rem;
  max-height: none;
}

@media (max-width: 700px) {
  .cart-item-cell {
    grid-template-columns: 1fr;
  }
  .cart-print-thumb {
    width: 4.75rem;
  }
}

/* Theme toggle (visitor) */
.theme-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex: 0 0 auto;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}
html[data-theme="light"] body {
  color-scheme: light;
}
html[data-theme="dark"] body {
  color-scheme: dark;
}

