body.modal-abierto {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.show {
  display: flex;
}

.modal-contenido {
  background-color: transparent;
  border-radius: 0;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  height: 100%;
  position: relative;

  /* Centrado */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.modal-contenido .splide__track {
  display: flex;
  justify-content: center;
}

.modal-contenido .splide__slide {
  display: flex;
  justify-content: center;
}

.modal-contenido .splide__slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 90vh;
}

.cerrar, .cerrar-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background-color: transparent;
  border: none;
}

@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Versión móvil */
@media screen and (max-width: 768px) {
  .modal {
    padding: 10px;
  }

  .modal-contenido {
    max-width: 95vw;
    max-height: 80vh;
  }

  .modal-contenido .splide__slide img {
    max-width: 100%;
    height: auto;
  }
}
