/* TRIWUU_GLOBAL_MOBILE_STICKY_HEADER_1_1_35
 * Garantía final, cargada después de las hojas específicas de cada página.
 * `overflow-x:hidden` convierte algunos body en contenedores de scroll y
 * desactiva position:sticky; `clip` contiene el lateral sin romperlo.
 */
@media (max-width:980px){
  html,
  html body{
    max-width:100%!important;
    overflow-x:visible!important;
    overflow-x:clip!important;
  }

  html{
    scroll-padding-top:calc(var(--triwuu-sticky-stack-height, 0px) + 12px);
  }

  html body .triwuu-site-header,
  html body .triwuu-site-header--proposal{
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    width:100%!important;
    max-width:100vw!important;
    isolation:isolate;
  }

  body.woocommerce-cart .woocommerce-notices-wrapper,
  body.woocommerce-cart .woocommerce-message,
  body.woocommerce-cart .woocommerce-info,
  body.woocommerce-cart .woocommerce-error{
    scroll-margin-top:calc(var(--triwuu-sticky-stack-height, 0px) + 12px);
  }

  body.woocommerce-checkout .woocommerce-notices-wrapper,
  body.woocommerce-checkout .woocommerce-NoticeGroup,
  body.woocommerce-checkout .woocommerce-message,
  body.woocommerce-checkout .woocommerce-info,
  body.woocommerce-checkout .woocommerce-error,
  body.woocommerce-checkout .wc-block-components-notice-banner{
    scroll-margin-top:calc(var(--triwuu-sticky-stack-height, 0px) + 12px);
  }
}

@media (min-width:783px) and (max-width:980px){
  html body.admin-bar .triwuu-site-header,
  html body.admin-bar .triwuu-site-header--proposal{
    top:32px!important;
  }

  /* TRIWUU_ADMIN_BAR_STICKY_FLOW_OFFSET_1_1_35
   * La barra de administración es fija y desplaza visualmente la cabecera.
   * Reservamos ese mismo hueco en el contenido para que su primera fila no
   * quede físicamente debajo del header al estar arriba del todo.
   */
  html body.admin-bar header.triwuu-site-header + #content{
    padding-top:32px!important;
  }
}

@media (max-width:782px){
  html body.admin-bar #wpadminbar{
    display:block!important;
    visibility:visible!important;
    position:fixed!important;
    top:0!important;
    right:0!important;
    left:0!important;
    width:100%!important;
    max-width:100vw!important;
    z-index:99999!important;
  }

  html body.admin-bar .triwuu-site-header,
  html body.admin-bar .triwuu-site-header--proposal{
    top:46px!important;
  }

  html body.admin-bar header.triwuu-site-header + #content{
    padding-top:46px!important;
  }
}
