/* --- CONFIGURACIÓN DE VARIABLES Y CONTENEDOR --- */
:root {
  --carousel-max-width: 300px;
  --carousel-aspect-ratio: 4 / 5;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: var(--carousel-max-width);
  aspect-ratio: var(--carousel-aspect-ratio); 
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  touch-action: pan-y; 
}

/* --- ESTRUCTURA DE DIAPOSITIVAS --- */
.carousel-track {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- BOTONES DE NAVEGACIÓN (ESCRITORIO) --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 18px;            
  padding: 10px 14px;         
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none; 
}

.btn-prev { left: 8px; }
.btn-next { right: 8px; }

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

/* --- AJUSTES EXCLUSIVOS PARA MÓVIL (BOTONES VISIBLES) --- */
@media (max-width: 600px) {
  .carousel-container {
    border-radius: 0px;       
  }
  
  .carousel-btn {
    display: block;           
    font-size: 14px;          
    padding: 8px 12px;        
    background-color: rgba(0, 0, 0, 0.5); 
  }

  .btn-prev { left: 5px; }    
  .btn-next { right: 5px; }
}
.imagen {
      width: 300px;
      cursor: pointer;
    }

    /* Fondo oscuro */
    .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    /* Imagen grande */
    .modal img {
     max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
    }
   .modal img:hover {
    transform: scale(1.02);
}