/* Sarie Art — mobile header true-center + input-stable runtime v2.
   Centers the identity against the viewport and keeps mouse/touch controls usable. */
@media (max-width:760px){
  .site-header{
    --sarie-mobile-header-action-cluster:calc(
      var(--header-mobile-search-size,34px) +
      var(--header-mobile-cart-size,34px) +
      var(--header-mobile-account-size,34px) + 8px
    );
    --sarie-mobile-header-nav-cluster:var(--header-mobile-categories-size,34px);
    --sarie-mobile-header-edge-reserve:calc(
      max(
        var(--sarie-mobile-header-action-cluster),
        var(--sarie-mobile-header-nav-cluster)
      ) + 16px
    );
    --sarie-mobile-header-brand-cap:max(
      56px,
      calc(100vw - (2 * var(--sarie-mobile-header-edge-reserve)))
    );
    --sarie-mobile-header-runtime-height:max(
      60px,
      var(--header-mobile-height,58px),
      calc(var(--header-mobile-logo-height,38px) + 16px)
    );
  }

  .site-header .container.nav-wrap--reordered{
    position:relative!important;
    direction:ltr!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    max-width:none!important;
    min-height:var(--sarie-mobile-header-runtime-height)!important;
    padding-block:8px!important;
    padding-inline:8px!important;
    gap:8px!important;
    overflow:visible!important;
  }

  .nav-wrap--reordered .header-actions{
    position:relative!important;
    z-index:3!important;
    order:0!important;
    flex:0 0 auto!important;
    justify-self:auto!important;
    justify-content:flex-start!important;
    gap:4px!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }

  .nav-wrap--reordered .header-nav-zone{
    position:relative!important;
    z-index:3!important;
    order:2!important;
    flex:0 0 auto!important;
    justify-self:auto!important;
    justify-content:flex-end!important;
    min-width:0!important;
    margin:0!important;
  }

  .nav-wrap--reordered .brand--header{
    position:absolute!important;
    z-index:2!important;
    inset-inline:auto!important;
    right:auto!important;
    top:50%!important;
    left:50%!important;
    transform:translate(-50%,-50%)!important;
    order:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:0!important;
    max-width:var(--sarie-mobile-header-brand-cap)!important;
    margin:0!important;
    gap:var(--header-mobile-logo-gap,0px)!important;
  }

  .site-header .brand--header .header-brand-picture{
    display:block!important;
    flex:0 1 var(--header-mobile-logo-width,122px)!important;
    width:min(
      var(--header-mobile-logo-width,122px),
      var(--sarie-mobile-header-brand-cap)
    )!important;
    min-width:0!important;
    max-width:100%!important;
    height:var(--header-mobile-logo-height,38px)!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  .site-header .brand--header .header-brand-picture .site-logo{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:var(--header-mobile-logo-fit,contain)!important;
  }

  .site-header .brand--header .brand-text{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:100%!important;
  }

  .site-header .brand--header .brand-mark{
    width:min(
      var(--header-mobile-logo-height,38px),
      var(--sarie-mobile-header-brand-cap)
    )!important;
    min-width:min(
      var(--header-mobile-logo-height,38px),
      var(--sarie-mobile-header-brand-cap)
    )!important;
    height:var(--header-mobile-logo-height,38px)!important;
  }

  .search--header.is-open,
  .search--header:focus-within{
    top:calc(var(--sarie-mobile-header-runtime-height) + env(safe-area-inset-top,0px))!important;
  }

  .header-categories__panel,
  .account-menu__panel,
  .nav-wrap--reordered .nav-links--edge.open{
    top:calc(var(--sarie-mobile-header-runtime-height) + 6px + env(safe-area-inset-top,0px))!important;
  }
}
