/* AVITO.EU unified layout widths v300 */
:root{--avito-content:1320px;--avito-gutter:24px;--avito-mobile-gutter:10px}
html,body{max-width:100%;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}

/* One desktop content width for all primary blocks */
.wrap,
.home30 .wrap,
.catalog30 .wrap,
.product30 .wrap,
.catalog-main .wrap,
.catalog30 .catalog-intro,
.catalog30 .market-choice30,
.catalog30 .catalog-products,
.catalog30 .category-directory,
.product30 .detail-layout,
.product30 .why30,
.product30 .detail-between-ad,
.product30 .related-products,
.legal-page main{
  width:min(var(--avito-content),calc(100% - (var(--avito-gutter) * 2)))!important;
  max-width:var(--avito-content)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Keep inner tables/grids from growing outside their parent */
.product-grid,.catalog-grid,.category-grid,.market-grid,.market-choice30-grid,
.cat30-layout,.cat30-results,.cat30-filter,.detail-card,.detail-rail,
.pf-category-grid,.pf-brand-grid,.pf-benefits,.footer-main,
.legal-page article,.legal-page .legal-market-network,.legal-page .independence-notice{
  min-width:0!important;
  max-width:100%!important;
}
img,svg,video,canvas{max-width:100%}

/* Home horizontal ad blocks follow the same grid width */
.home30>.ad-slot,.home30-ad,.ad-before-footer{
  width:min(var(--avito-content),calc(100% - (var(--avito-gutter) * 2)))!important;
  max-width:var(--avito-content)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Legal pages use the same outer width as the marketplace */
.legal-page main{margin-top:28px!important}
.legal-page main>article{width:100%!important;margin:0!important}

/* Pre-footer aligns with the entire site grid */
.avito-prefooter-v200{
  width:min(var(--avito-content),calc(100% - (var(--avito-gutter) * 2)))!important;
  max-width:var(--avito-content)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Full-bleed footer with centered content */
.avito-footer-v200{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border-radius:0!important;
}
.avito-footer-v200 .footer-main,
.avito-footer-v200 .footer-line{
  width:min(var(--avito-content),calc(100% - (var(--avito-gutter) * 2)))!important;
  max-width:var(--avito-content)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.avito-footer-v200 .footer-main{padding-left:0!important;padding-right:0!important}
.avito-footer-v200 .footer-line{padding-left:0!important;padding-right:0!important}
.legal-page .avito-footer-v200{margin-top:46px!important;border-radius:0!important}

/* Prevent grid columns from forcing page overflow */
.avito-prefooter-v200 a,.avito-footer-v200 a,.home30 a,.catalog30 a,.product30 a,.legal-page a{min-width:0}

@media(max-width:760px){
  :root{--avito-gutter:10px}
  .wrap,
  .home30 .wrap,
  .catalog30 .wrap,
  .product30 .wrap,
  .catalog-main .wrap,
  .catalog30 .catalog-intro,
  .catalog30 .market-choice30,
  .catalog30 .catalog-products,
  .catalog30 .category-directory,
  .product30 .detail-layout,
  .product30 .why30,
  .product30 .detail-between-ad,
  .product30 .related-products,
  .legal-page main,
  .home30>.ad-slot,.home30-ad,.ad-before-footer,
  .avito-prefooter-v200{
    width:calc(100% - 20px)!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .avito-footer-v200{width:100%!important;margin:0!important}
  .avito-footer-v200 .footer-main,.avito-footer-v200 .footer-line{
    width:calc(100% - 20px)!important;
    max-width:none!important;
  }
}


/* v304 strict homepage alignment baseline */
:root{--avito-content:1288px!important}
.home30-hero,
.home30-live,
.home30 .wrap,
.home30-ad,
.home30 .brands,
.home30 .shops,
.avito-prefooter-v200,
.avito-footer-v200 .footer-main,
.avito-footer-v200 .footer-line{
  width:min(var(--avito-content),calc(100% - (var(--avito-gutter) * 2)))!important;
  max-width:var(--avito-content)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.home30-hero{width:min(var(--avito-content),calc(100% - (var(--avito-gutter) * 2)))!important}
@media(max-width:760px){
  .home30-hero,
  .home30-live,
  .home30 .wrap,
  .home30-ad,
  .home30 .brands,
  .home30 .shops,
  .avito-prefooter-v200,
  .avito-footer-v200 .footer-main,
  .avito-footer-v200 .footer-line{
    width:calc(100% - 20px)!important;
    max-width:none!important;
  }
}
