/* Build 345 — largura única do app/loja no desktop.
   A Home geral do Marketplace continua com a largura própria. */
:root{--store-app-desktop-width:820px}

@media (min-width: 901px){
  body.marketplace-store-app{
    background:var(--bg,#f6f7f9);
  }

  /* Cabeçalho e barras do contexto da loja seguem exatamente a mesma régua. */
  body.marketplace-store-app .market-header .market-wrap,
  body.marketplace-store-app .market-store-context-bar .market-wrap,
  body.marketplace-store-app .market-footer .market-wrap{
    width:min(var(--store-app-desktop-width),calc(100% - 32px))!important;
    max-width:var(--store-app-desktop-width)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Toda página da loja usa o mesmo viewport central do detalhe do produto. */
  body.marketplace-store-app .market-main{
    width:min(var(--store-app-desktop-width),100%)!important;
    max-width:var(--store-app-desktop-width)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    min-width:0!important;
  }

  /* Wrappers internos não voltam para 1180px. */
  body.marketplace-store-app .market-main .market-wrap,
  body.marketplace-store-app .store-page.market-wrap,
  body.marketplace-store-app .market-section > .market-wrap,
  body.marketplace-store-app .market-store-page > .market-wrap,
  body.marketplace-store-app .market-native-shell,
  body.marketplace-store-app .market-account-shell,
  body.marketplace-store-app .market-cart-shell,
  body.marketplace-store-app .market-orders-shell{
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }

  /* Produto já tinha 820px; mantém exatamente a mesma referência. */
  body.marketplace-store-app .market-product-page,
  body.marketplace-store-app .market-product-page.is-pizza-builder{
    width:min(var(--store-app-desktop-width),100%)!important;
    max-width:var(--store-app-desktop-width)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Evita blocos do app da loja escapando lateralmente. */
  body.marketplace-store-app .market-main > *,
  body.marketplace-store-app .market-main section,
  body.marketplace-store-app .market-main article{
    max-width:100%;
    box-sizing:border-box;
  }
}

@media (max-width: 900px){
  body.marketplace-store-app .market-main,
  body.marketplace-store-app .market-header .market-wrap,
  body.marketplace-store-app .market-store-context-bar .market-wrap,
  body.marketplace-store-app .market-footer .market-wrap{
    max-width:none!important;
  }
}
