/* Individual products only. Existing Page 45, archive, Cart and Checkout CSS is untouched. */
body.single-product #content .sgff-single-product {
	--sgff-product-burgundy: #6b2233;
	--sgff-product-dark: #531826;
	--sgff-product-gold: #c2a052;
	--sgff-product-cream: #fbf7ee;
	--sgff-product-ink: #2c2725;
	--sgff-product-line: #e4dbce;
}
body.single-product #primary { margin-block: clamp(1.5rem, 3vw, 2.5rem); }
body.single-product #content div.product.sgff-single-product {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
	align-items: start;
	gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
	max-width: 68.75rem;
	margin-inline: auto;
	padding: 0;
	color: var(--sgff-product-ink);
	background: transparent;
	border: 0;
	box-shadow: none;
}
body.single-product #content div.product.sgff-single-product::before,
body.single-product #content div.product.sgff-single-product::after { content: none; }
body.single-product #content .sgff-single-product > * { min-width: 0; grid-column: 1 / -1; }
body.single-product #content div.product.sgff-single-product > h1.product_title {
	grid-row: 1;
	margin: 0;
	color: var(--sgff-product-burgundy);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.15;
	overflow-wrap: anywhere;
}
body.single-product #content div.product.sgff-single-product > .woocommerce-product-gallery {
	grid-column: 1;
	grid-row: 2;
	float: none;
	width: 100%;
	max-width: 28rem;
	margin: 0;
}
body.single-product #content .sgff-single-product > .woocommerce-product-gallery .woocommerce-product-gallery__wrapper { margin: 0; }
body.single-product #content .sgff-single-product > .woocommerce-product-gallery img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 21rem;
	object-fit: contain;
	object-position: center top;
	box-shadow: none;
}
body.single-product #content .sgff-single-product > .woocommerce-product-gallery .woocommerce-product-gallery__image:nth-child(n+2) img { max-height: 5rem; }
body.single-product #content div.product.sgff-single-product > .summary {
	grid-column: 2;
	grid-row: 2;
	float: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
body.single-product #content .sgff-single-product > .summary > .price {
	margin: 0 0 .875rem;
	color: var(--sgff-product-burgundy);
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.3;
}
body.single-product #content .sgff-single-product > .summary .woocommerce-product-details__short-description {
	margin: 0 0 1.25rem;
	font-size: 1rem;
	line-height: 1.6;
}
body.single-product #content .sgff-single-product > .summary .woocommerce-product-details__short-description > :last-child { margin-bottom: 0; }
body.single-product #content .sgff-single-product > .summary form.cart:not([hidden]) { flex-wrap: wrap; margin: 0 0 1rem; }

/* Compact Mix and Match rows. Native table semantics, inputs and validation remain. */
body.single-product #content .sgff-single-product form.mnm_form table.mnm_table {
	width: 100%;
	margin: 0 0 .75rem;
	border: 0;
	border-collapse: collapse;
	background: transparent;
}
body.single-product #content .sgff-single-product form.mnm_form table.mnm_table th,
body.single-product #content .sgff-single-product form.mnm_form table.mnm_table td {
	padding: .5rem .375rem;
	border: 0;
	border-bottom: 1px solid var(--sgff-product-line);
	background: transparent;
	vertical-align: middle;
	text-align: start;
}
body.single-product #content .sgff-single-product form.mnm_form table.mnm_table th { font-size: .875rem; font-weight: 600; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table .product-thumbnail { width: 3.5rem; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table .mnm_image { min-width: 0; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table .product-thumbnail img {
	display: block;
	width: 3rem;
	height: 3rem;
	max-width: 3rem;
	object-fit: contain;
	box-shadow: none;
}
body.single-product #content .sgff-single-product form.mnm_form .mnm_table :is(.product-name, .product-details) { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table :is(.product-name, .product-details) > :last-child { margin-bottom: 0; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table .woocommerce-loop-product__title { margin: 0; font-size: 1rem; font-weight: 400; line-height: 1.4; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table .product-quantity { width: 5.5rem; text-align: end; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_table .quantity { float: none; margin: 0; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_message { margin: .5rem 0 1rem; font-size: .9375rem; line-height: 1.5; }
body.single-product #content .sgff-single-product form.cart .woocommerce-info,
body.single-product #content .sgff-single-product form.mnm_form .mnm_status .mnm_message {
	margin: .75rem 0;
	border-top-color: var(--sgff-product-gold);
	background: var(--sgff-product-cream);
	color: var(--sgff-product-ink);
}
body.single-product #content .sgff-single-product form.cart .woocommerce-info::before,
body.single-product #content .sgff-single-product form.mnm_form .mnm_status .mnm_message::before { color: var(--sgff-product-burgundy); }

/* Captured Mix and Match 2.9.2 tabular form: keep native DOM and live-region order.
 * Only the visible, matching form becomes a column. Hidden classes/attributes
 * are excluded and native inline display:none continues to take precedence.
 */
body.single-product #content .sgff-single-product > .summary > form.mnm_form.layout_tabular:not([hidden], .hidden, [aria-hidden="true"]):has(> .mnm_status + .mnm_button_wrap) {
	display: flex;
	flex-direction: column;
}
body.single-product #content .sgff-single-product > .summary > form.mnm_form.layout_tabular:has(> .mnm_status + .mnm_button_wrap)::before,
body.single-product #content .sgff-single-product > .summary > form.mnm_form.layout_tabular:has(> .mnm_status + .mnm_button_wrap)::after { content: none; }
body.single-product #content .sgff-single-product form.mnm_form.layout_tabular > .mnm_status { order: 2; }
body.single-product #content .sgff-single-product form.mnm_form.layout_tabular > .mnm_button_wrap:not([hidden], .hidden, [aria-hidden="true"]) {
	display: flex;
	flex-direction: column;
	order: 1;
}
body.single-product #content .sgff-single-product form.mnm_form.layout_tabular > .mnm_button_wrap > .single_add_to_cart_button { order: -1; flex-basis: auto; }
body.single-product #content .sgff-single-product form.mnm_form.layout_tabular > .mnm_reset {
	align-self: flex-start;
	min-height: 44px;
	margin-bottom: .75rem !important;
	padding: .25rem 0;
	border: 0;
	background: transparent;
	color: var(--sgff-product-burgundy);
	font-size: .875rem;
	text-decoration: underline;
	box-shadow: none;
}
body.single-product #content .sgff-single-product form.mnm_form .mnm_status > .mnm_price { margin: .75rem 0; font-size: .875rem; }
body.single-product #content .sgff-single-product form.mnm_form .mnm_status .mnm_counter { margin-left: 0; }

/* Native selectors retain all min/max/step and disabled/hidden states. */
body.single-product #content .sgff-single-product form.cart input.qty {
	box-sizing: border-box;
	width: 4.75rem;
	min-width: 3rem;
	min-height: 48px;
	padding: .5rem;
	border: 1px solid #958478;
	border-radius: 3px;
	background: #fff;
	color: var(--sgff-product-ink);
	font-size: 1rem;
	line-height: 1.4;
	text-align: center;
}
body.single-product #content .sgff-single-product form.cart select {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	padding: .625rem 2rem .625rem .75rem;
	border: 1px solid #958478;
	border-radius: 3px;
	background-color: #fff;
	color: var(--sgff-product-ink);
	font-size: 1rem;
}
body.single-product #content .sgff-single-product form.cart .variations { margin-bottom: 1rem; }
body.single-product #content .sgff-single-product form.cart .variations th,
body.single-product #content .sgff-single-product form.cart .variations td { padding-block: .375rem; }
body.single-product #content .sgff-single-product form.cart .single_add_to_cart_button {
	box-sizing: border-box;
	float: none;
	width: 100%;
	min-height: 54px;
	flex-basis: 100%;
	margin: .75rem 0 0;
	padding: .875rem 1.25rem;
	border: 1px solid var(--sgff-product-burgundy);
	border-radius: 3px;
	background: var(--sgff-product-burgundy);
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-transform: none;
	white-space: normal;
	box-shadow: none;
}
body.single-product #content .sgff-single-product form.cart .single_add_to_cart_button:hover { border-color: var(--sgff-product-dark); background: var(--sgff-product-dark); }
body.single-product #content .sgff-single-product form.cart .single_add_to_cart_button:disabled,
body.single-product #content .sgff-single-product form.cart .single_add_to_cart_button.disabled { opacity: .5; cursor: not-allowed; }
body.single-product #content .sgff-single-product form.cart :is(input, select, button, a):focus-visible { outline: 3px solid var(--sgff-product-burgundy); outline-offset: 3px; }

/* Show the existing associated label for the parent quantity, not component labels. */
body.single-product #content .sgff-single-product form.cart > .quantity:not([hidden]):has(> input.qty:not([type="hidden"])),
body.single-product #content .sgff-single-product form.cart :is(.mnm_button, .mnm_button_wrap) > .quantity:not([hidden]):has(> input.qty:not([type="hidden"])),
body.single-product #content .sgff-single-product form.cart .woocommerce-variation-add-to-cart > .quantity:not([hidden]):has(> input.qty:not([type="hidden"])) { float: none; flex-basis: 100%; margin: .75rem 0 0; }
body.single-product #content .sgff-single-product form.cart > .quantity:not([hidden]):has(> input.qty:not([type="hidden"])) > label.screen-reader-text,
body.single-product #content .sgff-single-product form.cart :is(.mnm_button, .mnm_button_wrap) > .quantity:not([hidden]):has(> input.qty:not([type="hidden"])) > label.screen-reader-text,
body.single-product #content .sgff-single-product form.cart .woocommerce-variation-add-to-cart > .quantity:not([hidden]):has(> input.qty:not([type="hidden"])) > label.screen-reader-text {
	position: static !important;
	display: block;
	clip: auto !important;
	clip-path: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 0 .375rem;
	padding: 0;
	overflow: visible;
	font-size: .9375rem;
	font-weight: 600;
	white-space: normal;
}

body.single-product #content .sgff-single-product > .sgff-product-details,
body.single-product #content .sgff-single-product > .woocommerce-tabs,
body.single-product #content .sgff-single-product > section.products {
	grid-column: 1 / -1;
	width: 100%;
	margin: .75rem 0 0;
	padding: 1.25rem 0 0;
	border: 0;
	border-top: 1px solid var(--sgff-product-line);
	background: transparent;
	box-shadow: none;
}
body.single-product #content .sgff-single-product > .sgff-product-details h2 { margin: 0 0 .75rem; color: var(--sgff-product-burgundy); font-size: 1.25rem; line-height: 1.4; }
body.single-product #content .sgff-single-product > .sgff-product-details { line-height: 1.6; overflow-wrap: anywhere; }

@media (max-width: 767px) {
	body.single-product #content div.product.sgff-single-product { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
	body.single-product #content div.product.sgff-single-product > .woocommerce-product-gallery { grid-column: 1; grid-row: 2; max-width: 100%; }
	body.single-product #content div.product.sgff-single-product > .summary { grid-column: 1; grid-row: 3; }
	body.single-product #content .sgff-single-product > .woocommerce-product-gallery img { max-height: 13.5rem; }
	body.single-product #content .sgff-single-product > .woocommerce-product-gallery .woocommerce-product-gallery__image:nth-child(n+2) img { max-height: 4rem; }
	body.single-product #content .sgff-single-product form.cart .variations th,
	body.single-product #content .sgff-single-product form.cart .variations td { display: block; width: 100%; }
	body.single-product #content .sgff-single-product form.mnm_form .mnm_table th,
	body.single-product #content .sgff-single-product form.mnm_form .mnm_table td { padding-inline: .25rem; }
}
