/* ===== GENSTONE - Animations ===== */

/* ===== HERO SLIDER PROGRESS BAR ===== */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  width: 0%;
  z-index: 10;
  transition: none;
}
.hero-progress.animate {
  width: 100%;
  transition: width 5s linear;
}

/* ===== SLIDE TRANSITIONS ===== */
.hero-slide {
  animation: none;
}
.hero-slide.entering {
  animation: slideIn 0.8s ease forwards;
}
.hero-slide.leaving {
  animation: slideOut 0.8s ease forwards;
}

@keyframes slideIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== COUNTER ANIMATION ===== */
@keyframes countUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.counter-item.animated .counter-number {
  animation: countUp 0.5s ease forwards;
}

/* ===== SCROLL REVEAL VARIANTS ===== */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.revealed { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.revealed { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* ===== CARD HOVER ANIMATIONS ===== */
.product-card,
.why-card,
.contact-card {
  will-change: transform;
}

/* ===== LOADING ANIMATION ===== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--white);
  animation: loaderFade 1s ease infinite alternate;
}
.loader-logo span { color: var(--gold); }
.loader-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--gold-dark), var(--gold), var(--gold-hover));
  animation: loaderBar 0.8s ease forwards;
}

@keyframes loaderFade {
  from { opacity: 0.5; }
  to { opacity: 1; }
}
@keyframes loaderBar {
  from { width: 0; }
  to { width: 100%; }
}

/* ===== FILTER ANIMATION ===== */
.products-grid,
.gallery-grid,
.masonry-grid {
  transition: none;
}
.product-card,
.gallery-item,
.masonry-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}
.product-card.hiding,
.gallery-item.hiding {
  opacity: 0;
  transform: scale(0.95);
}

/* ===== GOLD SHIMMER ===== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.gold-shimmer {
  background: linear-gradient(90deg, var(--gold), var(--gold-hover), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ===== MOBILE DRAWER ===== */
.mobile-drawer a {
  transform: translateX(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, color 0.2s;
}
.mobile-drawer.open a {
  transform: translateX(0);
  opacity: 1;
}
.mobile-drawer.open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-drawer.open a:nth-child(2) { transition-delay: 0.1s; }
.mobile-drawer.open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-drawer.open a:nth-child(4) { transition-delay: 0.2s; }
.mobile-drawer.open a:nth-child(5) { transition-delay: 0.25s; }
.mobile-drawer.open a:nth-child(6) { transition-delay: 0.3s; }
.mobile-drawer.open a:nth-child(7) { transition-delay: 0.35s; }

/* ===== LIGHTBOX OPEN/CLOSE ===== */
.lightbox {
  transition: opacity 0.3s ease;
}
.lightbox-inner {
  animation: lightboxIn 0.3s ease;
}
@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== NUMBER COUNT ===== */
@keyframes numberPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ===== SECTION SEPARATORS ===== */
.section-wave {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--gold-dark), var(--gold));
  margin: 16px auto 0;
}
.section-header .section-wave { margin-left: auto; margin-right: auto; }

/* ===== IMAGE PARALLAX EFFECT ===== */
@keyframes parallaxMove {
  from { transform: translateY(0); }
  to { transform: translateY(-30px); }
}

/* ===== WHATSAPP PULSE ===== */
@keyframes pulse-green {
  0% { box-shadow: 0 4px 15px rgba(37,211,102,0.3); }
  50% {
    box-shadow: 0 4px 25px rgba(37,211,102,0.6),
                0 0 0 10px rgba(37,211,102,0.08),
                0 0 0 20px rgba(37,211,102,0.04);
  }
  100% { box-shadow: 0 4px 15px rgba(37,211,102,0.3); }
}

/* ===== STAR RATING ===== */
@keyframes starPop {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== SMOOTH NAV TRANSITIONS ===== */
.nav-links a::after {
  will-change: width;
}
