/* ===================================
   SCROLL ANIMATIONS & MICRO-INTERACTIONS
   AQUA FMCG LTD
   =================================== */

/* ===================================
   ANIMATION INITIAL STATES
   =================================== */

[data-animate] {
  opacity: 0;
  will-change: transform, opacity;
}

/* Fade Animations */
[data-animate="fade-in"] {
  opacity: 0;
}

[data-animate="fade-in-up"] {
  opacity: 0;
  transform: translateY(30px);
}

[data-animate="fade-in-down"] {
  opacity: 0;
  transform: translateY(-30px);
}

[data-animate="fade-in-left"] {
  opacity: 0;
  transform: translateX(-30px);
}

[data-animate="fade-in-right"] {
  opacity: 0;
  transform: translateX(30px);
}

/* Scale Animations */
[data-animate="scale-in"] {
  opacity: 0;
  transform: scale(0.9);
}

/* Slide Animations */
[data-animate="slide-up"] {
  opacity: 0;
  transform: translateY(50px);
}

[data-animate="slide-in-left"] {
  opacity: 0;
  transform: translateX(-100px);
}

[data-animate="slide-in-right"] {
  opacity: 0;
  transform: translateX(100px);
}

/* ===================================
   ANIMATED STATES
   =================================== */

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
  transition: all var(--animation-duration, 600ms) var(--animation-easing, ease-out) var(--animation-delay, 0ms);
}

/* ===================================
   DELAY UTILITIES
   =================================== */

.delay-1 { --animation-delay: 100ms; }
.delay-2 { --animation-delay: 200ms; }
.delay-3 { --animation-delay: 300ms; }
.delay-4 { --animation-delay: 400ms; }
.delay-5 { --animation-delay: 500ms; }

/* ===================================
   DURATION UTILITIES
   =================================== */

.duration-fast { --animation-duration: 400ms; }
.duration-normal { --animation-duration: 600ms; }
.duration-slow { --animation-duration: 800ms; }

/* ===================================
   BUTTON HOVER EFFECTS
   =================================== */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 200ms ease;
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.02);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus {
  outline: 2px solid var(--primary-olive);
  outline-offset: 2px;
}

/* Primary Button Effects */
.btn-primary {
  transition: all 200ms ease;
}

.btn-primary:hover {
  background-color: var(--primary-olive-dark);
  border-color: var(--primary-olive-dark);
  transform: scale(1.02);
}

/* Secondary Button Effects */
.btn-secondary,
.btn-outline-primary {
  transition: background-color 250ms ease, color 200ms ease, transform 200ms ease;
}

.btn-secondary:hover,
.btn-outline-primary:hover {
  background-color: var(--primary-olive);
  color: white;
  transform: scale(1.02);
}

/* Ghost Button Effects */
.btn-outline-light {
  transition: all 250ms ease;
}

.btn-outline-light:hover {
  background-color: white;
  color: var(--primary-olive);
}

/* ===================================
   CARD HOVER EFFECTS
   =================================== */

.card,
.product-card,
.category-card,
.value-card {
  transition: all 300ms ease;
  cursor: pointer;
}

.card:hover,
.product-card:hover,
.category-card:hover,
.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Product Card Image Zoom */
.product-card .product-image,
.category-card .category-image {
  overflow: hidden;
  transition: transform 300ms ease;
}

.product-card:hover .product-image,
.category-card:hover .category-image {
  transform: scale(1.05);
}

/* Category Link Arrow Animation */
.category-link {
  transition: all 300ms ease;
}

.category-card:hover .category-link {
  transform: translateX(6px);
}

.category-link i {
  transition: transform 300ms ease;
}

.category-card:hover .category-link i {
  transform: translateX(4px);
}

/* ===================================
   NAVIGATION LINK EFFECTS
   =================================== */

.navbar-nav .nav-link {
  position: relative;
  transition: color 250ms ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-olive);
  transition: width 250ms ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

/* Footer Links */
.footer-links a {
  transition: all 200ms ease;
}

.footer-links a:hover {
  opacity: 1;
  transform: translateX(4px);
}

/* ===================================
   FORM FIELD INTERACTIONS
   =================================== */

.form-control {
  transition: all 200ms ease;
}

.form-control:focus {
  border-color: var(--primary-olive);
  box-shadow: 0 0 0 3px rgba(92, 107, 74, 0.15);
  transform: scale(1.01);
}

.form-label {
  transition: color 200ms ease;
}

.form-control:focus + .form-label,
.form-control:focus ~ .form-label {
  color: var(--primary-olive);
}

/* ===================================
   ICON INTERACTIONS
   =================================== */

.social-icon {
  transition: all 300ms ease;
}

.social-icon:hover {
  transform: scale(1.15);
  background-color: var(--secondary-off-white);
  color: var(--footer-dark-olive);
}

.value-prop-icon i,
.service-item i {
  transition: all 300ms ease;
}

.value-prop-item:hover .value-prop-icon i,
.service-item:hover i {
  transform: scale(1.1);
  color: var(--primary-olive-dark);
}

/* ===================================
   LOADING STATES
   =================================== */

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===================================
   SMOOTH SCROLL
   =================================== */

html {
  scroll-behavior: smooth;
}

/* ===================================
   COUNTER ANIMATION
   =================================== */

[data-count-to] {
  font-variant-numeric: tabular-nums;
}

/* ===================================
   RESPONSIVE ANIMATIONS
   =================================== */

@media (max-width: 767.98px) {
  [data-animate] {
    --animation-duration: 400ms;
  }
  
  .card:hover,
  .product-card:hover,
  .category-card:hover {
    transform: translateY(-4px);
  }
}

/* ===================================
   REDUCED MOTION SUPPORT
   =================================== */

@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;
  }
  
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Remove will-change after animation */
[data-animate].animation-complete {
  will-change: auto;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .btn:hover,
  .card:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}