/* ============================================================
   ZORO TECH — Premium Animation Layer
   Pure CSS · GPU-Accelerated · Zero Layout Thrash
   Uses only transform, opacity, filter for 60fps performance
   ============================================================ */

/* ---- Scroll Reveal Foundation ---- */
/* Elements get .revealed by the IntersectionObserver in app.js */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a grid on reveal */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.40s; }

.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* ---- 3D Perspective Card Hover (Product Cards) ---- */
.product-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

.product-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-1deg);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Inner image parallax depth on hover */
.product-card:hover .card-image-wrap img {
  transform: scale(1.08) translateZ(20px);
}

/* Subtle shine sweep across the card on hover */
.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 100%
  );
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 5;
}

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


/* ---- Category Showcase Cards — 3D Lift ---- */
.category-showcase-card {
  transform-style: preserve-3d;
  perspective: 600px;
}

.category-showcase-card:hover {
  transform: translateY(-6px) rotateX(3deg) scale(1.02);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}


/* ---- Why-Choose Cards — Animated Top Border ---- */
.why-card::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: borderShimmer 4s ease-in-out infinite;
}

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

.why-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.why-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.why-card:hover .why-number {
  color: rgba(255, 255, 255, 0.06);
  transition: color 0.4s ease;
}


/* ---- Testimonial Cards — Subtle Float ---- */
.testimonial-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.testimonial-card:hover .rating-stars {
  animation: starPulse 0.6s ease;
}

@keyframes starPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}


/* ---- Trust Cards — Glow Icon on Hover ---- */
.trust-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.trust-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.trust-card:hover .icon-wrap {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.trust-card:hover .icon-wrap i {
  transform: scale(1.15);
  transition: transform 0.3s ease;
}


/* ---- Section Header — Reveal Up ---- */
.section-header {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ---- Hero Section Enhancements ---- */
/* Floating animation for hero shop image */
.hero-laptop-wrap {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateY(0); }
  50%      { transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateY(-12px); }
}

.hero-laptop-wrap:hover {
  animation-play-state: paused;
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg) translateY(-5px);
}

/* Animated gradient tag pill */
.hero-tag {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: tagShimmer 3s ease-in-out infinite;
}

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


/* ---- WhatsApp Button Pulse ---- */
.whatsapp-float-btn {
  animation: waPulse 2.5s ease-in-out infinite;
}

@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50%      { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 60px rgba(37, 211, 102, 0.15); }
}

.whatsapp-float-btn:hover {
  animation: none;
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}


/* ---- Reel Cards — Hover Zoom & Glow ---- */
.reel-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
}

.reel-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.reel-card:hover .reel-card-media img {
  transform: scale(1.08);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reel-card .reel-play-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reel-card:hover .reel-play-btn {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}


/* ---- Catalog Tab — Active Glow ---- */
.catalog-tab.active {
  animation: tabGlow 2s ease-in-out infinite alternate;
}

@keyframes tabGlow {
  0%   { box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05); }
  100% { box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12); }
}

.catalog-tab {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.catalog-tab:hover {
  transform: translateY(-2px);
}

.catalog-tab:active {
  transform: translateY(0) scale(0.97);
}


/* ---- Button Press Effects (Micro-interaction) ---- */
.btn:active {
  transform: translateY(0) scale(0.97);
  transition: transform 0.1s ease;
}

.card-btn-icon:active {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}


/* ---- Compare Drawer Entrance ---- */
.compare-drawer {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ---- Pagination Button Hover Lift ---- */
.pagination-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pagination-btn:hover:not([disabled]):not(.active) {
  transform: translateY(-3px) scale(1.05);
}


/* ---- Search Input Focus Glow ---- */
.search-wrap input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}


/* ---- Filter Checkbox — Scale Bounce ---- */
.filter-checkbox input:checked {
  animation: checkBounce 0.3s ease;
}

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


/* ---- Contact Icon Boxes — Hover Glow ---- */
.contact-detail-card .icon-box {
  transition: all 0.3s ease;
}

.contact-detail-card:hover .icon-box {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.06);
  transform: scale(1.05);
}


/* ---- Product Detail Page — Related Cards ---- */
.related-section .product-card:hover {
  transform: translateY(-5px) scale(1.02);
}


/* ---- Smooth appearance for the pricing note bar ---- */
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}


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

  .reveal-on-scroll,
  .reveal-stagger > *,
  .section-header {
    opacity: 1;
    transform: none;
  }
}
