/* ===== Overlay (fondo negro semitransparente) ===== */
.pu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.65);

  /* Fade al salir */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

/* Fade al entrar */
.pu-overlay.activo {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s;
}

/* ===== Caja blanca ===== */
.pu-popup {
  position: relative;
  width: 50%;
  max-width: 1120px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: #fff;
  border-radius: 10px;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s ease;
}
.pu-overlay.activo .pu-popup {
  transform: none;
}

/* ===== Botón X ===== */
.pu-cerrar {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}
.pu-cerrar:hover { opacity: 1; transform: scale(1.15); }

/* ===== Slider ===== */
.pu-slider {
  position: relative;
  flex-shrink: 0;
  height: 60vh;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  overflow: hidden;
  touch-action: pan-y;
}

.pu-slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.pu-slider__slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* contain = imagen completa, sin recortar */
.pu-slider__slide img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Título flotante sobre el slider */
.pu-slider__title {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: calc(100% - 120px);
  margin: 0;
  padding: 10px 25px;
  background: rgba(20, 26, 36, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* Flechas */
.pu-slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 30px;
  height: 30px;
  margin-top: -32px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 26, 36, 0.8);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.pu-slider__arrow:hover { background: rgba(20, 26, 36, 1); transform: scale(1.08); }
.pu-slider__arrow--prev { left: 16px; }
.pu-slider__arrow--next { right: 16px; }

/* Puntos */
.pu-slider__dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.pu-slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.2s;
}
.pu-slider__dot.is-active { background: #f5a300; }

/* ===== Texto con scroll vertical ===== */
.pu-texto {
  margin-top: 24px;
  padding-right: 18px;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 180px;
  overflow-y: auto;
  color: #1c1c1c;
  font-size: 18px;
  line-height: 1.6;
  text-align: justify;

  scrollbar-width: thin;
  scrollbar-color: #9a9a9a #2e2e2e;
}
.pu-texto p { margin: 0 0 14px; }
.pu-texto p:last-child { margin-bottom: 0; }

.pu-texto::-webkit-scrollbar { width: 14px; }
.pu-texto::-webkit-scrollbar-track { background: #2e2e2e; }
.pu-texto::-webkit-scrollbar-thumb {
  background: #9a9a9a;
  border-radius: 8px;
  border: 3px solid #2e2e2e;
}

/* Evita que la página de fondo haga scroll con el popup abierto */
body.popup-lock { overflow: hidden; }

/* ===== Móvil ===== */
@media (max-width: 640px) {
  .pu-overlay { padding: 12px; }
  .pu-popup { padding: 16px; }
  .pu-slider__title { top: 12px; padding: 8px 20px; max-width: calc(100% - 32px); }
  .pu-slider__arrow { width: 44px; height: 44px; margin-top: -22px; font-size: 22px; }
  .pu-slider__arrow--prev { left: 8px; }
  .pu-slider__arrow--next { right: 8px; }
  .pu-texto { font-size: 16px;height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .pu-overlay, .pu-popup, .pu-slider__track { transition-duration: 0.01s; }
}

@media(max-width:750px){
  .pu-popup {
    width: 98%;
    height: 70vh;
    padding: 10px;
  }
  .pu-slider {
    height: 45vh;
  }
  .pu-slider__arrow{
   width: 25px;
   height: 25px;
   font-size: 17px;

  }
  .pu-slider__arrow:hover { background: rgba(20, 26, 36, 1); transform: scale(1); }
}