@font-face { font-family: "Fraunces"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #f4ede1;
  --paper: #fbf7f0;
  --ink: #2e241b;
  --muted: #6d5d4b;
  --line: #e2d5c1;
  --rust: #a24a22;
  --rust-dark: #7e3615;
  --iron: #3b332c;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(46, 36, 27, .06), 0 8px 24px rgba(46, 36, 27, .08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.35rem; }
a { color: var(--rust); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.prose { font-size: 1.08rem; white-space: pre-line; }

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 247, 240, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand strong { display: block; white-space: nowrap; font-family: var(--serif); font-size: 1.15rem; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--rust), var(--rust-dark));
  color: var(--paper); font-family: var(--serif); font-weight: 700;
}
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--line); }
@media (max-width: 560px) { .nav a:not([href="#produkte"]):not([href="#kontakt"]) { display: none; } }

/* Admin-Leiste */
.adminbar { position: sticky; top: 64px; z-index: 19; background: var(--iron); color: var(--paper); }
.adminbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.adminbar-actions { display: flex; gap: 8px; }
#modeHint { opacity: .75; font-size: .9rem; }

/* Startbereich */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 85% 10%, rgba(162, 74, 34, .16), transparent 60%),
    radial-gradient(700px 360px at 0% 100%, rgba(59, 51, 44, .10), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-top: clamp(56px, 10vw, 110px); padding-bottom: clamp(56px, 10vw, 110px); max-width: 820px; margin-left: max(0px, calc((100% - 1140px) / 2)); }
.eyebrow { color: var(--rust); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .85rem; margin: 0 0 12px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; margin: 0 0 28px; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--rust); color: #fff;
  font: 600 1rem/1 var(--sans); padding: 14px 24px; text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--rust-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-small { padding: 9px 16px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--line); }
.btn-ghost-light { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8c1d17; }
.btn-wa { background: #25744a; }
.btn-wa:hover { background: #1c5a39; }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Bereiche */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.status { color: var(--muted); }
.status:empty { display: none; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font: 600 .9rem var(--sans); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--iron); border-color: var(--iron); color: var(--paper); }

/* Produktraster */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
  position: relative; background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(46,36,27,.08), 0 16px 36px rgba(46,36,27,.12); }
.card-open { all: unset; cursor: pointer; display: flex; flex-direction: column; flex: 1; }
.card-open:focus-visible { outline: 3px solid var(--rust); outline-offset: -3px; }
.card-img { aspect-ratio: 4 / 3; background: var(--line); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .9rem;
  background: repeating-linear-gradient(135deg, #eadfcd 0 10px, #e4d7c2 10px 20px); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.card-cat { color: var(--rust); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.card-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.card-price { font-weight: 600; color: var(--muted); }
.card-admin { display: flex; gap: 8px; padding: 0 18px 16px; }
.card-admin .btn { flex: 1; }

.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--muted);
  border: 2px dashed var(--line); border-radius: var(--radius); }

/* Kontakt */
.contact { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }

/* Fußzeile */
.foot { background: var(--iron); color: #d8cdbd; font-size: .92rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 22px; }
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: inherit; }
.price-note { color: var(--muted); font-size: .92rem; margin: 24px 0 0; }
.price-note:empty { display: none; }
.legal { width: min(720px, calc(100vw - 32px)); }
.legal h4 { font-family: var(--serif); font-size: 1.05rem; margin: 22px 0 6px; }
.legal p, .legal li { font-size: .95rem; }
.legal p { white-space: pre-line; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.facts { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 6px 18px; margin: 12px 0 0; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.facts .missing { color: var(--danger); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 10px; } }
.secret { cursor: default; user-select: none; -webkit-tap-highlight-color: transparent; }

/* Dialoge */
.dlg {
  border: 0; border-radius: 18px; padding: 24px; width: min(560px, calc(100vw - 32px));
  background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.25);
  max-height: calc(100vh - 32px); overflow: auto;
}
.dlg::backdrop { background: rgba(30, 22, 15, .55); backdrop-filter: blur(2px); }
.dlg-small { width: min(400px, calc(100vw - 32px)); }
.dlg-wide { width: min(920px, calc(100vw - 32px)); padding: 0; }
.dlg-x {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(251,247,240,.92); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.dlg label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.dlg input, .dlg textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  font: 400 1rem var(--sans);
}
.dlg input:focus, .dlg textarea:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px rgba(162,74,34,.15); }
.dlg input[type="file"] { padding: 8px; }
#gateCode { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.dlg label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-top: -6px; }
.dlg label.check input { width: auto; margin: 0; }
.hint { color: var(--rust); font-weight: 600; font-size: .9rem; margin: -6px 0 8px; }
.ok { color: #25744a; font-weight: 600; font-size: .92rem; margin: 4px 0; }
.ok:empty { display: none; }
.linkbtn.forgot { margin-right: auto; color: var(--rust); font-size: .92rem; }
.err { color: var(--danger); font-weight: 600; min-height: 1.2em; margin: 4px 0; font-size: .92rem; }
.err:empty { min-height: 0; margin: 0; }
.preview img { max-height: 180px; border-radius: 10px; margin-bottom: 12px; }
.pre { white-space: pre-line; }

.view { display: grid; grid-template-columns: 1.2fr 1fr; }
.view-img { background: var(--line); min-height: 280px; }
.view-img img { width: 100%; height: 100%; object-fit: cover; max-height: 80vh; }
.view-body { padding: 32px 28px; display: flex; flex-direction: column; gap: 10px; }
.view-price { font-size: 1.3rem; font-weight: 600; }
.view-desc { white-space: pre-line; color: var(--muted); }
.view-info { font-size: .9rem; border-top: 1px solid var(--line); padding-top: 10px; }
.view-info summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.view-info .facts { grid-template-columns: auto 1fr; margin-top: 8px; }
.dlg label small { font-weight: 400; color: var(--muted); }
.view-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
@media (max-width: 720px) {
  .view { grid-template-columns: 1fr; }
  .view-img { min-height: 0; aspect-ratio: 4 / 3; }
  .view-body { padding: 22px 20px 24px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--iron); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .toast { transition: none; }
}
