/* OEEROO 1.04.05.6: shared boxed layout and responsive policy/review refinements. */
:root { --oeeroo-container: 1280px; }

/* One desktop frame: each visible page edge aligns with the header content edge. */
@media (min-width: 768px) {
	.site-header > .header-main,
	.site-header .header-nav > .oeeroo-container,
	.site-footer > .footer-inner,
	.oeeroo-container,
	main > *,
	.single-product #main,
	.woocommerce-cart .woocommerce,
	.woocommerce-checkout .woocommerce {
		width: min(calc(100% - 96px), var(--oeeroo-container)) !important;
		max-width: var(--oeeroo-container) !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: 32px !important;
		padding-right: 32px !important;
	}
	.single-product #main,
	.woocommerce-cart .woocommerce,
	.woocommerce-checkout .woocommerce { box-sizing: border-box !important; }
}

/* The header, page bodies, hero, and footer all share the homepage hero width. */
.site-header > .header-main,
.site-header .header-nav > .oeeroo-container,
.site-footer > .footer-inner,
.oeeroo-container,
.woocommerce-page #main,
.page #main > article:not(.oeeroo-refund-page) {
	width: min(calc(100% - 96px), var(--oeeroo-container)) !important;
	margin-left: auto;
	margin-right: auto;
}

.site-footer > .footer-inner { padding-left: 32px; padding-right: 32px; }
.oeeroo-policy-hero > .oeeroo-container { width: min(calc(100% - 96px), var(--oeeroo-container)) !important; padding-left: 32px; padding-right: 32px; }

/* Force every top-level page surface to the same width as the homepage hero. */
main > * {
	width: min(calc(100% - 96px), var(--oeeroo-container)) !important;
	max-width: var(--oeeroo-container) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
main > .oeeroo-refund-page { width: min(calc(100% - 96px), var(--oeeroo-container)) !important; }

/* The form stays out of the document flow until the customer asks to write a review. */
.oeeroo-review-form[hidden] { display: none !important; }
.oeeroo-review-form:not([hidden]) {
	margin-top: 24px;
	padding: 24px;
	border: 1px solid var(--oeeroo-border);
	background: #fff;
}
.oeeroo-write-review { cursor: pointer; }
.oeeroo-write-review-main { display: none; }
.oeeroo-review-more button,
.oeeroo-write-review { background: #20262f !important; color: #fff !important; border: 0 !important; border-radius: 6px !important; }

/* Product detail uses the complete desktop hero-width canvas. */
@media (min-width: 768px) {
	.single-product #main {
		width: min(calc(100% - 96px), var(--oeeroo-container)) !important;
		max-width: var(--oeeroo-container) !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	.single-product .product { padding-top: 12px !important; }
	.single-product .woocommerce-breadcrumb { margin-bottom: 8px !important; }
	.single-product form.variations_form.cart { margin-top: 6px !important; margin-bottom: 10px !important; }
	.single-product form.variations_form.cart > table.variations { margin-bottom: 2px !important; }
	.oeeroo-desktop-product-actions { gap: 12px !important; margin: 2px 0 8px !important; }
	.oeeroo-desktop-product-action { min-width: 142px; min-height: 48px; justify-content: center; padding: 10px 16px; font-size: 14px; }
	.oeeroo-desktop-product-action svg { width: 24px; height: 24px; }
	.oeeroo-desktop-compare { color: #0878d1; background: #eef7ff; }
	.oeeroo-desktop-wishlist { color: #d52f66; background: #fff0f5; }
	.single-product .oeeroo-purchase-assurances { width: 48%; float: left; clear: left; justify-content: flex-start; margin-top: 16px !important; }
}

/* Refund-policy highlight cards: circle glyphs and copy have deliberate mobile spacing. */
@media (max-width: 700px) {
	main > *, main > .oeeroo-refund-page { width: calc(100% - 32px) !important; }
	.oeeroo-reviews-layout { display: flex !important; flex-direction: column !important; }
	.oeeroo-reviews-main { display: contents !important; }
	.oeeroo-rating-summary { display: contents !important; }
	.oeeroo-rating-summary > h2, .oeeroo-rating-card { order: 1; }
	.oeeroo-review-more { order: 2; }
	.oeeroo-write-review-main { display: block; order: 3; width: 100%; margin: 0 0 18px; padding: 13px 20px; text-align: center; font-weight: 700; }
	.oeeroo-rating-summary > .oeeroo-write-review { display: none; }
	.oeeroo-review-form { order: 4; }
	.oeeroo-policy-highlights {
		padding-left: 20px;
		padding-right: 20px;
	}
	.oeeroo-policy-highlights article {
		grid-template-columns: 54px minmax(0, 1fr);
		column-gap: 16px;
		align-items: center;
		padding: 18px 20px;
	}
	.oeeroo-policy-highlights i {
		display: grid;
		place-items: center;
		width: 54px;
		height: 54px;
		margin: 0;
		line-height: 1;
		text-align: center;
	}
	.oeeroo-policy-highlights strong,
	.oeeroo-policy-highlights span {
		min-width: 0;
	}
	.oeeroo-policy-highlights strong { font-size: 16px; }
	.oeeroo-policy-highlights span { font-size: 13px; }
	.oeeroo-policy-intro,
	.oeeroo-policy-grid { padding-left: 20px; padding-right: 20px; }
	.oeeroo-review-form:not([hidden]) { padding: 18px 16px; }
}

@media (max-width: 767px) {
	/* Mobile is edge-to-edge; the existing 16px component padding remains inside it. */
	main > *,
	main > .oeeroo-refund-page,
	.site-header > .header-main,
	.site-header .header-nav > .oeeroo-container,
	.site-footer > .footer-inner,
	.oeeroo-container,
	.oeeroo-policy-hero > .oeeroo-container,
	.woocommerce-page #main,
	.page #main > article:not(.oeeroo-refund-page) {
		width: 100% !important;
		max-width: none !important;
	}
	.site-footer > .footer-inner,
	.oeeroo-policy-hero > .oeeroo-container { padding-left: 16px; padding-right: 16px; }
}

/* Merchant-ready return policy: consistent square corners and left-aligned card icons. */
.oeeroo-policy-highlights article,
.oeeroo-policy-grid > section,
.oeeroo-policy-intro li,
.oeeroo-legal-sidebar,
.oeeroo-legal-sidebar nav { border-radius: 0 !important; }
.oeeroo-policy-highlights article { box-shadow: none !important; }
@media (min-width: 701px) {
	.oeeroo-policy-highlights article { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 16px; align-items: center; text-align: left; }
	.oeeroo-policy-highlights i { display: grid; place-items: center; grid-row: 1 / span 2; margin: 0; line-height: 1; }
	.oeeroo-policy-highlights span { margin-top: 4px; }
}

/* Saved lists retain the same rating information as catalogue cards. */
.oeeroo-saved-rating { display: flex; align-items: center; gap: 4px; margin: -5px 0 12px; color: var(--oeeroo-muted); font-size: 12px; }
.oeeroo-saved-rating span { position: relative; display: inline-block; width: 72px; overflow: hidden; white-space: nowrap; color: #d5d5d5; font-size: 14px; letter-spacing: 0; }
.oeeroo-saved-rating span:before { content: '★★★★★'; position: absolute; inset: 0 auto 0 0; width: var(--oeeroo-rating); overflow: hidden; color: #f5ab20; }
.oeeroo-saved-rating b { color: var(--oeeroo-text); }
.oeeroo-saved-rating em { font-style: normal; }
.oeeroo-saved-clear,
.woocommerce-cart-form .product-remove a,
.woocommerce-cart .woocommerce a.remove { display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; border: 0 !important; border-radius: 4px !important; background: #fff0f3 !important; color: #cf2856 !important; font-weight: 700; }
.oeeroo-saved-clear:before { content: '✦'; color: #0878d1; }
.oeeroo-saved-page[data-oeeroo-saved-page="wishlist"] .oeeroo-saved-clear:before { content: '♡'; color: #d52f66; font-size: 17px; }
.oeeroo-saved-page[data-oeeroo-saved-page="compare"] .oeeroo-saved-clear:before { content: '⇄'; color: #0878d1; font-size: 17px; }
.oeeroo-clear-cart-wrap { margin: 0 0 15px; text-align: right; }
.oeeroo-clear-cart { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 4px; background: #fff0f3; color: #cf2856; font-weight: 700; }

/* Legal pages retain the requested rounded Quick Links only; all other legal panels are square. */
.oeeroo-legal-layout aside { border-radius: 10px !important; }
.oeeroo-legal-layout aside a, .oeeroo-legal-contact { border-radius: 0 !important; }

/* Product-card third action: professional cart color and matching hover behavior. */
.oeeroo-card-add { color: #168c50 !important; background: #effaf3 !important; text-decoration: none; }
.oeeroo-card-add:hover { color: #fff !important; background: #168c50 !important; }
.oeeroo-card-add.is-added { color: #fff !important; background: #168c50 !important; }
.oeeroo-card-add.is-added:after { content: '✓'; position: absolute; font-size: 12px; font-weight: 700; }
.oeeroo-card-add.is-added svg { opacity: .18; }
.oeeroo-card-add.is-loading { opacity: .55; pointer-events: none; }

/* Final geometry override: page content starts and ends at the same inner edges as the header. */
@media (min-width: 768px) {
	.site-header > .header-main,
	.site-header .header-nav > .oeeroo-container,
	.site-footer > .footer-inner,
	main > *,
	.single-product #main,
	.woocommerce-cart .woocommerce,
	.woocommerce-checkout .woocommerce {
		width: min(calc(100% - 96px), var(--oeeroo-container)) !important;
		max-width: var(--oeeroo-container) !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: 32px !important;
		padding-right: 32px !important;
	}
	.single-product .product,
	.woocommerce-cart .woocommerce-cart-form,
	.woocommerce-checkout form.checkout { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
	.oeeroo-product-brand-inline { display: block !important; text-align: center !important; margin: 3px 0 8px !important; }
}

/* Required product-detail controls: compact after variables, with assurances centered in one row. */
@media (min-width: 768px) {
	.single-product form.variations_form.cart, .single-product form.variations_form.cart .single_variation_wrap { margin-top: 0 !important; padding-top: 0 !important; }
	.single-product form.variations_form.cart > table.variations { margin-bottom: 0 !important; }
	.oeeroo-desktop-product-actions { margin-top: 0 !important; margin-bottom: 8px !important; justify-content: center; }
	.oeeroo-product-brand-inline { display: block !important; margin: 4px 0 8px !important; text-align: center; color: var(--oeeroo-text) !important; font-size: 14px !important; }
	.oeeroo-product-brand-inline span { display: inline-block !important; }
	.oeeroo-product-brand-inline span:not(:first-child) { display: none !important; }
	.oeeroo-product-brand-inline b { color: var(--oeeroo-primary) !important; }
	.single-product .oeeroo-purchase-assurances { width: 100% !important; float: none !important; display: flex !important; justify-content: center !important; flex-flow: row nowrap !important; gap: 26px !important; margin: 14px auto 0 !important; }
	.single-product .oeeroo-purchase-assurance { flex: 0 1 auto !important; }
	.woocommerce-checkout .woocommerce, .woocommerce-cart .woocommerce { width: min(calc(100% - 96px), var(--oeeroo-container)) !important; max-width: var(--oeeroo-container) !important; padding-left: 0 !important; padding-right: 0 !important; }
	.woocommerce-checkout .site-header .header-main, .woocommerce-checkout .site-header .header-nav > .oeeroo-container { width: min(calc(100% - 96px), var(--oeeroo-container)) !important; max-width: var(--oeeroo-container) !important; }
}

/* Checkout visual hierarchy matches the rest of the store. */
.woocommerce-checkout .woocommerce { max-width: var(--oeeroo-container); }
.woocommerce-checkout #customer_details, .woocommerce-checkout #order_review { background: #fff; border: 1px solid var(--oeeroo-border); padding: 28px; }
.woocommerce-checkout #customer_details h3, .woocommerce-checkout #order_review_heading { font-size: 23px; margin: 0 0 22px; padding-bottom: 13px; border-bottom: 2px solid var(--oeeroo-primary); }
.woocommerce-checkout form .form-row label { display: block; margin-bottom: 7px; font-weight: 700; }
.woocommerce-checkout form .form-row input.input-text, .woocommerce-checkout form .form-row select, .woocommerce-checkout form .form-row textarea { border-color: #dce3ea; background: #fff; }
.woocommerce-checkout #payment { border-radius: 0; background: #f5f8fb; }
.woocommerce-checkout #place_order { width: 100%; min-height: 52px; background: var(--oeeroo-primary); color: #fff; font-weight: 700; }
@media (max-width: 767px) { .woocommerce-checkout #customer_details, .woocommerce-checkout #order_review { padding: 18px 16px; } }
