/* Estilos para el carrusel de imágenes de producto */
.product-image-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Contenedor principal del carrusel - ahora sin fondo */
.carousel-main {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: transparent; /* Fondo transparente para el contenedor */
}

/* Imagen principal - siempre usar contain para evitar recortes */
.carousel-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* Forzar contain para todas las imágenes */
  display: block;
  transition: all 0.3s ease;
  background-color: #e8cdb5; /* Mantener el fondo de color para las imágenes */
}

.single-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #e8cdb5; /* Mantener el fondo de color para las imágenes */
}

.single-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* Forzar contain para todas las imágenes */
  display: block;
  transition: all 0.3s ease;
}

/* Miniaturas superpuestas en la parte inferior de la imagen principal - ahora ocultas por defecto */
.carousel-thumbnails {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 20;
  background-color: rgba(232, 205, 181, 0.7); /* Fondo semi-transparente */
  padding: 5px;
  border-radius: 8px 8px 0 0;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

/* Clase para mostrar las miniaturas */
.carousel-thumbnails.visible {
  opacity: 1;
  transform: translateY(0);
}

.thumbnail {
  width: 60px;
  height: 60px;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
  border-color: #a44; /* Color que coincide con el tema del sitio */
  transform: scale(1.1);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Controles de navegación */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30; /* Mayor z-index para estar por encima de las miniaturas */
  transition: all 0.3s ease;
  opacity: 0.7;
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Estrategia adaptativa para diferentes dispositivos */
@media (min-width: 992px) {
  /* Escritorio */
  .carousel-main {
    height: 100%;
  }

  /* Efecto de zoom en hover solo para escritorio */
  .carousel-main:hover .carousel-main-image {
    transform: scale(1.05);
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  /* Tablets */
  .carousel-main {
    height: 100%;
  }
}

@media (max-width: 767px) {
  /* Móviles */
  .carousel-main {
    height: 300px;
  }

  .carousel-thumbnails {
    bottom: 0;
    padding: 3px;
  }

  .thumbnail {
    width: 40px;
    height: 40px;
  }

  .carousel-prev,
  .carousel-next {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .thumbnail {
    width: 35px;
    height: 35px;
  }

  .carousel-prev,
  .carousel-next {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
}

/* Ajustes para el modal */
.product-detail-modal {
  max-width: 100%;
  width: 95%;
  overflow-x: hidden;
}

.product-detail-image {
  height: 500px;
  background-color: transparent; /* Fondo transparente */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 576px) {
  .product-detail-content {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
  }

  .product-detail-image {
    height: 300px;
    width: 100%;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px;
    border-radius: 0;
  }

  .product-detail-modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .carousel-thumbnails {
    gap: 5px;
  }

  .thumbnail {
    width: 35px;
    height: 35px;
  }
}

