/* ==========================================================================
   PATPONNO - GLOBAL OPTIMIZED AMBIENT ANIMATIONS & UTILITIES (style.css)
   - Hardware Accelerated (GPU transform3d)
   - Performance Optimized (Reduced blur footprint & draw calls)
   - Zero Inline Clutter
   ========================================================================== */

/* ==========================================================================
   1. TOP SCROLLING ANNOUNCEMENT BAR (MARQUEE)
   ========================================================================== */
.pat-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #064E3B;
  color: #ffffff;
}

.pat-marquee-track {
  display: flex;
  width: max-content;
  animation: patScroll 50s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.pat-marquee:hover .pat-marquee-track {
  animation-play-state: paused;
}

.pat-marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pat-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 35px;
  white-space: nowrap;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
}

@keyframes patScroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 640px) {
  .pat-marquee-item {
    font-size: 11.5px;
    padding: 0 18px;
    gap: 8px;
  }
}

/* ==========================================================================
   2. MOBILE BOTTOM NAVIGATION SAFE-AREA & SPACING
   ========================================================================== */
@media (max-width: 767px) {
  body {
    padding-bottom: 74px;
  }
}

/* ==========================================================================
   3. HARDWARE-ACCELERATED AMBIENT BACKGROUND SYSTEM
   ========================================================================== */
.global-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(37, 162, 103, 0.015), transparent 35%),
    linear-gradient(315deg, rgba(16, 185, 129, 0.02), transparent 40%);
}

/* GPU-optimized ambient orbs with balanced blur radius (45px instead of 80px+) */
.ambient-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(45px);
  opacity: 0.45;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.orb-one {
  width: 380px;
  height: 380px;
  top: -120px;
  right: 5%;
  background: rgba(37, 162, 103, 0.12);
  animation: ambientOrbOne 16s ease-in-out infinite alternate;
}

.orb-two {
  width: 320px;
  height: 320px;
  left: -100px;
  top: 35%;
  background: rgba(114, 0, 154, 0.08);
  animation: ambientOrbTwo 20s ease-in-out infinite alternate;
}

.orb-three {
  width: 280px;
  height: 280px;
  right: 8%;
  bottom: -80px;
  background: rgba(245, 158, 11, 0.06);
  animation: ambientOrbThree 18s ease-in-out infinite alternate;
}

@keyframes ambientOrbOne {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-35px, 25px, 0) scale(1.06); }
  100% { transform: translate3d(20px, -20px, 0) scale(0.97); }
}

@keyframes ambientOrbTwo {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(35px, -25px, 0); }
  100% { transform: translate3d(15px, 30px, 0); }
}

@keyframes ambientOrbThree {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-30px, -20px, 0) scale(1.08); }
}

/* ==========================================================================
   4. CATEGORY & SECTION FLOATING ANIMATIONS
   ========================================================================== */
.animate-category-float {
  animation: categoryFloat 8s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.animate-category-float-reverse {
  animation: categoryFloatReverse 10s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes categoryFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(15px, -12px, 0); }
}

@keyframes categoryFloatReverse {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-15px, 12px, 0); }
}

/* ==========================================================================
   5. FEATURED SECTION BACKGROUND BLOBS & SHAPES
   ========================================================================== */
.featured-products-section {
  isolation: isolate;
}

.featured-float-slow {
  animation: featuredFloatSlow 9s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.featured-float {
  animation: featuredFloat 8s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.featured-float-reverse {
  animation: featuredFloatReverse 10s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.featured-ring {
  animation: featuredRing 12s linear infinite;
  will-change: transform;
}

.featured-ring-reverse {
  animation: featuredRingReverse 10s linear infinite;
  will-change: transform;
}

.featured-dots {
  animation: featuredDots 5s ease-in-out infinite;
}

.featured-dots-reverse {
  animation: featuredDotsReverse 6s ease-in-out infinite;
}

.featured-diamond {
  animation: featuredDiamond 7s ease-in-out infinite;
}

@keyframes featuredFloatSlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-20px, 20px, 0) scale(1.05); }
}

@keyframes featuredFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(20px, -20px, 0) scale(1.06); }
}

@keyframes featuredFloatReverse {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-15px, -15px, 0); }
}

@keyframes featuredRing {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes featuredRingReverse {
  0%   { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes featuredDots {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -10px, 0); }
}

@keyframes featuredDotsReverse {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(0, 8px, 0) rotate(8deg); }
}

@keyframes featuredDiamond {
  0%, 100% { transform: rotate(45deg) translate3d(0, 0, 0); }
  50%      { transform: rotate(65deg) translate3d(0, -10px, 0); }
}

/* ==========================================================================
   6. AUTO-SCROLL CAROUSEL / BRAND TICKER
   ========================================================================== */
.animate-scroll {
  animation: scrollTicker 28s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

@keyframes scrollTicker {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

#sliderTrack::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   7. PRODUCT & ELEMENT REVEAL ANIMATIONS
   ========================================================================== */
.product-reveal {
  opacity: 0;
  animation: productReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes productReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* ==========================================================================
   8. MOBILE RESPONSIVE PERFORMANCE OPTIMIZATION (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Reduce blur size to avoid mobile frame drops */
  .ambient-orb,
  .hero-bg-glow {
    filter: blur(35px) !important;
    opacity: 0.3 !important;
  }

  .orb-one   { width: 220px; height: 220px; }
  .orb-two   { width: 190px; height: 190px; }
  .orb-three { width: 180px; height: 180px; }

  /* Disable expensive secondary decor on small screens */
  .featured-ring,
  .featured-ring-reverse,
  .featured-diamond,
  .hero-circle-2,
  .hero-circle-3,
  .hero-orbit-2,
  .hero-orbit-3,
  .ambient-diamond {
    display: none !important;
  }

  /* Simplify floating blob sizes on mobile */
  .featured-float-slow,
  .featured-float,
  .featured-float-reverse {
    width: 180px !important;
    height: 180px !important;
    filter: blur(35px) !important;
    opacity: 0.25 !important;
  }
}

/* ==========================================================================
   9. ACCESSIBILITY: PREFERS REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .pat-marquee-track,
  .ambient-orb,
  .animate-category-float,
  .animate-category-float-reverse,
  .featured-float-slow,
  .featured-float,
  .featured-float-reverse,
  .featured-ring,
  .featured-ring-reverse,
  .featured-dots,
  .featured-dots-reverse,
  .featured-diamond,
  .animate-scroll {
    animation: none !important;
    transform: none !important;
  }
}
