/* OVERLAY */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 99998; /* 🔥 más alto */
}

/* POPUP */
#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #111;
  color: white;
  width: 340px;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  display: none;
  z-index: 99999; /* 🔥 por encima de todo */
  transition: 0.3s ease;
}

#popup.active {
  transform: translate(-50%, -50%) scale(1);
}

/* CERRAR */
#closePopup {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* TEXTO */
.tag {
  color: #00ff88;
  font-size: 14px;
}

.title {
  font-size: 24px;
  margin: 10px 0;
}

/* CONTENEDOR PRECIOS */
.price-box {
  text-align: center;
  margin-top: 10px;
}

/* PRECIO ANTIGUO */
.price.old {
  text-decoration: line-through;
  color: #888;
  font-size: 18px;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

/* PRECIO NUEVO */
.price.new {
  font-size: 30px;
  font-weight: bold;
  color: #00ff88;
  margin-top: 5px;
  opacity: 0;
  transform: scale(0.8);
  animation:
    popIn 0.6s ease forwards 0.3s,
    glow 1.5s infinite alternate;
}

/* BADGE DESCUENTO */
.badge {
  background: red;
  color: white;
  padding: 3px 6px;
  font-size: 12px;
  margin-left: 5px;
  border-radius: 5px;
}

/* BOTÓN */
.cta {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #00ff88;
  color: black;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
}

/* IMAGEN */
.image img {
  width: 100%;
  margin-top: 15px;
}

/* ANIMACIONES */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* EFECTO BRILLO */
@keyframes glow {
  from {
    text-shadow: 0 0 5px #00ff88;
  }
  to {
    text-shadow: 0 0 15px #00ff88;
  }
}
