/* ===== POPUP OVERLAY ===== */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
  display: block;
}

/* ===== POPUP ===== */
.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  background: linear-gradient(145deg, #1a1726, #13111c);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  animation: popupIn 0.4s ease forwards;
}

.popup.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Close button */
.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Gift icon */
.popup-gift {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

/* Discount */
.popup-discount {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 6px;
}

.popup-discount-label {
  font-size: 0.95rem;
  color: #b0b0c0;
  margin-bottom: 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Timer */
.popup-timer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.popup-timer .timer-block {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 56px;
}

.popup-timer .timer-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.popup-timer .timer-label {
  display: block;
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* CTA Button */
.popup-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 14px 28px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.popup-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
  .popup {
    padding: 30px 24px;
    max-width: 340px;
  }

  .popup-discount {
    font-size: 2.8rem;
  }

  .popup-timer .timer-block {
    min-width: 48px;
    padding: 8px 10px;
  }
}
