:root {
  --ink: #0f1720; --muted: #64748b; --line: #e5e7eb; --bg: #f6f7f9; --card: #fff;
  --brand: #ff5a1f; --brand-dark: #e04810; --dark: #0f1720; --ok: #16a34a; --bad: #dc2626; --wait: #d97706;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1 { font-size: 1.7rem; margin: .6em 0 .4em; } h2 { font-size: 1.25rem; margin: 1.4em 0 .6em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; }
.demo-bar { background: #fff3cd; color: #7a5a00; text-align: center; font-size: .85rem; padding: 4px; }

/* Header */
.site-header { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { font-weight: 900; font-size: 1.35rem; letter-spacing: .5px; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--brand); }
.search { flex: 1; display: flex; max-width: 620px; }
.search input { flex: 1; border: 0; padding: 10px 12px; border-radius: 8px 0 0 8px; font-size: 1rem; min-width: 0; }
.search button { border: 0; background: var(--brand); padding: 0 14px; border-radius: 0 8px 8px 0; cursor: pointer; }
.header-links { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.header-links a { text-decoration: none; }
.badge { background: var(--brand); border-radius: 99px; padding: 0 7px; font-size: .8rem; }
.lang { position: relative; cursor: pointer; } .lang summary { list-style: none; }
.lang .dropdown { position: absolute; right: 0; top: 140%; background: #fff; color: var(--ink); border-radius: 8px; box-shadow: 0 8px 24px #0003; min-width: 140px; overflow: hidden; }
.lang .dropdown a { display: block; padding: 8px 14px; } .lang .dropdown a:hover, .lang .dropdown a.active { background: var(--bg); }
.cat-nav { background: #1b2530; overflow-x: auto; }
.cat-nav .wrap { display: flex; gap: 4px; }
.cat-nav a { padding: 8px 12px; text-decoration: none; white-space: nowrap; font-size: .92rem; color: #dbe2ea; }
.cat-nav a:hover { color: #fff; background: #ffffff14; }

main { min-height: 60vh; padding-bottom: 40px; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 12px 0; background: #e8f5ee; color: #14532d; }
.flash.error { background: #fdecec; color: #7f1d1d; } .flash.info { background: #e8f0fd; color: #1e3a8a; }

/* Buttons & Forms */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #e2e8f0; color: var(--ink); } .btn.secondary:hover { background: #cbd5e1; }
.btn.danger { background: #fee2e2; color: var(--bad); }
.btn.full { width: 100%; display: block; }
.link { background: none; border: 0; padding: 0; color: #2563eb; cursor: pointer; font: inherit; } .link.danger { color: var(--bad); }
.inline { display: inline; }
.form { background: var(--card); padding: 20px; border-radius: var(--radius); display: grid; gap: 12px; max-width: 720px; }
.form.narrow { max-width: 420px; } .form.wide { max-width: 900px; }
label { display: grid; gap: 4px; font-size: .92rem; font-weight: 500; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; width: 100%; }
label.check { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Startseite */
.hero { background: linear-gradient(120deg, #0f1720, #263445 60%, #ff5a1f); color: #fff; border-radius: var(--radius); padding: 40px 28px; margin-top: 18px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 6px; } .hero p { opacity: .9; margin: 0 0 18px; }
.hero-search { display: flex; gap: 8px; max-width: 520px; } .hero-search input { border: 0; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-tile { background: var(--card); border-radius: var(--radius); padding: 16px; text-decoration: none; display: grid; gap: 4px; border: 1px solid var(--line); }
.cat-tile:hover { border-color: var(--brand); }
.cat-icon { font-size: 1.8rem; }

/* Produktkarten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; border: 1px solid var(--line); display: flex; flex-direction: column; }
.card:hover { box-shadow: 0 6px 20px #0001; }
.card-img { aspect-ratio: 1; background: #eef1f4; } .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px 14px; display: grid; gap: 4px; }
.card-title { font-weight: 600; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 800; color: var(--ink); } .price s { color: var(--muted); font-weight: 400; font-size: .85em; } .price.big { font-size: 1.7rem; }
.pager { display: flex; justify-content: center; gap: 14px; margin: 20px 0; align-items: center; }
.pager a { background: var(--card); padding: 6px 14px; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); }

/* Kategorie-Seite */
.crumbs { font-size: .88rem; color: var(--muted); margin-top: 14px; } .crumbs a { text-decoration: none; }
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.layout.checkout { grid-template-columns: 1fr 340px; }
.side { background: var(--card); border-radius: var(--radius); padding: 12px; display: grid; gap: 2px; position: sticky; top: 120px; }
.side a { text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .93rem; }
.side a.active, .side a:hover { background: var(--bg); color: var(--brand); }
.side-title { font-weight: 700; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list-head select { width: auto; }

/* Produktseite */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin-top: 14px; }
.gallery img#main-img { border-radius: var(--radius); background: #fff; aspect-ratio: 1; object-fit: contain; width: 100%; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
.buybox { background: var(--card); border-radius: var(--radius); padding: 22px; align-self: start; }
.buybox h1 { margin-top: 2px; }
.facts { list-style: none; padding: 0; display: grid; gap: 6px; margin: 16px 0; }
.buy-form { display: flex; gap: 8px; } .buy-form input { width: 80px; } .buy-form .btn { flex: 1; }
.desc { background: var(--card); border-radius: var(--radius); padding: 20px; margin-top: 24px; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; margin: 10px 0; }
.table td, .table th { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: .93rem; }
.table th { background: #f1f4f7; font-weight: 600; }
.thumb { width: 64px; } .thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.qty { width: 74px; }
.totals { max-width: 360px; margin-left: auto; background: var(--card); padding: 16px; border-radius: var(--radius); display: grid; gap: 6px; }
.totals div, .sum-line { display: flex; justify-content: space-between; gap: 10px; }
.grand { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 8px; }
.summary { background: var(--card); padding: 18px; border-radius: var(--radius); display: grid; gap: 8px; align-self: start; }
.summary h2 { margin-top: 0; }
.center-box { text-align: center; background: var(--card); padding: 40px 20px; border-radius: var(--radius); margin: 30px auto; max-width: 620px; }

/* Händler/Admin */
.subnav, .tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; align-items: center; }
.subnav a, .tabs a { padding: 7px 12px; border-radius: 8px; background: var(--card); text-decoration: none; font-size: .92rem; border: 1px solid var(--line); }
.subnav a.active, .tabs a.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.tabs form input { width: 220px; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .8rem; background: #e2e8f0; }
.pill.ok { background: #dcfce7; color: var(--ok); } .pill.bad { background: #fee2e2; color: var(--bad); } .pill.wait { background: #fef3c7; color: var(--wait); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px; display: grid; text-decoration: none; border: 1px solid var(--line); }
.stat span { color: var(--muted); font-size: .85rem; } .stat strong { font-size: 1.45rem; }
.stat.alert { border-color: var(--brand); } .stat.alert strong { color: var(--brand); }
.order-card, .review { background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--line); display: grid; gap: 8px; }
.oc-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.oc-body { display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.address { font-size: .9rem; background: var(--bg); padding: 8px 12px; border-radius: 8px; }
.ship-form, .admin-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.ship-form select { width: auto; } .ship-form input { width: 240px; }
.admin-form label { flex: 1; min-width: 180px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.review { grid-template-columns: 220px 1fr; }
.review-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } .review-imgs img { aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.review-body { display: grid; gap: 8px; }
.ai-box { background: #f0f7ff; border-radius: 8px; padding: 8px 10px; }
.img-edit { display: flex; gap: 10px; flex-wrap: wrap; } .img-edit label { width: 110px; font-weight: 400; } .img-edit img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.img-edit input { width: auto; }
.convo { background: var(--bg); border-radius: 8px; padding: 8px 12px; font-size: .9rem; display: grid; gap: 4px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.cat-row { display: flex; justify-content: space-between; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--card); }
.lead { font-size: 1.05rem; } .steps { background: var(--card); border-radius: var(--radius); padding: 14px 14px 14px 34px; }
.legal { background: var(--card); padding: 24px; border-radius: var(--radius); margin-top: 16px; max-width: 860px; }

/* Footer */
.site-footer { background: var(--dark); color: #cbd5e1; padding: 30px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; }
.footer-grid a { display: block; text-decoration: none; padding: 2px 0; } .footer-grid a:hover { color: #fff; }

/* Chat */
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 50; }
.chat-toggle { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--brand); font-size: 1.6rem; cursor: pointer; box-shadow: 0 6px 18px #0004; }
.chat-box { position: absolute; right: 0; bottom: 70px; width: 360px; max-width: calc(100vw - 36px); height: 480px; max-height: calc(100vh - 120px); background: #fff; border-radius: 14px; box-shadow: 0 12px 40px #0004; display: flex; flex-direction: column; overflow: hidden; }
.chat-box[hidden] { display: none; }
.chat-head { background: var(--dark); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; font-weight: 600; }
.chat-head button { background: none; border: 0; color: #fff; cursor: pointer; font-size: 1rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; font-size: .93rem; }
.chat-msg.bot { background: #fff; align-self: flex-start; border: 1px solid var(--line); }
.chat-msg.me { background: var(--brand); color: #fff; align-self: flex-end; }
.chat-msg a { color: #2563eb; } .chat-msg.typing { color: var(--muted); }
.chat-form { display: flex; border-top: 1px solid var(--line); }
.chat-form input { border: 0; border-radius: 0; padding: 12px; }
.chat-form button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; cursor: pointer; }

/* Handy */
@media (max-width: 800px) {
  .header-row { flex-wrap: wrap; } .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-links { margin-left: auto; }
  .layout, .layout.checkout, .product, .review { grid-template-columns: 1fr; }
  .side { position: static; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .oc-body { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .table td, .table th { padding: 8px 6px; }
}

/* KI-Designs */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.design-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; align-content: start; }
.design-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; }
.design-card img.dunkel { background: #1f2937; } .design-card img.hell { background: #f1f5f9; }
.design-card .btn { font-size: .88rem; padding: 8px 10px; }

/* Design-Auswahl & Auftrag (1.2) */
.design-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.design-opt { display: grid; gap: 4px; border: 2px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; font-weight: 400; position: relative; }
.design-opt input { position: absolute; top: 6px; left: 6px; width: auto; }
.design-opt img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; }
.design-opt img.dunkel { background: #1f2937; } .design-opt img.hell { background: #f1f5f9; }
.design-opt:has(input:checked) { border-color: var(--brand); }
.design-opt .kein { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: 6px; }
.design-auftrag { display: flex; gap: 10px; align-items: center; background: #fff7ed; border-radius: 8px; padding: 8px; }
.design-auftrag img { width: 64px; height: 64px; object-fit: contain; background: #1f2937; border-radius: 6px; }

/* Merken & Teilen (1.3) */
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.aktionen .btn { padding: 9px 14px; font-size: .95rem; }
