/**
 * =====================================================
 * ESTILOS PARA CARRUSEL DE IMÁGENES DE PRODUCTOS
 * Sistema de múltiples imágenes con carrusel
 * =====================================================
 */

/* ===== CARRUSEL DE IMÁGENES DE PRODUCTOS ===== */
.product-carousel {
  height: 100%;
  position: relative;
}

.product-carousel .carousel-inner {
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.product-carousel .carousel-item {
  height: 100%;
}

.product-carousel .carousel-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.product-card:hover .product-carousel .carousel-item img {
  transform: scale(1.1);
}

/* Controles del carrusel */
.product-carousel .carousel-control-prev,
.product-carousel .carousel-control-next {
  width: 15%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.product-card:hover .carousel-control-prev,
.product-card:hover .carousel-control-next {
  opacity: 0.8;
}

.product-carousel .carousel-control-prev:hover,
.product-carousel .carousel-control-next:hover {
  opacity: 1;
}

.product-carousel .carousel-control-prev-icon,
.product-carousel .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background-size: 50%;
}

/* Indicadores del carrusel */
.product-carousel .carousel-indicators {
  bottom: 10px;
  margin-bottom: 0;
  z-index: 10;
}

.product-carousel .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 3px;
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  transition: all 0.3s ease;
}

.product-carousel .carousel-indicators button.active {
  background-color: #667eea;
  transform: scale(1.2);
}

/* ===== INDICADOR DE GALERÍA ===== */
.gallery-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.gallery-indicator i {
  margin-right: 4px;
}

/* ===== PREVIEW DE IMÁGENES EN ADMIN ===== */
.image-preview-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  background: #f8f9fa;
}

.image-preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-preview-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.image-preview-item .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  font-size: 0.7rem;
}

.image-preview-item img {
  border-radius: 8px;
}

/* ===== EFECTOS HOVER PARA CARRUSEL ===== */
.product-card {
  overflow: hidden;
}

.product-card:hover .product-carousel .carousel-indicators {
  opacity: 1;
}

.product-carousel .carousel-indicators {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ===== RESPONSIVE PARA CARRUSEL ===== */
@media (max-width: 768px) {
  .product-carousel .carousel-control-prev,
  .product-carousel .carousel-control-next {
    width: 20%;
  }
  
  .product-carousel .carousel-control-prev-icon,
  .product-carousel .carousel-control-next-icon {
    width: 25px;
    height: 25px;
  }
  
  .product-carousel .carousel-indicators button {
    width: 6px;
    height: 6px;
    margin: 0 2px;
  }
  
  .gallery-indicator {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
}

@media (max-width: 480px) {
  .product-carousel .carousel-indicators {
    bottom: 5px;
  }
  
  .gallery-indicator {
    bottom: 5px;
    right: 5px;
  }
}

/* ===== ANIMACIONES PARA CARRUSEL ===== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.product-carousel .carousel-item.active {
  animation: slideIn 0.5s ease-in-out;
}

/* ===== MEJORAS VISUALES ===== */
.product-carousel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  pointer-events: none;
}

.product-card:hover .product-carousel::before {
  opacity: 1;
}

/**
 * =====================================================
 * COMENTARIOS PARA PRINCIPIANTES:
 * 
 * Este archivo CSS maneja todos los estilos del carrusel:
 * 
 * CARACTERÍSTICAS:
 * - Carrusel automático con controles
 * - Indicadores de navegación
 * - Efectos hover suaves
 * - Responsive design
 * - Animaciones de transición
 * - Preview de imágenes en admin
 * 
 * ESTRUCTURA:
 * .product-carousel
 *   └── .carousel-inner
 *       └── .carousel-item
 *           └── img
 * 
 * CONTROLES:
 * - Flechas prev/next (aparecen en hover)
 * - Indicadores de puntos (abajo)
 * - Contador de imágenes (esquina)
 * 
 * RESPONSIVE:
 * - Móviles: controles más grandes
 * - Tablets: indicadores ajustados
 * - Desktop: efectos completos
 * =====================================================
 */
