/* ==========================================
   OTIMIZAÇÕES DE PERFORMANCE - APENAS ADIÇÕES
   ========================================== */

/* === OTIMIZAÇÕES MOBILE === */
@media (max-width: 768px) {
  .mobile-optimized .hero-glass-main,
  .mobile-optimized .feature-glass-card,
  .mobile-optimized .floating-card-main,
  .mobile-optimized .clients-counter-glass,
  .mobile-optimized .support-counter-glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(20, 20, 30, 0.95) !important;
  }

  .mobile-optimized .premium-navbar {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }
}

/* === CONTAINMENT PARA ISOLAMENTO === */
.hero-premium {
  contain: layout style paint;
}

.products-section {
  contain: layout style;
}

a[href*="/products/"].group {
     animation: none !important;
  contain: layout style paint;
}

.feature-glass-card {
  contain: layout style paint;
}

/* === LAZY LOADING DE ANIMAÇÕES === */
.lazy-animation {
  opacity: 0;
  transform: translateY(30px);
  transition: none;
}

.lazy-animation.animate {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* === REDUÇÃO DE ANIMAÇÕES PARA DEVICES FRACOS === */
.reduce-animations * {
  animation-duration: 0.2s !important;
  transition-duration: 0.2s !important;
}

.reduce-animations .bg-orb,
.reduce-animations .navbar-orb {
  animation: none !important;
}

.reduce-animations .hero-bg-effects,
.reduce-animations .navbar-bg-effects {
  display: none !important;
}

/* === WILL-CHANGE OTIMIZADO === */
.hero-glass-main {
  will-change: auto;
}

.hero-glass-main:hover {
  will-change: transform;
}

a[href*="/products/"].group {
     animation: none !important;
  will-change: auto;
}

/* a[href*="/products/"].group:hover {
  will-change: transform;
} */

.category-button {
  will-change: auto;
}

.category-button:hover {
  will-change: transform;
}

/* === HARDWARE ACCELERATION OTIMIZADA === */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* === PREFERS REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .reduce-motion .hero-bg-effects,
  .reduce-motion .navbar-bg-effects {
    display: none !important;
  }
}

/* === INTERSECTION OBSERVER STYLES === */
.observe-animation {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.observe-animation.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === PRODUTO CARDS OTIMIZADOS === */
.product-card-optimized {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.product-card-optimized:hover {
  transform: translateY(-2px) translateZ(0);
}

/* === SIMPLIFICAÇÃO DE BACKDROP FILTERS === */
.simple-glass {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* === CSS CONTAINMENT PARA PERFORMANCE === */
.section-container {
  contain: layout style paint;
}

.product-grid {
  contain: layout;
}

.navbar-container {
  contain: layout style;
}

/* === LAZY LOADING PRODUCTS === */
.product-lazy {
  opacity: 0;
  transform: translateY(30px);
  transition: none;
}

.product-lazy.loaded {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
             transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === OTIMIZAÇÃO DE FONTS === */
.font-optimized {
  font-display: swap;
  text-rendering: optimizeSpeed;
}

/* === SCROLL OTIMIZADO === */
.scroll-optimized {
  scroll-behavior: smooth;
  overflow-anchor: auto;
}

@supports (scroll-behavior: smooth) {
  .scroll-optimized {
    scroll-behavior: smooth;
  }
}

/* === BATTERY SAVING MODE === */
@media (prefers-reduced-motion: reduce) {
  .battery-save * {
    animation: none !important;
    transition: none !important;
  }
  
  .battery-save .hero-bg-effects,
  .battery-save .bg-orb,
  .battery-save .navbar-orb {
    display: none !important;
  }
}

/* === MEMORY OPTIMIZATION === */
.memory-efficient {
  transform: translateZ(0);
  will-change: auto;
}

.memory-efficient:hover {
  will-change: transform;
}

.memory-efficient:not(:hover) {
  will-change: auto;
}

/* === CRITICAL CSS INLINE OPTIMIZATION === */
.critical-path {
  font-display: block;
}

.non-critical {
  font-display: swap;
}

/* === REDUCED COMPLEXITY FOR LOW-END DEVICES === */
.low-end-device .hero-glass-main::before,
.low-end-device .feature-glass-card::before,
.low-end-device .bg-card::before {
  display: none !important;
}

.low-end-device .shimmer-effect,
.low-end-device .button-shine,
.low-end-device .hover-glow {
  display: none !important;
}

/* === PERFORMANCE HINTS === */
.performance-hint {
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

/* === OPTIMIZED TRANSFORMS === */
.transform-optimized {
  transform: translate3d(0, 0, 0);
}

.transform-optimized:hover {
  transform: translate3d(0, -2px, 0);
}

