:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f3f4f6;
  --border: #e5e7eb;
  --text: #16181d;
  --muted: #6b7280;
  --accent: #ee7203;         /* PT24-Orange */
  --accent-2: #f97316;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
/* SVG-Icons (Feather-Stil) */
.ic { width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2;
      stroke-linecap:round; stroke-linejoin:round; vertical-align:-2.5px; flex:0 0 auto; }
.ic-lg { width:20px; height:20px; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ── App-Layout: Sidebar links (PT24-Stil) + Inhalt rechts ── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 218px; flex: 0 0 218px; background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 14.5px; padding: 18px 16px 14px; }
.logo {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 13px; flex: 0 0 auto;
}
.brand strong { letter-spacing: .01em; }
.sidenav { flex: 1; padding: 4px 10px 12px; }
.nav-group { margin-top: 14px; }
.nav-group-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: #9aa1ad; padding: 0 8px; margin-bottom: 4px;
}
.sidenav a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px; color: #3f4550; font-weight: 500; font-size: 13.5px;
}
.sidenav a:hover { background: var(--panel-2); text-decoration: none; color: var(--text); }
.sidenav a.active { background: #fff3e8; color: var(--accent); font-weight: 600; }
.sidenav a .ni { width: 18px; display:inline-flex; justify-content:center; flex: 0 0 auto; opacity: .8; }
.side-foot { padding: 12px 16px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.side-foot a.logout-btn {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 8px; color: #3f4550; font-weight: 600; font-size: 13px;
}
.side-foot a.logout-btn:hover { background: var(--panel-2); text-decoration: none; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .sidenav { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 10px 10px; }
  .nav-group { margin: 4px 6px 0 0; }
  .nav-group-label { display: none; }
}

main { max-width: 1280px; width: 100%; margin: 0 auto; padding: 26px 28px 60px; }

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 26px 0 12px; }
.sub { color: var(--muted); margin: 0 0 20px; }

/* flashes */
.flashes { margin-bottom: 18px; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); }
.flash-success { background: rgba(22,163,74,.09); border-color: rgba(22,163,74,.35); }
.flash-error { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.35); }
.flash-warn { background: rgba(217,119,6,.09); border-color: rgba(217,119,6,.35); }

/* cards & grid */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.card .num { font-size: 30px; font-weight: 700; }
.card .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card.alert .num { color: var(--amber); }
.card.bad .num { color: var(--red); }

.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow);
}

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: var(--panel-2); }
td.right, th.right { text-align: right; }

/* badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.b-imported { background: rgba(29,78,216,.08); color: #1d4ed8; }
.b-changed { background: rgba(217,119,6,.12); color: var(--amber); }
.b-error { background: rgba(220,38,38,.10); color: var(--red); }
.b-new { background: rgba(22,163,74,.12); color: var(--green); }
.b-ok { background: rgba(22,163,74,.10); color: var(--green); }

/* buttons */
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer; font-size: 13px;
}
.btn:hover { background: #eceef2; text-decoration: none; }
.btn-primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn-primary:hover { background: #d96500; border-color: #d96500; }
.btn-secondary { background: var(--panel); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: #eceef2; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { background: transparent; }

/* forms */
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px; font-family: inherit;
}
textarea { min-height: 70px; resize: vertical; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 180px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 200px; }
.spacer { flex: 1; }

/* issues */
.issue { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.error { background: var(--red); }
.dot.warn { background: var(--amber); }
.dot.ok { background: var(--green); }

/* ════════════ Artikel-Katalog: Shop-Ansicht / Listen-Ansicht ════════════ */
.view-toggle { display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.vt-btn { background:var(--panel); color:var(--muted); border:none; padding:6px 12px; cursor:pointer; font-size:12px; font-weight:600; }
.vt-btn + .vt-btn { border-left:1px solid var(--border); }
.vt-btn:hover { background:var(--panel-2); color:var(--text); }
.vt-btn.active { background:var(--accent); color:#fff; }

body.view-grid #listView { display:none; }
body.view-list #shopGrid { display:none; }

.shop-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap:14px; }
.shop-card {
  background:var(--panel); border:1px solid var(--border); border-radius:12px; overflow:hidden;
  display:flex; flex-direction:column; color:var(--text); transition:border-color .15s, transform .1s;
}
.shop-card:hover { border-color:var(--accent); text-decoration:none; transform:translateY(-2px); }
.shop-img { position:relative; aspect-ratio:4/3; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.shop-img img { width:100%; height:100%; object-fit:contain; padding:10px; }
.shop-img.noimg { background:var(--panel-2); }
.shop-noimg { font-size:34px; opacity:.4; }
.shop-badge { position:absolute; top:8px; left:8px; }
.shop-body { padding:10px 12px 12px; display:flex; flex-direction:column; gap:2px; }
.shop-title { font-weight:600; font-size:13px; line-height:1.3; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; min-height:2.2em; }
.shop-meta code { font-size:11px; }
.shop-cat { font-size:11px; color:var(--muted); }
.shop-counts { display:flex; gap:11px; font-size:11px; color:var(--muted); margin-top:5px; }

/* Optionen-Pflege: Editier-Tabelle */
.opt-edit-table { width:100%; border-collapse:collapse; }
.opt-edit-table th { text-align:left; }
.opt-edit-table td { padding:5px 8px 5px 0; vertical-align:middle; }
.opt-edit-table input[type=text] { padding:6px 8px; }
.opt-edit-table .opt-num { width:80px; }
.opt-color-cell { display:flex; align-items:center; gap:6px; }
.opt-color-cell input[type=color] { width:30px; height:30px; padding:0; border:1px solid var(--border); border-radius:6px; background:none; cursor:pointer; flex:0 0 auto; }
.opt-color-text { width:90px; }

/* KI-Bildkatalog */
.ai-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap:12px; }
.ai-card { position:relative; background:var(--panel); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.ai-card.is-done { border-color:rgba(22,163,74,.35); }
.ai-pick { position:absolute; top:6px; left:6px; z-index:2; background:rgba(255,255,255,.78); border-radius:5px; padding:3px; line-height:0; }
.ai-pick input { width:auto; margin:0; }
.ai-img { position:relative; aspect-ratio:1/1; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.ai-img img { width:100%; height:100%; object-fit:contain; padding:8px; }
.ai-badge { position:absolute; top:6px; right:6px; }
.ai-body { padding:8px 10px; }
.ai-sku code { font-size:10px; }
.ai-label { font-size:11px; font-weight:600; margin-top:3px; line-height:1.2; }
.ai-flags { font-size:13px; margin-top:2px; min-height:16px; }
.ai-cost { font-size:10px; color:var(--muted); margin-top:3px; }
.ai-open { font-size:10px; margin-top:4px; }

/* KI Flag-Chips (beschriftet, farbcodiert) */
.flag-chips { display:inline-flex; flex-wrap:wrap; gap:4px; }
.flag-chip { display:inline-flex; align-items:center; gap:5px; font-size:10px; font-weight:600;
  padding:2px 8px; border-radius:999px; border:1px solid var(--border); line-height:1.5; white-space:nowrap; }
.flag-chip i { width:6px; height:6px; border-radius:50%; flex:0 0 auto; background:currentColor; }
.fc-blue   { color:#1d4ed8; background:rgba(29,78,216,.07);  border-color:rgba(29,78,216,.3); }
.fc-amber  { color:#b45309; background:rgba(217,119,6,.09);  border-color:rgba(217,119,6,.3); }
.fc-purple { color:#6d28d9; background:rgba(109,40,217,.08);  border-color:rgba(109,40,217,.3); }
.fc-teal   { color:#0f766e; background:rgba(15,118,110,.08);  border-color:rgba(15,118,110,.3); }
.fc-green  { color:#15803d; background:rgba(22,163,74,.09);  border-color:rgba(22,163,74,.3); }
.fc-red    { color:#b91c1c; background:rgba(220,38,38,.08);   border-color:rgba(220,38,38,.3); }
.fc-gray   { color:var(--muted); background:var(--panel-2);   border-color:var(--border); }
.flag-legend { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; font-size:11px; color:var(--muted); }

/* KI Modell-Vergleich */
.cmp-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap:14px; }
.cmp-col { background:var(--panel); border:1px solid var(--border); border-radius:10px; padding:14px; }
.cmp-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.cmp-head code { font-size:12px; }
.cmp-table { width:100%; border-collapse:collapse; font-size:12px; }
.cmp-table th { text-align:left; vertical-align:top; color:var(--muted); font-weight:600; width:34%; padding:5px 8px 5px 0; white-space:nowrap; }
.cmp-table td { padding:5px 0; border-bottom:1px solid var(--border); }
.cmp-rate { display:flex; align-items:center; gap:8px; margin-top:10px; }
.rate-btn { background:var(--panel-2); border:1px solid var(--border); border-radius:8px; padding:5px 11px; cursor:pointer; font-size:15px; }
.rate-btn:hover { background:#eceef2; }
.rate-btn.up.on { background:rgba(22,163,74,.14); border-color:var(--green); }
.rate-btn.down.on { background:rgba(220,38,38,.12); border-color:var(--red); }

/* Artikel-Suche (Autocomplete) */
.search-results { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:20; background:var(--panel); border:1px solid var(--border); border-radius:8px; overflow:hidden; box-shadow:0 8px 24px rgba(16,24,40,.12); max-height:300px; overflow-y:auto; }
.search-results[hidden] { display:none; }
.sr-item { display:block; padding:8px 12px; color:var(--text); border-bottom:1px solid var(--border); }
.sr-item:hover { background:var(--panel-2); text-decoration:none; }
.sr-item code { font-size:11px; color:var(--muted); margin-left:6px; }
.sr-empty { padding:10px 12px; color:var(--muted); font-size:13px; }

/* detail layout */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px){ .detail-grid { grid-template-columns: 1fr; } }
.preview-frame {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; color: #111;
}
.preview-hero { padding: 26px 22px; background: linear-gradient(135deg,#eef2ff,#fff); }
.preview-hero h3 { margin: 0 0 6px; font-size: 22px; color: #111; }
.preview-hero p { margin: 0; color: #555; }
.preview-body { padding: 18px 22px; }
.chip { display:inline-block; background:#eef1f6; color:#333; border-radius:6px; padding:3px 9px; margin:3px 4px 3px 0; font-size:12px; }
.chip-eco { background:rgba(22,163,74,.09); color:#2ecc71; border-radius:6px; padding:3px 9px; margin:3px 4px 3px 0; font-size:12px; display:inline-block; }
.chip-color { display:inline-flex; align-items:center; gap:5px; border-radius:6px; padding:3px 9px; margin:3px 4px 3px 0; font-size:12px; border:1px solid var(--border); background:var(--panel-2); color:var(--text); }
.color-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }

/* Thumbs mit Scraping-Badge */
.thumbs { display:flex; gap:8px; flex-wrap:wrap; }
.thumb-wrap { position:relative; }
.thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; border:1px solid var(--border); background: var(--panel-2); display:block; }
.thumb-badge { position:absolute; bottom:3px; right:3px; background:rgba(238,114,3,.9); color:#fff; font-size:9px; padding:1px 4px; border-radius:3px; }

/* Allgemeine Eigenschafts-Illustration (z.B. Druckpositionen) — gehört zur
   Property, nicht zu einer einzelnen Option */
.group-illustration { display:inline-flex; flex-direction:column; gap:5px; margin-bottom:12px; }
.group-illustration img { max-width:340px; max-height:200px; width:auto; height:auto; object-fit:contain; background:#fff; border:1px solid var(--border); border-radius:10px; padding:8px; }
.group-illustration-note { font-size:11px; color:var(--muted); }

/* Option-Cards (nach Scraping) */
.option-cards { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:12px; }
.option-card { background:var(--panel-2); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.option-card-img { height:120px; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.option-card-img img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; padding:8px; }
.option-card-body { padding:12px 14px; }
.option-card-title { font-weight:600; font-size:13px; margin-bottom:6px; }
.option-card-desc { font-size:11px; color:var(--muted); line-height:1.5; max-height:80px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; }
.option-card-link { display:inline-block; margin-top:8px; font-size:11px; color:var(--accent); }
.option-card-hints { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.hint-icon { width:28px; height:28px; object-fit:contain; background:#f5f5f5; border-radius:4px; padding:2px; }
.hint-chip { display:inline-flex; align-items:center; gap:5px; background:var(--panel-2); border:1px solid var(--border); border-radius:14px; padding:2px 9px 2px 3px; }
.hint-text { font-size:11px; color:var(--muted); }
.meta-tag { display:inline-block; background:var(--panel); border:1px solid var(--border); border-radius:4px; padding:1px 6px; font-size:10px; color:var(--muted); white-space:nowrap; }

pre.raw { background: var(--bg); border:1px solid var(--border); border-radius:8px; padding:12px; max-height:340px; overflow:auto; font-size:12px; }
.muted { color: var(--muted); }
.kv { display:flex; justify-content: space-between; padding:5px 0; border-bottom:1px dashed var(--border); }
.empty { color: var(--muted); padding: 30px; text-align:center; }
#testResult { margin-top:12px; }

/* ════════════════════ Artikel-Detailseite (PDP) ════════════════════ */
.pdp-head { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.lang-row { display:flex; flex-wrap:wrap; gap:5px; }
.lang-btn { background: var(--panel); border:1px solid var(--border); border-radius:5px; padding:3px 9px; font-size:12px; cursor:pointer; color: var(--text); }
.lang-btn:hover { background:#eceef2; }
.lang-btn.active { background: var(--accent); border-color: var(--accent); color:#fff; }
.lang-load-form { display:inline; margin:0; }
.lang-btn.lang-load { border-style:dashed; color:var(--muted); opacity:.85; }
.lang-btn.lang-load:hover { opacity:1; color:var(--text); }
.lang-btn.lang-load .plus { font-weight:700; }
.lang-btn.lang-load[disabled] { opacity:.6; cursor:default; }
.lang-btn.lang-load-all { border-style:dashed; border-color:var(--accent); color:var(--accent); font-weight:600; }
.lang-btn.lang-load-all:hover { background:rgba(238,114,3,.08); }
.lang-btn.lang-load-all[disabled] { opacity:.6; cursor:default; }

.pdp-top {
  display:grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  gap:28px; align-items:start; margin-bottom:10px;
}
@media (max-width: 920px){ .pdp-top { grid-template-columns: 1fr; } }

/* ── Linke Spalte: Galerie + Produkt-Details darunter ── */
.pdp-left { display: flex; flex-direction: column; gap: 16px; }
/* Galerie NICHT mehr sticky: darunter stehen jetzt die Produkt-Details, ein
   sticky Bild würde beim Scrollen über die Details rutschen (Overlap). */
.gallery { position: static; }
.pd-card { /* Produkt-Details/Beschreibung unter dem Bild */ }
.gallery-main {
  margin:0; background:#fff; border:1px solid var(--border); border-radius: var(--radius);
  aspect-ratio: 4 / 3; display:flex; align-items:center; justify-content:center;
  overflow:hidden; cursor: zoom-in; position:relative;
}
.gallery-main img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; padding:14px; transition: transform .25s ease; }
.gallery-main:hover img { transform: scale(1.03); }
.zoom-hint {
  position:absolute; bottom:10px; right:10px; background:rgba(15,17,21,.78); color:#fff;
  font-size:11px; padding:4px 9px; border-radius:999px; opacity:0; transition:opacity .2s;
}
.gallery-main:hover .zoom-hint { opacity:1; }

.strip-wrap { display:flex; align-items:center; gap:6px; margin-top:10px; }
.strip { display:flex; gap:8px; overflow-x:auto; scroll-behavior:smooth; padding:2px; flex:1; scrollbar-width:thin; }
.strip::-webkit-scrollbar { height:6px; }
.strip::-webkit-scrollbar-thumb { background: var(--border); border-radius:3px; }
.thumb {
  flex:0 0 auto; width:72px; height:58px; padding:0; border:2px solid var(--border);
  border-radius:8px; overflow:hidden; background:#fff; cursor:pointer; transition:border-color .15s;
}
.thumb img { width:100%; height:100%; object-fit:contain; padding:4px; display:block; }
.thumb:hover { border-color:#d1d5db; }
.thumb.active { border-color: var(--accent); }
.thumb.broken { display:none; }
.strip-nav {
  flex:0 0 auto; width:30px; height:58px; border:1px solid var(--border); background:var(--panel-2);
  color:var(--text); border-radius:8px; cursor:pointer; font-size:20px; line-height:1; display:grid; place-items:center;
}
.strip-nav:hover { background:#eceef2; }

.gallery-empty {
  background: var(--panel); border:1px dashed var(--border); border-radius: var(--radius);
  aspect-ratio: 4 / 3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color: var(--muted);
}
.gallery-empty .ge-icon { font-size:38px; opacity:.6; }
.gallery-empty p { margin:0; }

/* ── Lightbox ── */
.lightbox {
  position:fixed; inset:0; z-index:100; background:rgba(8,9,12,.92);
  display:flex; align-items:center; justify-content:center;
}
.lightbox[hidden] { display:none; }
.lightbox img { max-width:88vw; max-height:88vh; object-fit:contain; border-radius:6px; }
.lb-btn { position:absolute; background:rgba(255,255,255,.10); color:#fff; border:none; cursor:pointer; border-radius:10px; }
.lb-btn:hover { background:rgba(255,255,255,.22); }
.lb-close { top:20px; right:24px; width:42px; height:42px; font-size:26px; }
.lb-prev, .lb-next { top:50%; transform:translateY(-50%); width:52px; height:72px; font-size:40px; }
.lb-prev { left:20px; } .lb-next { right:20px; }
.lb-counter { position:absolute; bottom:20px; left:50%; transform:translateX(-50%); color:#cfd6e4; font-size:13px; }
@media (max-width:600px){ .lb-prev,.lb-next{ width:40px; height:56px; font-size:30px; } }

/* ── Konfigurator ── */
.configurator { display:flex; flex-direction:column; gap:16px; }
.cfg-card { background: var(--panel); border:1px solid var(--border); border-radius: var(--radius); padding:18px 20px; }
.cfg-title { font-size:15px; font-weight:700; margin-bottom:14px; }
.opt-group { margin-bottom:16px; }
.opt-label { font-size:12px; color: var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.03em; margin-bottom:7px; }
.opt-label .req { color: var(--amber); margin-left:3px; }
.opt-select { width:100%; }

.tiles { display:flex; flex-wrap:wrap; gap:8px; }
.tile {
  position:relative; border:1.5px solid var(--border); background: var(--panel-2); border-radius:9px;
  padding:9px 13px; cursor:pointer; display:flex; flex-direction:column; gap:2px; min-width:0;
  transition: border-color .15s, background .15s;
}
.tile input { position:absolute; opacity:0; pointer-events:none; }
.tile:hover { border-color:#d1d5db; }
.tile:has(input:checked) { border-color: var(--accent); background: rgba(238,114,3,.08); }
.tile-name { font-size:13px; font-weight:600; color: var(--text); }
.tile-meta { font-size:11px; color: var(--muted); }
.tile .eco { color: var(--green); }

.swatches { display:flex; flex-wrap:wrap; gap:8px; max-height:240px; overflow:auto; padding:2px; }
.swatches::-webkit-scrollbar { width:6px; }
.swatches::-webkit-scrollbar-thumb { background: var(--border); border-radius:3px; }
.swatch {
  position:relative; display:flex; align-items:center; gap:7px; border:1.5px solid var(--border);
  background: var(--panel-2); border-radius:999px; padding:5px 12px 5px 7px; cursor:pointer; transition: border-color .15s, background .15s;
}
.swatch input { position:absolute; opacity:0; pointer-events:none; }
.swatch:hover { border-color:#d1d5db; }
.swatch:has(input:checked) { border-color: var(--accent); background: rgba(238,114,3,.08); }
.sw-dot { width:16px; height:16px; border-radius:50%; flex:0 0 auto; border:1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.sw-name { font-size:12.5px; color: var(--text); }

/* Festgelegte (Einzel-Option) Properties: standardmäßig ausgeblendet */
.show-fixed-toggle { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted); margin:0 0 16px; cursor:pointer; }
.show-fixed-toggle[hidden] { display:none; }
.show-fixed-toggle input { width:auto; margin:0; }
.opt-group.single-fixed { display:none; }
#cfgForm.show-fixed .opt-group.single-fixed { display:block; }
#cfgForm.show-fixed .opt-group.single-fixed { opacity:.75; }

/* Nicht-mögliche Optionen (verletzen Ausschlussregeln bei aktueller Auswahl) */
.tile.impossible, .swatch.impossible { position:relative; opacity:.55; cursor:help; }
.tile.impossible .tile-name, .swatch.impossible .sw-name { text-decoration:line-through; }
.tile.impossible::after { content:''; position:absolute; top:6px; right:6px; width:8px; height:8px; border-radius:50%; background:var(--red); }
.swatch.impossible { padding-right:24px; }
.swatch.impossible::after { content:''; position:absolute; top:50%; right:9px; transform:translateY(-50%); width:8px; height:8px; border-radius:50%; background:var(--red); }

.opt-popover {
  position:absolute; z-index:60; max-width:270px; background:var(--panel-2);
  border:1px solid var(--red); border-radius:9px; padding:11px 13px; font-size:12px;
  color:var(--text); line-height:1.5; box-shadow:0 10px 30px rgba(16,24,40,.15);
}
.opt-popover[hidden] { display:none; }
.opt-popover b { color:#b91c1c; }
.opt-popover .cfg-fix { width:100%; margin-top:10px; }
.opt-popover .cfg-fix-msg:empty { display:none; }
.opt-popover .cfg-fix-msg { margin-top:8px; font-size:11.5px; }
.opt-popover .cfg-fix-msg.ok { color:var(--green); }
.opt-popover .cfg-fix-msg.err { color:#b91c1c; }

/* Eigenes Format (custom size) — Eingabefelder mit API-Grenzen */
.custom-size { margin-top:10px; padding:12px; background:var(--bg); border:1px solid var(--border); border-radius:9px; }
.custom-size[hidden] { display:none; }
.custom-size-row { display:flex; gap:10px; }
.custom-size-row label { flex:1; font-size:11px; color:var(--muted); margin:0; }
.custom-size-row input { width:100%; margin-top:4px; }
.custom-size-row input:invalid { border-color:var(--red); }
.custom-size-hint { font-size:11px; color:var(--muted); margin-top:7px; }

.cfg-calc { width:100%; margin-top:4px; padding:11px; font-size:14px; }
.cfg-result:empty { display:none; }
.cfg-result { margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
.price-main { font-size:30px; font-weight:800; color: var(--text); line-height:1.1; }
.price-main span { font-size:15px; font-weight:600; color: var(--muted); }
.price-sub { color: var(--muted); font-size:13px; margin-top:2px; }
.price-spec { margin-top:8px; font-size:13px; color: var(--text); }

/* Produkt-Details Spec-Tabelle */
.spec-table { width:100%; border-collapse:collapse; font-size:13px; }
.spec-table tr { border-bottom:1px solid var(--border); }
.spec-table tr:last-child { border-bottom:none; }
.spec-table th { text-align:left; vertical-align:top; padding:7px 12px 7px 0; color: var(--muted); font-weight:600; white-space:nowrap; width:40%; }
.spec-table td { padding:7px 0; color: var(--text); }
.spec-table .spec-desc { margin-top:3px; color: var(--muted); font-size:12px; }
.spec-table .spec-desc p { margin:0 0 4px; }
.hero-desc { font-size:13.5px; color: var(--text); }
.hero-desc p { margin:0 0 6px; }
.hero-desc ul { margin:4px 0; padding-left:18px; }

.raw-details { margin-top:26px; }
.raw-details > summary { cursor:pointer; list-style:none; }
.raw-details > summary::-webkit-details-marker { display:none; }
.raw-details > summary h2 { margin:0; }
.raw-details > summary::before { content:'▸ '; color: var(--muted); }
.raw-details[open] > summary::before { content:'▾ '; }

/* Sub-Navigation (Bilder & KI Hub) */
.subnav { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 18px; border-bottom:1px solid var(--border); padding-bottom:10px; }
.subnav a { padding:7px 14px; border-radius:7px; font-size:13px; font-weight:500; color:var(--muted); text-decoration:none; }
.subnav a:hover { background:var(--panel-2); color:var(--text); }
.subnav a.on { background:var(--accent); color:#fff; }
.subnav-2 { border-bottom:none; margin-bottom:14px; }
.subnav-2 a { font-size:12px; padding:5px 11px; }
.subnav-2 a.on { background:var(--panel-2); color:var(--text); border:1px solid var(--border); }
/* Detail-Tabs */
.dtabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:14px; }
.dtab { padding:8px 14px; border-radius:7px 7px 0 0; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer; border:1px solid transparent; background:none; }
.dtab.on { color:var(--text); background:var(--panel); border-color:var(--border); border-bottom-color:var(--panel); }
.dpane { display:none; }
.dpane.on { display:block; }

/* Vergleichs-Dialog (Original ↔ Mockup mit Wisch-Schieber) */
.cmp-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.9); z-index:1100; align-items:center; justify-content:center; flex-direction:column; gap:14px; }
.cmp-modal.on { display:flex; }
.cmp-box { position:relative; width:min(86vw,640px); aspect-ratio:1/1; background:#fff; border-radius:8px; overflow:hidden; touch-action:none; }
.cmp-box .cmp-base { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.cmp-over { position:absolute; top:0; left:0; height:100%; width:50%; overflow:hidden; border-right:2px solid #fff; }
.cmp-over img { position:absolute; top:0; left:0; object-fit:contain; }
.cmp-lbl { position:absolute; top:8px; padding:2px 8px; border-radius:6px; font-size:11px; color:#fff; background:rgba(0,0,0,.55); }
.cmp-lbl.l { left:8px; } .cmp-lbl.r { right:8px; }
.cmp-range { width:min(86vw,640px); }
.cmp-close { color:#fff; cursor:pointer; font-size:13px; }
