.popup-window {
  position: relative;
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  background: #f2f2f2;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  overflow: hidden;
}

.popup-viewport {
  border-radius: 8px;      /* esquinas internas */
  overflow: hidden;        /* ← CLAVE ABSOLUTA */
  background: transparent;
}

/* ===== Overlay ===== */
.popup-carousel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Track ===== */
.popup-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

/* ===== Slide ===== */
.popup-slide {
  min-width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  background: #fff;             /* ← tarjeta */
  border-radius: 8px;
  overflow: hidden;
}


/* ===== Imagen ===== */
.popup-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Contenido ===== */
.popup-content {
  padding: 20px;
  text-align: center;
  display: none;
}

.popup-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: #24306c;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

/* ===== CONTROLES ===== */

.popup-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.popup-btn-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

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

.popup-btn-close {
  position: absolute;
  top: 8px;
  right: 8px;
  pointer-events: auto;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 850px){
  .popup-window{
    width: 80%;
  }
}