/* =========================================================
   BURNIGAN STANDARD PAGE GAP FIX — 1.1.8
   ---------------------------------------------------------
   Purpose:
   Remove only the outer Blocksy content-shell band on standard
   WordPress pages such as About, Contact, FAQ, Shipping & Returns,
   Privacy Policy and Terms & Conditions.

   It intentionally excludes:
   - Homepage
   - WooCommerce shop / product / cart / checkout / account pages

   The legacy master stylesheet deliberately left 24px desktop and
   16px mobile bottom shell spacing on normal pages. This file loads
   last and neutralises that shell spacing without changing the
   designed padding inside the page sections themselves.
   ========================================================= */

/* Put Blocksy's real page-spacing token at zero at every relevant
   level. The body declaration also covers templates that inherit the
   token before #main is constructed. */
html body.page:not(.home):not(.woocommerce-page),
html body.page:not(.home):not(.woocommerce-page) main#main,
html body.page:not(.home):not(.woocommerce-page) .site-main {
  --theme-content-vertical-spacing: 0px !important;
}

/* Remove the outer page shell's own spacing. */
html body.page:not(.home):not(.woocommerce-page) main#main,
html body.page:not(.home):not(.woocommerce-page) .site-main {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Blocksy may place the theme spacing on the first content container
   rather than on main itself. Neutralise only that outer container. */
html body.page:not(.home):not(.woocommerce-page) main#main > :is(.ct-container, .ct-container-full, .ct-container-fluid),
html body.page:not(.home):not(.woocommerce-page) .site-main > :is(.ct-container, .ct-container-full, .ct-container-fluid) {
  --theme-content-vertical-spacing: 0px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Prevent collapsed margins on the first/last rendered page block from
   recreating the external band. This does not zero padding inside the
   designed sections. */
html body.page:not(.home):not(.woocommerce-page) main#main .entry-content > :first-child,
html body.page:not(.home):not(.woocommerce-page) .site-main .entry-content > :first-child,
html body.page:not(.home):not(.woocommerce-page) main#main > :is(.ct-container, .ct-container-full, .ct-container-fluid) > :first-child,
html body.page:not(.home):not(.woocommerce-page) .site-main > :is(.ct-container, .ct-container-full, .ct-container-fluid) > :first-child {
  margin-top: 0 !important;
}

html body.page:not(.home):not(.woocommerce-page) main#main .entry-content > :last-child,
html body.page:not(.home):not(.woocommerce-page) .site-main .entry-content > :last-child,
html body.page:not(.home):not(.woocommerce-page) main#main > :is(.ct-container, .ct-container-full, .ct-container-fluid) > :last-child,
html body.page:not(.home):not(.woocommerce-page) .site-main > :is(.ct-container, .ct-container-full, .ct-container-fluid) > :last-child {
  margin-bottom: 0 !important;
}

/* Keep the footer itself flush to the page shell. */
html body.page:not(.home):not(.woocommerce-page) footer.ct-footer,
html body.page:not(.home):not(.woocommerce-page) .site-footer {
  margin-top: 0 !important;
}
