@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&display=swap');

/* === BOTÓN FLOTANTE === */
#pcf-boton-abrir {
  position: fixed;
  bottom: 90px;
  right: 25px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00E0FF, #845EC2);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35), 0 0 18px rgba(0, 224, 255, .35);
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
#pcf-boton-abrir:hover {
  transform: translateY(-2px) scale(1.06);
  filter: saturate(1.05);
}

/* === OVERLAY (centrado real en cualquier resolución) === */
#pcf-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: rgba(0,0,0,0.72);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

/* === MODAL RULETA === */
#pcf-modal {
  position: relative;
  margin: auto;
  background: #0b0e14;
  color: #fff;
  border-radius: 18px;
  padding: 20px 22px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.06);
  text-align: center;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  width: min(520px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp .45s ease-out;
  transform: none !important; /* elimina desplazamiento */
  top: auto !important;
  left: auto !important;
}

/* 💻 Pantallas muy grandes (≥1920px) */
@media (min-width: 1600px) {
  #pcf-overlay {
    justify-content: center !important;
    align-items: center !important;
  }
  #pcf-modal {
    width: 500px;
    margin: auto !important;
  }
}


/* Animación suave */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(-25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === BOTÓN CERRAR === */
#pcf-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
  z-index: 2;
}
#pcf-close:hover {
  background: #F5B400;
  color: #0b0e14;
}

/* === HEADER === */
.pcf-header {
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}

/* === CANVAS === */
#pcf-canvas {
  width: 100%;
  height: auto;
  max-width: 360px;
  display: block;
  margin: 10px auto 20px auto;
}

/* === BOTÓN GIRAR === */
#pcf-girar {
  margin-top: 12px;
  width: 100%;
  background: linear-gradient(135deg, #00E0FF, #845EC2);
  color: #fff;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(0,224,255,.28);
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
  font-size: 16px;
}
#pcf-girar:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}
#pcf-girar:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* === CONTADOR Y MENSAJE === */
#pcf-contador {
  margin-top: 8px;
  font-size: 14px;
  color: #fff;
  text-align: center;
}
#pcf-mensaje {
  margin-top: 12px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.6);
}

/* === CTA WHATSAPP + QR === */
#pcf-whatsapp {
  display: block;
  margin-top: 14px;
  text-decoration: none;
  text-align: center;
  background: linear-gradient(135deg, #30d472, #18b458);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(30,200,110,.28);
}
#pcf-qr {
  display: block;
  margin: 10px auto 4px;
  width: 160px;
  height: auto;
  border-radius: 10px;
  border: 2px solid #F5B400;
  box-shadow: 0 0 18px rgba(245,180,0,.25);
}

/* === RESPONSIVE === */

/* 📱 Móviles vertical */
/* === AJUSTES EN MÓVILES (responsividad) === */
@media (max-width: 768px) {
  #pcf-boton-abrir {
    bottom: 65px; /* alineado con el carrito */
    right: 20px;  /* misma distancia lateral */
    width: 58px;
    height: 58px;
    font-size: 24px;
    animation: pcf-pulse 2.3s infinite ease-in-out, pcf-bounce 2.8s infinite ease-in-out;
  }
}
  #pcf-modal {
    width: 92%;
    padding: 14px 10px 24px;
  }
  #pcf-canvas { max-width: 260px; }
}

/* 💻 Tablets vertical */
@media (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
  #pcf-modal {
    width: 90%;
    padding: 16px;
    max-width: 460px;
  }
  #pcf-canvas { max-width: 300px; }
}

/* 🔁 Tablets horizontales */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  #pcf-overlay { align-items: center; justify-content: center; }
  #pcf-modal {
    max-height: 88vh;
    width: min(88vw, 500px);
    padding: 18px;
  }
  #pcf-canvas { max-width: 320px; }
}

/* 💻 Desktop */
@media (min-width: 1025px) {
  #pcf-modal {
    width: min(520px, 94vw);
    padding: 20px 22px 30px;
  }
}

/* === BOTÓN FLOTANTE RULETA (PCubaFit) === */
#pcf-boton-abrir {
    position: fixed;
    bottom: 90px; /* Distancia reducida respecto al carrito */
    right: 20px; /* Alineación mejorada */
    background: linear-gradient(135deg, #3dd9f3, #8e5cff);
    color: #fff;
    border-radius: 50%;
    width: 70px; /* Tamaño reducido */
    height: 70px; /* Tamaño reducido */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px; /* Ajuste del tamaño de la fuente */
    cursor: pointer;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
    animation: pcf-pulse 2s infinite ease-in-out, pcf-bounce 2s infinite ease-in-out;
    z-index: 9999;
}

/* === HOVER PARA EL BOTÓN === */
#pcf-boton-abrir:hover {
    transform: scale(1.15) rotate(3deg);
}

/* === PULSO (efecto de latido) === */
@keyframes pcf-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 18px rgba(0, 132, 255, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 28px rgba(0, 132, 255, 0.6);
    }
}

/* === REBOTE SUAVE (efecto de rebote continuo) === */
@keyframes pcf-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-5px);
    }
}

/* === AJUSTES EN MÓVILES (responsividad) === */
@media (max-width: 768px) {
    #pcf-boton-abrir {
        bottom: 80px; /* Ajuste para móviles */
        right: 25px;
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}



