/* BOTÓN VER DETALLES */
.btn-detalles {
  display: block;          /* para que margin auto funcione */
  margin: 0 auto 15px;     /* 0 arriba, auto centrado horizontal, 15px abajo */
  padding: 12px 22px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-detalles:hover {
  background: #333;
  transform: translateY(-2px);
}

/* MODAL OSCURO */
.modal-detalles-producto {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px; /* espacio para pantallas pequeñas */
  box-sizing: border-box;
}

/* CONTENIDO DEL MODAL */
.modal-contenido-detalles {
  position: relative;
  background: #fff;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalFadeIn 0.4s ease;
  overflow-y: auto; /* scroll si la imagen es muy alta */
}

/* IMAGEN DENTRO DEL MODAL */
.modal-contenido-detalles img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.modal-contenido-detalles img:hover {
  transform: scale(1.02);
}

/* BOTÓN CERRAR */
.modal-cerrar-detalles {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-cerrar-detalles:hover {
  color: #111;
}

/* MODAL PARA BLUE GOLD MASK DETALLES */

/* CONTENEDOR DE IMÁGENES PARA PRODUCTOS CON MÁS DE UNA IMAGEN */
.imagenes-detalles {
  display: flex;
  gap: 15px;       /* separación entre imágenes */
  flex-wrap: wrap;  /* se adaptan en móviles */
  justify-content: center;
}

.modal-img-detalles {
  max-width: 45%;   /* cada imagen ocupa aprox la mitad del modal */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* DESACTIVAR BOTÓN */
.producto-sin-stock .btn-detalles {
  pointer-events: none;
  background: #999;
  cursor: not-allowed;
}

/* ANIMACIÓN DEL MODAL */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .modal-contenido-detalles {
    max-width: 90%;
    padding: 20px;
  }
}

