/* ---------- Farben & Grundwerte (abgestimmt auf das Logo) ---------- */
:root {
  --bg: #fdf3e3;          /* Creme wie der Logo-Hintergrund */
  --surface: #fff8ee;
  --text: #17384d;        /* Dunkelblau der Logo-Umrandung */
  --muted: #4f6676;
  --accent: #f4b731;      /* Sonnengelb der Schrift */
  --accent-dark: #e09e14;
  --green: #4f9a3a;       /* Palmengrün */
  --border: #ead6b8;
  --radius: 20px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text);
}

/* Ausgeblendete Elemente bleiben ausgeblendet, auch wenn eine Klasse "display" setzt */
[hidden] {
  display: none !important;
}

/* ---------- Kopfzeile ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 4px solid var(--text);
}

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo img {
  height: 110px;
  width: auto;
  transition: transform 0.2s ease;
}

.logo:hover img {
  transform: rotate(-4deg) scale(1.05);
}

/* Navigation aus den drei runden Bild-Buttons */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.main-nav a {
  display: block;
  border-radius: 50%;
  outline-offset: 4px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.main-nav img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  transform: translateY(-4px) scale(1.06);
  filter: drop-shadow(0 8px 10px rgba(23, 56, 77, 0.25));
}

/* Aktuelle Seite: etwas größer mit gelbem Leuchten */
.main-nav a[aria-current="page"] {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px var(--accent)) drop-shadow(0 0 4px var(--accent));
}

/* ---------- Inhalt ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 16px 48px;
}

h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 24px;
}

.hero-cat {
  display: block;
  width: 100%;
  max-width: 400px;
  justify-self: center;
}

.hero-cat img {
  width: 100%;
  height: auto;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Einheitlicher Fliesstext im Begrüssungsbereich */
.intro,
.note,
.outro {
  margin: 0;
  max-width: 650px;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
}

.note {
  padding: 14px 18px;
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: 16px;
  text-align: left;
}

.note strong {
  font-weight: 600;
}

/* ---------- Unterseiten ---------- */
main > h1 {
  margin-bottom: 24px;
}

.placeholder {
  background: var(--surface);
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Fußzeile ---------- */
.site-footer {
  background: var(--text);
  color: var(--bg);
  text-align: center;
  padding: 16px;
  font-size: 0.95rem;
}

.site-footer .stand {
  opacity: 0.7;
  font-size: 0.85rem;
}

.intern-knopf {
  margin-left: 6px;
  padding: 0 4px;
  font: inherit;
  font-size: 0.85rem;
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.45;
  cursor: pointer;
}

.intern-knopf:hover,
.intern-knopf:focus-visible {
  opacity: 1;
}

/* ---------- Knöpfe ---------- */
.knopf,
.knopf-leicht {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 18px;
  border: 3px solid var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.knopf {
  background: var(--accent);
  color: var(--text);
}

.knopf-leicht {
  background: var(--surface);
  color: var(--text);
}

.knopf:hover,
.knopf-leicht:hover {
  transform: translateY(-2px);
}

.knopf:focus-visible,
.knopf-leicht:focus-visible,
.auswahl-knopf:focus-visible,
.info summary:focus-visible,
.entfernen:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Tradebinder ---------- */
.info {
  margin-bottom: 20px;
  max-width: 720px;
}

.info summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 8px 18px 8px 10px;
  border: 3px solid var(--text);
  border-radius: 999px;
  background: var(--surface);
}

.info summary::-webkit-details-marker {
  display: none;
}

.info-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.95rem;
}

.info[open] summary {
  background: var(--accent);
}

.info-inhalt {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-inhalt section + section {
  padding-top: 18px;
  border-top: 2px dashed var(--border);
}

.info-inhalt h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.schritte {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: schritt;
}

.schritte li {
  counter-increment: schritt;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  padding: 8px 0;
}

.schritte li + li {
  border-top: 1px solid var(--border);
}

.schritte li::before {
  content: counter(schritt);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}

.legende {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.legende > div {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.legende h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.legende dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  font-size: 0.92rem;
}

.legende dt {
  justify-self: start;
  padding: 0 7px;
  border: 2px solid var(--text);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.5;
}

.legende dd {
  margin: 0;
}

.info-fuss {
  margin: 0;
  font-weight: 600;
}

.beispiel-hinweis {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 2px dashed var(--accent-dark);
  border-radius: 12px;
  background: var(--surface);
  max-width: 720px;
}

.werkzeuge {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.suche input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 12px 18px 12px 44px;
  border: 3px solid var(--text);
  border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317384d' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") no-repeat 16px center / 20px;
  color: var(--text);
}

.suche input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filter label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
}

.filter select {
  font: inherit;
  font-weight: 400;
  font-size: 1rem;
  padding: 8px 12px;
  border: 2px solid var(--text);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  max-width: 100%;
}

/* Filter mit Mehrfachauswahl (Aufklappfeld mit Kästchen) */
.mehrfach {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
}

.mehrfach summary {
  list-style: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 400;
  padding: 8px 34px 8px 12px;
  border: 2px solid var(--text);
  border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317384d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mehrfach summary::-webkit-details-marker {
  display: none;
}

.mehrfach summary:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
}

.mehrfach.ist-aktiv summary {
  background-color: #fdebc4;
  font-weight: 600;
}

.mehrfach-liste {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(23, 56, 77, 0.18);
}

.filter .mehrfach-liste label {
  flex: none;
  flex-direction: row;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
}

.filter .mehrfach-liste label:hover {
  background: #fdebc4;
}

.mehrfach-liste input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent-dark);
}

.anzahl {
  margin: 0;
  color: var(--muted);
}

.kartenliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}

.karte {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.karte.ist-gewaehlt {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--accent);
}

.karte-bild {
  position: relative;
  margin-bottom: 8px;
  aspect-ratio: 63 / 88;
  max-width: 100%;
}

.karte-bild img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.karte-platzhalter {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 3px solid var(--text);
  background: repeating-linear-gradient(45deg, #2f6fb8 0 12px, #2a64a6 12px 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
}

.karte-platzhalter .ball {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid var(--text);
  background: linear-gradient(#e2483d 0 46%, var(--text) 46% 54%, #fff 54%);
  position: relative;
}

.karte-platzhalter .ball::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--text);
}

/* Preisschild wie ein Anhänger */
.preisschild {
  position: absolute;
  bottom: -14px;
  right: -8px;
  padding: 4px 12px 4px 20px;
  background: var(--accent);
  border: 3px solid var(--text);
  border-radius: 8px 6px 6px 8px;
  font-weight: 700;
  font-size: 1.05rem;
  transform: rotate(4deg);
  box-shadow: 2px 3px 0 rgba(23, 56, 77, 0.25);
  white-space: nowrap;
}

.preisschild::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text);
}

.auswahl-knopf:disabled {
  cursor: not-allowed;
  background: #e4e4e4;
  border-color: #a8a8a8;
  color: #7a7a7a;
}

.beispiel-marke {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}

.karte-info h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.karte-set {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.karte-marken {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kaestchen {
  padding: 1px 8px;
  border: 2px solid var(--text);
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: help;
}

/* Sealed Products: quadratische Bildfläche, keine Preisschilder */
.produktliste {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.produkt .karte-bild {
  aspect-ratio: 1 / 1;
  margin-bottom: 0;
}

.produkt .karte-bild img {
  border-radius: 0;
}

.produkt-inhalt {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.seiten-intro {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: 1.1rem;
}

.auswahl-knopf {
  margin-top: auto;
  font: inherit;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  border: 3px solid var(--text);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.auswahl-knopf:hover:not(:disabled) {
  background: #fdebc4;
}

.auswahl-knopf[aria-pressed="true"] {
  background: var(--accent);
}

.keine-treffer {
  text-align: center;
  padding: 32px 16px;
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.keine-treffer p {
  margin: 0 0 12px;
}

/* Auswahl-Leiste unten */
.auswahl-leiste {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--text);
  color: var(--bg);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -6px 16px rgba(23, 56, 77, 0.25);
}

.auswahl-leiste .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-weight: 600;
}

.auswahl-leiste .knopf {
  border-color: var(--bg);
}

/* ---------- Auswahl-Seite ---------- */
.zurueck {
  font-weight: 600;
}

.auswahl-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
}

.auswahl-liste li {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
}

.auswahl-liste .ist-produkt img {
  aspect-ratio: 1 / 1;
}

.zurueck-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.keine-treffer .knopf + .knopf {
  margin-left: 8px;
}

.auswahl-liste img,
.mini-platzhalter {
  width: 48px;
  aspect-ratio: 63 / 88;
  object-fit: contain;
  border-radius: 5px;
}

.mini-platzhalter {
  display: block;
  border: 2px solid var(--text);
  background: repeating-linear-gradient(45deg, #2f6fb8 0 6px, #2a64a6 6px 12px);
}

.auswahl-angaben {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auswahl-angaben span {
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.auswahl-preis {
  font-weight: 700;
  white-space: nowrap;
}

.auswahl-preis.hab-ich {
  padding: 2px 10px;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--accent);
  font-size: 0.85rem;
}

.entfernen {
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.auswahl-total {
  font-size: 1.2rem;
  margin: 16px 0 28px;
}

.nachricht {
  max-width: 760px;
  padding: 18px;
  border: 3px solid var(--text);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 24px;
}

.nachricht h2 {
  margin: 0 0 6px;
}

.nachricht p {
  margin: 0 0 12px;
}

.name-feld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  margin-bottom: 12px;
  max-width: 320px;
}

.name-feld input,
.nachricht textarea {
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 10px;
  padding: 8px 12px;
}

.nachricht textarea {
  width: 100%;
  font-weight: 400;
  line-height: 1.5;
  resize: vertical;
}

.nachricht-knoepfe {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.kopiert {
  font-weight: 600;
  color: var(--green);
}

@media (max-width: 600px) {
  .site-header .inner {
    justify-content: center;
  }
  .logo img {
    height: 80px;
  }
  .main-nav img {
    width: 92px;
    height: 92px;
  }
  h1 {
    font-size: 1.8rem;
  }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .intro,
  .note,
  .outro {
    margin: 0 auto;
  }
  .kartenliste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .karte {
    padding: 10px;
  }
  .filter label,
  .filter .mehrfach {
    flex: 1 1 140px;
  }
  .auswahl-liste li {
    grid-template-columns: 40px 1fr auto;
  }
  .auswahl-liste img,
  .auswahl-liste .mini-platzhalter {
    grid-row: 1 / span 2;
  }
  .auswahl-liste .auswahl-preis {
    grid-column: 2;
  }
  .auswahl-liste .entfernen {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
