/* Favorito Delivery — Build 567
   Cabeçalho isolado: nasce pronto no primeiro paint e nunca é movimentado por JavaScript. */
body.marketplace-body .market-header{
  position:sticky!important;
  top:0!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  max-width:100%!important;
  z-index:100!important;
  transform:none!important;
  translate:none!important;
  transition:none!important;
  animation:none!important;
  will-change:auto!important;
  backface-visibility:visible!important;
  contain:layout paint;
}
body.marketplace-body .market-header > .market-wrap{
  width:100%;
  min-width:0;
  max-width:1280px;
  margin-left:auto;
  margin-right:auto;
  transform:none!important;
  transition:none!important;
  animation:none!important;
}

body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"]:not(.marketplace-store-app){
  --fd567-header-height:72px;
}
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"]:not(.marketplace-store-app) .market-header,
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"]:not(.marketplace-store-app) .market-header > .market-wrap{
  min-height:var(--fd567-header-height);
}

/* Área de localização + descoberta também é CSS-only. */
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"]:not(.marketplace-store-app) .fav-vitrine-top{
  /* Build 573: esta camada cuida SOMENTE do sticky.
     A largura pertence à régua global (.market-wrap / --fd-content-width). */
  position:sticky!important;
  top:var(--fd567-header-height)!important;
  z-index:90!important;
  transform:none!important;
  translate:none!important;
  transition:none!important;
  animation:none!important;
  will-change:auto!important;
  background:#f7f8fa!important;
  box-shadow:none!important;
  contain:layout paint;
}
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header,
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .fd567-header-location{
  transform:none!important;
  transition:none!important;
  animation:none!important;
  will-change:auto!important;
}

/* Reaproveita o endereço atual sem depender das antigas folhas fd531/fd532/fd533. */
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header{
  position:relative;
}
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header > .fd567-header-location{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%)!important;
  width:auto;
  max-width:min(58vw,520px);
  min-width:0;
  margin:0;
  z-index:1;
}
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header > .fd567-header-location .fav-vitrine-location-copy{
  min-width:0;
}
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header > .fd567-header-location .fav-vitrine-location-copy strong,
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header > .fd567-header-location .fav-vitrine-location-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.fav-vitrine-search-is-open[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header > .fd567-header-location{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

/* Build 573: removido o padding calculado que criava uma segunda régua no topo. */
@media(max-width:760px){
  body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"]:not(.marketplace-store-app){
    --fd567-header-height:64px;
  }
  body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header > .fd567-header-location{
    max-width:calc(100% - 108px);
  }
}

/* Build 573 — uma única régua: cabeçalho e topo só consomem a largura global. */
@media(min-width:1024px){
  body.marketplace-body .market-header > .market-wrap,
  body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .fav-vitrine-top{
    width:var(--fd-content-width)!important;
    max-width:var(--fd-content-max)!important;
    min-width:0!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .fav-vitrine-top{
    left:auto!important;
    right:auto!important;
  }
}
