/**
 * Automatic Fluid Commerce Layout — Child 2.0.0-rc.47.6.
 *
 * Flatsome owns markup. This last presentation layer opens only top-level
 * commerce frames. Nested rows, cards, forms and UX Builder components keep
 * their own layout rules.
 */
:root{
  --hdfl-content-max:1440px;
  --hdfl-header-max:1600px;
  --hdfl-footer-max:1600px;
  --hdfl-fluid-gutter:clamp(16px,2.5vw,48px);
  --hdfl-contained-frame:min(calc(100% - (2 * var(--hdfl-fluid-gutter))),var(--hdfl-content-max));
  --hdfl-header-frame:min(calc(100% - (2 * var(--hdfl-fluid-gutter))),var(--hdfl-header-max));
}

#wrapper,#main{width:100%;max-width:none}

/* Header remains wide but intentionally not edge-to-edge. */
#header .header-main>.container,
#header .header-inner,
#wide-nav>.flex-row,
#wide-nav .container{
  box-sizing:border-box;
  width:var(--hdfl-header-frame)!important;
  max-width:var(--hdfl-header-max)!important;
  margin-inline:auto!important;
}

/* Default contained mode remains available for diagnostics or later settings UI. */
body.hdfl-commerce-layout-contained{
  --hdfl-commerce-frame:var(--hdfl-contained-frame);
  --hdfl-commerce-max:var(--hdfl-content-max);
}
body.hdfl-commerce-layout-wide{
  --hdfl-commerce-frame:min(calc(100% - (2 * var(--hdfl-fluid-gutter))),1600px);
  --hdfl-commerce-max:1600px;
}
body.hdfl-commerce-layout-fluid{
  --hdfl-commerce-frame:calc(100% - (2 * var(--hdfl-fluid-gutter)));
  --hdfl-commerce-max:none;
}

/* Full commerce canvas. */
body.hdfl-commerce-layout :is(#wrapper,#main,.shop-page-title,.shop-container,.category-page-row,.product-container,.product-main,.product-footer){
  width:100%!important;
  max-width:none!important;
}

/* Archive top-level frames only. */
body.hdfl-commerce-layout:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand) :is(
  .shop-page-title>.page-title-inner,
  .shop-container>[class~="row"],
  .shop-container>.category-page-row,
  .category-page-row,
  .hdfl-catalog-shell,
  .hdfl-native-catalog-shell
){
  box-sizing:border-box;
  width:var(--hdfl-commerce-frame)!important;
  max-width:var(--hdfl-commerce-max)!important;
  margin-inline:auto!important;
}
body.hdfl-commerce-layout:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand) .shop-container{
  padding-inline:0!important;
}
body.hdfl-commerce-layout:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand) .category-page-row>.large-9,
body.hdfl-commerce-layout:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand) .category-page-row>.shop-container{
  width:100%!important;
  max-width:none!important;
  flex:0 0 100%!important;
}

/* Single product hero uses the same automatic fluid frame. */
body.single-product.hdfl-commerce-layout :is(
  .product-main>.row,
  .product-main>.product-main-inner,
  .hdfl-native-product-hero>.hdfl-product-frame,
  .hdfl-native-product-hero .hdfl-shell
){
  box-sizing:border-box;
  width:var(--hdfl-commerce-frame)!important;
  max-width:var(--hdfl-commerce-max)!important;
  margin-inline:auto!important;
}

@media(min-width:850px){
  body.single-product.hdfl-commerce-layout .product-main>.row{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:flex-start;
    gap:clamp(40px,4vw,80px);
  }
  body.single-product.hdfl-commerce-layout .product-main>.row>.product-gallery,
  body.single-product.hdfl-commerce-layout .product-main>.row>.large-6:first-child{
    width:auto!important;
    max-width:none!important;
    flex:1 1 58%!important;
  }
  body.single-product.hdfl-commerce-layout .product-main>.row>.product-info,
  body.single-product.hdfl-commerce-layout .product-main>.row>.large-6:last-child{
    width:auto!important;
    max-width:620px!important;
    flex:1 1 42%!important;
  }
}

/* Product sections: only direct content frames are fluid. */
body.single-product.hdfl-commerce-layout :is(
  .hdfl-product-detail-section,
  .hdfl-product-section,
  .hdfl-product-specifications,
  .hdfl-product-documents,
  .hdfl-product-related,
  .hdfl-product-projects,
  .hdfl-product-reviews,
  .hdfl-product-faq,
  .related-products-wrapper,
  .product-footer,
  .woocommerce-tabs
)>:is([class~="row"],.container,[class~="section-content"],.hdfl-shell,.hdfl-product-frame),
body.single-product.hdfl-commerce-layout :is(
  .hdfl-product-detail-section__inner,
  .hdfl-product-section__inner,
  .hdfl-product-frame
){
  box-sizing:border-box;
  width:var(--hdfl-commerce-frame)!important;
  max-width:var(--hdfl-commerce-max)!important;
  margin-inline:auto!important;
}

/* Footer is wide, but kept readable. */
#footer :is(.footer-1,.footer-2)>.row,
#footer .absolute-footer>.container,
#footer .footer-primary>.container{
  box-sizing:border-box;
  width:min(calc(100% - (2 * var(--hdfl-fluid-gutter))),var(--hdfl-footer-max))!important;
  max-width:var(--hdfl-footer-max)!important;
  margin-inline:auto!important;
}

@media(max-width:849px){
  :root{--hdfl-fluid-gutter:clamp(16px,3vw,28px)}
  body.single-product.hdfl-commerce-layout .product-main>.row{display:block!important}
  body.single-product.hdfl-commerce-layout .product-main>.row>:is(.product-gallery,.product-info,[class*="large-"]){
    width:100%!important;
    max-width:none!important;
    flex-basis:100%!important;
  }
}
@media(max-width:549px){:root{--hdfl-fluid-gutter:12px}}
