/* --- 1. SMOOTH GOLDEN SNOW (High Performance) --- */
/* We use pseudo-elements on the body to avoid adding HTML. 
   Pointer-events: none ensures you can still click everything behind the snow. */

body::before, body::after {
  content: "";
  position: fixed;
  top: -50%;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none; /* Allows clicking through snow */
  z-index: 9999; /* Stays on top */
  background: transparent;
  background-image: 
    radial-gradient(3px 3px at 15% 15%, rgba(255, 215, 0, 0.9) 50%, transparent),
    radial-gradient(2px 2px at 30% 60%, rgba(255, 215, 0, 0.7) 50%, transparent),
    radial-gradient(4px 4px at 50% 20%, rgba(255, 223, 0, 0.8) 50%, transparent),
    radial-gradient(2px 2px at 70% 40%, rgba(218, 165, 32, 0.9) 50%, transparent),
    radial-gradient(3px 3px at 85% 80%, rgba(255, 215, 0, 0.8) 50%, transparent),
    radial-gradient(2px 2px at 10% 90%, rgba(255, 223, 0, 0.6) 50%, transparent);
  background-size: 200% 200%;
  opacity: 0.8;
  will-change: transform; /* Triggers Hardware Acceleration */
}

/* Layer 1: Slower, smaller snow */
body::before {
  animation: goldenSnowFall 15s linear infinite;
  background-size: 100vw 100vh;
}

/* Layer 2: Faster, larger snow for 3D depth */
body::after {
  animation: goldenSnowFall 10s linear infinite;
  background-image: 
    radial-gradient(3px 3px at 25% 25%, rgba(255, 215, 0, 0.9) 50%, transparent),
    radial-gradient(4px 4px at 60% 50%, rgba(218, 165, 32, 0.8) 50%, transparent),
    radial-gradient(3px 3px at 80% 10%, rgba(255, 223, 0, 0.8) 50%, transparent);
  background-size: 100vw 100vh;
  opacity: 0.6;
}

@keyframes goldenSnowFall {
  0% {
    transform: translateY(-50vh);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* --- 2. FUTURISTIC LIGHTNING BUTTON --- */
/* Targets the main Salla Add to Cart button */

.s-add-to-cart-button, 
.product-details__btn-add,
.btn--add-to-cart { 
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.5) !important;
  transition: all 0.3s ease;
  z-index: 1;
}

/* The Glowing Pulse */
.s-add-to-cart-button, 
.product-details__btn-add,
.btn--add-to-cart {
  animation: electricPulse 2s infinite;
}

/* The Lightning Streak Effect */
.s-add-to-cart-button::after, 
.product-details__btn-add::after,
.btn--add-to-cart::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.8), 
    transparent
  );
  transform: skewX(-20deg);
  animation: lightningStreak 3s infinite;
  z-index: -1;
}

/* Hover Effect */
.s-add-to-cart-button:hover, 
.product-details__btn-add:hover,
.btn--add-to-cart:hover {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
  border-color: #fff !important;
}

@keyframes electricPulse {
  0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 10px #FFD700 inset; }
  100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
}

@keyframes lightningStreak {
  0% { left: -100%; opacity: 0; }
  20% { opacity: 0.5; }
  40% { left: 200%; opacity: 0; }
  100% { left: 200%; opacity: 0; }
}