/* ============================================================================
   Elizabeth — PERFORMANCE LAYER (lite, sin romper scroll)
   ============================================================================ */

/* MOTION REDUCTION */
@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;
  }
  .news-strip-ticker-inner { animation: none !important; }
}

/* MOBILE OPTIMIZATIONS — backdrop-filter es caro en móviles low-end */
@media (max-width: 768px) {
  .news-strip .news-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .product-card,
  .news-card {
    box-shadow: 0 4px 12px rgba(45, 31, 23, 0.06) !important;
  }
}

/* IMAGE LOADING — fade in suave */
img[loading="lazy"] {
  background: linear-gradient(110deg, var(--eli-paper) 30%, var(--eli-line) 50%, var(--eli-paper) 70%);
  background-size: 200% 100%;
  animation: eli-skeleton 1.4s linear infinite;
}

img[loading="lazy"].loaded,
img[loading="lazy"][src][complete] {
  background: none;
  animation: none;
}

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

/* GPU ACCELERATION (sin romper scroll) */
.product-card,
.news-card,
.eli-launcher,
.hero-media,
.product-media img {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* SCROLL — solo padding-top para anchors, NO bloquear scroll */
html {
  scroll-padding-top: var(--eli-header-h, 80px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ANTI-ALIASING */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PRODUCT-CARD HD */
.product-card img,
.eli-novedades-card img,
.eli-product-img img {
  transform: translateZ(0);
}

/* MOBILE: sin hover scale */
@media (hover: none) {
  .product-card:hover,
  .news-card:hover {
    transform: none !important;
  }
}

/* SCROLL FIX — body.menu-open solo bloquea en mobile, NUNCA en desktop */
@media (min-width: 861px) {
  body.menu-open {
    overflow: visible !important;
  }
}

/* Failsafe: si quedó atascado por JS error, click escape libera */
body.menu-open[data-failsafe-released] {
  overflow: visible !important;
}

/* PRINT */
@media print {
  .news-strip-ticker,
  .eli-sticky-cta,
  .eli-launcher,
  .eli-window,
  body::before,
  .news-strip::before,
  .news-strip::after {
    display: none !important;
  }
  body { background: white !important; color: black !important; }
}
