/**
 * Shared page container: same content width and side gutters as the header
 * (assets/css/ms-shop-header.css: 1240px content, 32 / 24 / 16px gutters).
 *
 * Applied to: homepage sections (ms-shop-home.css uses the tokens),
 * product archives (shop, categories, tags, product search) and the footer.
 * Other pages (single product, cart, checkout, plain pages) keep Storefront's
 * default .col-full for now.
 *
 * Loaded site-wide by inc/ms-shop-layout.php.
 */

:root {
	--ms-shop-container: 1240px;
	--ms-shop-gutter: 32px;
}

@media (max-width: 1179px) {
	:root {
		--ms-shop-gutter: 24px;
	}
}

@media (max-width: 767px) {
	:root {
		--ms-shop-gutter: 16px;
	}
}

/* Product archives: content area. Top/bottom padding stays in style.css. */
body.woocommerce.archive #content > .col-full {
	box-sizing: border-box;
	max-width: calc(var(--ms-shop-container) + 2 * var(--ms-shop-gutter));
	padding-left: var(--ms-shop-gutter);
	padding-right: var(--ms-shop-gutter);
	margin-left: auto;
	margin-right: auto;
}

/* Footer columns and bottom bar. */
#colophon .col-full {
	box-sizing: border-box;
	max-width: calc(var(--ms-shop-container) + 2 * var(--ms-shop-gutter));
	padding-left: var(--ms-shop-gutter);
	padding-right: var(--ms-shop-gutter);
	margin-left: auto;
	margin-right: auto;
}

/* Space between the header and the content on product pages and regular pages
   (FAQ, about, policies, ...). Cart, checkout and My Account already get 40px
   from style.css (`.woocommerce-page .content-area`). style.css also sets
   `#content { margin-top: 0 !important }` site-wide; the homepage and archives
   handle their own top spacing. */
body.single-product #content > .col-full,
body.page:not(.ms-shop-is-home):not(.woocommerce-page) #content > .col-full {
	padding-top: 40px;
}

@media (max-width: 767px) {
	body.single-product #content > .col-full,
	body.page:not(.ms-shop-is-home):not(.woocommerce-page) #content > .col-full {
		padding-top: 24px;
	}
}
