/* =======================================
   🛍️ PROFESSIONELLER STORE-SLIDER
   Complete Product Gallery Solution
   ======================================= */

/* CSS-VARIABLEN FÜR KONSISTENTES THEMING */
:root {
  --slider-primary: #2c3e50;
  --slider-secondary: #3498db;
  --slider-accent: #e74c3c;
  --slider-background: #ffffff;
  --slider-shadow: rgba(0, 0, 0, 0.15);
  --slider-shadow-hover: rgba(0, 0, 0, 0.25);
  --slider-border: #e0e0e0;
  --slider-text: #333333;
  --slider-text-light: #666666;
  --slider-success: #27ae60;
  --slider-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --slider-animation: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =======================================
   🎯 MAIN SLIDER CONTAINER
   ======================================= */
.store-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%; /* ✅ VOLLE BREITE: Keine Beschränkung mehr */
  margin: 0; /* ✅ ÄSTHETISCHE ABSTÄNDE: Kein auto-centering */
  background: #ffffff;
  /* border-radius: 16px; */ /* GRÖSSERE RUNDUNG für modernen Look */
  /* box-shadow: 0 8px 32px var(--slider-shadow); */ /* STÄRKERE SCHATTEN für Premium-Effekt */
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid rgba(0, 0, 0, 0.08); /* SUBTILER RAHMEN */
}

.store-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* ✅ OPTIMIERT: 16:9 FORMAT für moderne Store-Präsentation */
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =======================================
   🖼️ MEDIA ELEMENTS (BILDER & VIDEOS)
   ======================================= */
.store-slider-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Verhältnis beibehalten, vollständig sichtbar */
  object-position: center;
  opacity: 0; /* STANDARD: Unsichtbar */
  transform: translateX(0); /* STANDARD: Zentriert aber unsichtbar */
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: zoom-in;
  will-change: opacity;
  z-index: 1; /* STANDARD Z-INDEX */
}

.store-slider-media.active {
  opacity: 1; /* NUR AKTIVE SLIDE SICHTBAR */
  z-index: 3; /* HÖCHSTER Z-INDEX für aktive Slide */
}

/* REMOVE PREV/NEXT - Verwirrt das System */
.store-slider-media.prev,
.store-slider-media.next {
  opacity: 0; /* SICHER UNSICHTBAR */
  z-index: 1; /* NIEDRIGSTER Z-INDEX */
}

.store-slider-video {
  cursor: default; /* Videos haben eigene Controls */
}

/* =======================================
   🎮 NAVIGATION CONTROLS
   ======================================= */
.store-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px; /* GRÖSSERE BUTTONS für bessere Touch-Bedienung */
  height: 48px;
  background: rgba(255, 255, 255, 0.95); /* WENIGER TRANSPARENT für bessere Sichtbarkeit */
  border: 2px solid rgba(0, 0, 0, 0.1); /* STÄRKERE UMRANDUNG */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--slider-transition);
  box-shadow: 0 4px 16px var(--slider-shadow); /* STÄRKERE SCHATTEN */
  font-size: 18px; /* GRÖSSERE ICONS */
  color: var(--slider-primary);
  user-select: none;
  backdrop-filter: blur(8px); /* STÄRKERER BLUR-EFFEKT */
}

.store-slider-nav:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 24px var(--slider-shadow-hover); /* STÄRKERER HOVER-SCHATTEN */
  transform: translateY(-50%) scale(1.15); /* GRÖSSERE HOVER-ANIMATION */
  border-color: var(--slider-secondary);
  color: var(--slider-secondary); /* FARBWECHSEL bei Hover */
}

.store-slider-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.store-slider-nav.prev {
  left: 12px;
}

.store-slider-nav.next {
  right: 12px;
}

.store-slider-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.9);
}

/* =======================================
   📍 INDICATOR DOTS
   ======================================= */
.store-slider-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.store-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--slider-transition);
  position: relative;
}

.store-slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.store-slider-dot.active {
  background: white;
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* =======================================
   🖼️ THUMBNAIL NAVIGATION
   ======================================= */
.store-slider-thumbnails {
  display: flex;
  gap: 12px; /* GRÖSSERE ABSTÄNDE */
  padding: 20px; /* MEHR PADDING für Premium-Look */
  background: #f8f9fa;
  border-top: 1px solid var(--slider-border);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); /* SUBTILER INNER-SHADOW */
}

.store-slider-thumbnails::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.store-slider-thumbnail {
  flex-shrink: 0;
  width: 70px; /* GRÖSSERE THUMBNAILS */
  height: 70px;
  border-radius: 12px; /* GRÖSSERE RUNDUNG */
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent; /* DICKERE UMRANDUNG */
  transition: var(--slider-transition);
  position: relative;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* SCHATTEN für Thumbnails */
}

.store-slider-thumbnail:hover {
  border-color: var(--slider-secondary);
  transform: scale(1.1) translateY(-2px); /* LIFT-EFFECT bei Hover */
  box-shadow: 0 8px 20px var(--slider-shadow); /* STÄRKERER HOVER-SCHATTEN */
}

.store-slider-thumbnail.active {
  border-color: var(--slider-accent);
  box-shadow: 0 0 0 2px var(--slider-accent), 0 4px 16px rgba(231, 76, 60, 0.3); /* GLOW-EFFECT */
  transform: scale(1.05); /* AKTIVE THUMBNAILS leicht vergrössert */
}

.store-slider-thumbnail img,
.store-slider-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.store-slider-thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--slider-transition);
}

.store-slider-thumbnail:hover .store-slider-thumbnail-overlay {
  opacity: 1;
}

/* Video Thumbnail Indicator */
.store-slider-thumbnail.video::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* =======================================
   📱 TOUCH & SWIPE SUPPORT
   ======================================= */
.store-slider-container.touching {
  cursor: grabbing;
}

.store-slider-container.swiping .store-slider-media {
  transition: none; /* Disable transitions during swipe */
}

/* =======================================
   🔍 ZOOM FUNKTIONALITÄT
   ======================================= */
.store-slider-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: var(--slider-transition);
}

.store-slider-zoom-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.store-slider-zoom-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.store-slider-zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--slider-transition);
}

.store-slider-zoom-close:hover {
  background: white;
  transform: scale(1.1);
}

/* =======================================
   📱 RESPONSIVE BREAKPOINTS
   ======================================= */

/* Tablet Landscape (768px - 1024px) */
@media (max-width: 1024px) {
  .store-slider-wrapper {
    max-width: 100%; /* ✅ VOLLE BREITE auch für Tablets */
    margin: clamp(1rem, 2.5vw, 1.5rem) 0; /* ✅ ÄSTHETISCHE ABSTÄNDE */
  }
  
  .store-slider-nav {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .store-slider-nav.prev {
    left: 8px;
  }
  
  .store-slider-nav.next {
    right: 8px;
  }
  
  .store-slider-thumbnail {
    width: 55px;
    height: 55px;
  }
}

/* Tablet Portrait (600px - 768px) */
@media (max-width: 768px) {
  .store-slider-container {
    aspect-ratio: 16/9; /* ✅ KONSISTENT: 16:9 auch für Tablets */
  }
  
  .store-slider-thumbnails {
    padding: 12px;
    gap: 6px;
  }
  
  .store-slider-thumbnail {
    width: 50px;
    height: 50px;
  }
  
  .store-slider-indicators {
    bottom: 12px;
  }
}

/* Mobile (320px - 600px) */
@media (max-width: 600px) {
  .store-slider-wrapper {
    border-radius: 8px;
    margin: clamp(0.75rem, 2vw, 1rem) 0; /* ✅ NUR VERTIKALE ABSTÄNDE für Mobile */
    max-width: 100%; /* ✅ VOLLE BREITE ohne Beschränkungen */
  }
  
  .store-slider-container {
    aspect-ratio: 16/9; /* ✅ MOBILE-OPTIMIERT: 16:9 für Konsistenz */
    min-height: 200px; /* ✅ MOBILE-FIX: Mindesthöhe für kleine Bildschirme */
  }
  
  .store-slider-nav {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
  
  .store-slider-nav.prev {
    left: 6px;
  }
  
  .store-slider-nav.next {
    right: 6px;
  }
  
  .store-slider-thumbnails {
    padding: 8px;
    gap: 4px;
  }
  
  .store-slider-thumbnail {
    width: 45px;
    height: 45px;
    border-radius: 6px;
  }
  
  .store-slider-indicators {
    bottom: 8px;
    padding: 6px 10px;
  }
  
  .store-slider-dot {
    width: 6px;
    height: 6px;
  }
}

/* =======================================
   🎨 LOADING & ERROR STATES
   ======================================= */
.store-slider-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.store-slider-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--slider-border);
  border-top: 3px solid var(--slider-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.store-slider-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--slider-text-light);
  z-index: 5;
}

.store-slider-error-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* =======================================
   ♿ ACCESSIBILITY FEATURES
   ======================================= */
.store-slider-nav:focus,
.store-slider-dot:focus,
.store-slider-thumbnail:focus {
  outline: 2px solid var(--slider-secondary);
  outline-offset: 2px;
}

.store-slider-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;
}

/* =======================================
   🎭 ANIMATIONS & TRANSITIONS
   ======================================= */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.store-slider-media.slide-right {
  animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.store-slider-media.slide-left {
  animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.store-slider-media.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* =======================================
   🌙 DARK MODE SUPPORT
   ======================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --slider-background: #1a1a1a;
    --slider-primary: #ffffff;
    --slider-text: #ffffff;
    --slider-text-light: #cccccc;
    --slider-border: #333333;
    --slider-shadow: rgba(0, 0, 0, 0.3);
    --slider-shadow-hover: rgba(0, 0, 0, 0.5);
  }
  
  .store-slider-nav {
    background: rgba(26, 26, 26, 0.9);
    color: white;
  }
  
  .store-slider-nav:hover {
    background: rgba(26, 26, 26, 1);
  }
  
  .store-slider-thumbnails {
    background: #2a2a2a;
  }
  
  .store-slider-thumbnail {
    background: #333333;
  }
}

/* =======================================
   🎯 PERFORMANCE OPTIMIZATIONS
   ======================================= */
.store-slider-media {
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
}

.store-slider-nav {
  will-change: transform;
}

.store-slider-thumbnail {
  will-change: transform;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .store-slider-media,
  .store-slider-nav,
  .store-slider-dot,
  .store-slider-thumbnail {
    transition: none !important;
    animation: none !important;
  }
}

/* =======================================
   🎯 TRACK-BASED SLIDER SYSTEM
   (für productDetail.js sliderCarousel)
   ======================================= */

/* SLIDER CONTAINER */
#sliderCarousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16/9; /* MODERNES 16:9 FORMAT */
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 50px;
}

/* SLIDER CONTAINER */
#sliderCarousel .slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* SLIDER TRACK - KRITISCH für translateX() */
#sliderCarousel .slider-track,
#sliderTrack {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* EINZELNE SLIDES */
#sliderCarousel .slider-slide {
  flex: 0 0 100%; /* JEDE SLIDE = 100% BREITE */
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

/* BILDER IN SLIDES */
#sliderCarousel .slider-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}

/* NAVIGATION BUTTONS */
#sliderCarousel #sliderPrev,
#sliderCarousel #sliderNext {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  color: #2c3e50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

#sliderCarousel #sliderPrev {
  left: 12px;
}

#sliderCarousel #sliderNext {
  right: 12px;
}

#sliderCarousel #sliderPrev:hover,
#sliderCarousel #sliderNext:hover {
  background: white;
  transform: translateY(-50%) scale(1.15);
  color: #3498db;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* DOTS NAVIGATION */
#sliderCarousel .slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 20px;
}

#sliderCarousel .slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

#sliderCarousel .slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

#sliderCarousel .slider-dot.active {
  background: white;
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* RESPONSIVE für TRACK-SYSTEM */
@media (max-width: 768px) {
  #sliderCarousel {
    aspect-ratio: 16/9; /* BEIBEHALTEN: 16:9 auch für Tablets */
    margin: 0 8px;
    border-radius: 12px;
  }
  
  #sliderCarousel #sliderPrev,
  #sliderCarousel #sliderNext {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  
  #sliderCarousel #sliderPrev {
    left: 8px;
  }
  
  #sliderCarousel #sliderNext {
    right: 8px;
  }
}

@media (max-width: 600px) {
  #sliderCarousel {
    aspect-ratio: 16/9; /* AUCH MOBILE: 16:9 für Konsistenz */
  }
  
  #sliderCarousel #sliderPrev,
  #sliderCarousel #sliderNext {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  #sliderCarousel #sliderPrev {
    left: 6px;
  }
  
  #sliderCarousel #sliderNext {
    right: 6px;
  }
}
@media (max-width: 1150px){
  #sliderCarousel{
    aspect-ratio: calc(100vw / 60vh);
  }
  
}
@media (max-width: 950px){
  #sliderCarousel{
    aspect-ratio: calc(100vw / 70vh);
  }
  
}

@media (max-width: 800px){
  #sliderCarousel{
    aspect-ratio: calc(100vw / 80vh);
  }
  
}
@media (max-width: 650px){
  #sliderCarousel{
    aspect-ratio: calc(100vw / 90vh); /* funktioniert nicht wie gedacht */

  }
  
}
@media (max-width: 500px){
  #sliderCarousel{
   aspect-ratio: calc(100vw / 100vh);  /* funktioniert nicht wie gedacht */

  }
  
}
@media (max-width: 400px){
  #sliderCarousel{
    aspect-ratio: calc(100vw / 110vh);  /* funktioniert nicht wie gedacht */

  }
  
}
@media (min-width: 300px){
  
.product-slider-container {
  aspect-ratio:16/12 !important;
}
}