/* Product Teaser Swiper Styles */

.product-teaser-slider {
  position: relative;
  background: #f9fafb;
  border-radius: 0.375rem; /* rounded-sm */
  overflow: hidden;
}

.product-teaser-swiper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.product-teaser-swiper .swiper-wrapper {
  display: flex;
  height: 100%;
  width: 100%;
}

.product-teaser-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  flex-shrink: 0;
  position: relative;
}

.product-teaser-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* Navigation Arrows - Always visible - Force primary color */
.product-teaser-swiper .swiper-button-prev,
.product-teaser-swiper .swiper-button-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-top: 0 !important;
  width: 28px !important;
  height: 28px !important;
  background: rgba(0, 72, 39, 0.9) !important; /* Primary color */
  border: 1px solid rgba(0, 72, 39, 0.2) !important;
  border-radius: 50% !important;

  transition: all 0.2s ease !important;
  z-index: 10 !important;
  opacity: 1 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.product-teaser-swiper .swiper-button-prev:after,
.product-teaser-swiper .swiper-button-next:after {
  font-size: 10px !important;
  font-weight: bold !important;
  color: #fff !important;
}

.product-teaser-swiper .swiper-button-prev:hover,
.product-teaser-swiper .swiper-button-next:hover {
  background: rgba(0, 72, 39, 1) !important; /* Primary color full opacity */
  border-color: rgba(0, 72, 39, 0.4) !important;
  /* keep position stable; no scale to avoid vertical jump */
  transform: translateY(-50%) !important;
}

.product-teaser-swiper .swiper-button-disabled {
  opacity: 0.3 !important;
  cursor: not-allowed;
}

/* Pagination Dots */
.product-teaser-swiper .swiper-pagination {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 10;
}

.product-teaser-swiper .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: rgba(0, 72, 39, 0.5); /* Primary color */
  border-radius: 50%;
  transition: all 0.2s ease;
  cursor: pointer;
}

.product-teaser-swiper .swiper-pagination-bullet-active {
  background: rgba(0, 72, 39, 1); /* Primary color active */
  transform: scale(1.2);
}

.product-teaser-swiper .swiper-pagination-bullet:hover {
  background: rgba(0, 72, 39, 0.8);
  transform: scale(1.1);
}

/* Navigation always visible */

/* Loading state */
.product-teaser-swiper .swiper-slide-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.product-teaser-swiper .swiper-slide-loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid rgba(0, 72, 39, 0.8);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 640px) {
  .product-teaser-swiper .swiper-button-prev,
  .product-teaser-swiper .swiper-button-next {
    width: 24px;
    height: 24px;
    margin-top: -12px;
  }

  .product-teaser-swiper .swiper-button-prev:after,
  .product-teaser-swiper .swiper-button-next:after {
    font-size: 8px;
  }

  .product-teaser-swiper .swiper-pagination-bullet {
    width: 5px;
    height: 5px;
  }

  .product-teaser-swiper .swiper-pagination {
    bottom: 8px;
    gap: 3px;
  }
}

/* Force visibility for all swiper elements */
.product-teaser-swiper * {
  visibility: visible !important;
}

.product-teaser-swiper .swiper {
  display: block !important;
  visibility: visible !important;
}

.product-teaser-swiper .swiper-wrapper {
  display: flex !important;
  visibility: visible !important;
}

.product-teaser-swiper .swiper-slide {
  display: flex !important;
  flex-shrink: 0;
  visibility: visible !important;
}

.product-teaser-swiper img {
  display: block !important;
  visibility: visible !important;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .product-teaser-swiper .swiper-button-prev,
  .product-teaser-swiper .swiper-button-next {
    background: rgba(0, 72, 39, 0.9);
    border: 2px solid white;
  }

  .product-teaser-swiper .swiper-pagination-bullet {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .product-teaser-swiper .swiper-button-prev,
  .product-teaser-swiper .swiper-button-next,
  .product-teaser-swiper .swiper-pagination-bullet {
    transition: none;
  }

  .product-teaser-swiper .swiper-slide img {
    transition: none;
  }

  .product-teaser-swiper .swiper-slide-loading::before {
    animation: none;
  }
}

.swiper-button-next, .swiper-button-prev { color: #fff; }
