/* pflanzen.online — Bühne (Karussell), Panels, Filter und Rabattpreise.
   Ergänzt styles.css; nutzt dessen Farbvariablen. */

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

/* --- Kopfzeile: Finder links, Marke mittig, Menü rechts ------------------- */
.site-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 14px; max-width: 1180px; padding: 16px 22px;
}
/* Ohne justify-self dehnt der Button die ganze 1fr-Spalte aus. */
.site-header .icon-btn:first-of-type { justify-self: start; }
.site-header .brand { justify-self: center; }
.site-header .icon-btn:last-of-type { justify-self: end; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--green); background: var(--green-soft); }
.icon-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.icon-btn.plain { border: 0; background: none; padding: 6px 8px; font-size: 1rem; }
.icon-lines { display: inline-flex; flex-direction: column; gap: 3px; width: 17px; }
.icon-lines i { display: block; height: 2px; border-radius: 2px; background: currentColor; }
.icon-lines i:nth-child(2) { width: 70%; }
@media (max-width: 560px) { .icon-btn-text { display: none; } }

/* --- Ausklapp-Panels ------------------------------------------------------ */
.panel-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 38, 27, .45);
}
body.panel-open { overflow: hidden; }

.panel {
  position: fixed; top: 0; bottom: 0; z-index: 50;
  width: min(360px, 88vw); overflow-y: auto;
  padding: 20px; background: var(--panel);
  box-shadow: 0 0 60px rgba(20, 38, 27, .22);
  display: flex; flex-direction: column; gap: 14px;
}
.panel-left { left: 0; border-right: 1px solid var(--line); }
.panel-right { right: 0; border-left: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.panel-sub {
  margin: 6px 0 0; font-size: .74rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--soft);
}
.panel-hint { margin: 0; font-size: .8rem; color: var(--soft); min-height: 1.2em; }

.panel-search input {
  width: 100%; padding: 12px 14px; font: inherit;
  border: 1px solid var(--line); border-radius: 11px; background: var(--bg);
}
.panel-search input:focus { outline: none; border-color: var(--green); background: var(--panel); }

.panel-cats { display: flex; flex-direction: column; gap: 3px; }
.cat-btn {
  text-align: left; padding: 9px 12px; border: 0; border-radius: 9px;
  background: none; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer;
}
.cat-btn:hover { background: var(--green-soft); }
.cat-btn.is-active { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }

.panel-check { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; }
.panel-check input { width: 17px; height: 17px; accent-color: var(--green); }
.panel-nav { display: flex; flex-direction: column; gap: 2px; }
.panel-nav a { padding: 8px 12px; border-radius: 9px; font-size: .95rem; }
.panel-nav a:hover { background: var(--green-soft); }
.panel-nav a[aria-current="page"] { background: var(--green-soft); font-weight: 700; }
.panel-nav.small a { font-size: .86rem; color: var(--muted); }
.panel-link { margin-top: auto; font-size: .88rem; font-weight: 600; }

/* --- Bühne ---------------------------------------------------------------- */
.stage {
  position: relative; max-width: 1180px; margin: 8px auto 0;
  padding: 0 22px 34px;
  height: clamp(430px, 64vh, 600px);
  /* Die seitlich herausragenden Nachbarkarten würden sonst eine waagerechte
     Bildlaufleiste erzeugen — genau das macht Karussells auf Mobil unbrauchbar. */
  overflow: hidden;
}
.stage-empty { height: auto; padding: 40px 22px; overflow: visible; }
.stage-track { position: relative; width: 100%; height: 100%; }

.slide {
  position: absolute; top: 50%; left: 50%;
  width: min(880px, 82vw);
  display: flex; gap: 26px; align-items: center;
  padding: 22px; border-radius: 22px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .55s cubic-bezier(.22, .8, .3, 1), opacity .45s ease;
  will-change: transform, opacity;
}
.slide[data-pos="active"] { transform: translate(-50%, -50%) scale(1); opacity: 1; z-index: 3; }
.slide[data-pos="prev"]   { transform: translate(-108%, -50%) scale(.8); opacity: .34; z-index: 2; }
.slide[data-pos="next"]   { transform: translate(8%, -50%) scale(.8); opacity: .34; z-index: 2; }
.slide[data-pos="far"],
.slide[data-pos="hidden"] {
  transform: translate(-50%, -50%) scale(.65); opacity: 0; z-index: 1; pointer-events: none;
}

.slide-media {
  flex: 0 0 44%; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: var(--green-soft); display: block;
}
.slide-media img { width: 100%; height: 100%; object-fit: cover; }
.slide-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.slide-info h2 { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.65rem); line-height: 1.25; }
.slide-info h2 a { color: var(--ink); }
.slide-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.slide-detail { font-size: .86rem; color: var(--muted); text-decoration: underline; }

.stage-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--green-dark);
  font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
  transition: background .15s, border-color .15s;
}
.stage-nav:hover { background: var(--green-soft); border-color: var(--green); }
.stage-nav:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.stage-nav.prev { left: 6px; }
.stage-nav.next { right: 6px; }

.stage-dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 7px;
}
.stage-dots .dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: var(--soft); opacity: .45; cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.stage-dots .dot:hover { opacity: .8; }
.stage-dots .dot.is-active { opacity: 1; background: var(--green); transform: scale(1.5); }
.stage-nomatch { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }

/* --- Preis mit Rabatt ----------------------------------------------------- */
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
.price strong { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.price.big strong { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.price s { color: var(--soft); font-size: .92em; }
.save-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: .8rem; font-weight: 800;
}
.price.big .save-badge { font-size: .95rem; padding: 6px 13px; }
.price .price-note { flex-basis: 100%; font-size: .76rem; color: var(--soft); }

/* --- Kundenstimmen -------------------------------------------------------- */
.voices { max-width: 780px; }
.voice-stack { position: relative; }
.voice {
  margin: 0; padding: 20px 22px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--panel);
}
.voice blockquote { margin: 0 0 12px; font-size: 1.02rem; line-height: 1.6; color: var(--ink); }
.voice figcaption { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.btn-outline {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--green);
  border-radius: 999px; color: var(--green-dark); font-size: .88rem; font-weight: 600;
}
.btn-outline:hover { background: var(--green-soft); }
.voice-note { margin: 14px 0 0; font-size: .8rem; color: var(--soft); line-height: 1.5; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.section-head h2 { margin: 0; }

/* --- Ohne JavaScript ------------------------------------------------------ */
/* Ohne JS bleibt alles lesbar: die Slides stehen schlicht untereinander. */
.no-js .stage { height: auto; }
.no-js .slide {
  position: static; transform: none; opacity: 1; width: auto; margin-bottom: 16px;
}
.no-js .stage-nav, .no-js .stage-dots, .no-js .panel-scrim { display: none; }
.no-js .panel { position: static; width: auto; box-shadow: none; }

/* --- Reduzierte Bewegung -------------------------------------------------- */
.reduce-motion .slide { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}

/* --- Schmale Bildschirme -------------------------------------------------- */
@media (max-width: 720px) {
  .stage { height: clamp(470px, 76vh, 640px); padding: 0 12px; }
  .slide { width: min(420px, 88vw); flex-direction: column; align-items: stretch; padding: 16px; }
  .slide-media { flex: none; width: 100%; aspect-ratio: 4 / 3; }
  .slide[data-pos="prev"] { transform: translate(-136%, -50%) scale(.78); opacity: .22; }
  .slide[data-pos="next"] { transform: translate(36%, -50%) scale(.78); opacity: .22; }
  .stage-nav { width: 40px; height: 40px; }
  .stage-nav.prev { left: 0; }
  .stage-nav.next { right: 0; }
}
