/* ══════════════════════════════════════════
   LOADER.CSS — Grillz smile page loader
   Importado en shared.css vía <link>
══════════════════════════════════════════ */

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

#page-loader.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.03);
}

/* SVG smile wrapper */
.loader-smile {
  width: 180px;
  height: auto;
  position: relative;
}

/* Tooth shimmer animation */
.tooth {
  fill: #1a1a22;
  stroke: rgba(200,169,110,0.35);
  stroke-width: 1;
  transition: fill 0.2s;
}

/* Gold grill overlay per tooth */
.grill {
  opacity: 0;
  animation: grillShine 2.4s ease-in-out infinite;
}

/* Stagger each tooth's grill */
.grill-1  { animation-delay: 0.00s; }
.grill-2  { animation-delay: 0.10s; }
.grill-3  { animation-delay: 0.20s; }
.grill-4  { animation-delay: 0.30s; }
.grill-5  { animation-delay: 0.40s; }
.grill-6  { animation-delay: 0.30s; }
.grill-7  { animation-delay: 0.20s; }
.grill-8  { animation-delay: 0.10s; }

@keyframes grillShine {
  0%   { opacity: 0; }
  20%  { opacity: 0; }
  45%  { opacity: 1; }
  65%  { opacity: 1; }
  85%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Sparkles */
.sparkle {
  opacity: 0;
  animation: sparkle 2.4s ease-in-out infinite;
  transform-origin: center;
}
.sparkle-1 { animation-delay: 0.45s; }
.sparkle-2 { animation-delay: 0.65s; }
.sparkle-3 { animation-delay: 0.30s; }
.sparkle-4 { animation-delay: 0.80s; }

@keyframes sparkle {
  0%, 30% { opacity: 0; transform: scale(0) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1) rotate(15deg); }
  70%      { opacity: 0; transform: scale(0.5) rotate(30deg); }
  100%     { opacity: 0; }
}

/* Glow pulse under the smile */
.loader-glow {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(200,169,110,0.35) 0%, transparent 70%);
  animation: glowPulse 2.4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,100% { opacity: 0.4; transform: translateX(-50%) scaleX(0.8); }
  50%     { opacity: 1;   transform: translateX(-50%) scaleX(1.1); }
}

/* Brand label */
.loader-brand {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.22em;
  background: linear-gradient(130deg, #e8cc9a, #c8a96e);
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
  animation: brandFade 2.4s ease-in-out infinite;
}
@keyframes brandFade {
  0%,100% { opacity: 0.5; }
  50%     { opacity: 1; }
}

/* Progress bar */
.loader-bar-track {
  width: 140px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c8a96e, #e8cc9a);
  border-radius: 999px;
  animation: barFill 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
  width: 0%;
}
@keyframes barFill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}
