/* ==========================================================================
   Boxed sections: every section on every page is a rounded box with the same radius,
   inset to the header width, with an even gap between boxes. Change --box-r to change all of them.
   ========================================================================== */

:root {
	--box-r: 28px;
	--box-gap: 18px;
	--box-w: var(--wide);
	--box-pad: clamp(18px, 3.2vw, 48px);
	--box-soft: #f4f6f8;
}

@media (max-width: 700px) {
	:root { --box-r: 22px; --box-gap: 12px; --box-w: var(--wide); --box-pad: 18px; }
}

/* Home ----------------------------------------------------------------- */
.site-main--home { padding-bottom: 0; }
.site-main--home :is(section.hero, section.vidhero, section.promos, section.hsection, section.showcase, section.split, section.banner) {
	width: var(--box-w);
	margin: var(--box-gap) auto 0;
	border-radius: var(--box-r);
	overflow: hidden;
}
.site-main--home :is(section.hero, section.vidhero, section.promos, section.hsection, section.showcase, section.split, section.banner) .home-wrap { width: 100%; padding-inline: var(--box-pad); }
.site-main--home .promos { padding-inline: var(--box-pad); }

/* Sections that were plain white become soft boxes so the edges show */
.site-main--home .pgrid,
.site-main--home .why,
.site-main--home .reviews,
.site-main--home .promos { background: var(--box-soft); }
.site-main--home .bestseller { background: #f8f6f1; }

/* The hero keeps its own layout width; it only gains the box edges */
.site-main--home .hero .hero__wrap { width: calc(100% - 2 * var(--box-pad)); }

/* Footer: perks box and footer box, same radius ------------------------ */
.site-footer,
.site-footer--perks {
	width: var(--box-w);
	margin: var(--box-gap) auto 0;
	border-radius: var(--box-r);
	overflow: hidden;
	border-top: 0;
}
.site-footer + .site-footer,
.site-footer--perks + .site-footer { margin-bottom: var(--box-gap); }

/* Shop and product pages ------------------------------------------------ */
.shop .shop-head,
.shop .shop__body,
.single .pd,
.single .pdp-related {
	width: var(--box-w);
	margin: var(--box-gap) auto 0;
	padding-inline: var(--box-pad);
	border-radius: var(--box-r);
	background: var(--box-soft);
}
.shop .shop-head { padding-block: 30px 34px; }
.shop .shop__body { padding-block: 6px 40px; }
.single .pd { padding-block: 60px 56px; }
.single .pdp-related { padding-block: 56px 50px; }
.single .pdp-related h2 { margin-top: 0; }
.shop .filters,
.single .pd-care li,
.single #reviews ol.commentlist li { background: #fff; }
.single .pdp { margin-top: 0; }

/* Generic pages (About, Cart, Checkout, My account) -------------------- */
.page .page__head,
.page .page__content {
	width: var(--box-w);
	max-width: none;
	margin: var(--box-gap) auto 0;
	padding-inline: var(--box-pad);
	border-radius: var(--box-r);
	background: var(--box-soft);
	border: 0;
}
.page .page__head { padding-block: 34px; }
.page .page__content { padding-block: 34px 50px; margin-bottom: 0; }
.page .page__head .container,
.page .page__content > .container { width: 100%; }

/* Cards and photos inside the boxes get a smaller radius so the corners match */
:root { --box-r-in: 16px; }
.hcard,
.promo,
.pgrid__photo,
.why__big,
.why__card-img,
.journey__img,
.reviews__photo,
.hero__video,
.split__media,
.blog__img,
.blog__card,
.reviews__card { border-radius: var(--box-r-in) !important; overflow: hidden; }

/* Footer content sits inside the box, not on its edge */
.site-footer__inner,
.site-footer--perks .perks__inner,
.site-footer--perks > div { width: 100%; padding-inline: var(--box-pad); }

/* Blog archive + single post ------------------------------------------- */
.blg .blg-hero,
.blg .blg-cats,
.blg .blg-grid-wrap,
.single-post .sp-hero,
.single-post .sp-wrap,
.single-post .sp-related { overflow: visible; }

/* Promo cards fill the box (the grid used the old full-page width and spilled out on the right) */
.site-main--home .promos__grid { width: 100%; }
/* Elementor sets img { height: auto }, which stopped the photos filling the promo cards */
.site-main--home .promo .promo__img { width: 100%; height: 100%; object-fit: cover; }
/* Same Elementor reset shrank the blog card photos to their natural ratio, leaving a dark gap under them */
.site-main--home .fblog__card .fblog__img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

/* Product cards and the collection tabs: rounded like the boxes (beats the older square-corner rules in home.css) */
body .hcard,
body .collections .hcard,
body .pgrid .hcard,
body .bestseller .hcard { border-radius: var(--box-r-in) !important; overflow: hidden; }
body .collections .tabs { border-radius: var(--box-r-in) !important; }
body .collections .tabs .tabs__tab,
body .collections .tabs__tab { border-radius: calc(var(--box-r-in) - 4px) !important; }
body .collections .center .hbtn,
body .hsection .hbtn { border-radius: 999px !important; }
body .hcard__buy { border-radius: 999px !important; }
body .hcard__img,
body .hcard__link { border-radius: 0 !important; }
body .collections .tabs button.tabs__tab { border-radius: calc(var(--box-r-in) - 4px) !important; }
