/*
Theme Name:   Catwalk Dogwalk
Theme URI:    https://catwalkdogwalk.com
Description:  Child theme of Blocksy for catwalkdogwalk.com. All site-specific
              CSS and functions live here so updating Blocksy can never
              overwrite them.
Author:       Pet-Tek International
Template:     blocksy
Version:      1.0.3
Text Domain:  catwalkdogwalk
*/

/* ---------------------------------------------------------------------------
   Self-contained pages.

   The nine designed pages are complete documents: they carry their own
   navigation, stylesheet and footer, and manage their own widths, including
   full-bleed bands that must reach the edge of the viewport.

   Blocksy wraps page content in .ct-container-full, and the block editor adds
   .is-layout-constrained, and both impose a max-width and side padding. That
   is what pinches those pages in with gutters either side.

   :has(nav#nav) matches only the pages carrying our own navigation, so every
   other page — cart, checkout, account, any future post — keeps Blocksy's
   normal container untouched.
--------------------------------------------------------------------------- */
#main-container:has(nav#nav),
main#main:has(nav#nav) {
	max-width: none;
	padding: 0;
	margin: 0;
}

.ct-container-full:has(nav#nav),
.ct-container:has(nav#nav) {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	display: block !important;
	grid-template-columns: none !important;
}

article:has(nav#nav) {
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.entry-content:has(nav#nav) {
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* .is-layout-constrained caps every direct child; these pages size their own. */
.entry-content:has(nav#nav) > *,
.entry-content:has(nav#nav) > .alignwide,
.entry-content:has(nav#nav) > .alignfull {
	max-width: none !important;
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Fallback for any browser without :has() — the same pages by body class.
   NOTE: padding is reset on the CONTAINERS only. The page's own top-level
   elements (nav, each section, the footer) carry their own padding and must
   keep it — zeroing it here is what flattened the footer. */
body.cdw-full #main-container,
body.cdw-full main#main,
body.cdw-full .ct-container-full,
body.cdw-full .ct-container,
body.cdw-full article,
body.cdw-full .entry-content {
	max-width: none !important;
	width: auto !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Direct children: release the width cap only. Never touch their padding. */
body.cdw-full .entry-content > *,
body.cdw-full .entry-content > .alignwide,
body.cdw-full .entry-content > .alignfull {
	max-width: none !important;
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
