/* =========================================================
   NUVORELIX V33 — MOBILE STOREFRONT VISIBILITY FIX
   - El catálogo aparece antes en móvil.
   - Las cards no dependen de IntersectionObserver para verse.
   - Se compacta el hero en teléfonos pequeños.
   ========================================================= */

@media (max-width: 820px){
  /* En móvil, priorizar lo que el usuario vino a ver: los productos. */
  body.cm-home-reboot main.container.cm-page{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }

  body.cm-home-reboot main.container.cm-page > .nx-home-hero{order:1!important}
  body.cm-home-reboot main.container.cm-page > .cm-search-context{order:1!important}
  body.cm-home-reboot main.container.cm-page > .cm-catalog{order:2!important}
  body.cm-home-reboot main.container.cm-page > .nx-paths{order:3!important}
  body.cm-home-reboot main.container.cm-page > .nx-ecosystem{order:4!important}
  body.cm-home-reboot main.container.cm-page > .cm-recommendations{order:5!important}
  body.cm-home-reboot main.container.cm-page > .cm-how-it-works{order:6!important}

  /* Seguridad visual: nunca dejar contenido real invisible por una animación. */
  body.cm-nova-ux .cm-reveal,
  body.cm-nova-ux .cm-reveal.is-visible,
  body.cm-nova-ux section.cm-reveal,
  body.cm-nova-ux article.cm-reveal,
  body.cm-nova-ux .cm-product-card.cm-reveal{
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    transition:none!important;
  }

  body.cm-home-reboot .cm-catalog,
  body.cm-home-reboot .cm-catalog-layout,
  body.cm-home-reboot .cm-products-wrap,
  body.cm-home-reboot .cm-product-grid,
  body.cm-home-reboot .cm-product-card{
    opacity:1!important;
    visibility:visible!important;
  }

  body.cm-home-reboot .cm-catalog{
    display:block!important;
    width:100%!important;
    margin:28px 0 36px!important;
    scroll-margin-top:110px!important;
  }

  body.cm-home-reboot .cm-catalog-layout,
  body.cm-home-reboot .cm-products-wrap{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }

  body.cm-home-reboot .nx-catalog-v42 .cm-product-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    width:100%!important;
  }

  body.cm-home-reboot .nx-catalog-v42 .nx-product-card{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
  }

  body.cm-home-reboot .nx-catalog-v42 .nx-product-media-wrap,
  body.cm-home-reboot .nx-catalog-v42 .nx-product-body{
    width:100%!important;
    min-width:0!important;
  }

  /* El hotfix de escritorio fijaba 520px aun en móvil. */
  body.cm-home-reboot .nx-home-hero.nx-brand-hero{
    min-height:0!important;
    grid-template-columns:1fr!important;
    gap:22px!important;
    padding:30px 22px!important;
  }

  body.cm-home-reboot .nx-brand-showcase{
    min-height:220px!important;
  }

  body.cm-home-reboot .nx-home-metrics{
    grid-template-columns:1fr!important;
  }
}

@media (max-width: 600px){
  body.cm-home-reboot main.container.cm-page{
    padding-left:12px!important;
    padding-right:12px!important;
  }

  body.cm-home-reboot .nx-home-hero.nx-brand-hero{
    padding:25px 18px!important;
    border-radius:22px!important;
  }

  body.cm-home-reboot .nx-home-copy h1{
    font-size:clamp(2.75rem,14vw,4rem)!important;
    line-height:.94!important;
  }

  body.cm-home-reboot .nx-home-copy>p{
    font-size:.96rem!important;
    line-height:1.62!important;
  }

  /* Decoración secundaria fuera del camino del catálogo en teléfonos. */
  body.cm-home-reboot .nx-brand-showcase,
  body.cm-home-reboot .nx-home-metrics,
  body.cm-home-reboot .nx-home-signals{
    display:none!important;
  }

  body.cm-home-reboot .nx-home-actions{
    margin-top:20px!important;
  }

  body.cm-home-reboot .cm-catalog{
    margin-top:22px!important;
  }

  body.cm-home-reboot .nx-catalog-toolbar{
    margin-bottom:14px!important;
  }

  body.cm-home-reboot .nx-catalog-heading h2{
    font-size:1.9rem!important;
  }

  body.cm-home-reboot .nx-catalog-v42 .nx-product-media{
    height:190px!important;
  }
}
