/**
 * Custom Carousel Styles
 * Styles for the custom carousel implementation
 */

/* Main carousel container */
.custom-carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

/* Carousel container */
.custom-carousel .carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Carousel track */
.custom-carousel .carousel-track {
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  transition: transform 500ms ease;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

/* Individual slides */
.custom-carousel .carousel-track > * {
  display: block;
  position: relative;
  float: left;
  margin: 0;
  padding: 0 5px;
  box-sizing: border-box;
  flex-shrink: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Estilos para los slides clonados (al final del carrusel) */
.custom-carousel .carousel-track > .clone-slide {
  opacity: 1;
  visibility: visible;
}

/* Añadir marcadores visuales durante el desarrollo (quitar en producción) */
.custom-carousel.debug .carousel-track > .clone-slide {
  border: 1px dashed orange;
}

/* Navigation arrows */
.custom-carousel .carousel-prev,
.custom-carousel .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 24px;
  line-height: 40px;
  text-align: center;
  color: #333;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.custom-carousel .carousel-prev {
  left: 10px;
}

.custom-carousel .carousel-next {
  right: 10px;
}

.custom-carousel .carousel-prev:hover,
.custom-carousel .carousel-next:hover {
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.custom-carousel .carousel-prev.disabled,
.custom-carousel .carousel-next.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Navigation dots */
.custom-carousel .carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.custom-carousel .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  margin: 0 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.custom-carousel .carousel-dot.active {
  background-color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-carousel .carousel-prev,
  .custom-carousel .carousel-next {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .custom-carousel .carousel-prev {
    left: 5px;
  }
  
  .custom-carousel .carousel-next {
    right: 5px;
  }
}

/* Ensure smooth transitions */
.custom-carousel * {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

/* Para productos, asegurar que las imágenes se muestren correctamente */
.custom-carousel .product {
  max-width: 100%;
  display: block;
}

.custom-carousel .product img {
  max-width: 100%;
  height: auto;
} 