/* Favorito Delivery — Build 531
   Camada isolada de estabilidade visual do Marketplace e da loja do cliente.
   Não altera tamanhos, cards, catálogo ou estrutura da Home. */

/* Primeira pintura: o conteúdo público só aparece depois que o DOM e as imagens críticas
   estão posicionados. O cabeçalho continua visível, evitando tela branca completa. */
html.fd531-preload:not(.fd531-ready):not(.fd531-timeout) body.marketplace-body .market-main,
html.fd531-preload:not(.fd531-ready):not(.fd531-timeout) body.marketplace-body .market-app-bottom,
html.fd531-preload:not(.fd531-ready):not(.fd531-timeout) body.marketplace-body .market-floating-cart,
html.fd531-preload:not(.fd531-ready):not(.fd531-timeout) body.marketplace-body .market-active-order-bar{
  opacity:0!important;
  visibility:hidden!important;
}
html.fd531-preload.fd531-ready body.marketplace-body .market-main,
html.fd531-preload.fd531-ready body.marketplace-body .market-app-bottom,
html.fd531-preload.fd531-ready body.marketplace-body .market-floating-cart,
html.fd531-preload.fd531-ready body.marketplace-body .market-active-order-bar,
html.fd531-preload.fd531-timeout body.marketplace-body .market-main,
html.fd531-preload.fd531-timeout body.marketplace-body .market-app-bottom,
html.fd531-preload.fd531-timeout body.marketplace-body .market-floating-cart,
html.fd531-preload.fd531-timeout body.marketplace-body .market-active-order-bar{
  opacity:1!important;
  visibility:visible!important;
}

/* Impede a capa/identidade da loja de receber animações durante a primeira montagem.
   Mantém exatamente as dimensões definidas pelo layout já existente. */
body.marketplace-store-app[data-market-page="loja"] .store-app-hero,
body.marketplace-store-app[data-market-page="loja"] .app-store-cover,
body.marketplace-store-app[data-market-page="loja"] .store-cover-image,
body.marketplace-store-app[data-market-page="loja"] .store-app-identity,
body.marketplace-store-app[data-market-page="loja"] .store-avatar,
body.marketplace-store-app[data-market-page="loja"] .fav469-delivery-strip{
  animation:none!important;
  backface-visibility:hidden;
}
body.marketplace-store-app[data-market-page="loja"] .store-cover-image{
  display:block!important;
  width:100%!important;
  height:100%!important;
  transform:none!important;
  will-change:auto!important;
}

/* Marketplace: quando a logo for ocultada no Master, o endereço ocupa exatamente
   o centro reservado à marca. Nada é aplicado aos apps individuais das lojas. */
.fd531-market-header-location{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
  min-width:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 8px;
  border-radius:9px;
}
.fd531-market-header-location strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  line-height:1.15;
  font-weight:650;
}
.fd531-market-header-location svg{flex:0 0 auto}
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>.fd531-market-header-location{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(58vw,520px);
  max-width:calc(100% - 112px);
}
body.fav-vitrine-search-is-open[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header>.fd531-market-header-location{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
/* O endereço já está no cabeçalho; evita repetir o mesmo bloco logo abaixo. */
body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"][data-market-header-logo="0"] .fav-vitrine-location-row{
  display:none!important;
}
.fd531-market-header-location-simple{
  max-width:min(68vw,560px);
}

@media(max-width:620px){
  .fd531-market-header-location strong{font-size:12.5px}
  body[data-market-page="inicio"][data-market-home-model="favorito_vitrine"] .is-vitrine-header>.fd531-market-header-location{
    width:min(62vw,360px);
    max-width:calc(100% - 104px);
    padding-inline:4px;
  }
}

@media(prefers-reduced-motion:reduce){
  html.fd531-preload body.marketplace-body .market-main,
  html.fd531-preload body.marketplace-body .market-app-bottom{transition:none!important}
}
