/* Öffentliche Katalogseite: dunkel, minimalistisch, warme Rot-/Orange-Akzente.
   Vollständig lokal, keine externen Schriften/Icons/Bilder. */

:root {
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1d1d20;
  --border: #2a2a2e;
  --text: #ffffff;
  --muted: #9a9aa3;
  --accent: #ff5a36;
  --accent-2: #e8401f;
  --radius: 16px;
  --radius-sm: 999px;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body.modal-open {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
}

/* --- Kopfbereich ---------------------------------------------------- */

.site-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 8px;
  text-align: center;
}

.logo img {
  display: block;
  margin: 0 auto;
  max-height: 96px;
  width: auto;
}

.intro {
  margin: 16px auto 0;
  max-width: 640px;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* --- Hauptbereich --------------------------------------------------- */

.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  cursor: pointer;
}

.pill:hover {
  color: var(--text);
  border-color: var(--accent);
}

.pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.pill:focus-visible,
.card:focus-visible,
.modal-close:focus-visible,
.gallery-nav:focus-visible,
.social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.card {
  appearance: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.card:hover {
  border-color: var(--accent);
}

.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
}

.card-title {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* --- Detail-Modal --------------------------------------------------- */

.modal {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.modal-inner {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-close {
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--accent);
}

.gallery {
  position: relative;
  background: #000000;
}

.gallery-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.slide {
  width: 100%;
  display: flex;
  justify-content: center;
}

.slide img,
.slide video {
  display: block;
  max-width: 100%;
  max-height: 62dvh;
  object-fit: contain;
}

.gallery-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.gallery-nav:hover {
  background: var(--accent);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-count {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 13px;
}

.modal-body {
  padding: 20px 20px 28px;
}

.modal-title {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.prices {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.prices li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: var(--surface-2);
}

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

.price-label {
  overflow-wrap: anywhere;
}

.price-value {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* --- Fußbereich ----------------------------------------------------- */

.site-footer {
  padding: 24px 16px 40px;
  border-top: 1px solid var(--border);
}

.social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social a {
  display: inline-flex;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  opacity: 0.85;
}

.social a:hover {
  opacity: 1;
  border-color: var(--accent);
}

.social img {
  display: block;
}

/* --- Mobil: Modal nahezu vollflächig -------------------------------- */

@media (max-width: 640px) {
  .modal {
    width: 100vw;
    max-width: 100vw;
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: 12px;
  }

  .modal-inner {
    height: 100%;
    max-height: none;
  }

  .slide img,
  .slide video {
    max-height: 50dvh;
  }

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