/* Katalog Gießformen - Systemschriften, keine externen Ressourcen */
:root {
  --grund: #f5f1ea;      /* Gips */
  --flaeche: #ffffff;
  --text: #2a2622;
  --leise: #6b635a;
  --linie: #e2dace;
  --akzent: #9c4a2b;     /* Terrakotta */
  --akzent-dunkel: #7a3820;
  --akzent-hell: #f6e7df;
  --hinweis: #fff6db;
  --hinweis-linie: #e7c96a;
  --ok: #2f6b3a;
  --fehler: #a32020;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(42, 38, 34, .06), 0 2px 8px rgba(42, 38, 34, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1c1a18;
    --flaeche: #262320;
    --text: #eee8e0;
    --leise: #b3a99c;
    --linie: #3a3530;
    --akzent: #e08a64;
    --akzent-dunkel: #f0a582;
    --akzent-hell: #3a2a22;
    --hinweis: #332c18;
    --hinweis-linie: #8a7330;
    --ok: #7cc58a;
    --fehler: #ff8a80;
    --schatten: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--akzent); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.klein { font-size: .875rem; color: var(--leise); }

/* Kopf */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 1200px; margin: 0 auto; padding: 14px 16px 12px; }
.marke { font-size: 1.25rem; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.unterzeile { margin: 2px 0 0; color: var(--leise); font-size: .9rem; }
.beispiel-banner { margin: 0; padding: 6px 16px; background: var(--akzent); color: #fff; text-align: center; font-size: .875rem; }

.haupt { max-width: 1200px; margin: 0 auto; padding: 16px 16px 96px; }
.hinweis {
  background: var(--hinweis); border: 1px solid var(--hinweis-linie); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px; font-size: .95rem;
}

/* Werkzeugleiste: bleibt beim Scrollen oben */
.werkzeug {
  position: sticky; top: 0; z-index: 5;
  background: var(--grund); padding: 8px 0 10px; margin: 0 0 6px;
  display: grid; gap: 8px;
}
.suche input, .filter select, .anfrage input, .anfrage textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
.suche input:focus, .filter select:focus, .anfrage input:focus, .anfrage textarea:focus {
  outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent);
}
.filter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.filter .check { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--akzent); flex: none; }
.anzahl { margin: 0; color: var(--leise); font-size: .9rem; }
@media (min-width: 760px) {
  .werkzeug { grid-template-columns: minmax(260px, 1fr) auto; align-items: center; }
  .filter { grid-template-columns: 200px 200px auto; }
  .filter .check { grid-column: auto; }
  .anzahl { grid-column: 1 / -1; }
}

/* Raster */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
@media (min-width: 760px) { .raster { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; } }
.karte {
  background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten);
  border: 1px solid var(--linie); overflow: hidden; display: flex; flex-direction: column;
}
/* Handyfotos sind hochkant -> Vorschau 3:4, Bild füllt die Fläche */
.karte-bild { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--linie); overflow: hidden; }
.karte-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ohne-foto { display: grid; place-items: center; height: 100%; color: var(--leise); font-size: .9rem; }
.karte-text { padding: 10px 12px 4px; flex: 1; }
.karte h2 { font-size: 1rem; line-height: 1.3; margin: 2px 0 4px; }
.karte h2 a { color: var(--text); text-decoration: none; }
.karte h2 a:hover { text-decoration: underline; }
.nr { font-size: .8rem; color: var(--leise); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.her { margin: 0; font-size: .85rem; color: var(--leise); }
.preis { margin: 4px 0 0; font-weight: 600; font-size: .95rem; }
.karte.s-verkauft { opacity: .55; }
.karte.s-verkauft img { filter: grayscale(1); }

.badge {
  display: inline-block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 99px; background: var(--leise); color: #fff; vertical-align: middle;
}
.karte-bild .badge { position: absolute; top: 8px; left: 8px; }
.badge.s-reserviert { background: #b7791f; }
.badge.s-verkauft { background: #555; }

/* Merken-Knopf (Stern) */
.merken {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 8px 12px 12px; min-height: 40px; padding: 6px 12px;
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  color: var(--akzent); background: transparent; border: 1.5px solid var(--akzent); border-radius: 8px;
}
.merken[aria-pressed="true"] { background: var(--akzent); color: #fff; }
.merken-icon { width: 16px; height: 16px; display: inline-block; background: currentColor;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

.leer { text-align: center; color: var(--leise); padding: 40px 0; }

/* Merkzettel-Knopf unten */
.merkzettel-knopf {
  position: fixed; z-index: 10; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 99px;
  background: var(--flaeche); color: var(--text); box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}
.merkzettel-knopf.hat { background: var(--akzent); color: #fff; }
.merkzettel-knopf .zahl {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .12); font-size: .85rem;
}

/* Dialoge */
dialog {
  border: 0; padding: 0; color: var(--text); background: var(--flaeche);
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0;
}
dialog::backdrop { background: rgba(20, 18, 16, .6); }
@media (min-width: 760px) {
  dialog { width: min(1000px, calc(100% - 48px)); height: auto; max-height: calc(100% - 48px); margin: auto; border-radius: 14px; }
  dialog.merkzettel { width: min(560px, calc(100% - 48px)); }
}
dialog[open] { display: flex; flex-direction: column; }
.dialog-kopf {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--linie); flex: none;
}
.dialog-kopf h2 { margin: 0; font-size: 1.15rem; flex: 1; }
.dialog-kopf button {
  width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; cursor: pointer;
  background: transparent; border: 0; color: var(--text); border-radius: 8px;
}
.dialog-kopf button:hover { background: var(--grund); }
.dialog-kopf .schliessen { margin-left: auto; }
.detail-inhalt, .merkzettel-inhalt { overflow-y: auto; padding: 16px; flex: 1; }

.detail-inhalt { display: grid; gap: 16px; }
@media (min-width: 760px) { .detail-inhalt { grid-template-columns: 3fr 2fr; } }
.gross { margin: 0; }
.gross img { width: 100%; height: auto; border-radius: 8px; background: var(--linie); }
.gross figcaption { font-size: .8rem; color: var(--leise); margin-top: 6px; }
.mini { display: flex; gap: 8px; margin-top: 8px; }
.mini button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; width: 80px; }
.mini button[aria-current="true"] { border-color: var(--akzent); }
.mini img { border-radius: 4px; aspect-ratio: 4 / 3; object-fit: cover; }
.angaben h2 { margin: 2px 0 6px; font-size: 1.35rem; line-height: 1.25; }
.angaben .nr { margin: 0; }
.gross-preis { font-size: 1.15rem; margin-bottom: 12px; }
.angaben dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: .95rem; }
.angaben dt { color: var(--leise); }
.angaben dd { margin: 0; overflow-wrap: anywhere; }
.anmerkung { background: var(--grund); border-radius: 8px; padding: 8px 12px; font-size: .95rem; }
.gross-merken { margin: 8px 0 0; width: 100%; min-height: 48px; font-size: 1rem; }

/* Merkliste & Formular */
.merkliste { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.merkliste li { display: grid; grid-template-columns: 72px 1fr 44px; gap: 10px; align-items: center;
  background: var(--grund); border-radius: 8px; padding: 6px; font-size: .95rem; line-height: 1.35; }
.merk-bild img { border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; }
.entfernen { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.4rem; color: var(--leise); cursor: pointer; border-radius: 8px; }
.entfernen:hover { background: var(--flaeche); color: var(--text); }
.merk-leer { color: var(--leise); }
.anfrage { display: grid; gap: 12px; border-top: 1px solid var(--linie); padding-top: 12px; }
.anfrage h3 { margin: 0; }
.anfrage p { margin: 0; }
.anfrage label:not(.check) { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--leise); }
.anfrage .check { font-size: .875rem; }
.falle { position: absolute; left: -9999px; }
.senden {
  min-height: 48px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--akzent); color: #fff; border: 0; border-radius: 8px;
}
.senden:disabled { opacity: .6; }
.meldung:empty { display: none; }
.meldung { padding: 10px 12px; border-radius: 8px; background: var(--grund); }
.meldung.ok { color: var(--ok); }
.meldung.fehler { color: var(--fehler); }

/* Textseiten */
.text { max-width: 720px; }
.text h1 { font-size: 1.6rem; }
.text h2 { font-size: 1.15rem; margin-top: 1.6em; }

.fuss { border-top: 1px solid var(--linie); padding: 20px 16px 96px; text-align: center; font-size: .875rem; color: var(--leise); }
.fuss p { margin: 4px 0; }

:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
