/* Vollständiger Zielpfad: /public/assets/css/style.css */
:root {
  --bg: #120b16;
  --panel: rgba(255, 255, 255, 0.08);
  --text: #fff8f0;
  --muted: rgba(255, 248, 240, 0.72);
  --gold: #e8c979;
  --rose: #d899b8;
  --danger: #b5304a;
  --ok: #2c8a64;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #513251, transparent 36%),
    radial-gradient(circle at bottom right, #2f1842, transparent 42%),
    var(--bg);
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }

.site-body { overflow: hidden; }

.stage {
  min-height: 100vh;
  padding: clamp(16px, 3vw, 42px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.brand-bar,
.admin-header,
.panel {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}

.brand-bar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 28px;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 58px);
  line-height: .96;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

p { color: var(--muted); }

.shop-link,
.cta,
.admin-actions a,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(232,201,121,.95), rgba(216,153,184,.9));
  color: #1b101a;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.slideshow {
  position: relative;
  min-height: 0;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--shadow);
  background: #08050b;
}

.slides,
.slide {
  position: absolute;
  inset: 0;
}

.slide {
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .9s ease, transform 4.5s ease;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: radial-gradient(circle, rgba(255,255,255,.06), rgba(0,0,0,.36));
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,8,16,.82), rgba(12,8,16,.34) 42%, rgba(12,8,16,.12) 68%, rgba(12,8,16,.58));
  pointer-events: none;
}

.slide-overlay {
  position: absolute;
  left: clamp(20px, 6vw, 86px);
  bottom: clamp(28px, 8vw, 108px);
  z-index: 2;
  max-width: min(640px, 78vw);
}

.slide-overlay h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 76px);
  line-height: .92;
}

.slide-overlay p {
  font-size: clamp(16px, 1.7vw, 23px);
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #1b101a;
  background: var(--gold);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.cta { margin-top: 10px; }

.nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  padding: 0;
  font-size: 42px;
  line-height: 1;
  background: rgba(255,255,255,.16);
  color: var(--text);
  transform: translateY(-50%);
}

.prev { left: 18px; }
.next { right: 18px; }

.dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.dot {
  width: 12px;
  height: 12px;
  min-height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  border: 0;
}

.dot.is-active {
  width: 34px;
  background: var(--gold);
}

.empty-state {
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 34px;
  background: rgba(0,0,0,.2);
}

/* Admin */
.admin-body {
  min-height: 100vh;
  overflow: auto;
}

.admin-wrap {
  width: min(1500px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 28px;
}

.admin-header h1 {
  font-size: clamp(34px, 4vw, 62px);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  margin: 18px 0;
  padding: 22px;
  border-radius: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: #1b101a;
  outline: none;
}

textarea {
  resize: vertical;
  background: rgba(0,0,0,.24);
  color: var(--text);
}

input[type="file"],
input[type="text"],
input[type="number"],
input:not([type]) {
  background: rgba(0,0,0,.24);
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
}

.notice {
  padding: 14px 18px;
  border-radius: 18px;
  margin: 14px 0;
  font-weight: 900;
}

.notice.ok {
  background: rgba(44,138,100,.22);
  border: 1px solid rgba(44,138,100,.44);
}

.notice.bad {
  background: rgba(181,48,74,.22);
  border: 1px solid rgba(181,48,74,.44);
}

.hint {
  font-size: 14px;
}

.login-panel {
  max-width: 520px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 520px) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.folder-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.folder-counts div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.12);
}

.folder-counts span {
  color: var(--muted);
  font-size: 14px;
}

.sticky-submit {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  margin: 0 0 16px;
  border-radius: 22px;
  background: rgba(18, 11, 22, .92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.media-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(0,0,0,.24);
  border: 2px solid rgba(255,255,255,.12);
  cursor: pointer;
  min-height: 250px;
}

.media-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.media-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
}

.media-title {
  color: var(--text);
  font-weight: 900;
  line-height: 1.2;
}

.media-meta {
  color: var(--muted);
  font-size: 12px;
  word-break: break-word;
}

.checkmark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.28);
  color: transparent;
  font-weight: 900;
}

.media-card:has(input:checked) {
  border-color: var(--gold);
  background: rgba(232,201,121,.12);
}

.media-card:has(input:checked) .checkmark {
  color: #1b101a;
  background: var(--gold);
}

.bottom-submit {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.upload-grid label:nth-child(5) {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.slide-admin-list {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.slide-admin-card {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border-radius: 22px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.12);
}

.slide-admin-card img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
}

.slide-fields {
  display: grid;
  grid-template-columns: 110px repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.slide-fields label:nth-child(4),
.slide-fields label:nth-child(7) {
  grid-column: 1 / -1;
}

.danger {
  background: var(--danger);
  color: #fff;
}

.clear-form {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .site-body { overflow: auto; }
  .stage { min-height: 100svh; }
  .brand-bar,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .slideshow { min-height: 72svh; }
  .slide-overlay {
    left: 18px;
    right: 18px;
    bottom: 74px;
    max-width: none;
  }
  .slide::after {
    background: linear-gradient(0deg, rgba(12,8,16,.86), rgba(12,8,16,.24) 62%, rgba(12,8,16,.34));
  }
  .nav {
    width: 44px;
    height: 44px;
    font-size: 32px;
  }
  .filter-row,
  .upload-grid,
  .slide-fields,
  .slide-admin-card {
    grid-template-columns: 1fr;
  }
  .slide-admin-card img {
    width: 100%;
    height: 240px;
  }
}


/* === Admin-Mediathek: kleine anklickbare Vorschaubilder === */
.admin-body .media-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
}

.admin-body .media-card {
  min-height: 0 !important;
  height: auto !important;
  padding: 8px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.admin-body .media-card img {
  display: block !important;
  width: 100% !important;
  height: 115px !important;
  max-width: 100% !important;
  max-height: 115px !important;
  object-fit: contain !important;
  border-radius: 12px !important;
}

.admin-body .media-title {
  font-size: 12px !important;
  line-height: 1.2 !important;
  max-height: 2.4em !important;
  overflow: hidden !important;
}

.admin-body .media-meta {
  font-size: 10px !important;
  line-height: 1.2 !important;
  max-height: 2.4em !important;
  overflow: hidden !important;
}

.admin-body .checkmark {
  width: 26px !important;
  height: 26px !important;
  top: 8px !important;
  right: 8px !important;
  font-size: 14px !important;
}

.admin-body .sticky-submit {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
}

@media (min-width: 1200px) {
  .admin-body .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  }

  .admin-body .media-card img {
    height: 105px !important;
    max-height: 105px !important;
  }
}

@media (max-width: 700px) {
  .admin-body .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
  }

  .admin-body .media-card img {
    height: 92px !important;
    max-height: 92px !important;
  }
}


/* === Public Slideshow: keine riesigen Dateinamen / Bild klarer === */
.site-body .slide img {
  filter: brightness(1.08) !important;
}

.site-body .slide::after {
  background: linear-gradient(90deg, rgba(12,8,16,.46), rgba(12,8,16,.12) 42%, rgba(12,8,16,.04) 68%, rgba(12,8,16,.30)) !important;
}

.site-body .slide-overlay h2 {
  font-size: clamp(28px, 3.4vw, 54px) !important;
  overflow-wrap: anywhere !important;
}

.site-body .slide-overlay {
  max-width: min(560px, 70vw) !important;
}


/* === Produkt-Story-Slides === */
.site-body .slide.is-text-slide {
  display: grid !important;
  place-items: center !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(232,201,121,.18), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(216,153,184,.18), transparent 32%),
    linear-gradient(135deg, rgba(30,15,40,.96), rgba(10,6,14,.98)) !important;
}

.site-body .slide.is-text-slide::after {
  display: none !important;
}

.site-body .slide.is-text-slide .slide-overlay {
  position: static !important;
  width: min(920px, calc(100% - 56px)) !important;
  max-width: 920px !important;
  text-align: center !important;
  padding: clamp(28px, 5vw, 70px) !important;
  border-radius: 34px !important;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.36) !important;
}

.site-body .slide.is-text-slide .slide-overlay h2 {
  font-size: clamp(38px, 6vw, 86px) !important;
  line-height: .95 !important;
}

.site-body .slide.is-text-slide .slide-overlay p {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 760px !important;
  font-size: clamp(20px, 2.2vw, 34px) !important;
  color: rgba(255,248,240,.86) !important;
}

.site-body .slide.is-text-slide .cta {
  margin-top: 22px !important;
  min-height: 58px !important;
  padding: 0 30px !important;
  font-size: clamp(18px, 1.4vw, 24px) !important;
}


/* === Bild-Story: schöner Übergang zwischen Name, Bild, Beschreibung, Card, Preis, Link === */
.site-body .slide {
  opacity: 0 !important;
  transform: scale(1.055) translateY(10px) !important;
  filter: blur(14px) brightness(.88) !important;
  transition:
    opacity 1.15s ease,
    transform 5.8s cubic-bezier(.16,.84,.24,1),
    filter 1.15s ease !important;
}

.site-body .slide.is-active {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
  filter: blur(0) brightness(1.05) !important;
}

.site-body .slide img {
  transition: transform 6.2s cubic-bezier(.16,.84,.24,1), filter 1.15s ease !important;
}

.site-body .slide.is-active img {
  transform: scale(1.018) !important;
}

.site-body .slide.image .slide-overlay,
.site-body .slide:not(.is-text-slide) .slide-overlay {
  bottom: clamp(22px, 5vw, 68px) !important;
}

.site-body .slide.price-slide .slide-overlay h2 {
  font-size: clamp(54px, 8vw, 120px) !important;
}

.site-body .slide.link .slide-overlay {
  text-align: center !important;
}

.site-body .slide.link .cta {
  min-height: 64px !important;
  padding: 0 34px !important;
  font-size: clamp(18px, 1.7vw, 26px) !important;
}

.site-body .slide.is-text-slide::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(232,201,121,.24);
  border-radius: 34px;
  pointer-events: none;
}


/* === Saubere Sequenz bei mehreren Bild-Stories === */
.site-body .slide.story-transition {
  background:
    radial-gradient(circle at 50% 45%, rgba(232,201,121,.24), transparent 30%),
    radial-gradient(circle at 20% 80%, rgba(216,153,184,.20), transparent 36%),
    linear-gradient(135deg, rgba(18,10,28,.98), rgba(7,4,10,.98)) !important;
}

.site-body .slide.story-transition .slide-overlay {
  border-color: rgba(232,201,121,.32) !important;
  background: rgba(255,255,255,.06) !important;
}

.site-body .slide.story-transition .slide-overlay h2 {
  font-size: clamp(34px, 5vw, 72px) !important;
}

.site-body .slide.story-name .slide-overlay .badge {
  margin-bottom: 20px !important;
}

.site-body .slide.story-description .slide-overlay p {
  font-size: clamp(18px, 2vw, 28px) !important;
  line-height: 1.55 !important;
}

.site-body .slide.story-product-image::after,
.site-body .slide.story-card::after {
  background: linear-gradient(90deg, rgba(12,8,16,.24), rgba(12,8,16,.04) 48%, rgba(12,8,16,.18)) !important;
}


/* === Separates Präsentationsfenster === */
.viewer-body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(232,201,121,.18), transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(216,153,184,.18), transparent 32%),
    linear-gradient(135deg, #08040c 0%, #170d21 48%, #09050d 100%) !important;
  color: var(--text);
}

.viewer-stage {
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

.viewer-close {
  position: fixed;
  z-index: 1000;
  top: 18px;
  right: 18px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(10,6,14,.72);
  color: rgba(255,248,240,.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
}

.viewer-empty {
  width: min(760px, calc(100% - 44px));
  margin: 0 auto;
  height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
}

.viewer-empty h1 {
  font-size: clamp(36px, 6vw, 80px);
}

.viewer-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.viewer-slide {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  align-items: center;
  gap: clamp(22px, 4vw, 70px);
  padding: clamp(34px, 6vw, 92px);
  opacity: 0 !important;
  transform: scale(1.045) translateY(12px) !important;
  filter: blur(16px) brightness(.88) !important;
  transition:
    opacity 1.1s ease,
    transform 6.2s cubic-bezier(.16,.84,.24,1),
    filter 1.1s ease !important;
}

.viewer-slide.is-active {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
  filter: blur(0) brightness(1.04) !important;
}

.viewer-slide::after {
  display: none !important;
}

.viewer-slide.is-text-slide {
  grid-template-columns: 1fr;
  place-items: center;
  padding: clamp(28px, 6vw, 96px);
}

.viewer-slide.is-text-slide::before {
  content: "";
  position: absolute;
  inset: clamp(18px, 3vw, 42px);
  border-radius: clamp(28px, 4vw, 54px);
  border: 1px solid rgba(232,201,121,.24);
  box-shadow:
    inset 0 0 60px rgba(232,201,121,.06),
    0 30px 90px rgba(0,0,0,.32);
  pointer-events: none;
}

.viewer-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: min(78vh, 760px);
  padding: clamp(14px, 2vw, 28px);
  border-radius: clamp(28px, 4vw, 54px);
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.12), transparent 48%),
    rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    0 34px 100px rgba(0,0,0,.44),
    inset 0 0 50px rgba(255,255,255,.035);
  overflow: hidden;
}

.viewer-image-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px solid rgba(232,201,121,.14);
  pointer-events: none;
}

.viewer-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent !important;
  transform: scale(1.018);
  transition: transform 6.4s cubic-bezier(.16,.84,.24,1);
}

.viewer-slide.is-active .viewer-image-frame img {
  transform: scale(1.045);
}

.viewer-content {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4;
  width: 100%;
  max-width: 720px !important;
  padding: clamp(24px, 4vw, 54px);
  border-radius: clamp(26px, 4vw, 48px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.055));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    0 28px 90px rgba(0,0,0,.34),
    inset 0 0 34px rgba(255,255,255,.035);
  backdrop-filter: blur(16px);
}

.viewer-slide.is-text-slide .viewer-content {
  width: min(920px, calc(100vw - 64px));
  max-width: 920px !important;
  text-align: center;
}

.viewer-badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(232,201,121,.98), rgba(216,153,184,.92));
  color: #1b101a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.viewer-content h1 {
  margin: 0;
  font-size: clamp(38px, 5.5vw, 92px);
  line-height: .92;
  letter-spacing: -.055em;
  color: #fff8f0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.viewer-content p {
  margin: 18px 0 0;
  max-width: 760px;
  font-size: clamp(18px, 2vw, 31px);
  line-height: 1.48;
  color: rgba(255,248,240,.80);
}

.viewer-slide.price-slide .viewer-content h1 {
  font-size: clamp(58px, 9vw, 136px);
  letter-spacing: -.07em;
}

.viewer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  margin-top: 26px;
  padding: 0 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(232,201,121,1), rgba(216,153,184,.98));
  color: #1b101a;
  font-size: clamp(18px, 1.6vw, 25px);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 18px 46px rgba(0,0,0,.32);
}

.viewer-nav {
  position: fixed;
  z-index: 900;
  top: 50%;
  width: 50px;
  height: 50px;
  min-height: 50px;
  padding: 0;
  transform: translateY(-50%);
  background: rgba(10,6,14,.52);
  color: rgba(255,248,240,.88);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
}

.viewer-prev {
  left: 18px;
}

.viewer-next {
  right: 18px;
}

.viewer-progress {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 7px;
  max-width: min(900px, calc(100vw - 80px));
  overflow: hidden;
  transform: translateX(-50%);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(10,6,14,.42);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}

.viewer-dot {
  width: 9px;
  height: 9px;
  min-height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  border: 0;
}

.viewer-dot.is-active {
  width: 30px;
  background: var(--gold);
}

@media (max-width: 920px) {
  .viewer-slide {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 74px 18px 62px;
  }

  .viewer-image-frame {
    height: 50vh;
    border-radius: 28px;
  }

  .viewer-content {
    max-width: none !important;
    padding: 22px;
    border-radius: 28px;
  }

  .viewer-content h1 {
    font-size: clamp(34px, 10vw, 58px);
  }

  .viewer-content p {
    font-size: clamp(16px, 4.4vw, 22px);
  }

  .viewer-slide.is-text-slide .viewer-content {
    width: calc(100vw - 36px);
  }

  .viewer-nav {
    width: 42px;
    height: 42px;
    min-height: 42px;
    font-size: 30px;
  }
}


/* === Responsive-Fix: Sammelkarte immer vollständig sichtbar === */
.viewer-slide.story-card {
  grid-template-columns: 1fr !important;
  place-items: center !important;
  padding: clamp(54px, 6vh, 86px) clamp(18px, 4vw, 70px) clamp(58px, 7vh, 92px) !important;
}

.viewer-slide.story-card .viewer-image-frame {
  width: auto !important;
  max-width: calc(100vw - 90px) !important;
  height: calc(100vh - 155px) !important;
  max-height: 760px !important;
  aspect-ratio: 3 / 4 !important;
  padding: clamp(8px, 1.2vw, 16px) !important;
  border-radius: clamp(20px, 3vw, 38px) !important;
}

.viewer-slide.story-card .viewer-image-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transform: none !important;
}

.viewer-slide.story-card.is-active .viewer-image-frame img {
  transform: scale(1.01) !important;
}

.viewer-slide.story-card .viewer-content {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 54px !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: min(620px, calc(100vw - 120px)) !important;
  min-width: 0 !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  text-align: center !important;
  background: rgba(10, 6, 14, .58) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(14px) !important;
}

.viewer-slide.story-card .viewer-badge {
  display: none !important;
}

.viewer-slide.story-card .viewer-content h1 {
  margin: 0 !important;
  font-size: clamp(16px, 2.1vw, 28px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.025em !important;
  white-space: nowrap !important;
  max-width: calc(100vw - 160px) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.viewer-slide.story-card .viewer-content p,
.viewer-slide.story-card .viewer-cta {
  display: none !important;
}

/* Auch normale Produktbilder sauberer in kleinen Präsentationsfenstern */
@media (max-width: 1280px), (max-height: 760px) {
  .viewer-slide:not(.is-text-slide):not(.story-card) {
    grid-template-columns: 1fr !important;
    place-items: center !important;
    gap: 14px !important;
    padding: 68px 24px 62px !important;
  }

  .viewer-slide:not(.is-text-slide):not(.story-card) .viewer-image-frame {
    width: min(92vw, 860px) !important;
    height: min(58vh, 520px) !important;
  }

  .viewer-slide:not(.is-text-slide):not(.story-card) .viewer-content {
    max-width: min(860px, 92vw) !important;
    padding: 18px 22px !important;
    text-align: center !important;
  }

  .viewer-slide:not(.is-text-slide):not(.story-card) .viewer-content h1 {
    font-size: clamp(24px, 5vw, 48px) !important;
  }

  .viewer-slide:not(.is-text-slide):not(.story-card) .viewer-content p {
    font-size: clamp(15px, 2.5vw, 21px) !important;
  }
}

/* Extrem kleine Fenster: Karte bleibt trotzdem ganz sichtbar */
@media (max-width: 760px), (max-height: 620px) {
  .viewer-close {
    top: 10px !important;
    right: 10px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  .viewer-slide.story-card {
    padding: 48px 10px 52px !important;
  }

  .viewer-slide.story-card .viewer-image-frame {
    max-width: calc(100vw - 28px) !important;
    height: calc(100vh - 115px) !important;
    max-height: none !important;
    padding: 6px !important;
  }

  .viewer-slide.story-card .viewer-content {
    bottom: 34px !important;
    max-width: calc(100vw - 80px) !important;
    padding: 7px 12px !important;
  }

  .viewer-slide.story-card .viewer-content h1 {
    font-size: 14px !important;
    max-width: calc(100vw - 110px) !important;
  }

  .viewer-progress {
    bottom: 8px !important;
    max-width: calc(100vw - 46px) !important;
  }

  .viewer-nav {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    font-size: 26px !important;
  }

  .viewer-prev {
    left: 8px !important;
  }

  .viewer-next {
    right: 8px !important;
  }
}


/* === Final Viewer Fix: alle Bilder immer komplett sichtbar === */
.viewer-slide.story-product-image,
.viewer-slide.image,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) {
  grid-template-columns: 1fr !important;
  place-items: center !important;
  gap: 0 !important;
  padding: 52px 54px 52px !important;
}

.viewer-slide.story-product-image .viewer-image-frame,
.viewer-slide.image .viewer-image-frame,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-image-frame {
  width: calc(100vw - 118px) !important;
  height: calc(100vh - 128px) !important;
  max-width: 1480px !important;
  max-height: 860px !important;
  aspect-ratio: auto !important;
  padding: 10px !important;
  border-radius: clamp(18px, 2.8vw, 42px) !important;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.10), transparent 52%),
    rgba(255,255,255,.045) !important;
  overflow: hidden !important;
}

.viewer-slide.story-product-image .viewer-image-frame img,
.viewer-slide.image .viewer-image-frame img,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-image-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

.viewer-slide.story-product-image.is-active .viewer-image-frame img,
.viewer-slide.image.is-active .viewer-image-frame img,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link).is-active .viewer-image-frame img {
  transform: scale(1.006) !important;
}

/* Bei reinen Bildslides keine große Textkarte erzwingen */
.viewer-slide.story-product-image .viewer-content:empty,
.viewer-slide.image .viewer-content:empty {
  display: none !important;
}

.viewer-slide.story-product-image .viewer-content,
.viewer-slide.image .viewer-content,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-content {
  position: fixed !important;
  left: 50% !important;
  bottom: 50px !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: min(720px, calc(100vw - 130px)) !important;
  padding: 9px 16px !important;
  border-radius: 999px !important;
  text-align: center !important;
  background: rgba(10,6,14,.50) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.26) !important;
  backdrop-filter: blur(12px) !important;
}

.viewer-slide.story-product-image .viewer-badge,
.viewer-slide.image .viewer-badge,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-badge {
  display: none !important;
}

.viewer-slide.story-product-image .viewer-content h1,
.viewer-slide.image .viewer-content h1,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-content h1 {
  font-size: clamp(14px, 2vw, 24px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.viewer-slide.story-product-image .viewer-content p,
.viewer-slide.image .viewer-content p,
.viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-content p,
.viewer-slide.story-product-image .viewer-cta,
.viewer-slide.image .viewer-cta {
  display: none !important;
}

/* Textslides bleiben grafisch, aber besser im kleinen Fenster */
.viewer-slide.is-text-slide:not(.story-card) {
  padding: 62px 44px 62px !important;
}

.viewer-slide.is-text-slide:not(.story-card) .viewer-content {
  width: min(960px, calc(100vw - 88px)) !important;
  max-width: 960px !important;
  padding: clamp(24px, 4vw, 54px) !important;
}

.viewer-slide.is-text-slide:not(.story-card) .viewer-content h1 {
  font-size: clamp(34px, 6.2vw, 82px) !important;
}

.viewer-slide.is-text-slide:not(.story-card) .viewer-content p {
  font-size: clamp(17px, 2.3vw, 30px) !important;
}

/* Kleine Fenster / niedrige Höhe */
@media (max-width: 900px), (max-height: 680px) {
  .viewer-slide.story-product-image,
  .viewer-slide.image,
  .viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) {
    padding: 48px 12px 48px !important;
  }

  .viewer-slide.story-product-image .viewer-image-frame,
  .viewer-slide.image .viewer-image-frame,
  .viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-image-frame {
    width: calc(100vw - 42px) !important;
    height: calc(100vh - 110px) !important;
    max-width: none !important;
    max-height: none !important;
    padding: 6px !important;
    border-radius: 22px !important;
  }

  .viewer-slide.story-product-image .viewer-content,
  .viewer-slide.image .viewer-content,
  .viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-content {
    bottom: 33px !important;
    max-width: calc(100vw - 88px) !important;
    padding: 6px 11px !important;
  }

  .viewer-slide.story-product-image .viewer-content h1,
  .viewer-slide.image .viewer-content h1,
  .viewer-slide:not(.is-text-slide):not(.story-card):not(.price-slide):not(.story-link) .viewer-content h1 {
    font-size: 13px !important;
  }

  .viewer-slide.is-text-slide:not(.story-card) {
    padding: 50px 14px 50px !important;
  }

  .viewer-slide.is-text-slide:not(.story-card) .viewer-content {
    width: calc(100vw - 40px) !important;
    padding: 22px !important;
    border-radius: 26px !important;
  }
}


/* === True Contain Final: Originalbild nie in Rahmen schneiden === */
.viewer-slide.story-product-image,
.viewer-slide.story-card,
.viewer-slide.image,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
  place-items: center !important;
  padding: 54px 54px 54px !important;
  gap: 0 !important;
}

.viewer-slide.story-product-image .viewer-image-frame,
.viewer-slide.story-card .viewer-image-frame,
.viewer-slide.image .viewer-image-frame,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-image-frame {
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 118px) !important;
  max-height: calc(100vh - 128px) !important;
  aspect-ratio: auto !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.viewer-slide.story-product-image .viewer-image-frame::before,
.viewer-slide.story-card .viewer-image-frame::before,
.viewer-slide.image .viewer-image-frame::before,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-image-frame::before {
  display: none !important;
}

.viewer-slide.story-product-image .viewer-image-frame img,
.viewer-slide.story-card .viewer-image-frame img,
.viewer-slide.image .viewer-image-frame img,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-image-frame img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 118px) !important;
  max-height: calc(100vh - 128px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: clamp(16px, 2.4vw, 34px) !important;
  background: transparent !important;
  box-shadow:
    0 30px 90px rgba(0,0,0,.44),
    0 0 0 1px rgba(255,255,255,.13) !important;
  transform: none !important;
}

.viewer-slide.story-product-image.is-active .viewer-image-frame img,
.viewer-slide.story-card.is-active .viewer-image-frame img,
.viewer-slide.image.is-active .viewer-image-frame img,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition).is-active .viewer-image-frame img {
  transform: none !important;
}

/* Bildtitel nur dezent und niemals Bildfläche blockieren */
.viewer-slide.story-product-image .viewer-content,
.viewer-slide.story-card .viewer-content,
.viewer-slide.image .viewer-content,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-content {
  position: fixed !important;
  left: 50% !important;
  bottom: 52px !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: min(680px, calc(100vw - 140px)) !important;
  padding: 7px 13px !important;
  border-radius: 999px !important;
  background: rgba(10,6,14,.46) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.22) !important;
  backdrop-filter: blur(12px) !important;
  text-align: center !important;
}

.viewer-slide.story-product-image .viewer-content:has(.viewer-badge:only-child),
.viewer-slide.image .viewer-content:has(.viewer-badge:only-child) {
  display: none !important;
}

.viewer-slide.story-product-image .viewer-badge,
.viewer-slide.story-card .viewer-badge,
.viewer-slide.image .viewer-badge,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-badge {
  display: none !important;
}

.viewer-slide.story-product-image .viewer-content h1,
.viewer-slide.story-card .viewer-content h1,
.viewer-slide.image .viewer-content h1,
.viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-content h1 {
  font-size: clamp(13px, 1.7vw, 21px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.015em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.viewer-slide.story-product-image .viewer-content p,
.viewer-slide.story-card .viewer-content p,
.viewer-slide.image .viewer-content p,
.viewer-slide.story-product-image .viewer-cta,
.viewer-slide.story-card .viewer-cta,
.viewer-slide.image .viewer-cta {
  display: none !important;
}

/* Kleine Präsentationsfenster */
@media (max-width: 900px), (max-height: 680px) {
  .viewer-slide.story-product-image,
  .viewer-slide.story-card,
  .viewer-slide.image,
  .viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) {
    padding: 45px 12px 45px !important;
  }

  .viewer-slide.story-product-image .viewer-image-frame,
  .viewer-slide.story-card .viewer-image-frame,
  .viewer-slide.image .viewer-image-frame,
  .viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-image-frame {
    max-width: calc(100vw - 36px) !important;
    max-height: calc(100vh - 100px) !important;
  }

  .viewer-slide.story-product-image .viewer-image-frame img,
  .viewer-slide.story-card .viewer-image-frame img,
  .viewer-slide.image .viewer-image-frame img,
  .viewer-slide:not(.is-text-slide):not(.price-slide):not(.story-link):not(.story-transition) .viewer-image-frame img {
    max-width: calc(100vw - 36px) !important;
    max-height: calc(100vh - 100px) !important;
    border-radius: 18px !important;
  }

  .viewer-slide.story-product-image .viewer-content,
  .viewer-slide.story-card .viewer-content,
  .viewer-slide.image .viewer-content {
    bottom: 32px !important;
    max-width: calc(100vw - 88px) !important;
    padding: 5px 10px !important;
  }

  .viewer-slide.story-product-image .viewer-content h1,
  .viewer-slide.story-card .viewer-content h1,
  .viewer-slide.image .viewer-content h1 {
    font-size: 12px !important;
  }
}


/* === Keine generische Überschrift auf Beschreibung-Slides === */
.viewer-slide.story-description .viewer-content h1 {
  display: none !important;
}

.viewer-slide.story-description .viewer-badge {
  margin-bottom: 18px !important;
}

.viewer-slide.story-description .viewer-content {
  width: min(1040px, calc(100vw - 96px)) !important;
  max-width: 1040px !important;
  text-align: center !important;
}

.viewer-slide.story-description .viewer-content p {
  margin-top: 0 !important;
  max-width: 920px !important;
  font-size: clamp(24px, 3vw, 42px) !important;
  line-height: 1.42 !important;
  color: rgba(255,248,240,.88) !important;
}

@media (max-width: 900px), (max-height: 680px) {
  .viewer-slide.story-description .viewer-content {
    width: calc(100vw - 44px) !important;
  }

  .viewer-slide.story-description .viewer-content p {
    font-size: clamp(18px, 4.4vw, 27px) !important;
    line-height: 1.38 !important;
  }
}


/* === Admin: sicherer Slideshow-Löschbutton === */
.admin-body .danger-panel {
  border-color: rgba(239, 68, 68, .34) !important;
  background:
    linear-gradient(135deg, rgba(239,68,68,.10), rgba(255,255,255,.055)) !important;
}

.admin-body .danger-button {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: white !important;
  border: 0 !important;
  box-shadow: 0 16px 38px rgba(185,28,28,.26) !important;
}

.admin-body .danger-button:hover {
  filter: brightness(1.05);
}
