/* ===================================================
   PARALLAX SCROLLING & MICRO-ANIMATIONS
   Enhanced interactive effects for Kong's Tea website
   =================================================== */

/* === PARALLAX SCROLLING EFFECTS === */
.parallax-container {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.parallax-element {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.parallax-bg {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 120%;
  height: 120%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  transform: translateZ(-1px) scale(1.5);
}

.parallax-layer-1 {
  transform: translateZ(-0.5px) scale(1.2);
}

.parallax-layer-2 {
  transform: translateZ(-0.3px) scale(1.1);
}

.parallax-layer-3 {
  transform: translateZ(-0.1px) scale(1.05);
}

/* === SMOOTH SCROLL === */
html {
  scroll-behavior: smooth;
}

.smooth-scroll {
  scroll-behavior: smooth;
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 0.5px;
  background: linear-gradient(90deg, #ffbe33, #ff9500);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* === MICRO ANIMATIONS === */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.hover-lift:hover {
  transform: translateY(-12px) translateZ(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 190, 51, 0.2);
}

.hover-scale {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
}

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

.hover-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.hover-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.8s ease;
  z-index: 1;
}

.hover-glow:hover::before {
  left: 100%;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(255, 190, 51, 0.4);
}

/* === PRODUCT CARD ANIMATIONS === */
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
  perspective: 1000px;
  cursor: pointer;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 190, 51, 0.15) 50%, transparent 70%);
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.8s ease;
  z-index: 2;
  pointer-events: none;
}

.product-card:hover::before {
  transform: translateX(100%) rotate(45deg);
}

.product-card:hover {
  transform: translateY(-15px) rotateX(8deg) rotateY(2deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 190, 51, 0.3);
}

.product-card .product-image {
  transition: all 0.5s ease;
  transform-origin: center;
  overflow: hidden;
}

.product-card:hover .product-image {
  transform: scale(1.15);
}

.product-card .product-info {
  position: relative;
  z-index: 3;
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.product-card:hover .product-info {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.98);
}

.product-price {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #ffbe33;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  font-weight: 600;
}

.product-price::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: left 0.6s ease;
}

.product-card:hover .product-price::after {
  left: 100%;
}

/* === BUTTON ANIMATIONS === */
.btn-animated {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
  border: none;
  cursor: pointer;
}

.btn-animated::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}

.btn-animated:hover::before {
  width: 300%;
  height: 300%;
}

.btn-animated:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn-animated:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.1s ease;
}

/* === NAVIGATION ANIMATIONS === */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
  padding: 10px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffbe33, #ff9500);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: #ffbe33;
  transform: translateY(-2px);
}

/* === SCROLL ANIMATIONS === */
.fade-in-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.animate {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-right.animate {
  opacity: 1;
  transform: translateX(0);
}

.stagger-animation {
  animation-delay: calc(var(--stagger-delay, 0) * 0.15s);
}

/* === BOUNCE ANIMATIONS === */
.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateY(-15px);
  }
  70% {
    transform: scale(0.95) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* === FLOATING ANIMATIONS === */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
}

/* === PULSE ANIMATIONS === */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 190, 51, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 190, 51, 0.6);
  }
}
