/* =========================================================
   POPUP DE LANZAMIENTO DE PRODUCTO
========================================================= */

.product-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: rgba(7, 18, 35, 0.76);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.product-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.popup-open {
  overflow: hidden;
}

/* =========================
   CONTENEDOR PRINCIPAL
========================= */

.product-popup-dialog {
  position: relative;

  width: min(1040px, 100%);
  height: min(720px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);

  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);

  overflow: hidden;

  background: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.32);

  transform: translateY(28px) scale(0.97);

  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-popup.is-open .product-popup-dialog {
  transform: translateY(0) scale(1);
}

/* =========================
   VIDEO
========================= */

.product-popup-media {
  position: relative;

  min-height: 0;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(0, 87, 255, 0.22),
      transparent 54%
    ),
    #071427;
}

.product-popup-video {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: contain;
  object-position: center;

  background: #071427;
}

.product-popup-media::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(7, 20, 39, 0.03) 40%,
      rgba(7, 20, 39, 0.52) 100%
    );

  pointer-events: none;
}

/* =========================
   ETIQUETA DEL VIDEO
========================= */

.product-popup-badge {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 9px 14px;

  color: #ffffff;
  background: rgba(7, 20, 39, 0.72);

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-popup-badge::before {
  content: "";

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #39a0ff;

  box-shadow:
    0 0 14px rgba(57, 160, 255, 0.9);
}

/* =========================
   CONTENIDO DERECHO
========================= */

.product-popup-content {
  position: relative;

  min-height: 0;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 42px 40px 34px;

  background:
    radial-gradient(
      circle at top right,
      rgba(0, 87, 255, 0.09),
      transparent 40%
    ),
    #ffffff;
}

.product-popup-eyebrow {
  display: inline-flex;
  align-items: center;

  width: fit-content;

  margin-bottom: 18px;
  padding: 8px 13px;

  color: #1563bc;
  background: rgba(0, 87, 255, 0.08);

  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-popup-title {
  margin: 0;

  color: #10213b;

  font-size: clamp(2rem, 3.5vw, 3.15rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.product-popup-title span {
  color: var(--color-primary, #0057ff);
}

.product-popup-description {
  margin: 16px 0 0;

  color: #60708a;

  font-size: 0.98rem;
  line-height: 1.7;
}

.product-popup-features {
  display: grid;
  gap: 11px;

  margin: 20px 0 0;
  padding: 0;

  list-style: none;
}

.product-popup-features li {
  position: relative;

  padding-left: 26px;

  color: #31445f;

  font-size: 0.87rem;
  line-height: 1.45;
  font-weight: 700;
}

.product-popup-features li::before {
  content: "✓";

  position: absolute;
  top: 0;
  left: 0;

  width: 18px;
  height: 18px;

  display: grid;
  place-items: center;

  color: #ffffff;
  background: var(--color-primary, #0057ff);

  border-radius: 50%;

  font-size: 0.65rem;
  font-weight: 900;
}

/* =========================
   BOTONES
========================= */

.product-popup-actions {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: stretch;

  margin-top: 30px;
}

.product-popup-primary,
.product-popup-secondary {
  box-sizing: border-box;

  width: 100%;
  min-height: 54px;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 22px;

  border-radius: 13px;

  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.2;
  font-weight: 800;

  text-decoration: none;
  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.product-popup-primary {
  border: 1px solid transparent;

  color: #ffffff;
  background: var(--color-primary, #0057ff);

  box-shadow:
    0 14px 28px rgba(0, 87, 255, 0.24);
}

.product-popup-secondary {
  margin-top: 22px !important;

  border: 1px solid rgba(16, 33, 59, 0.14);

  color: #253b59;
  background: #ffffff;
}

.product-popup-primary:hover {
  transform: translateY(-2px);

  background: var(--color-primary-hover, #0047d6);

  box-shadow:
    0 18px 34px rgba(0, 87, 255, 0.3);
}

.product-popup-secondary:hover {
  transform: translateY(-2px);

  border-color: rgba(0, 87, 255, 0.22);

  background: #f3f7fc;
}

/* =========================
   BOTÓN CERRAR
========================= */

.product-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 1px solid rgba(16, 33, 59, 0.1);
  border-radius: 50%;

  color: #10213b;
  background: rgba(255, 255, 255, 0.94);

  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.12);

  font-family: Arial, Helvetica, sans-serif;
  font-size: 25px;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.product-popup-close:hover {
  transform: rotate(90deg);

  background: #ffffff;
}

/* =========================
   TABLET
========================= */

@media (max-width: 860px) {
  .product-popup {
    padding: 18px;
  }

  .product-popup-dialog {
    grid-template-columns: 1fr;

    width: min(680px, 100%);
    height: auto;
    max-height: calc(100vh - 36px);

    overflow-y: auto;
  }

  .product-popup-media {
    min-height: 310px;
    height: 42vh;
    max-height: 410px;
  }

  .product-popup-content {
    overflow: visible;

    padding: 38px 34px 36px;
  }

  .product-popup-title {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .product-popup-actions {
    margin-top: 28px;
  }

  .product-popup-secondary {
    margin-top: 18px !important;
  }
}

/* =========================
   CELULAR
========================= */

@media (max-width: 520px) {
  .product-popup {
    align-items: flex-end;

    padding: 10px;
  }

  .product-popup-dialog {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 20px);

    border-radius: 24px;
  }

  .product-popup-media {
    min-height: 225px;
    height: 34vh;
    max-height: 280px;
  }

  .product-popup-content {
    padding: 30px 22px 26px;
  }

  .product-popup-eyebrow {
    margin-bottom: 13px;
  }

  .product-popup-title {
    font-size: clamp(1.75rem, 9vw, 2.25rem);
  }

  .product-popup-description {
    margin-top: 16px;

    font-size: 0.9rem;
    line-height: 1.6;
  }

  .product-popup-features {
    margin-top: 20px;
  }

  .product-popup-actions {
    margin-top: 28px;
  }

  .product-popup-primary,
  .product-popup-secondary {
    width: 100%;
    min-height: 52px;
  }

  .product-popup-secondary {
    margin-top: 16px !important;
  }

  .product-popup-close {
    top: 12px;
    right: 12px;

    width: 38px;
    height: 38px;

    font-size: 22px;
  }

  .product-popup-badge {
    left: 15px;
    bottom: 14px;
  }
}

/* =========================
   PANTALLAS DE POCA ALTURA
========================= */

@media (max-height: 780px) and (min-width: 861px) {
  .product-popup {
    padding: 14px;
  }

  .product-popup-dialog {
    height: calc(100vh - 28px);
    max-height: calc(100vh - 28px);
  }

  .product-popup-content {
    justify-content: flex-start;

    padding: 34px 34px 28px;
  }

  .product-popup-title {
    font-size: clamp(2rem, 3vw, 2.7rem);
  }

  .product-popup-description {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .product-popup-features {
    gap: 9px;
  }

  .product-popup-actions {
    margin-top: 26px;
  }

  .product-popup-secondary {
    margin-top: 22px !important;
  }
}

/* =========================
   ACCESIBILIDAD
========================= */

@media (prefers-reduced-motion: reduce) {
  .product-popup,
  .product-popup-dialog,
  .product-popup-primary,
  .product-popup-secondary,
  .product-popup-close {
    transition: none;
  }
}