/*=============================================
MODAL SUPEROFERTA FLOTANTE (POPUP)
=============================================*/

.superoferta-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 10, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.superoferta-overlay.active {
  display: flex;
  opacity: 1;
}

.superoferta-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(255, 0, 85, 0.25);
  background: #0f1016;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-align: center;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}

/* FONDO MULTIMEDIA */
.superoferta-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.superoferta-bg img,
.superoferta-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.superoferta-gradient-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff0844 0%, #ffb199 50%, #1e1e2f 100%);
}

/* CAPA OSCURA PARA LEGIBILIDAD */
.superoferta-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 16, 22, 0.35) 0%, rgba(15, 16, 22, 0.75) 45%, rgba(15, 16, 22, 0.96) 100%);
  z-index: 2;
}

/* BOTÓN DE CIERRE */
.superoferta-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 15;
  width: 38px;
  height: 38px;
  line-height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.superoferta-close:hover {
  background: #ff0055;
  transform: rotate(90deg) scale(1.1);
}

/* CONTENIDO */
.superoferta-body {
  position: relative;
  z-index: 5;
  padding: 35px 22px 25px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 420px;
}

.superoferta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff0055;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(255, 0, 85, 0.5);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.superoferta-title {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.superoferta-desc {
  font-size: 14px;
  color: #e6e6e6;
  margin: 0 0 16px 0;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  max-width: 90%;
}

/* CONTADOR REGRESIVO */
.superoferta-countdown {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
  width: 100%;
}

.countdown-unit {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 6px 8px;
  min-width: 54px;
  flex: 1;
  max-width: 65px;
}

.countdown-num {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: #ffcc00;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.countdown-lbl {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #bbb;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* ACCIONES / BOTONES */
.superoferta-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.superoferta-btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(45deg, #00e676, #00c853);
  color: #05260f !important;
  font-weight: 900;
  font-size: 16px;
  padding: 13px 20px;
  border-radius: 35px;
  text-decoration: none !important;
  box-shadow: 0 8px 25px rgba(0, 230, 118, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.superoferta-btn-main:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 230, 118, 0.6);
  color: #000 !important;
}

.superoferta-btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.2);
  border: 1px solid #25D366;
  color: #25D366 !important;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 25px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
  align-self: center;
}

.superoferta-btn-share:hover {
  background: #25D366;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/*=============================================
ANIMACIONES DE ENTRADA
=============================================*/

@keyframes soZoomIn {
  from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
  50% { opacity: 1; }
}
.so-zoomIn { animation: soZoomIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes soBounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 0.9; transform: scale(1.08); }
  70% { transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}
.so-bounceIn { animation: soBounceIn 0.75s ease; }

@keyframes soFlipInX {
  from { transform: perspective(400px) rotate3d(1, 0, 0, 90deg); opacity: 0; }
  40% { transform: perspective(400px) rotate3d(1, 0, 0, -20deg); }
  60% { transform: perspective(400px) rotate3d(1, 0, 0, 10deg); }
  80% { transform: perspective(400px) rotate3d(1, 0, 0, -5deg); }
  to { transform: perspective(400px); opacity: 1; }
}
.so-flipInX { animation: soFlipInX 0.75s ease; }

@keyframes soSlideUp {
  from { transform: translate3d(0, 100%, 0); opacity: 0; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}
.so-slideUp { animation: soSlideUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }

@keyframes soRotateIn {
  from { transform: rotate3d(0, 0, 1, -180deg) scale(0.5); opacity: 0; }
  to { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}
.so-rotateIn { animation: soRotateIn 0.6s ease; }

@keyframes soPulseGlow {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 25px rgba(255, 0, 85, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 85, 0); }
}
.so-pulseGlow { animation: soPulseGlow 0.9s ease; }

/*=============================================
RESPONSIVE / MÓVIL (MOBILE-FIRST)
=============================================*/

@media (max-width: 576px) {
  .superoferta-overlay {
    padding: 10px;
  }

  .superoferta-modal {
    max-width: 100%;
    border-radius: 18px;
  }

  .superoferta-body {
    padding: 25px 15px 18px 15px;
    min-height: 360px;
  }

  .superoferta-title {
    font-size: 20px;
  }

  .superoferta-desc {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .countdown-unit {
    padding: 4px 6px;
    min-width: 44px;
  }

  .countdown-num {
    font-size: 16px;
  }

  .countdown-lbl {
    font-size: 8px;
  }

  .superoferta-btn-main {
    font-size: 14px;
    padding: 11px 16px;
  }

  .superoferta-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 28px;
  }
}
