/* ════════════════════════════════════════════════════════════════
   MARSTALLER-UNIVERSUM — Slider-Master v3.1.1
   ────────────────────────────────────────────────────────────────
   Behebt das „Ringe im Bild"-Problem (Splide-/Kadence-Pagination-
   Dots, die im Z-Index über das Bild kippen). Plus saubere Pfeile,
   Touch-Swipe-Optimierung, Trackpad-/Mausrad-Scroll auf Desktop.
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. PAGINATION KOMPLETT AUS (v3.1.2) ──────────────────────
   User-Wunsch: keine Indikatoren, keine Kreise, keine Striche.
   Nur Pfeile + Touch-Swipe + Trackpad-Scroll.
   Greift cross-theme auf alle bekannten Carousel/Slider-Systeme. */
.splide__pagination,
.splide__pagination__page,
.splide__pagination li,
ul.splide__pagination,
.kt-blocks-carousel-indicator,
.kt-blocks-carousel .splide__pagination,
.kt-blocks-carousel-dots,
.wp-block-kadence-advancedgallery .splide__pagination,
.wp-block-kadence-advancedgallery .kt-blocks-carousel-indicator,
.kb-gallery-slider .splide__pagination,
[class*="-hero"] .splide__pagination,
[class*="-hero-cinema"] .splide__pagination,
[class*="-carousel"] .splide__pagination,
.zzr-hero-gallery .splide__pagination,
.zzr-hero-cinema .splide__pagination,
.zzr-hero-cinema--gallery .splide__pagination,
.tmp-shop-hero .splide__pagination,
.mup-slider-pagination,
.mup-cinemascope-slider .splide__pagination,
.wp-block-gallery .splide__pagination,
figure.wp-block-gallery .splide__pagination {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -99999px !important;
}

/* ─── 2. PFEILE: Glas-Optik, Gold-Akzent ──────────────────────── */
.splide__arrows,
[class*="-hero"] .splide__arrows {
  position: static;
  pointer-events: none;
}
.splide__arrow,
[class*="-hero"] .splide__arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 48px !important;
  height: 48px !important;
  background: rgba(13, 13, 13, 0.55) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  border: 1px solid rgba(201, 168, 76, 0.45) !important;
  border-radius: 50% !important;
  opacity: 0.85 !important;
  z-index: 9 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.25s ease !important;
}
.splide__arrow--prev,
[class*="-hero"] .splide__arrow--prev { left: clamp(0.75rem, 2vw, 1.25rem) !important; right: auto !important; }
.splide__arrow--next,
[class*="-hero"] .splide__arrow--next { right: clamp(0.75rem, 2vw, 1.25rem) !important; left: auto !important; }
.splide__arrow:hover,
.splide__arrow:focus-visible {
  opacity: 1 !important;
  background: rgba(13, 13, 13, 0.85) !important;
  border-color: rgba(201, 168, 76, 0.95) !important;
  transform: translateY(-50%) scale(1.06) !important;
  outline: none !important;
}
.splide__arrow:focus-visible {
  box-shadow: 0 0 0 2px #c9a84c !important;
}
.splide__arrow svg,
.splide__arrow > svg {
  fill: rgba(248, 242, 230, 0.95) !important;
  width: 18px !important;
  height: 18px !important;
  transform: none !important;
}
.splide__arrow:disabled,
.splide__arrow[disabled] {
  opacity: 0.25 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

@media (max-width: 640px) {
  .splide__arrow {
    width: 44px !important;
    height: 44px !important;
  }
  .splide__arrow svg { width: 16px !important; height: 16px !important; }
}

/* ─── 3. TOUCH-SWIPE-OPTIMIERUNG ──────────────────────────────── */
.splide__track,
.splide__list,
.mup-slider-track {
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.splide__track:active,
.mup-slider-track:active { cursor: grabbing; }

.splide__slide,
.mup-slider-slide {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.splide__slide img,
.mup-slider-slide img {
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ─── 4. SCROLL-SNAP-SLIDER (CSS-only) Trackpad-fähig ────────── */
.mup-slider-track,
.mup-cinemascope-slider__track {
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
}
/* Scrollbar verstecken aber funktional bleiben */
.mup-slider-track::-webkit-scrollbar,
.mup-cinemascope-slider__track::-webkit-scrollbar { display: none !important; }
.mup-slider-track,
.mup-cinemascope-slider__track {
  scrollbar-width: none !important;
}

/* ─── 5. HERO-OVERLAY z-index Schutz ──────────────────────────── */
/* Damit Pagination/Arrows NIE über dem Text-Overlay landen */
.zzr-hero-overlay,
[class*="-hero-overlay"],
[class*="-hero"] [class*="overlay"] {
  position: relative;
  z-index: 12;
}
/* Dezimaler Anti-Ghost: erlaubt KEINE auto-generierten Splide-Dots
   INNERHALB des Bild-Bereichs */
[class*="-hero"] .splide__track .splide__pagination,
[class*="-hero"] figure.wp-block-gallery .splide__pagination {
  display: none !important;
}

/* ─── 6. KADENCE GALLERY MASONRY: keine Decorative Circles ──── */
.kb-gallery-ul .kb-gallery-item::before,
.kb-gallery-ul .kb-gallery-item::after,
.kb-gallery-figure::before,
.kb-gallery-figure::after,
[class*="-hero-gallery"] figure::before,
[class*="-hero-gallery"] figure::after {
  /* Verhindert dekorative Pseudo-Elemente, die als Kreise erscheinen */
  content: none !important;
}

/* ─── 7. REDUCE-MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .splide__track,
  .splide__list,
  .mup-slider-track,
  .mup-cinemascope-slider__track {
    scroll-behavior: auto !important;
  }
  .splide__arrow,
  .splide__pagination__page {
    transition: none !important;
  }
}
