/* Platouri MDF v5.3 — ONE horizontal frame across the theme.
   Header and every PAGE CONTENT frame share exactly the same 1440px boundary.
   Do not constrain the black footer background: only its two inner rows follow
   this same frame. Media/widget sizes and Elementor content remain editable. */
body.pd52-global-shell {
  --pd53-page-width: 1440px;
}

/* Outer page frames — no viewport-wide backgrounds or 1280/1320px exceptions. */
body.pd52-global-shell .pd-site-header,
body.pd52-global-shell main#main-content,
body.pd52-global-shell main.pd-home,
body.pd52-global-shell main.pd-round12,
body.pd52-global-shell main.pd-square13,
body.pd52-global-shell main.pd-flower14,
body.pd52-global-shell main.pd-rect15,
body.pd52-global-shell main.pd-about16,
body.pd52-global-shell main.pd-contact17,
body.pd52-global-shell main.pd-regular-page,
body.pd52-global-shell main.pd-wishlist-page,
body.pd52-global-shell main.pd26-woo-single,
body.pd52-global-shell .pd26-seo-crumbs {
  box-sizing: border-box;
  width: 100% !important;
  max-width: var(--pd53-page-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Keep the footer full width and its content aligned with the page edge. */
body.pd52-global-shell .pd-site-footer .pd-footer-content,
body.pd52-global-shell .pd-site-footer .pd-subfooter {
  max-width: var(--pd53-page-width) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Homepage v3.4 deliberately escaped its 1440px parent. The user now wants
   ALL sections, including testimonials and newsletter, within the page frame. */
body.pd52-global-shell main.pd-home > .pd-reviews,
body.pd52-global-shell main.pd-home > .pd-newsletter {
  box-sizing: border-box !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: clamp(17px, 5.4%, 78px) !important;
  padding-right: clamp(17px, 5.4%, 78px) !important;
}

/* Elementor may insert viewport-wide containers even when main is boxed.
   Limit only the root-level wrappers; preserve intentionally narrow inner
   widgets/columns and all content, image, and text controls. */
body.pd52-global-shell main#main-content > .elementor,
body.pd52-global-shell main#main-content > .elementor-location-single,
body.pd52-global-shell main.pd-regular-page > article > .elementor,
body.pd52-global-shell main#main-content > .elementor > .elementor-section-wrap {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.pd52-global-shell main#main-content > .elementor > .elementor-section.elementor-section-stretched,
body.pd52-global-shell main#main-content > .elementor > .elementor-section-wrap > .elementor-section.elementor-section-stretched,
body.pd52-global-shell main.pd-regular-page > article > .elementor > .elementor-section.elementor-section-stretched {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Elementor Canvas bypasses main#main-content. Its direct page document
   still uses the common header/footer hooks introduced in v5.2. */
body.pd52-global-shell.elementor-template-canvas > .elementor,
body.pd52-global-shell.elementor-template-canvas > .elementor-location-single {
  box-sizing: border-box;
  width: 100% !important;
  max-width: var(--pd53-page-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* WooCommerce shop, categories, tags, single product and account/cart pages.
   Avoid touching nested Woo widgets inside cards or configurators. */
body.pd52-global-shell.woocommerce-page :is(#primary.content-area, #content.site-content, main#main, main.site-main),
body.pd52-global-shell.post-type-archive-product :is(#primary, main#main, main.site-main),
body.pd52-global-shell.tax-product_cat :is(#primary, main#main, main.site-main),
body.pd52-global-shell.tax-product_tag :is(#primary, main#main, main.site-main),
body.pd52-global-shell.woocommerce-page > .woocommerce {
  box-sizing: border-box;
  width: 100% !important;
  max-width: var(--pd53-page-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Existing regular-page padding remains inside the shared outer frame.
   A smaller viewport gets exactly the same 100%-wide frame as the header. */
@media (max-width: 920px) {
  body.pd52-global-shell main.pd-home > .pd-reviews,
  body.pd52-global-shell main.pd-home > .pd-newsletter {
    padding-left: clamp(17px, 4vw, 36px) !important;
    padding-right: clamp(17px, 4vw, 36px) !important;
  }
}
@media (max-width: 600px) {
  body.pd52-global-shell main.pd-home > .pd-reviews,
  body.pd52-global-shell main.pd-home > .pd-newsletter {
    padding-left: 17px !important;
    padding-right: 17px !important;
  }
  body.pd52-global-shell main.pd-regular-page {
    padding-left: 16px;
    padding-right: 16px;
  }
}
