/* Epic Brand - Premium Animations */
/* Inspired by Nike, Adidas, and high-end streetwear e-commerce */

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

/* Fade In from Bottom */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In from Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In from Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Reveal from Bottom (Image reveal effect) */
@keyframes revealUp {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ========================================
   BASE ANIMATION CLASSES
======================================== */

.animate-on-scroll {
  opacity: 0;
  transition: none;
}

.animate-on-scroll.animated {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: forwards;
}

/* Animation Types */
.fade-up {
  animation-name: fadeInUp;
}

.fade-left {
  animation-name: fadeInLeft;
}

.fade-right {
  animation-name: fadeInRight;
}

.scale-in {
  animation-name: scaleIn;
}

.reveal-up {
  animation-name: revealUp;
}

/* Stagger Delays for Grid Items */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ========================================
   PREMIUM HOVER EFFECTS
======================================== */

/* Category Card Hover (Nike-style) */
.category-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Product Card Hover (Adidas-style) */
.product-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   MAGNETIC BUTTON EFFECT
======================================== */

.magnetic-button {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.magnetic-button:hover {
  transform: scale(1.05);
}

.magnetic-button:active {
  transform: scale(0.98);
}

/* Shine Effect on Hover */
.magnetic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.magnetic-button:hover::before {
  left: 100%;
}

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

.parallax-slow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   IMAGE REVEAL OVERLAY
======================================== */

.image-reveal-container {
  position: relative;
  overflow: hidden;
}

.image-reveal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eab308 0%, #a855f7 100%);
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.image-reveal-container.revealed .image-reveal-overlay {
  transform: translateY(-100%);
}

.image-reveal-container img {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   TEXT ANIMATIONS
======================================== */

/* Split Text Reveal */
.text-reveal {
  overflow: hidden;
  display: inline-block;
}

.text-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: textReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes textReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger for text characters */
.text-reveal span:nth-child(1) { animation-delay: 0.05s; }
.text-reveal span:nth-child(2) { animation-delay: 0.1s; }
.text-reveal span:nth-child(3) { animation-delay: 0.15s; }
.text-reveal span:nth-child(4) { animation-delay: 0.2s; }
.text-reveal span:nth-child(5) { animation-delay: 0.25s; }

/* ========================================
   SMOOTH SCROLL
======================================== */

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #eab308 0%, #a855f7 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #c084fc 100%);
}

/* ========================================
   LOADING ANIMATIONS
======================================== */

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

.pulse-animation {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   GRADIENT BORDER ANIMATION
======================================== */

.gradient-border {
  position: relative;
  background: linear-gradient(135deg, #eab308 0%, #a855f7 100%);
  padding: 2px;
  border-radius: 1rem;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #eab308 0%, #a855f7 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
  opacity: 1;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   TRUST BADGE ANIMATIONS
======================================== */

.trust-badge {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trust-badge:hover {
  transform: translateY(-4px) scale(1.05);
}

.trust-badge .icon-wrapper {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.trust-badge:hover .icon-wrapper {
  transform: rotate(360deg);
}

/* ========================================
   FOOTER ANIMATION
======================================== */

.footer-link {
  position: relative;
  transition: transform 0.3s ease;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #eab308 0%, #a855f7 100%);
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
}

/* ========================================
   MOBILE OPTIMIZATIONS
======================================== */

@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  .animate-on-scroll.animated {
    animation-duration: 0.5s;
  }
  
  .category-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  /* Disable parallax on mobile for performance */
  .parallax-slow {
    transform: none !important;
  }
}

/* ========================================
   PREFERS REDUCED MOTION
======================================== */

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