/* Popup Base (Estructura) */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(84, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-container {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border-radius: 25px;
  max-width: 550px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  transform: scale(0.7) translateY(-50px);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: popupFloat 3s ease-in-out infinite;
}

.popup-overlay.active .popup-container {
  transform: scale(1) translateY(0);
}

@keyframes popupFloat {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1) translateY(-10px); }
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: #540000;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(84, 0, 0, 0.3);
}

.popup-close:hover {
  background: #7a0000;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(84, 0, 0, 0.5);
}

.popup-header {
  background: linear-gradient(135deg, #540000 0%, #7a0000 100%);
  padding: 30px 25px 25px;
  border-radius: 25px 25px 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.popup-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shine 4s linear infinite;
}

@keyframes shine {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.popup-badge {
  background: #FFD700;
  color: #540000;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.popup-title {
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  margin: 0;
  font-family: 'Rubik', 'Roboto', system-ui, -apple-system, sans-serif;
  text-transform: uppercase;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.popup-body {
  padding: 25px 30px 30px;
}

.popup-offer {
  text-align: center;
  margin-bottom: 20px;
}

.popup-offer-title {
  color: #540000;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  font-family: 'Rubik', 'Roboto', system-ui, -apple-system, sans-serif;
}

.popup-price {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #540000;
  font-size: 40px;
  font-weight: 900;
  padding: 15px 20px;
  border-radius: 15px;
  display: inline-block;
  margin: 10px 0 15px;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
  font-family: 'Rubik', 'Roboto', system-ui, -apple-system, sans-serif;
  line-height: 1;
}

.popup-price small {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.9;
}

.popup-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  text-align: left;
  display: inline-block;
  max-width: 100%;
}

.popup-features li {
  padding: 6px 0 6px 30px;
  font-size: 15px;
  color: #333;
  position: relative;
  padding-right: 10px;
  word-wrap: break-word;
}

.popup-features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 6px;
  color: #540000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.popup-cta {
  text-align: center;
  margin-top: 0;
}

.popup-btn {
  background: linear-gradient(135deg, #540000 0%, #7a0000 100%);
  color: #fff;
  border: none;
  padding: 14px 40px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 25px rgba(84, 0, 0, 0.3);
  display: inline-block;
  text-decoration: none;
}

.popup-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(84, 0, 0, 0.5);
  background: linear-gradient(135deg, #7a0000 0%, #540000 100%);
  color: #fff;
}

.popup-terms {
  text-align: center;
  margin-top: 15px;
  font-size: 11px;
  color: #999;
  line-height: 1.4;
}

/* --- Variantes Black Friday (Override) --- */
.popup-overlay.popup--blackfriday {
  background: rgba(0, 0, 0, 0.86);
}

.popup-overlay.popup--blackfriday .popup-container {
  background: linear-gradient(135deg, #0e0e10 0%, #141418 100%);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
}

.popup-overlay.popup--blackfriday .popup-close {
  background: #1f1f22;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.popup-overlay.popup--blackfriday .popup-close:hover {
  background: #ff2a2a;
  box-shadow: 0 8px 24px rgba(255, 42, 42, 0.45);
}

.popup-overlay.popup--blackfriday .popup-header {
  background: linear-gradient(135deg, #0d0d0f 0%, #2a0000 100%);
}

.popup-overlay.popup--blackfriday .popup-badge {
  background: #1a1a1d;
  color: #ff4545;
  box-shadow: 0 4px 15px rgba(255, 69, 69, 0.3);
}

.popup-overlay.popup--blackfriday .popup-title {
  color: #ffffff;
}

.popup-overlay.popup--blackfriday .popup-offer-title,
.popup-overlay.popup--blackfriday .popup-offer-subtitle {
  color: #ff4545;
}

.popup-overlay.popup--blackfriday .popup-price {
  background: linear-gradient(135deg, #111113 0%, #1a1a1f 100%);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(255, 69, 69, 0.15);
}

.popup-overlay.popup--blackfriday .popup-price small {
  color: #ff4545;
}

.popup-overlay.popup--blackfriday .popup-features li {
  color: #ddd;
}

.popup-overlay.popup--blackfriday .popup-features li:before {
  color: #ff4545;
}

.popup-overlay.popup--blackfriday .popup-btn {
  background: linear-gradient(135deg, #ff2a2a 0%, #b80000 100%);
  color: #0d0d0f;
  box-shadow: 0 8px 25px rgba(255, 42, 42, 0.3);
}

.popup-overlay.popup--blackfriday .popup-btn:hover {
  background: linear-gradient(135deg, #ff4545 0%, #8f0000 100%);
  box-shadow: 0 12px 35px rgba(255, 42, 42, 0.45);
  color: #0d0d0f;
}

.popup-overlay.popup--blackfriday .popup-terms {
  color: rgba(255, 255, 255, 0.7);
}

/* Media Queries */
@media (max-width: 768px) {
  .popup-container {
    width: 95%;
    border-radius: 20px;
    max-height: 90vh;
  }
  .popup-header {
    padding: 25px 20px 20px;
    border-radius: 20px 20px 0 0;
  }
  .popup-title { font-size: 28px; }
  .popup-body { padding: 20px 20px 25px; }
  .popup-offer-title { font-size: 17px; margin-bottom: 10px; }
  .popup-price { font-size: 34px; padding: 12px 18px; }
  .popup-price small { font-size: 15px; }
  .popup-features { max-width: 90%; }
  .popup-features li { font-size: 14px; padding-left: 28px; padding-right: 5px; }
  .popup-features li:before { font-size: 18px; top: 5px; }
  .popup-btn { padding: 12px 35px; font-size: 16px; }
  .popup-close { width: 40px; height: 40px; font-size: 20px; top: 10px; right: 10px; }
}

@media (max-width: 480px) {
  .popup-title { font-size: 24px; }
  .popup-badge { font-size: 11px; padding: 5px 12px; }
  .popup-offer-title { font-size: 15px; line-height: 1.3; }
  .popup-price { font-size: 28px; padding: 10px 15px; }
  .popup-price small { font-size: 14px; }
  .popup-features { max-width: 85%; }
  .popup-features li { font-size: 12px; padding-left: 25px; padding-right: 5px; }
  .popup-features li:before { font-size: 16px; top: 5px; }
  .popup-btn { padding: 11px 25px; font-size: 14px; }
}