/**
 * SJMedia PDP Slide - Frontend Styles
 *
 * @author    sjmedia GmbH <info@sjmedia-consulting.de>
 * @copyright 2025 sjmedia GmbH
 */

/* Product Card Container - Standardmäßig ausgeblendet (Desktop) */
.sjmedia-pdp-mobile-card {
  width: auto;
  margin: 0;
  display: none !important; /* Standardmäßig ausgeblendet für Desktop */
  background-color: #ffffff;
  padding: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  position: relative;
}

/* Bild-Slider Styles - Standardmäßig ausgeblendet, nur auf mobilen Geräten sichtbar */
.sjmediaPDPslide-wrapper {
  display: none;
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.sjmediaPDPslide {
  position: relative;
  width: calc(100% + 16px);
  overflow: hidden;
  display: flex;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.sjmediaPDPslide-item {
  min-width: 100%;
  scroll-snap-align: start;
  position: relative;
}

.sjmediaPDPslide-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Navigation Buttons */
.sjmediaPDPslide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.sjmediaPDPslide-prev,
.sjmediaPDPslide-next {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  transition: background 0.3s ease;
  margin: 0 10px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.sjmediaPDPslide-prev:hover,
.sjmediaPDPslide-next:hover {
  background: rgba(255, 255, 255, 0.8);
}

.sjmediaPDPslide-prev i,
.sjmediaPDPslide-next i {
  font-size: 24px;
  color: #333;
}

/* Dots Navigation */
.sjmediaPDPslide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  bottom: 15px;
  padding: 0 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.sjmediaPDPslide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
  padding: 0;
}

.sjmediaPDPslide-dot.active {
  background: #333;
}

/* Responsive: Nur auf Bildschirmen kleiner als 991px anzeigen */
@media screen and (max-width: 991px) {
  /* Product Card Container auf Mobile anzeigen */
  .sjmedia-pdp-mobile-card {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0;
    padding: 0;
  }

  /* Slider auf Mobile anzeigen */
  .sjmediaPDPslide-wrapper {
    display: block !important;
    /*     margin-bottom: 0; */
    margin: 0 -8px 0 -8px;
  }

  /* Standard-Produktbilder auf Mobile ausblenden */
  .df-product-block-left .df-product-card .images-container,
  .df-product-block-left .df-product-card .product-cover,
  .df-product-block-left .df-product-card .lSSlideOuter,
  .df-product-block-left .df-product-card .page-content {
    display: none !important;
  }
}

/* Auf Desktop (>= 992px) komplett ausblenden */
@media screen and (min-width: 992px) {
  /* Slider auf Desktop ausblenden */
  .sjmedia-pdp-mobile-card {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .sjmediaPDPslide-wrapper {
    display: none !important;
  }

  /* Standard-Produktbilder auf Desktop anzeigen */
  .df-product-block-left .df-product-card .images-container,
  .df-product-block-left .df-product-card .product-cover,
  .df-product-block-left .df-product-card .lSSlideOuter,
  .df-product-block-left .df-product-card .page-content {
    display: block !important;
  }

  /* Floating Cart Button auf Desktop ausblenden */
  .sjmedia-mobile-floating-cart {
    display: none !important;
  }
}

.sjmedia-mobile-floating-cart {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: #ffffff;
  padding: 12px 15px;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-quantity .add .btn.add-to-cart {
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}

@media screen and (max-width: 991px) {
  .sjmedia-mobile-floating-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 15px;
  }

  .sjmedia-floating-cart-content {
    width: 50%;
    max-width: 50%;
    margin: 0 auto;
  }
}

.sjmedia-floating-cart-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Im Floating Cart: Nur Button anzeigen - gleiches Design wie Haupt-Button */
.sjmedia-mobile-floating-cart .add {
  width: 100%;
  margin: 0;
  padding: 0;
}

.sjmedia-mobile-floating-cart .add .btn.add-to-cart {
  width: 100%;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01rem;
  padding: 0.75em;
  min-height: 3.6em;
  max-width: none;
  background-color: #1f1f1f;
  color: #ffffff;
  border: none;
  border-radius: 0;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.sjmedia-mobile-floating-cart .add .btn.add-to-cart:hover {
  background-color: #adb79b;
}

.sjmedia-mobile-floating-cart .add .btn.add-to-cart:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@media screen and (max-width: 991px) {
  .sjmedia-mobile-floating-cart {
    display: block !important;
  }

  body.product-detail {
    padding-bottom: 80px;
  }
}

@media screen and (max-width: 480px) {
  .sjmedia-mobile-floating-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 15px;
  }
}

.page-authentication #content {
  box-shadow: none;
}

.page-authentication .opc_social .opc_social_item.paypal {
  margin-top: 13px;
}

.page-authentication .opc_solo_or {
  margin-top: 12px;
}
