/* =========================================================
   NUVORELIX V10.75 · STABILITY LAYER
   Última capa: evita desbordes/regresiones entre CSS históricos.
   No cambia la identidad visual; normaliza geometría y responsive.
   ========================================================= */

html,body{width:100%;max-width:100%;overflow-x:clip}
*,*::before,*::after{box-sizing:border-box}
:where(img,video,canvas,iframe){max-width:100%}
:where(main,section,article,aside,div,form,fieldset,nav,header,footer){min-width:0}
:where(h1,h2,h3,h4,p,li,strong,small,a,button,label,span){min-width:0}

/* El main abierto por header.php es el único main real de la página. */
body.nx-how-page > main.container.cm-page{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.nx-how-page .nxhow-main{
  width:min(1500px,calc(100% - 36px))!important;
  max-width:1500px!important;
  margin-inline:auto!important;
  overflow:visible!important;
}
body.nx-how-page .nxhow-hero,
body.nx-how-page .nxhow-choice-grid,
body.nx-how-page .nxhow-process-grid,
body.nx-how-page .nxhow-after,
body.nx-how-page .nxhow-after-grid,
body.nx-how-page .nxhow-faq,
body.nx-how-page .nxhow-final{max-width:100%!important;min-width:0!important}
body.nx-how-page .nxhow-title-safe{overflow-wrap:normal!important;word-break:normal!important}

/* Home/catalog: elimina cualquier desplazamiento heredado. */
body.cm-home-reboot .cm-catalog,
body.cm-home-reboot .nx-catalog-v42,
body.cm-home-reboot .cm-catalog-layout,
body.cm-home-reboot .cm-products-wrap,
body.cm-home-reboot .cm-product-grid{
  left:auto!important;right:auto!important;transform:none!important;
  max-width:100%!important;
}
body.cm-home-reboot .cm-catalog-layout{display:block!important}
body.cm-home-reboot .cm-product-card{overflow:hidden!important;min-width:0!important}
body.cm-home-reboot .cm-product-card :where(h3,p,strong,small,span){overflow-wrap:break-word}

/* Producto: sidebar seguro y demo sin scroll horizontal. */
body.cm-product-reboot > main.container.cm-page{
  width:min(1560px,calc(100% - clamp(20px,4vw,56px)))!important;
  max-width:1560px!important;
  margin-inline:auto!important;
}
body.cm-product-reboot .cm-product-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(320px,390px)!important;
  gap:clamp(18px,2.4vw,34px)!important;
  align-items:start!important;
  max-width:100%!important;
}
body.cm-product-reboot :where(.cm-product-main,.cm-purchase-column,.cm-purchase-card,.cm-preview-studio,.cm-product-details,.cm-live-demo-frame-wrap,.cm-live-demo-frame){min-width:0!important;max-width:100%!important}
body.cm-product-reboot .cm-live-demo-frame-wrap{overflow:hidden!important}
body.cm-product-reboot .cm-live-demo-frame{width:100%!important}
body.cm-product-reboot .cm-purchase-option{grid-template-columns:auto minmax(0,1fr) auto!important}
body.cm-product-reboot .cm-purchase-option :where(b,small,strong){overflow-wrap:break-word}

/* Navbar: evita que acciones empujen el ancho en laptops/escalado. */
.nova-navbar,.nova-navbar-shell{max-width:100%!important}
.nova-navbar-shell{min-width:0!important}
.nova-desktop-links,.nova-desktop-actions{min-width:0!important}

@media(max-width:1180px){
  body.cm-product-reboot .cm-product-layout{grid-template-columns:1fr!important}
  body.cm-product-reboot .cm-purchase-column{position:static!important;width:100%!important;max-width:none!important}
}

@media(max-width:900px){
  body.cm-home-reboot .nx-catalog-v42 .cm-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.cm-product-reboot > main.container.cm-page{width:calc(100% - 24px)!important}
}

@media(max-width:640px){
  body.nx-how-page .nxhow-main{width:calc(100% - 20px)!important}
  body.cm-home-reboot .nx-catalog-v42 .cm-product-grid{grid-template-columns:1fr!important}
  body.cm-home-reboot .nx60-buy-grid,
  body.nx-how-page .nxhow-choice-grid{grid-template-columns:1fr!important}
  body.cm-product-reboot > main.container.cm-page{width:calc(100% - 20px)!important}
  body.cm-product-reboot .cm-product-layout{display:block!important}
  body.cm-product-reboot .cm-purchase-column{margin-top:22px!important}
  body.cm-product-reboot .cm-purchase-option{grid-template-columns:auto minmax(0,1fr)!important}
  body.cm-product-reboot .cm-purchase-option>strong{grid-column:2!important;justify-self:start!important}
  .cm-mobile-dock{max-width:calc(100vw - 20px)!important}
}

/* En zoom-out/ultrawide el catálogo se expande, pero las cards no se vuelven
   microscópicas. Cuatro columnas es el máximo deliberado. */
@media(min-width:2200px){
  body.cm-home-reboot .nx-catalog-v42 .cm-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(min-width:3400px){
  body.cm-home-reboot .nx-catalog-v42 .cm-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

/* Fix final ficha de producto: el grid item no hereda el ancho global del shell. */
body.cm-product-reboot .cm-product-layout > .cm-product-main{
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  justify-self:stretch!important;
}
body.cm-product-reboot .cm-product-layout > .cm-purchase-column{
  width:100%!important;
  max-width:390px!important;
  justify-self:end!important;
}
@media(max-width:1180px){
  body.cm-product-reboot .cm-product-layout > .cm-purchase-column{max-width:none!important;justify-self:stretch!important}
}
