/* ============================================================
   MAYASHOP — effects.css
   Burbujas · Rayos · Luces · Burbujas de Diamantes
   Cada sección tiene sus propios efectos de canvas/CSS
   ============================================================ */

/* ── Canvas de efectos por sección ─────────────────────────── */
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   HERO — Burbujas flotantes + rayos eléctricos + luz radial
   ══════════════════════════════════════════════════════════════ */
#hero .fx-canvas { z-index: 1; }

/* Burbujas CSS hero */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(255,215,0,0.35),
    rgba(255,215,0,0.05) 60%,
    transparent 100%);
  border: 1px solid rgba(255,215,0,0.25);
  animation: bubbleFloat linear infinite;
  pointer-events: none;
}
.bubble::after {
  content: '';
  position: absolute;
  top: 15%; left: 20%;
  width: 30%; height: 20%;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  filter: blur(3px);
  transform: rotate(-30deg);
}
@keyframes bubbleFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) translateX(var(--drift,20px)) scale(0.7); opacity: 0; }
}

/* Rayos CSS */
.lightning {
  position: absolute;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255,215,0,0.9) 20%,
    rgba(255,255,200,1) 50%,
    rgba(255,215,0,0.9) 80%,
    transparent 100%);
  filter: blur(1px) drop-shadow(0 0 6px rgba(255,215,0,0.9));
  animation: lightningStrike ease-in-out infinite;
  transform-origin: top center;
  pointer-events: none;
  border-radius: 2px;
}
.lightning::before {
  content: '';
  position: absolute;
  top: 50%; left: -6px;
  width: 14px; height: 2px;
  background: rgba(255,215,0,0.6);
  transform: rotate(40deg);
  filter: blur(2px);
}
.lightning::after {
  content: '';
  position: absolute;
  top: 70%; left: -4px;
  width: 10px; height: 2px;
  background: rgba(255,215,0,0.5);
  transform: rotate(-50deg);
  filter: blur(2px);
}
@keyframes lightningStrike {
  0%,90%,100% { opacity: 0; transform: scaleY(0); }
  5%          { opacity: 1; transform: scaleY(1); }
  8%          { opacity: 0.3; transform: scaleY(0.9); }
  10%         { opacity: 1; transform: scaleY(1); }
  15%         { opacity: 0; transform: scaleY(0); }
}

/* Luz de fondo pulsante */
.section-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse ease-in-out infinite alternate;
}
@keyframes glowPulse {
  from { opacity: 0.3; transform: scale(1); }
  to   { opacity: 0.7; transform: scale(1.15); }
}

/* ══════════════════════════════════════════════════════════════
   PRODUCTOS — Burbujas de diamantes 💎
   ══════════════════════════════════════════════════════════════ */
.diamond-bubble {
  position: absolute;
  font-size: 1.2rem;
  animation: diamondDrift linear infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(0,212,255,0.8));
  user-select: none;
}
@keyframes diamondDrift {
  0%   { transform: translateY(0) rotate(0deg) scale(0.5); opacity: 0; }
  10%  { opacity: 1; transform: translateY(-10%) rotate(20deg) scale(1); }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-100vh) rotate(360deg) scale(0.6); opacity: 0; }
}

/* Partículas hexagonales de fondo en productos */
.hex-particle {
  position: absolute;
  width: 8px; height: 8px;
  background: rgba(255,215,0,0.15);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  animation: hexSpin linear infinite;
  pointer-events: none;
}
@keyframes hexSpin {
  from { transform: rotate(0deg) translateY(0); opacity: 0.3; }
  50%  { opacity: 0.8; }
  to   { transform: rotate(360deg) translateY(-60px); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   CALCULADORA — Rayos eléctricos + luces de neón
   ══════════════════════════════════════════════════════════════ */
.neon-ray {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0,255,136,0.8),
    rgba(255,255,255,0.9),
    rgba(0,255,136,0.8),
    transparent);
  filter: blur(0.5px) drop-shadow(0 0 4px rgba(0,255,136,0.8));
  animation: neonSweep linear infinite;
  pointer-events: none;
}
@keyframes neonSweep {
  0%   { transform: translateX(-100%) scaleY(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(200%) scaleY(3); opacity: 0; }
}

.spark {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 16px var(--green);
  animation: sparkFly ease-out infinite;
  pointer-events: none;
}
@keyframes sparkFly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx,30px), var(--sy,-60px)) scale(0); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   VENTAJAS — Burbujas de luz dorada
   ══════════════════════════════════════════════════════════════ */
.gold-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255,215,0,0.4) 0%,
    rgba(255,215,0,0.1) 50%,
    transparent 70%);
  filter: blur(12px);
  animation: orbDrift ease-in-out infinite;
  pointer-events: none;
}
@keyframes orbDrift {
  0%,100% { transform: translate(0,0); }
  33%     { transform: translate(30px,-20px); }
  66%     { transform: translate(-20px,10px); }
}

/* ══════════════════════════════════════════════════════════════
   TESTIMONIOS — Estrellas + partículas de brillo
   ══════════════════════════════════════════════════════════════ */
.star-particle {
  position: absolute;
  color: var(--gold);
  font-size: 0.7rem;
  animation: starTwinkle ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}
@keyframes starTwinkle {
  0%,100% { opacity: 0.1; transform: scale(0.8) rotate(0deg); }
  50%     { opacity: 1;   transform: scale(1.4) rotate(180deg); }
}

.shimmer-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,215,0,0.6),
    transparent);
  animation: shimmerMove linear infinite;
  pointer-events: none;
}
@keyframes shimmerMove {
  from { transform: translateX(-100%); }
  to   { transform: translateX(300%); }
}

/* ══════════════════════════════════════════════════════════════
   CTA — Explosión de partículas + rayos
   ══════════════════════════════════════════════════════════════ */
.cta-particle {
  position: absolute;
  border-radius: 50%;
  animation: ctaFloat ease-in-out infinite;
  pointer-events: none;
}
@keyframes ctaFloat {
  0%,100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50%     { transform: translateY(-30px) scale(1.3); opacity: 0.8; }
}

.energy-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,215,0,0.3);
  animation: ringExpand ease-out infinite;
  pointer-events: none;
}
@keyframes ringExpand {
  0%   { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL — Luz ambiental de sección (overlay suave)
   ══════════════════════════════════════════════════════════════ */
.section-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Scanline sutil para efecto retro-gaming */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Grain texture overlay */
.grain {
  position: absolute;
  inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.06;
  animation: grainShift 0.5s steps(2) infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes grainShift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(1px,-2px); }
  75%  { transform: translate(2px, 1px); }
  100% { transform: translate(-1px,2px); }
}
