/*
 * AsianBazar layout contract — v2.1.2
 * Keeps the approved visual design intact while enforcing one 1300px content
 * alignment across header, footer, pages and the complete WooCommerce journey.
 */

body.abpf-brand-shell-page{
  --abpf-layout-max:1300px;
  --abpf-layout-gutter:40px;
  overflow-x:hidden;
}

.abpf-container,
.abpf-shell,
.abpf-shop-shell,
.abpf-content-page,
.abpf-single-shell,
body.abpf-woocommerce-page .woocommerce,
.abpf-woocommerce-page .wc-block-cart,
.abpf-woocommerce-page .wc-block-checkout{
  width:calc(100% - var(--abpf-layout-gutter))!important;
  max-width:1300px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box;
  min-width:0;
}

/* Elements that visually belong to the same 1300px page rhythm. */
.abpf-header-inner,
.abpf-topbar-inner,
.abpf-footer-grid,
.abpf-footer-bottom,
.abpf-services,
.abpf-newsletter,
.abpf-reference-hero,
.abpf-page-hero,
.abpf-about-welcome,
.abpf-about-performance,
.abpf-contact-main,
.abpf-page-cta,
.abpf-shop-layout,
.abpf-single-top,
.abpf-single-description,
.abpf-single-related{
  min-width:0;
  box-sizing:border-box;
}

/* Prevent theme / Elementor wrappers and media from creating side overflow. */
body.abpf-brand-shell-page #page,
body.abpf-brand-shell-page #content,
body.abpf-brand-shell-page .site-content,
body.abpf-brand-shell-page #primary,
body.abpf-brand-shell-page main.site-main,
body.abpf-brand-shell-page .entry-content,
body.abpf-brand-shell-page .elementor,
body.abpf-brand-shell-page .elementor-section,
body.abpf-brand-shell-page .elementor-container,
body.abpf-brand-shell-page .e-con{
  min-width:0!important;
  max-width:100%;
  box-sizing:border-box;
}

body.abpf-brand-shell-page img,
.abpf-shell img,
.abpf-content-page img,
.abpf-shop-shell img,
.abpf-single-shell img{
  max-width:100%;
}

.abpf-footer-grid>* ,
.abpf-header-inner>* ,
.abpf-service>* ,
.abpf-product-card,
.abpf-benefit-card,
.abpf-support-card,
.abpf-contact-info,
.abpf-contact-form-card{
  min-width:0;
}

@media(max-width:820px){
  body.abpf-brand-shell-page{
    --abpf-layout-gutter:28px;
  }

  .abpf-container,
  .abpf-shell,
  .abpf-shop-shell,
  .abpf-content-page,
  .abpf-single-shell,
  body.abpf-woocommerce-page .woocommerce,
  .abpf-woocommerce-page .wc-block-cart,
  .abpf-woocommerce-page .wc-block-checkout{
    max-width:none!important;
  }

  .abpf-header-inner{
    flex-wrap:nowrap!important;
    gap:10px!important;
  }

  .abpf-brand{
    flex:0 1 138px!important;
    min-width:108px!important;
    max-width:138px!important;
  }

  .abpf-brand img{
    width:100%!important;
    height:auto!important;
    max-height:42px!important;
    object-fit:contain!important;
  }

  .abpf-header-actions{
    flex:0 0 auto!important;
    margin-left:auto!important;
  }

  .abpf-footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .abpf-services{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .abpf-page-hero,
  .abpf-about-welcome,
  .abpf-about-performance,
  .abpf-contact-main,
  .abpf-single-top,
  .abpf-shop-layout{
    max-width:100%;
  }
}

@media(max-width:560px){
  body.abpf-brand-shell-page{
    --abpf-layout-gutter:20px;
  }

  .abpf-header-inner{
    gap:7px!important;
  }

  .abpf-brand{
    flex-basis:118px!important;
    min-width:96px!important;
    max-width:118px!important;
  }

  .abpf-brand img{
    max-height:38px!important;
  }

  .abpf-icon-button,
  .abpf-icon-link,
  .abpf-mobile-toggle{
    flex:0 0 37px!important;
    width:37px!important;
    height:37px!important;
  }

  .abpf-footer-grid,
  .abpf-services{
    grid-template-columns:1fr!important;
  }

  .abpf-footer-grid{
    gap:28px!important;
  }

  .abpf-footer-bottom{
    width:calc(100% - var(--abpf-layout-gutter))!important;
  }

  .abpf-product-grid,
  .abpf-benefit-grid,
  .abpf-support-grid,
  .abpf-story-grid,
  .abpf-contact-fields,
  .abpf-new-products-list{
    min-width:0;
  }
}

@media(max-width:380px){
  body.abpf-brand-shell-page{
    --abpf-layout-gutter:16px;
  }

  .abpf-brand{
    flex-basis:104px!important;
    min-width:88px!important;
    max-width:104px!important;
  }

  .abpf-icon-button,
  .abpf-icon-link,
  .abpf-mobile-toggle{
    flex-basis:35px!important;
    width:35px!important;
    height:35px!important;
  }
}
