/* V3in Market – Farben aus dem Logo: Violett #937BFF, Türkis #3FD1DF */
:root {
  --ink: #16142b;
  --ink-2: #24204a;
  --ink-3: #322d63;
  --violet: #8b6cff;
  --violet-strong: #6f50ec;
  --violet-soft: #efebff;
  --cyan: #3fd1df;
  --cyan-strong: #1fb4c3;
  --cyan-soft: #e3f8fa;
  --bg: #eeedf4;
  --card: #ffffff;
  --text: #1b1a2e;
  --muted: #696680;
  --border: #dedbea;
  --danger: #d04343;
  --danger-soft: #fdeceb;
  --success: #188a5d;
  --success-soft: #e5f6ee;
  --warn: #b86e00;
  --warn-soft: #fff4e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 20, 43, .06), 0 2px 8px rgba(22, 20, 43, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; }
a { color: var(--violet-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .75rem; }
h2, .h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
.h3, h3 { font-size: 1.08rem; margin: 0 0 .6rem; }
.h4 { font-size: .95rem; margin: 1.1rem 0 .4rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: var(--bg); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cyan); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem; max-width: 1500px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; padding: .25rem .4rem; border: 1px solid transparent; border-radius: 6px; flex-shrink: 0; }
.brand:hover { border-color: rgba(255,255,255,.5); text-decoration: none; }
.brand img { display: block; width: 40px; height: 40px; }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; white-space: nowrap; }
.admin-tag { font-size: .7rem; background: var(--cyan); color: var(--ink); padding: .1rem .4rem; border-radius: 4px; vertical-align: middle; font-weight: 700; }

.search { flex: 1; display: flex; height: 42px; border-radius: 8px; overflow: hidden; background: #fff; min-width: 0; }
.search:focus-within { box-shadow: 0 0 0 3px var(--cyan); }
.search-cat { border: 0; background: #e9e7f2; color: var(--text); padding: 0 .5rem; font: inherit; font-size: .85rem; max-width: 160px; border-right: 1px solid var(--border); cursor: pointer; }
.search input { flex: 1; border: 0; padding: 0 .8rem; font: inherit; font-size: 1rem; min-width: 0; outline: none; }
.search-btn { border: 0; background: var(--cyan); color: var(--ink); width: 52px; cursor: pointer; display: grid; place-items: center; }
.search-btn:hover { background: var(--cyan-strong); }

.top-actions { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.top-link { color: #fff; display: flex; flex-direction: column; line-height: 1.15; padding: .35rem .55rem; border: 1px solid transparent; border-radius: 6px; font-size: .9rem; }
.top-link:hover { border-color: rgba(255,255,255,.5); text-decoration: none; }
.top-link .small { font-size: .75rem; color: #c9c5e8; }
.top-link.lang { flex-direction: row; align-items: center; gap: .3rem; font-weight: 700; }
.top-link.cart { flex-direction: row; align-items: flex-end; gap: .25rem; }
.cart-icon { position: relative; display: block; }
.cart-count { position: absolute; top: -6px; left: 14px; color: var(--cyan); font-weight: 800; font-size: 1rem; min-width: 1.2em; text-align: center; }
.cart-label { padding-bottom: 2px; }

.catbar { background: var(--ink-2); }
.catbar-inner { display: flex; gap: .15rem; overflow-x: auto; padding: .2rem .75rem; max-width: 1500px; margin: 0 auto; scrollbar-width: none; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a { color: #fff; white-space: nowrap; padding: .4rem .65rem; border: 1px solid transparent; border-radius: 6px; font-size: .9rem; }
.catbar a:hover { border-color: rgba(255,255,255,.45); text-decoration: none; }
.catbar a.active { background: var(--ink-3); border-color: var(--violet); }

/* ---------- Seite ---------- */
.page { flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; padding: 1rem; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; }
.narrow { max-width: 520px; margin: 2rem auto; }
.narrow-left { max-width: 520px; }

.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash-success { background: var(--success-soft); border-color: #9fd8bd; color: #0e5c3d; }
.flash-error { background: var(--danger-soft); border-color: #f0b4b0; color: #8d2323; }
.problem-list { margin: .35rem 0 0; padding-left: 1.2rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; border-radius: 999px; padding: .6rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: .38rem .85rem; font-size: .88rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-strong); }
.btn-add { background: var(--cyan); color: var(--ink); border-color: var(--cyan-strong); }
.btn-add:hover { background: var(--cyan-strong); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: #fff; color: var(--danger); border-color: #eab0ad; }
.btn-danger:hover { background: var(--danger-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--violet-strong); cursor: pointer; font: inherit; font-size: .88rem; }
.link-btn:hover { text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

/* ---------- Formulare ---------- */
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input[type=text], input[type=number], input[type=search], input[type=date], input[type=url], input[type=password], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid #c9c5da; border-radius: 8px; padding: .55rem .7rem; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
textarea { resize: vertical; }
.hint { color: var(--muted); }
.error { color: var(--danger); font-weight: 600; }
.has-error input, .has-error textarea, .has-error .sig-pad { border-color: var(--danger); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { margin-top: .3rem; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--violet); }
.radio { display: flex; gap: .4rem; align-items: center; padding: .15rem 0; cursor: pointer; font-size: .92rem; }
.radio input { accent-color: var(--violet); }

/* ---------- Startseite ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--radius); background: linear-gradient(120deg, var(--ink) 0%, var(--ink-3) 55%, #3a3480 100%); color: #fff; padding: 2.5rem 2rem; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: .5rem; }
.hero p { color: #d9d5f5; font-size: 1.08rem; max-width: 36em; margin: 0 0 1.25rem; }
.hero .btn-primary { background: var(--cyan); color: var(--ink); }
.hero .btn-primary:hover { background: #6fe0ea; }
.hero-art { position: relative; height: 200px; }
.float { position: absolute; width: 72px; height: 72px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); animation: bob 5s ease-in-out infinite; }
.f1 { left: 10%; top: 10%; width: 88px; height: 88px; }
.f2 { left: 45%; top: 0; animation-delay: -1s; }
.f3 { left: 70%; top: 35%; animation-delay: -2s; }
.f4 { left: 28%; top: 55%; animation-delay: -3s; }
.f5 { left: 58%; top: 70%; width: 56px; height: 56px; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } }

.steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.steps li { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem; display: flex; gap: .7rem; align-items: center; font-size: .92rem; }
.step-n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--violet-soft); color: var(--violet-strong); font-weight: 800; display: grid; place-items: center; }

.cat-tiles h2 { margin-top: .5rem; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; color: var(--text); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(22,20,43,.12); }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; flex: 1; }
.tile-cell { background: #f6f5fb; border-radius: 8px; padding: .6rem .4rem .4rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; min-width: 0; }
.tile-cell img { width: 48px; height: 48px; }
.tile-cell small { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tile-more { margin-top: .7rem; color: var(--violet-strong); font-size: .88rem; font-weight: 600; }

.shelf { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1rem .5rem; margin-bottom: 1rem; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 190px); gap: .75rem; overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x mandatory; }
.shelf-row .card { scroll-snap-align: start; box-shadow: none; border: 1px solid var(--border); }

/* ---------- Produktkarten ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .75rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.card-link { color: var(--text); display: flex; flex-direction: column; gap: .4rem; }
.card-link:hover { text-decoration: none; }
.card-link:hover .card-title { color: var(--violet-strong); text-decoration: underline; }
.card-img { background: #f6f5fb; border-radius: 8px; aspect-ratio: 1.25; display: grid; place-items: center; }
.card-img img { width: 84px; height: 84px; }
.noicon { width: 64px; height: 64px; border-radius: 8px; background: var(--border); color: var(--muted); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; }
.noicon.big { width: 160px; height: 160px; font-size: 3rem; }
.card-title { font-size: .95rem; font-weight: 600; margin: 0; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; }
.price { font-weight: 800; font-size: 1.25rem; }
.price.big { font-size: 1.9rem; }
.cur { font-size: .85rem; font-weight: 600; }
.cur::before { content: ""; display: inline-block; width: 1.15em; height: 1.15em; margin-right: .2em; vertical-align: -.2em; background: url('/icons/diamond.png?v=dia') center / contain no-repeat; }
.unit { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.card-add { margin-top: auto; }
.card-add .btn { width: 100%; }
.badge { display: inline-block; padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.badge-out { background: var(--danger-soft); color: var(--danger); margin-top: auto; text-align: center; }

/* ---------- Liste / Filter ---------- */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; }
.list-title { font-size: 1.1rem; margin: 0; }
.list-title small { font-weight: 400; }
.sort-form { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.sort-form select { width: auto; padding: .35rem .5rem; }
.list-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.filters { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; position: sticky; top: 120px; }
.filters summary { font-weight: 700; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters fieldset { border: 0; padding: 0; margin: .9rem 0 0; }
.filters legend { font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.price-range { display: flex; gap: .4rem; align-items: center; }
.filter-actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.25rem 0 .5rem; flex-wrap: wrap; }

/* ---------- Produktseite ---------- */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .75rem; }
.product { display: grid; grid-template-columns: minmax(220px, 380px) 1fr 300px; gap: 1.5rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1rem; align-items: start; }
.product-img { background: #f6f5fb; border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; }
.product-img .icon { width: 60%; }
.product-img .icon img { width: 100%; height: auto; }
.product-info h1 { margin-bottom: .2rem; }
.product-price .unit { font-size: .9rem; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 1rem 0; font-size: .92rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.buybox { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.stock { font-weight: 700; margin: 0; }
.stock.ok { color: var(--success); }
.stock.out { color: var(--danger); }
.buy-form { display: flex; flex-direction: column; gap: .5rem; }
.buy-form label { font-size: .9rem; font-weight: 600; }
.qty-row { display: flex; align-items: stretch; }
.unit-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.unit-toggle label { position: relative; cursor: pointer; }
.unit-toggle input { position: absolute; opacity: 0; }
.unit-toggle span { display: block; text-align: center; padding: .5rem .4rem; border: 2px solid var(--border); border-radius: 8px; font-weight: 700; font-size: .92rem; background: #fff; }
.unit-toggle span small { font-weight: 500; color: var(--muted); }
.unit-toggle input:checked + span { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-strong); }
.unit-toggle input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.qty-summary { margin: 0; font-size: .92rem; }
.qty-summary strong { font-size: 1.05rem; }
.qty-row input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; font-weight: 700; font-size: 1.05rem; -moz-appearance: textfield; }
.qty-row input::-webkit-outer-spin-button, .qty-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 44px; flex-shrink: 0; border: 1px solid #c9c5da; background: #f6f5fb; font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--text); }
.qty-btn:first-child { border-radius: 8px 0 0 8px; }
.qty-btn:last-child { border-radius: 0 8px 8px 0; }
.qty-btn:hover { background: var(--violet-soft); }

/* ---------- Warenkorb & Kasse ---------- */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; align-items: start; }
.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cart-line.problem { background: var(--warn-soft); margin: 0 -1.25rem; padding: 1rem 1.25rem; }
.cart-img { background: #f6f5fb; border-radius: 8px; display: grid; place-items: center; aspect-ratio: 1; }
.cart-img img { }
.cart-name { font-weight: 600; font-size: 1.02rem; color: var(--text); }
.cart-controls { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; }
.qty-input { width: 96px !important; }
.cart-line-total { font-weight: 800; white-space: nowrap; }
.warn { color: var(--warn); font-weight: 600; font-size: .9rem; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; flex-wrap: wrap; }
.cart-sum { margin-left: auto; font-size: 1.05rem; }
.cart-side, .checkout-side { position: sticky; top: 120px; }
.summary-lines { list-style: none; margin: 0; padding: 0; }
.summary-lines li { display: grid; grid-template-columns: 32px 1fr auto; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.summary-lines img { }
.sum-price { font-weight: 700; white-space: nowrap; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 0; font-size: 1.15rem; }
.sig-wrap { position: relative; }
.sig-pad { display: block; width: 100%; height: auto; aspect-ratio: 600 / 180; background: #fbfaff repeating-linear-gradient(0deg, transparent 0 calc(100% - 40px), #d5d1e6 calc(100% - 40px) calc(100% - 39px), transparent calc(100% - 39px)); border: 2px dashed #c9c5da; border-radius: 8px; touch-action: none; cursor: crosshair; }
.sig-pad.sig-missing { border-color: var(--danger); background-color: var(--danger-soft); }
.sig-clear { position: absolute; top: .4rem; right: .4rem; }

/* ---------- Bestellung ---------- */
.thanks { border-left: 6px solid var(--success); }
.thanks h1 { color: var(--success); }
.order-no { font-size: 1.3rem; letter-spacing: .04em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; }
.notice { border-left: 6px solid var(--violet); background: linear-gradient(90deg, var(--violet-soft), #fff 60%); }
.order-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; align-items: start; }
.status-track { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.status-track li { position: relative; text-align: center; font-size: .82rem; color: var(--muted); padding-top: 28px; }
.status-track li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 4px; background: var(--border); }
.status-track li:first-child::before { display: none; }
.status-track .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--border); z-index: 1; }
.status-track li.done, .status-track li.current { color: var(--text); font-weight: 700; }
.status-track li.done::before, .status-track li.current::before { background: var(--violet); }
.status-track li.done .dot { background: var(--violet); border-color: var(--violet); }
.status-track li.current .dot { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.status-payment_open { background: var(--warn-soft); color: var(--warn); }
.status-paid { background: var(--cyan-soft); color: #0b7884; }
.status-processing { background: var(--violet-soft); color: var(--violet-strong); }
.status-delivered { background: var(--success-soft); color: var(--success); }
.status-cancelled { background: #eeeef2; color: var(--muted); text-decoration: line-through; }
.messages { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.msg { padding: .7rem .9rem; border-radius: 10px; max-width: 92%; }
.msg-admin { background: var(--violet-soft); align-self: flex-start; border-top-left-radius: 2px; }
.msg-player { background: var(--cyan-soft); align-self: flex-end; border-top-right-radius: 2px; }
.admin .msg-admin { align-self: flex-end; border-radius: 10px 2px 10px 10px; }
.admin .msg-player { align-self: flex-start; border-radius: 2px 10px 10px 10px; }
.msg-meta { font-size: .78rem; color: var(--muted); margin-bottom: .2rem; }
.reply-form { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }
.reply-form label { font-weight: 600; font-size: .9rem; }
.error-code { font-size: 3rem; color: var(--violet); }

/* ---------- Item-Icons & Verzauberungs-Glanz ---------- */
.icon { position: relative; display: inline-block; line-height: 0; vertical-align: middle; flex-shrink: 0; }
.icon img { display: block; max-width: 100%; height: auto; }
.glint::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  background:
    linear-gradient(115deg, transparent 40%, rgba(170, 110, 255, .55) 47%, rgba(225, 200, 255, .7) 50%, rgba(170, 110, 255, .55) 53%, transparent 60%),
    linear-gradient(60deg, transparent 42%, rgba(140, 70, 255, .45) 48%, rgba(140, 70, 255, .45) 52%, transparent 58%),
    rgba(130, 60, 255, .2);
  background-size: 400% 400%, 500% 500%, auto;
  mix-blend-mode: screen;
  animation: glint 3.5s linear infinite;
}
@keyframes glint {
  from { background-position: 100% 100%, 0% 100%, 0 0; }
  to { background-position: 0% 0%, 100% 0%, 0 0; }
}
@media (prefers-reduced-motion: reduce) { .glint::after { animation: none; background-position: 50% 50%, 50% 50%, 0 0; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink-2); color: #d9d5f5; margin-top: 2rem; }
.back-top { display: block; text-align: center; background: var(--ink-3); color: #fff; padding: .8rem; font-size: .9rem; }
.back-top:hover { background: #3d377a; text-decoration: none; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.1rem; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; }
.footer-links a { color: #d9d5f5; font-size: .9rem; }
.footer-note { font-size: .78rem; color: #9b96c4; max-width: 60em; margin: 0; }

/* ---------- Admin ---------- */
.admin-bar .topbar-inner { flex-wrap: wrap; }
.admin-nav { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; }
.admin-nav a { color: #fff; padding: .4rem .7rem; border-radius: 6px; font-size: .92rem; }
.admin-nav a:hover { background: var(--ink-3); text-decoration: none; }
.admin-nav a.active { background: var(--violet); }
.logout { margin-left: auto; }
.admin-page h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.login-box { text-align: center; }
.login-box form { text-align: left; }
.login-logo { display: block; margin: 0 auto .5rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; display: flex; flex-direction: column; color: var(--text); border-top: 4px solid var(--border); }
a.stat:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(22,20,43,.12); }
.stat-warn { border-top-color: #f0b44c; }
.stat-accent { border-top-color: var(--violet); }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.stat-sub { font-size: .82rem; color: var(--muted); }
.admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: start; }
.top-items { margin: 0; padding: 0; list-style: none; counter-reset: top; }
.top-items li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 90px 82px; gap: .6rem; align-items: center; padding: .35rem 0; font-size: .9rem; }
.top-items img { }
.top-items .num { text-align: right; white-space: nowrap; }
.top-items a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { background: var(--bg); border-radius: 4px; height: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; padding: 1rem; }
.filter-bar .field { margin: 0; min-width: 140px; }
.filter-bar .field.grow { flex: 1; min-width: 200px; }
.filter-bar .actions { flex-direction: row; min-width: 0; }
.filter-bar .check { align-self: center; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; background: #faf9fd; }
.table tbody tr:hover { background: #faf9fd; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot th { font-size: .95rem; color: var(--text); text-transform: none; }
.table .clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-cell { min-width: 220px; }
.item-cell img { vertical-align: middle; margin-right: .35rem; }
.item-cell small, .item-cell code { margin-left: .25rem; }
.items-table td:first-child, .items-table th:first-child { width: 36px; }
.items-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--violet); }
.row-hidden { opacity: .55; }
.istatus { font-size: .8rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; }
.istatus-available { background: var(--success-soft); color: var(--success); }
.istatus-sold_out { background: var(--danger-soft); color: var(--danger); }
.istatus-hidden { background: #eeeef2; color: var(--muted); }
.bulk-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-bottom: 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--border); position: sticky; top: 64px; background: var(--card); z-index: 5; padding-top: .25rem; }
.bulk-bar select { width: auto; max-width: 100%; }
.bulk-value { width: 110px !important; }
form.inline { display: inline; }
.signature { max-width: 320px; width: 100%; background: #fbfaff; border: 1px solid var(--border); border-radius: 8px; }
.history { margin: 0; padding-left: 1.1rem; font-size: .88rem; }
.item-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.item-head p { margin: .1rem 0; }
.tier-row { display: grid; grid-template-columns: 1fr 110px; gap: .75rem; align-items: center; padding: .3rem 0; border-bottom: 1px dashed var(--border); }
.tier-row label { font-size: .92rem; }
.sticky-save { position: sticky; bottom: 0; background: rgba(238, 237, 244, .92); backdrop-filter: blur(4px); padding: .75rem 0; margin-bottom: 1rem; z-index: 5; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .product { grid-template-columns: 1fr 1fr; }
  .buybox { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; gap: .5rem; padding: .5rem .75rem; }
  .search { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .top-link.track { display: none; }
  .brand-name { font-size: 1.1rem; }
  .brand img { width: 34px; height: 34px; }
  .search-cat { max-width: 96px; font-size: .8rem; }
  .list-layout, .cart-layout, .checkout-layout, .order-layout, .admin-cols { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters:not([open]) { padding: .75rem 1rem; }
  .cart-side, .checkout-side { position: static; }
  .hero { grid-template-columns: 1fr; padding: 1.75rem 1.25rem; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .bulk-bar { top: 0; position: static; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .page { padding: .75rem; }
  .panel { padding: 1rem; }
  .product { grid-template-columns: 1fr; padding: 1rem; }
  .product-img { max-width: 240px; margin: 0 auto; width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .card { padding: .6rem; }
  .card-img img { width: 48px; height: 48px; }
  .price { font-size: 1.1rem; }
  .tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .tile { padding: .7rem; }
  .tile-cell img { width: 36px; height: 36px; }
  .steps { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 56px 1fr; }
  .cart-line-total { grid-column: 2; }
  .cart-line.problem { margin: 0 -1rem; padding: 1rem; }
  .cart-label { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat-value { font-size: 1.5rem; }
  .status-track li { font-size: .72rem; }
  .copy-row { flex-direction: column; }
  .top-items li { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .top-items .bar { display: none; }
  .logout { margin-left: 0; }
}
.cat-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .45rem 1rem; margin-top: .6rem; }

/* ============================================================
   "Krass"-Ebene – seitenweite Effekte (ans Ende, override)
   ============================================================ */

/* 1) Animierter Aurora-Hintergrund hinter allem */
body { position: relative; }
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 12% 8%, rgba(139, 108, 255, .28), transparent 60%),
    radial-gradient(38vmax 38vmax at 88% 18%, rgba(63, 209, 223, .25), transparent 60%),
    radial-gradient(45vmax 45vmax at 70% 92%, rgba(255, 111, 174, .18), transparent 62%);
  filter: blur(8px) saturate(115%);
  animation: aurora 24s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(2vmax, -2vmax, 0) rotate(4deg) scale(1.08); }
  100% { transform: translate3d(-2vmax, 2vmax, 0) rotate(-3deg) scale(1.05); }
}

/* 2) Leuchtender, animierter Marken-Schriftzug */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-name {
    background: linear-gradient(90deg, #cbbcff, #7fe6ef, #ffb3d4, #cbbcff);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: brand-flow 6s linear infinite;
    filter: drop-shadow(0 0 10px rgba(139, 108, 255, .45));
  }
}
@keyframes brand-flow { to { background-position: 220% center; } }

/* 3) Hero: wandernder Glanz + tieferer Schatten */
.hero { box-shadow: 0 20px 50px -20px rgba(111, 80, 236, .7); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .14) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: hero-sheen 7s ease-in-out infinite;
}
@keyframes hero-sheen { 0% { background-position: 150% 0; } 100% { background-position: -150% 0; } }

/* 4) Buttons: Shine beim Hover + Glow + Lift */
.btn-primary, .btn-add, .btn-lg { position: relative; overflow: hidden; transition: background .15s, box-shadow .25s, transform .2s; }
.btn-primary:hover, .btn-add:hover, .btn-lg:hover { transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 10px 26px -8px rgba(139, 108, 255, .9); }
.btn-add:hover, .hero .btn-primary:hover { box-shadow: 0 10px 26px -8px rgba(63, 209, 223, .9); }
.btn-primary::after, .btn-add::after, .btn-lg::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-180%) skewX(-18deg);
}
.btn-primary:hover::after, .btn-add:hover::after, .btn-lg:hover::after {
  animation: btn-shine .7s ease;
}
@keyframes btn-shine { to { transform: translateX(260%) skewX(-18deg); } }

/* 5) Karten/Kacheln: Hover-Lift mit farbigem Glow */
.tile, .panel, .steps li { transition: transform .25s cubic-bezier(.2, .8, .3, 1), box-shadow .25s ease; }
.tile:hover, .panel:hover, .steps li:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -12px rgba(111, 80, 236, .45), 0 4px 12px rgba(22, 20, 43, .1);
}
.tile { position: relative; overflow: hidden; }
.tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.tile:hover::before { transform: scaleX(1); }

/* 6) Scroll-Reveal (Klasse wird per JS gesetzt -> ohne JS nichts versteckt) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* 7) Feinschliff: Textmarkierung + Scrollleiste */
::selection { background: var(--violet); color: #fff; }
html { scrollbar-color: var(--violet) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--violet), var(--cyan)); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  body::before, .brand-name, .hero::after { animation: none; }
  .tile, .panel, .steps li, .btn-primary, .btn-add, .btn-lg { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* schlichte "Seit 2023"-Zeile im Hero */
.hero-since {
  margin: 0 0 .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #b9b4e6;
}
.hero-since::before { content: "★ "; color: var(--cyan); }
