/* ---------- Farben & Grundlagen ---------- */
:root {
  --papier: #f3efe6;
  --papier-dunkel: #e8e2d4;
  --tinte: #171614;
  --grau: #77736a;
  --akzent: #ff5a1f;
  --linie: #171614;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  background: var(--papier);
  color: var(--tinte);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1; }

/* leichtes Papier-Rauschen, damit es nicht so "glatt" wirkt */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  z-index: 100;
}

/* ---------- Kopfzeile ---------- */
.kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(16px, 5vw, 64px);
  border-bottom: 1.5px solid var(--linie);
}

.logo {
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  color: var(--tinte);
  text-decoration: none;
}
.logo span { color: var(--akzent); display: inline-block; animation: hupf 2.6s ease-in-out infinite; }

@keyframes hupf {
  0%, 80%, 100% { transform: translateY(0); }
  88% { transform: translateY(-7px); }
}

.kopf-info { font-size: .9rem; color: var(--grau); }

/* ---------- Titel ---------- */
.held {
  padding: clamp(48px, 10vh, 110px) clamp(16px, 5vw, 64px) 40px;
  max-width: 1100px;
}

.titel {
  font-size: clamp(2.8rem, 9vw, 7.2rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -0.05em;
  margin-bottom: 44px;
}

.titel em {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--akzent);
}

/* Jede Zeile gleitet von unten herein */
/* oben Platz lassen, sonst werden die Pünktchen vom Ü abgeschnitten */
.zeile { display: block; overflow: hidden; padding: .18em 0 .08em; margin-top: -.14em; }
.zeile > span {
  display: inline-block;
  transform: translateY(105%);
  animation: rein .9s cubic-bezier(.2, .8, .2, 1) forwards;
}
.zeile:nth-child(2) > span { animation-delay: .12s; }

@keyframes rein { to { transform: translateY(0); } }

/* ---------- Suchfeld ---------- */
.suche {
  position: relative;
  display: flex;
  max-width: 760px;
  border: 2px solid var(--tinte);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 6px 6px 0 var(--tinte);
  transition: box-shadow .2s, transform .2s;
  opacity: 0;
  animation: auftauchen .7s .45s ease forwards;
}

.suche:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--akzent);
}

@keyframes auftauchen {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.suche input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 1.25rem;
  padding: 20px 22px;
  outline: none;
  color: var(--tinte);
}

/* tippender Platzhalter */
.platzhalter {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--grau);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  max-width: calc(100% - 170px);
}
.platzhalter::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -3px;
  background: var(--akzent);
  animation: blinken 1s steps(1) infinite;
}
.suche.hat-text .platzhalter { display: none; }

@keyframes blinken { 50% { opacity: 0; } }

.los {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px;
  padding: 0 22px;
  border: none;
  border-radius: 9px;
  background: var(--tinte);
  color: var(--papier);
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .15s;
}
.los::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--akzent);
  transform: translateY(101%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.los:hover::before { transform: translateY(0); }
.los svg { position: relative; transition: transform .3s; }
.los:hover svg { transform: translateX(4px); }
.los:active { transform: scale(.96); }
.los { isolation: isolate; }
.los::before { z-index: -1; }

/* ---------- Letzte Suchen ---------- */
.verlauf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  min-height: 34px;
}
.verlauf span { color: var(--grau); font-size: .9rem; align-self: center; margin-right: 4px; }
.verlauf button {
  font: inherit;
  font-size: .9rem;
  padding: 6px 14px;
  border: 1.5px solid var(--tinte);
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  transition: background .2s, color .2s;
  animation: auftauchen .4s ease both;
}
.verlauf button:hover { background: var(--tinte); color: var(--papier); }

/* ---------- Laufband ---------- */
.band {
  border-top: 1.5px solid var(--linie);
  border-bottom: 1.5px solid var(--linie);
  background: var(--tinte);
  color: var(--papier);
  overflow: hidden;
  padding: 14px 0;
  transform: rotate(-1.2deg) scale(1.02);
  margin: 30px 0 10px;
}
.band-inhalt {
  display: flex;
  width: max-content;
  animation: laufen 40s linear infinite;
}
.band:hover .band-inhalt { animation-play-state: paused; }
.band-inhalt span {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 0 22px;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: color .2s;
}
.band-inhalt span:hover { color: var(--akzent); }
.band-inhalt span::after { content: "✳"; color: var(--akzent); margin-left: 44px; }

@keyframes laufen { to { transform: translateX(-50%); } }

/* ---------- Ergebnisse ---------- */
.ergebnisse {
  padding: 50px clamp(16px, 5vw, 64px) 80px;
  max-width: 1200px;
}

.ergebnis-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
  font-size: 1.3rem;
}
.ergebnis-kopf strong {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.7rem;
}

.anzahl { font-size: .95rem; color: var(--grau); }

/* ---------- Sortieren & Filtern ---------- */
.steuerung {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border: 2px solid var(--tinte);
  border-radius: 12px;
  background: #fffdf8;
}
.tabs button {
  position: relative;
  z-index: 1;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: 9px 16px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--tinte);
  transition: color .3s;
}
.tabs button.aktiv { color: var(--papier); }

/* schwarzer Balken, der zum gewählten Knopf gleitet */
.schieber {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 8px;
  background: var(--tinte);
  transition: left .4s cubic-bezier(.3, 1.4, .5, 1), width .4s cubic-bezier(.3, 1.4, .5, 1);
}

.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter button {
  font: inherit;
  font-size: .9rem;
  padding: 7px 14px;
  border: 1.5px solid var(--tinte);
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.filter button:hover { transform: translateY(-2px); }
.filter button.aktiv { background: var(--akzent); }

.meldung {
  padding: 16px 20px;
  border: 2px dashed var(--tinte);
  border-radius: 12px;
  margin-bottom: 20px;
}

/* ---------- Produktliste ---------- */
.produkte {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.produkt {
  position: relative;
  display: grid;
  grid-template-columns: 50px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 20px 14px 16px;
  border: 2px solid var(--tinte);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--tinte);
  text-decoration: none;
  opacity: 0;
  animation: karteRein .55s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--i) * 55ms);
  transition: transform .2s, box-shadow .2s;
}
.produkt:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--tinte); }

@keyframes karteRein {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.produkt.bester { background: var(--akzent); }
.produkt.bester::before {
  content: "Bester Deal";
  position: absolute;
  top: -12px;
  left: 18px;
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--tinte);
  color: var(--papier);
  border-radius: 6px;
  transform: rotate(-3deg);
}

.rang {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-align: center;
}

.bild {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #fff;
  border: 1.5px solid var(--tinte);
  border-radius: 10px;
  padding: 6px;
}

.p-titel {
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: .88rem;
}

.shop-pill {
  padding: 2px 10px;
  border: 1.5px solid var(--tinte);
  border-radius: 99px;
  font-weight: 600;
  font-size: .8rem;
  background: var(--farbe, #fffdf8);
  color: var(--text, var(--tinte));
}

.sterne { white-space: nowrap; }
.sterne b { color: var(--akzent); }
.produkt.bester .sterne b { color: var(--tinte); }

.p-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.p-preis {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.p-preis small { display: block; font-size: .75rem; font-weight: 400; letter-spacing: 0; opacity: .7; }

.wert { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; }
.wert-balken {
  width: 90px;
  height: 9px;
  border: 1.5px solid var(--tinte);
  border-radius: 99px;
  overflow: hidden;
  background: #fffdf8;
}
.wert-balken i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--tinte);
  transform-origin: left;
  transform: scaleX(0);
  animation: fuellen .8s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--i) * 55ms + .3s);
}
@keyframes fuellen { to { transform: scaleX(1); } }

.zum-produkt {
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.zum-produkt svg { transition: transform .25s; }
.produkt:hover .zum-produkt svg { transform: translate(3px, -3px); }

/* Lade-Platzhalter mit schimmerndem Effekt */
.produkt.laedt { pointer-events: none; }
.laedt .klotz {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--papier-dunkel) 0%, #f9f6ef 50%, var(--papier-dunkel) 100%);
  background-size: 200% 100%;
  animation: schimmer 1.2s linear infinite;
}
@keyframes schimmer { to { background-position: -200% 0; } }

.mehr {
  margin-top: 16px;
  font: inherit;
  font-size: .9rem;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  color: var(--grau);
}

.erklaerung {
  margin: 34px 0 50px;
  max-width: 680px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--grau);
}
.erklaerung strong { color: var(--tinte); }

.abschnitt {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--grau);
  margin: 0 0 14px;
}

/* ---------- Kleine Shop-Karten ---------- */
.weitere-shops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.shop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border: 2px solid var(--tinte);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--tinte);
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, background .2s, color .2s;
}
.shop:hover {
  transform: translateY(-4px) rotate(-.6deg);
  box-shadow: 0 5px 0 var(--tinte);
  background: var(--farbe);
  color: var(--text, var(--tinte));
}
.shop-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }

.pfeil {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.pfeil svg { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.pfeil svg + svg { position: absolute; transform: translate(-30px, 30px); }
.shop:hover .pfeil svg:first-child { transform: translate(30px, -30px); }
.shop:hover .pfeil svg + svg { transform: translate(0, 0); }

/* ---------- Fusszeile ---------- */
.fuss {
  border-top: 1.5px solid var(--linie);
  padding: 22px clamp(16px, 5vw, 64px);
  font-size: .9rem;
  color: var(--grau);
}

/* ---------- Handy ---------- */
@media (max-width: 600px) {
  .kopf-info { display: none; }
  .suche input, .platzhalter { font-size: 1.05rem; }
  .suche input { padding: 18px 16px; }
  .platzhalter { left: 18px; max-width: calc(100% - 70px); }
  .los { padding: 0 14px; font-size: 0; gap: 0; }
  .produkt { grid-template-columns: 34px 70px 1fr; gap: 12px; padding: 14px; }
  .rang { font-size: 1.4rem; }
  .bild { width: 70px; height: 70px; }
  .p-rechts { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 9px 6px; font-size: .85rem; }
}

/* Wer weniger Bewegung möchte, bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
