/* Approved purchase-row layout, scoped to the live Single Product template. */
body.single-product .elementor-7031 .cie-sp-summary .cie-trade-purchase-gate {
	container: cie-purchase-row / inline-size;
}

/* The live template caps this form at 494px even when its column is wider. */
body.single-product .elementor-7031 .cie-sp-summary .cie-trade-purchase-gate form.cart {
	width: 100% !important;
	max-width: none !important;
}

body.single-product .elementor-7031 .cie-sp-summary .single_variation_wrap {
	--cie-purchase-row-height: 45px;
	/* Native inline hiding and the variation purchase guard remain authoritative. */
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 16px;
	padding-top: 20px !important;
}

/* Keep WooCommerce's live region, price observer and stock text intact. */
body.single-product .elementor-7031 .cie-sp-summary .single_variation {
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
}

body.single-product .elementor-7031 .cie-sp-summary .single_variation .woocommerce-variation-price {
	display: flex;
	align-items: center;
	min-height: var(--cie-purchase-row-height);
}

body.single-product .elementor-7031 .cie-sp-summary .single_variation .price {
	flex-wrap: wrap;
	row-gap: 4px !important;
}

body.single-product .elementor-7031 .cie-sp-summary .woocommerce-variation-add-to-cart {
	min-width: 0;
	min-height: var(--cie-purchase-row-height);
	margin: 0 !important;
	align-items: center !important;
	row-gap: 12px !important;
}

/* Match the native price-state selectors before removing their separate offsets. */
body.single-product .elementor-7031 .cie-sp-summary .woocommerce-variation.single_variation:has(.woocommerce-variation-price .price) {
	padding-top: 0 !important;
}

body.single-product .elementor-7031 .cie-sp-summary .single_variation_wrap:has(.woocommerce-variation-price .price) .woocommerce-variation-add-to-cart {
	margin-top: 0 !important;
}

/* Use the actual summary width: narrow desktop columns also stack safely. */
@container cie-purchase-row (min-width: 560px) {
	body.single-product .elementor-7031 .cie-sp-summary .single_variation_wrap {
		grid-template-columns: minmax(0, max-content) max-content;
		justify-content: start;
		column-gap: clamp(24px, 1.667vw, 32px);
	}

	body.single-product .elementor-7031 .cie-sp-summary .single_variation {
		max-width: 320px;
	}

	body.single-product .elementor-7031 .cie-sp-summary .woocommerce-variation-add-to-cart {
		flex-wrap: nowrap !important;
		column-gap: clamp(24px, 1.667vw, 32px) !important;
	}
}

/* Reuse the approved icon-to-bullets gap between the existing hero groups. */
body.single-product .elementor-7031 .cie-sp-summary {
	--cie-purchase-hero-gap: calc(var(--cie-summary-gap) + 17.1px);
	--cie-purchase-read-more-gap: calc(var(--cie-summary-gap) + clamp(5.7px, .532vw, 9.5px));
	gap: 0 !important;
	row-gap: 0 !important;
}

body.single-product .elementor-7031 .cie-sp-summary > .elementor-element,
body.single-product .elementor-7031 .cie-sp-summary > .elementor-widget > .elementor-widget-container {
	margin-block: 0 !important;
	padding-block: 0 !important;
}

/* These are the seven existing summary sections; their internal layouts stay native. */
body.single-product .elementor-7031 .cie-sp-summary > .elementor-element + .elementor-element {
	margin-block-start: var(--cie-purchase-hero-gap) !important;
}

/* The bullets and Read more remain a single group with their original internal gap. */
body.single-product .elementor-7031 .cie-sp-summary > .elementor-element.elementor-element-ciespreadm {
	margin-block-start: var(--cie-purchase-read-more-gap) !important;
}

body.single-product .elementor-7031 .cie-sp-summary .cie-product-identity,
body.single-product .elementor-7031 .cie-sp-summary .cie-feature-icons,
body.single-product .elementor-7031 .cie-sp-summary .woocommerce-product-details__short-description p {
	margin-block: 0 !important;
}

/* The outer section gap now owns this space, rather than an extra purchase-row inset. */
body.single-product .elementor-7031 .cie-sp-summary .single_variation_wrap {
	padding-top: 0 !important;
}

@media (max-width: 1199px) {
	body.single-product .elementor-7031 .cie-sp-summary {
		--cie-purchase-hero-gap: calc(var(--cie-summary-gap) + 15.2px);
	}
}

@media (max-width: 520px) {
	body.single-product .elementor-7031 .cie-sp-summary {
		--cie-purchase-hero-gap: calc(var(--cie-summary-gap) + 9.5px);
	}
}

/* Live product template: block flow measures the purchase widget after its container query.
 * The column flex basis otherwise reserves the taller pre-query purchase layout.
 * Existing explicit child margins retain the equal hero-section spacing.
 */
@media (max-width: 767px) {
	body.single-product .elementor-7031 .cie-sp-summary {
		display: block !important;
	}
}
