/* ============================================
   GadżetPro — WOW EFFECTS & ANIMATIONS
   Spectacular visual effects for premium feel
   ============================================ */

/* ========================================
   SCROLL-REVEAL ANIMATIONS
   ======================================== */

/* Base state — elements hidden before scroll trigger */
[data-gp-reveal] {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-gp-reveal="up"] {
  transform: translateY(60px);
}

[data-gp-reveal="down"] {
  transform: translateY(-60px);
}

[data-gp-reveal="left"] {
  transform: translateX(-60px);
}

[data-gp-reveal="right"] {
  transform: translateX(60px);
}

[data-gp-reveal="scale"] {
  transform: scale(0.85);
}

[data-gp-reveal="rotate"] {
  transform: rotate(-5deg) scale(0.9);
}

/* Revealed state */
[data-gp-reveal].is-revealed {
  opacity: 1;
  transform: translate(0) scale(1) rotate(0);
}

/* Legacy class from observer */
.gp-animate-up {
  opacity: 1 !important;
  transform: translate(0) scale(1) rotate(0) !important;
}

/* Stagger delays for grid children */
[data-gp-stagger] > *:nth-child(1) { transition-delay: 0ms; }
[data-gp-stagger] > *:nth-child(2) { transition-delay: 80ms; }
[data-gp-stagger] > *:nth-child(3) { transition-delay: 160ms; }
[data-gp-stagger] > *:nth-child(4) { transition-delay: 240ms; }
[data-gp-stagger] > *:nth-child(5) { transition-delay: 320ms; }
[data-gp-stagger] > *:nth-child(6) { transition-delay: 400ms; }
[data-gp-stagger] > *:nth-child(7) { transition-delay: 480ms; }
[data-gp-stagger] > *:nth-child(8) { transition-delay: 560ms; }


/* ========================================
   HERO ANIMATIONS
   ======================================== */

/* Hero entrance — content slides up with spring */
.gp-hero__content {
  animation: heroContentIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero image — zooms in with rotation */
.gp-hero__image {
  animation: heroImageIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes heroImageIn {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(3deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Hero accent text — gold shimmer sweep */
.gp-hero__accent {
  background: linear-gradient(
    90deg,
    #c9a84c 0%,
    #f0d78c 25%,
    #c9a84c 50%,
    #f0d78c 75%,
    #c9a84c 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 3s linear infinite;
}

@keyframes goldShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* PREMIUM QUALITY badge pulse */
.gp-hero__quality-badge {
  animation: qualityPulse 2s ease-in-out infinite;
}

@keyframes qualityPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 8px rgba(201, 168, 76, 0.15);
  }
}

/* Hero floating particles */
.gp-hero {
  position: relative;
  overflow: hidden;
}

.gp-hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.gp-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(201, 168, 76, 0.3);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

.gp-particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; width: 3px; height: 3px; }
.gp-particle:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; width: 5px; height: 5px; }
.gp-particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; }
.gp-particle:nth-child(4) { left: 55%; animation-duration: 18s; animation-delay: 1s; width: 6px; height: 6px; }
.gp-particle:nth-child(5) { left: 70%; animation-duration: 14s; animation-delay: 3s; width: 3px; height: 3px; }
.gp-particle:nth-child(6) { left: 85%; animation-duration: 11s; animation-delay: 5s; }
.gp-particle:nth-child(7) { left: 15%; animation-duration: 16s; animation-delay: 6s; width: 5px; height: 5px; }
.gp-particle:nth-child(8) { left: 60%; animation-duration: 13s; animation-delay: 7s; width: 3px; height: 3px; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(720deg);
    opacity: 0;
  }
}


/* ========================================
   ANIMATED GRADIENT BACKGROUND
   ======================================== */

.gp-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, #1a1f36, #252b48, #c9a84c, #1a1f36);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: 1;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ========================================
   CATEGORY CARD ANIMATIONS
   ======================================== */

.gp-category-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
}

.gp-category-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--gp-accent);
}

.gp-category-card__icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.3s ease;
}

.gp-category-card:hover .gp-category-card__icon {
  transform: scale(1.2) rotate(-5deg);
  color: var(--gp-accent);
}


/* ========================================
   FEATURE CARD ANIMATIONS
   ======================================== */

.gp-feature-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
}

.gp-feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.gp-feature-card__icon {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease;
}

.gp-feature-card:hover .gp-feature-card__icon {
  transform: scale(1.15) rotate(10deg);
  background: var(--gp-gold-gradient, linear-gradient(135deg, #c9a84c, #f0d78c));
  color: #1a1f36;
}


/* ========================================
   PRODUCT CARD WOW EFFECTS
   ======================================== */

.gp-product-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
}

.gp-product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(201, 168, 76, 0) 0%,
    rgba(201, 168, 76, 0.08) 50%,
    rgba(201, 168, 76, 0) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
}

.gp-product-card:hover::after {
  animation: cardShine 0.8s ease-out;
}

@keyframes cardShine {
  100% { left: 150%; }
}

.gp-product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(201, 168, 76, 0.15);
}

.gp-product-card__img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gp-product-card:hover .gp-product-card__img {
  transform: scale(1.08);
}

/* Badge entrance */
.gp-card-badge {
  animation: badgeSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.gp-card-badge--red { animation-delay: 0.1s; }
.gp-card-badge--gold { animation-delay: 0.2s; }

@keyframes badgeSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Stars twinkle */
.gp-product-card__stars i {
  animation: starTwinkle 2s ease-in-out infinite;
}
.gp-product-card__stars i:nth-child(1) { animation-delay: 0s; }
.gp-product-card__stars i:nth-child(2) { animation-delay: 0.2s; }
.gp-product-card__stars i:nth-child(3) { animation-delay: 0.4s; }
.gp-product-card__stars i:nth-child(4) { animation-delay: 0.6s; }
.gp-product-card__stars i:nth-child(5) { animation-delay: 0.8s; }

@keyframes starTwinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


/* ========================================
   CTA SECTION EFFECTS
   ======================================== */

.gp-cta-section {
  position: relative;
  overflow: hidden;
}

.gp-cta-section::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
  top: -100px;
  right: -50px;
  animation: ctaGlow 4s ease-in-out infinite alternate;
  pointer-events: none;
}

.gp-cta-section::after {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
  bottom: -80px;
  left: -30px;
  animation: ctaGlow 5s ease-in-out 1s infinite alternate;
  pointer-events: none;
}

@keyframes ctaGlow {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 1; }
}


/* ========================================
   STATS COUNTER ANIMATION
   ======================================== */

.gp-stats__number {
  transition: transform 0.3s ease;
}

.gp-stats__number:hover {
  transform: scale(1.1);
}

/* Stats glow line under number */
.gp-stats__grid > div {
  position: relative;
}

.gp-stats__grid > div::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--gp-gold-gradient, linear-gradient(90deg, #c9a84c, #f0d78c));
  margin: 12px auto 0;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gp-stats__grid > div:hover::after {
  width: 60px;
}


/* ========================================
   GOLDEN GLOW & SHINE EFFECTS
   ======================================== */

/* Luxury Shine Effect */
.gp-shine {
  position: relative;
  overflow: hidden;
}

.gp-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
  z-index: 3;
  pointer-events: none;
}

.gp-shine:hover::before {
  animation: shine 0.75s;
}

@keyframes shine {
  100% { left: 125%; }
}

/* Gold accent glow on hover */
.gp-interactive-glow:hover {
  box-shadow: 0 0 30px var(--gp-accent-glow, rgba(201, 168, 76, 0.4));
}

/* Pulsating gold border */
.gp-gold-pulse {
  animation: goldBorderPulse 2s ease-in-out infinite;
}

@keyframes goldBorderPulse {
  0%, 100% { border-color: rgba(201, 168, 76, 0.3); }
  50% { border-color: rgba(201, 168, 76, 0.8); }
}


/* ========================================
   BUTTON ANIMATIONS
   ======================================== */

.gp-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.gp-btn--gold {
  background-size: 200% auto;
}

.gp-btn--gold:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4);
}

.gp-btn--outline-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

/* Arrow bounce on button hover */
.gp-btn:hover .fa-arrow-right {
  animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}


/* ========================================
   SECTION HEADING ANIMATIONS
   ======================================== */

.gp-eyebrow {
  position: relative;
  display: inline-block;
}

.gp-eyebrow.is-revealed::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gp-accent, #c9a84c);
  animation: lineExpand 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lineExpand {
  from { width: 0; }
  to { width: 100%; }
}


/* ========================================
   GLASSMORPHISM
   ======================================== */

.gp-glass-dark {
  background: rgba(26, 31, 54, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header scroll effect */
.gp-header.is-scrolled .gp-nav {
  background: rgba(26, 31, 54, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}


/* ========================================
   PAGE TRANSITIONS
   ======================================== */

.gp-page-transition {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ========================================
   PARALLAX
   ======================================== */

.gp-parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}


/* ========================================
   PLP HERO ANIMATIONS
   ======================================== */

.gp-plp-hero {
  animation: plpHeroIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes plpHeroIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Breadcrumb items fade-in cascade */
.gp-breadcrumb__row > * {
  animation: breadcrumbIn 0.5s ease both;
}
.gp-breadcrumb__row > *:nth-child(1) { animation-delay: 0.2s; }
.gp-breadcrumb__row > *:nth-child(2) { animation-delay: 0.3s; }
.gp-breadcrumb__row > *:nth-child(3) { animation-delay: 0.4s; }
.gp-breadcrumb__row > *:nth-child(4) { animation-delay: 0.5s; }
.gp-breadcrumb__row > *:nth-child(5) { animation-delay: 0.6s; }

@keyframes breadcrumbIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}


/* ========================================
   PDP GALLERY HOVER
   ======================================== */

.gp-pdp-thumb.is-active {
  border-color: var(--gp-accent);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.3);
}


/* ========================================
   MARKING CALCULATOR ANIMATIONS
   ======================================== */

.gp-toggle__slider {
  transition: background 0.4s ease;
}

.gp-toggle__slider::before {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gp-calc__total-price {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gp-calc__total-price.is-updated {
  animation: pricePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pricePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


/* ========================================
   FOOTER ANIMATIONS
   ======================================== */

.gp-footer {
  position: relative;
}

.gp-footer__col {
  transition: transform 0.3s ease;
}

.gp-footer__col:hover {
  transform: translateY(-4px);
}

/* Social icons spin on hover */
.gp-social-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease;
}

.gp-social-icon:hover {
  transform: rotate(360deg) scale(1.15);
  background: var(--gp-accent);
  border-color: var(--gp-accent);
}


/* ========================================
   TOPBAR TICKER (optional)
   ======================================== */

.gp-topbar__ticker {
  overflow: hidden;
  white-space: nowrap;
}

.gp-topbar__ticker-inner {
  display: inline-block;
  animation: ticker 20s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}


/* ========================================
   LOADING SKELETON (utility)
   ======================================== */

.gp-skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ========================================
   RESPONSIVE — reduce motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .gp-hero__particles {
    display: none;
  }

  [data-gp-reveal] {
    transition-duration: 0.5s;
  }

  [data-gp-reveal="up"] {
    transform: translateY(30px);
  }
}
