/* QuickWerk Katalog.
   Bildsprache: Lagerhalle. Betonboden als Grund, Regaletiketten in Signalgelb
   tragen den Preis, alles andere bleibt ruhig. */

@font-face { font-family: "Barlow"; src: url("fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --beton: #e4e8e7;
  --beton-dunkel: #cfd6d6;
  --weiss: #ffffff;
  --tinte: #12283b;
  --tinte-leise: #4b5d6c;
  --etikett: #ffcb05;
  --rost: #a13d16;
  --gruen: #14693f;
  --schmal: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Barlow", system-ui, sans-serif;
  --rand: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--beton);
  color: var(--tinte);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.5;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }

.sprung { position: absolute; left: -999px; top: 8px; background: var(--etikett); padding: 8px 12px; z-index: 10; }
.sprung:focus { left: 8px; }

/* ── Kopf ─────────────────────────────────────────── */

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--rand);
}

.marke { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }

.marke-schild {
  background: var(--etikett);
  font-family: var(--schmal);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 7px 12px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.marke-claim { color: var(--tinte-leise); font-size: 0.95rem; line-height: 1.25; }

.kopf-telefon { font-weight: 600; white-space: nowrap; text-underline-offset: 4px; }

@media (max-width: 560px) {
  .marke-claim { display: none; }
}

/* ── Suche ────────────────────────────────────────── */

.suche { padding: clamp(20px, 5vw, 56px) var(--rand) 8px; }

.suche label {
  display: block;
  font-family: var(--schmal);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  margin-bottom: 18px;
}

.suche-zeile { display: flex; max-width: 640px; }

.suche input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.125rem;
  color: var(--tinte);
  background: var(--weiss);
  border: 2px solid var(--tinte);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  padding: 12px 14px;
}

.suche input::placeholder { color: #7d8b96; }

button, .knopf {
  font: inherit;
  font-weight: 600;
  color: var(--weiss);
  background: var(--tinte);
  border: 2px solid var(--tinte);
  border-radius: 2px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.suche button { border-radius: 0 2px 2px 0; }

button:hover, .knopf:hover { background: var(--etikett); color: var(--tinte); }

/* ── Kategorien ───────────────────────────────────── */

#bestand { padding: 20px var(--rand) 64px; }

.kategorien {
  display: flex;
  gap: 6px 22px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--tinte);
}

.kategorien a {
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 4px solid transparent;
  margin-bottom: -16px;
  padding-bottom: 10px;
}

.kategorien a span { color: var(--tinte-leise); font-weight: 400; font-size: 0.9em; margin-left: 2px; }
.kategorien a:hover { border-bottom-color: var(--beton-dunkel); }
.kategorien a[aria-current] { border-bottom-color: var(--etikett); font-weight: 600; }

.treffer { margin-bottom: 22px; color: var(--tinte-leise); }
.treffer a { margin-left: 10px; color: var(--tinte); text-underline-offset: 4px; }

/* ── Regal ────────────────────────────────────────── */

.regal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
  gap: 36px 22px;
}

.posten a { display: block; text-decoration: none; }

.posten-bild {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--beton-dunkel);
  border-radius: 2px;
  overflow: hidden;
}

.posten-bild img { width: 100%; height: 100%; object-fit: cover; }

.posten-ohne-bild {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--tinte-leise);
}

.etikett {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--etikett);
  padding: 3px 10px 4px;
  border-radius: 2px;
  margin: -17px 0 0 10px;
  box-shadow: 0 1px 0 rgba(18, 40, 59, 0.28);
}

.etikett-preis {
  font-family: var(--schmal);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.etikett-einheit { font-size: 0.875rem; font-weight: 500; }

.posten h2 {
  font-family: var(--schmal);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.12;
  margin-top: 9px;
  text-wrap: balance;
}

.posten a:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.posten-angaben { color: var(--tinte-leise); font-size: 0.95rem; margin-top: 3px; }
.posten-eingang { color: var(--gruen); font-size: 0.9rem; font-weight: 500; margin-top: 2px; }

.marker {
  position: absolute; top: 10px; left: 10px;
  background: var(--weiss);
  font-weight: 600; font-size: 0.875rem;
  padding: 3px 9px; border-radius: 2px;
}

.marker-reserviert { color: var(--rost); }
.posten-reserviert .posten-bild img { filter: grayscale(0.75) contrast(0.9); opacity: 0.8; }

/* Der jüngste Eingang bekommt den grossen Regalplatz. */
@media (min-width: 760px) {
  .regal-mit-neuzugang .posten:first-child { grid-column: span 2; grid-row: span 2; }
  .regal-mit-neuzugang .posten:first-child .posten-bild { aspect-ratio: auto; height: calc(100% - 7.6rem); min-height: 320px; }
  .regal-mit-neuzugang .posten:first-child a { height: 100%; }
  .regal-mit-neuzugang .posten:first-child h2 { font-size: 2.1rem; font-weight: 700; }
  .regal-mit-neuzugang .posten:first-child .etikett { margin-left: 16px; margin-top: -24px; padding: 5px 14px 6px; }
  .regal-mit-neuzugang .posten:first-child .etikett-preis { font-size: 2.3rem; }
}

@media (max-width: 520px) {
  .regal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .regal-mit-neuzugang .posten:first-child { grid-column: span 2; }
  .etikett { margin-left: 6px; }
  .etikett-preis { font-size: 1.35rem; }
  .posten h2 { font-size: 1.2rem; }
}

/* Neu eingetroffen, während die Seite offen ist: der eine bewegte Moment. */
@keyframes einraeumen {
  0% { opacity: 0; transform: translateY(-28px); }
  60% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes aufleuchten {
  0%, 55% { box-shadow: 0 0 0 6px var(--etikett); }
  100% { box-shadow: 0 0 0 0 rgba(255, 203, 5, 0); }
}

.posten-neu { animation: einraeumen 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.posten-neu .posten-bild { animation: aufleuchten 3.2s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .posten-neu { animation: none; }
  .posten-neu .posten-bild { animation: none; box-shadow: 0 0 0 4px var(--etikett); }
}

/* ── Leerzustände ─────────────────────────────────── */

.leer { max-width: 34rem; padding: 40px 0; }
.leer p:first-child, .leer h1 {
  font-family: var(--schmal); font-weight: 700; font-size: 2rem; line-height: 1.1; margin-bottom: 8px;
}
.leer p + p { margin-top: 10px; }
.leer a { text-underline-offset: 4px; }
.leer-seite { padding: clamp(40px, 10vw, 120px) var(--rand); }
.leer-seite .knopf { margin-top: 14px; }

/* ── Artikelseite ─────────────────────────────────── */

.zurueck { padding: 6px var(--rand) 0; }
.zurueck a { text-underline-offset: 4px; }

.artikel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: 18px var(--rand) 72px;
  align-items: start;
}

@media (max-width: 860px) {
  .artikel { grid-template-columns: minmax(0, 1fr); }
}

.galerie-gross { display: block; background: var(--beton-dunkel); border-radius: 2px; overflow: hidden; }
.galerie-gross img { width: 100%; max-height: 74vh; object-fit: contain; background: var(--beton-dunkel); }
.galerie-leer { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--tinte-leise); }

.galerie-leiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.galerie-leiste a { display: block; border-radius: 2px; overflow: hidden; border-bottom: 4px solid transparent; }
.galerie-leiste a[aria-current] { border-bottom-color: var(--etikett); }
.galerie-leiste img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.artikel-reserviert .galerie-gross img { filter: grayscale(0.6); }

.artikel-kategorie { color: var(--tinte-leise); margin-bottom: 6px; }
.artikel-kategorie a { text-underline-offset: 4px; }

.artikel h1 {
  font-family: var(--schmal);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  text-wrap: balance;
}

.etikett-gross { margin: 18px 0 0; padding: 6px 16px 8px; }
.etikett-gross .etikett-preis { font-size: 2.6rem; }
.etikett-gross .etikett-einheit { font-size: 1.05rem; }

.hinweis-reserviert { margin-top: 16px; color: var(--rost); font-weight: 500; max-width: 34rem; }

.angaben { margin-top: 24px; border-top: 2px solid var(--tinte); max-width: 34rem; }
.angaben div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--beton-dunkel); }
.angaben dt { color: var(--tinte-leise); }
.angaben dd { font-weight: 500; }

.beschreibung { margin-top: 22px; white-space: pre-line; max-width: 34rem; }

.anfrage { margin-top: 34px; background: var(--weiss); padding: 22px; border-radius: 2px; max-width: 34rem; }
.anfrage h2 { font-family: var(--schmal); font-weight: 700; font-size: 1.7rem; line-height: 1.1; margin-bottom: 12px; }
.anfrage label { display: block; font-weight: 500; margin: 12px 0 4px; }
.anfrage .freiwillig { color: var(--tinte-leise); font-weight: 400; font-size: 0.9em; margin-left: 4px; }

.anfrage input, .anfrage textarea {
  width: 100%;
  font: inherit;
  color: var(--tinte);
  background: var(--weiss);
  border: 2px solid var(--tinte);
  border-radius: 2px;
  padding: 10px 12px;
}

.anfrage textarea { resize: vertical; }
.anfrage button { margin-top: 16px; width: 100%; font-size: 1.1rem; }
.anfrage-telefon { margin-top: 14px; color: var(--tinte-leise); }
.anfrage-telefon a { color: var(--tinte); font-weight: 600; }

.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.meldung { padding: 12px 14px; border-radius: 2px; margin-bottom: 8px; }
.meldung-ok { border-left: 6px solid var(--gruen); padding-left: 16px; }
.meldung-fehler { border-left: 6px solid var(--rost); color: var(--rost); font-weight: 500; }

/* ── Fuss ─────────────────────────────────────────── */

.fuss {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 48px;
  padding: 28px var(--rand) 40px;
  border-top: 2px solid var(--tinte);
  margin: 0 0 0;
  color: var(--tinte-leise);
  font-size: 0.95rem;
}

.fuss-name { font-family: var(--schmal); font-weight: 700; font-size: 1.3rem; color: var(--tinte); }
.fuss a { color: var(--tinte); text-underline-offset: 4px; }
