/**
 * My Custom Woo Features - single product page.
 *
 * Loaded on product pages and wherever the Single Product widget or
 * [mcwf_single_product] shortcode is used. Everything is scoped to
 * .mcwf-single (a body class on product pages, a wrapper elsewhere) and
 * restyles WooCommerce's own markup.
 *
 * Contents
 *  1. Layout
 *  2. Gallery
 *  3. Summary: header, title, rating, price
 *  4. Add to cart form: options, quantity, buttons
 *  5. Note, meta, share
 *  6. Tabs and accordion
 *  7. Related products and upsells
 *  8. Sticky add to cart bar
 *  9. Embedded product: the layout follows the width of its column
 */

/* -------------------------------------------------------------------------
 * 1. Layout
 * ---------------------------------------------------------------------- */

.mcwf-single {
	--mcwf-gallery-w: 50%;
	--mcwf-thumb-w: 80px;
	--mcwf-gallery-offset: 0px;
}

.mcwf-single--gallery-small {
	--mcwf-gallery-w: 40%;
}

.mcwf-single--gallery-large {
	--mcwf-gallery-w: 58%;
}

.mcwf-single div.product {
	color: var(--mcwf-text);
	font-family: var(--mcwf-font, inherit);
	font-size: var(--mcwf-fs);
	line-height: 1.6;
}

/*
 * The product is a formatting context of its own: floats printed inside it
 * (by WooCommerce, the theme or another plugin) cannot let the next section,
 * or the footer, slide up over it.
 */
.mcwf-single div.product {
	display: flow-root;
}

.mcwf-single div.product > .woocommerce-tabs,
.mcwf-single div.product > .mcwf-accordion,
.mcwf-single div.product > .related,
.mcwf-single div.product > .upsells {
	float: none;
	width: auto;
	clear: both;
}

/*
 * Without the wrapper below (another plugin replaced the template hooks that
 * print it) the gallery and the summary simply stack, instead of floating.
 */
.mcwf-single div.product > .woocommerce-product-gallery,
.mcwf-single div.product > div.images,
.mcwf-single div.product > .summary {
	float: none !important;
	width: 100% !important;
	margin: 0 0 30px;
}

/* Gallery and summary side by side. The wrapper is printed by MCWF_Single_Product. */
.mcwf-single__top {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, var(--mcwf-gallery-w)) minmax(0, 1fr);
	column-gap: 40px;
	align-items: start;
	margin-bottom: 40px;
}

/* Anything else printed around the gallery spans the full width. */
.mcwf-single__top > * {
	grid-column: 1 / -1;
	min-width: 0;
}

.mcwf-single div.product .mcwf-single__top > .woocommerce-product-gallery,
.mcwf-single div.product .mcwf-single__top > div.images {
	grid-column: 1;
	float: none !important;
	width: 100% !important;
	margin: 0;
}

.mcwf-single div.product .mcwf-single__top > .summary {
	grid-column: 2;
	float: none !important;
	width: 100% !important;
	margin: 0;
}

/* The summary follows the page while a taller gallery scrolls past. */
.mcwf-single--sticky-summary div.product .mcwf-single__top > .summary {
	position: sticky;
	top: 30px;
}

.admin-bar .mcwf-single--sticky-summary div.product .mcwf-single__top > .summary,
.admin-bar.mcwf-single--sticky-summary div.product .mcwf-single__top > .summary {
	top: 62px;
}

.mcwf-single--embedded div.product {
	margin: 0;
}

@media (max-width: 1024px) {
	.mcwf-single__top {
		column-gap: 26px;
	}
}

@media (max-width: 767px) {
	.mcwf-single__top {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 24px;
		margin-bottom: 30px;
	}

	.mcwf-single div.product .mcwf-single__top > .summary {
		position: static;
		grid-column: 1;
	}
}

/* -------------------------------------------------------------------------
 * 2. Gallery
 * ---------------------------------------------------------------------- */

.mcwf-single__badges {
	position: absolute;
	top: 15px;
	inset-inline-start: 15px;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
	pointer-events: none;
}

.mcwf-single div.product .woocommerce-product-gallery {
	position: relative;
	padding-inline-start: var(--mcwf-gallery-offset);
}

.mcwf-single div.product .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.mcwf-single div.product .woocommerce-product-gallery .flex-viewport,
.mcwf-single div.product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
	overflow: hidden;
	background: var(--mcwf-light);
	border-radius: var(--mcwf-card-radius);
}

.mcwf-single div.product .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/* Thumbnails: a horizontal strip under the image by default. */
.mcwf-single div.product div.images .flex-control-thumbs {
	display: flex;
	gap: 10px;
	margin: 10px 0 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: none;
}

.mcwf-single div.product div.images .flex-control-thumbs::-webkit-scrollbar {
	display: none;
}

.mcwf-single div.product div.images .flex-control-thumbs li {
	flex: 0 0 calc((100% - 30px) / 4);
	float: none;
	clear: none !important;
	width: auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-single div.product div.images .flex-control-thumbs li img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border: 1px solid transparent;
	border-radius: calc(var(--mcwf-card-radius) / 2);
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 0.2s, border-color 0.2s;
}

.mcwf-single div.product div.images .flex-control-thumbs li img:hover,
.mcwf-single div.product div.images .flex-control-thumbs li img.flex-active {
	opacity: 1;
}

.mcwf-single div.product div.images .flex-control-thumbs li img.flex-active {
	border-color: var(--mcwf-primary);
}

/* Thumbnails in a vertical column to the left of the image (tablet and up). */
@media (min-width: 768px) {
	@supports selector(:has(a)) {
		.mcwf-single--thumbs-left div.product .woocommerce-product-gallery:has(.flex-control-thumbs) {
			--mcwf-gallery-offset: calc(var(--mcwf-thumb-w) + 10px);
		}

		.mcwf-single--thumbs-left .mcwf-single__top:has(.flex-control-thumbs) > .mcwf-single__badges {
			inset-inline-start: calc(var(--mcwf-thumb-w) + 25px);
		}

		.mcwf-single--thumbs-left div.product div.images .flex-control-thumbs {
			position: absolute;
			top: 0;
			bottom: 0;
			inset-inline-start: 0;
			flex-direction: column;
			width: var(--mcwf-thumb-w);
			margin: 0;
			overflow-x: hidden;
			overflow-y: auto;
		}

		.mcwf-single--thumbs-left div.product div.images .flex-control-thumbs li {
			flex: 0 0 auto;
			width: 100%;
		}
	}
}

/* Previous / next arrows on the main image. */
.mcwf-single div.product .flex-direction-nav {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-single div.product .flex-direction-nav li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-single div.product .flex-direction-nav a,
.mcwf-single div.product .flex-direction-nav a:hover {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	color: var(--mcwf-title);
	font-size: 0;
	text-decoration: none;
	background: var(--mcwf-surface);
	border-radius: 50%;
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transition: opacity 0.25s, color 0.2s, background-color 0.2s;
}

.mcwf-single div.product .flex-direction-nav a::before {
	content: "";
	width: 9px;
	height: 9px;
	border: solid currentColor;
	border-width: 0 0 1.6px 1.6px;
}

.mcwf-single div.product .flex-direction-nav .flex-prev {
	left: calc(var(--mcwf-gallery-offset) + 15px);
}

.mcwf-single div.product .flex-direction-nav .flex-prev::before {
	margin-left: 4px;
	transform: rotate(45deg);
}

.mcwf-single div.product .flex-direction-nav .flex-next {
	right: 15px;
}

.mcwf-single div.product .flex-direction-nav .flex-next::before {
	margin-right: 4px;
	transform: rotate(-135deg);
}

.mcwf-single div.product .woocommerce-product-gallery:hover .flex-direction-nav a,
.mcwf-single div.product .flex-direction-nav a:focus-visible {
	opacity: 1;
}

.mcwf-single div.product .flex-direction-nav a:hover {
	color: var(--mcwf-primary-text);
	background: var(--mcwf-primary);
}

.mcwf-single div.product .flex-direction-nav .flex-disabled {
	display: none;
}

@media (hover: none) {
	.mcwf-single div.product .flex-direction-nav {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * 3. Summary: header, title, rating, price
 * ---------------------------------------------------------------------- */

.mcwf-single__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 14px;
}

.mcwf-single .mcwf-single__header .woocommerce-breadcrumb {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0;
	color: var(--mcwf-muted);
	font-size: 13px;
	line-height: 1.5;
}

.mcwf-single .mcwf-single__header .woocommerce-breadcrumb a,
.mcwf-single .mcwf-single__header .woocommerce-breadcrumb a:visited {
	color: var(--mcwf-text);
	text-decoration: none;
}

.mcwf-single .mcwf-single__header .woocommerce-breadcrumb a:hover {
	color: var(--mcwf-title);
}

.mcwf-product-nav {
	display: flex;
	flex: none;
	gap: 2px;
	margin-inline-start: auto;
}

.mcwf-single .mcwf-product-nav .mcwf-product-nav__link,
.mcwf-single .mcwf-product-nav .mcwf-product-nav__link:visited {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	color: var(--mcwf-title);
	border-radius: 50%;
	transition: color 0.2s, background-color 0.2s;
}

.mcwf-single .mcwf-product-nav .mcwf-product-nav__link:hover {
	color: var(--mcwf-title);
	background: var(--mcwf-light);
}

.mcwf-product-nav__link--prev .mcwf-icon {
	transform: rotate(90deg);
}

.mcwf-product-nav__link--next .mcwf-icon {
	transform: rotate(-90deg);
}

[dir="rtl"] .mcwf-product-nav__link--prev .mcwf-icon {
	transform: rotate(-90deg);
}

[dir="rtl"] .mcwf-product-nav__link--next .mcwf-icon {
	transform: rotate(90deg);
}

.mcwf-single div.product .summary .product_title {
	margin: 0 0 12px;
	padding: 0;
	color: var(--mcwf-title);
	font-size: 32px;
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
}

.mcwf-single div.product .woocommerce-product-rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1;
}

.mcwf-single div.product .woocommerce-product-rating .star-rating,
.mcwf-single div.product .star-rating {
	float: none;
	margin: 0;
	color: var(--mcwf-star);
}

.mcwf-single div.product .woocommerce-product-rating .woocommerce-review-link,
.mcwf-single div.product .woocommerce-product-rating .woocommerce-review-link:visited {
	color: var(--mcwf-text);
	text-decoration: none;
}

.mcwf-single div.product .woocommerce-product-rating .woocommerce-review-link:hover {
	color: var(--mcwf-title);
}

.mcwf-single div.product .summary p.price,
.mcwf-single div.product .summary span.price {
	margin: 0 0 16px;
	color: var(--mcwf-price, var(--mcwf-primary));
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}

.mcwf-single div.product .summary .price del {
	margin-inline-end: 4px;
	color: var(--mcwf-muted);
	font-size: 0.75em;
	font-weight: 400;
	opacity: 1;
}

.mcwf-single div.product .summary .price ins {
	padding: 0;
	color: inherit;
	font-weight: 600;
	text-decoration: none;
	background: none;
}

.mcwf-single div.product .woocommerce-product-details__short-description {
	margin: 0 0 20px;
	color: var(--mcwf-text);
	font-size: 14px;
	line-height: 1.7;
}

.mcwf-single div.product .woocommerce-product-details__short-description > :last-child,
.mcwf-single div.product .woocommerce-product-details__short-description > .mcwf-content > :last-child {
	margin-bottom: 0;
}

.mcwf-single div.product .summary .stock {
	margin: 0 0 14px;
	color: var(--mcwf-primary);
	font-size: 14px;
	font-weight: 600;
}

.mcwf-single div.product .summary .stock.out-of-stock {
	color: var(--mcwf-danger);
}

/* -------------------------------------------------------------------------
 * 4. Add to cart form: options, quantity, buttons
 * ---------------------------------------------------------------------- */

.mcwf-single div.product form.cart,
.mcwf-single div.product form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.mcwf-single div.product form.cart {
	margin: 0 0 18px;
	padding: 0;
}

.mcwf-single div.product form.cart::before,
.mcwf-single div.product form.cart::after {
	content: none;
	display: none;
}

.mcwf-single div.product form.cart > table,
.mcwf-single div.product form.cart > .single_variation_wrap,
.mcwf-single div.product form.cart .single_variation,
.mcwf-single div.product form.cart .woocommerce-variation-add-to-cart {
	flex: 0 0 100%;
	width: 100%;
}

/* Variation options */

.mcwf-single div.product form.cart table.variations {
	display: block;
	margin: 0 0 4px;
	border: 0;
}

.mcwf-single div.product form.cart table.variations tbody,
.mcwf-single div.product form.cart table.variations tr,
.mcwf-single div.product form.cart table.variations th,
.mcwf-single div.product form.cart table.variations td {
	display: block;
	padding: 0;
	line-height: 1.4;
	text-align: start;
	background: none;
	border: 0;
}

.mcwf-single div.product form.cart table.variations tr {
	margin-bottom: 14px;
}

.mcwf-single div.product form.cart table.variations th.label label {
	display: inline-block;
	margin: 0 0 8px;
	color: var(--mcwf-title);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.mcwf-single div.product form.cart table.variations td.value {
	position: relative;
}

.mcwf-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* The dropdown stays in the page for WooCommerce's script and for assistive technology fallbacks, but out of sight. */
.mcwf-single div.product form.cart .mcwf-swatch-field select {
	position: absolute !important;
	width: 1px !important;
	min-width: 0 !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	opacity: 0 !important;
	clip: rect(0, 0, 0, 0) !important;
	pointer-events: none !important;
}

/*
 * Some themes dress every dropdown up with a script that adds elements next
 * to it. Here the option buttons stand in for the dropdown: nothing else is shown.
 */
.mcwf-swatch-field > :not(select):not(.mcwf-swatches) {
	display: none !important;
}

.mcwf-single div.product form.cart table.variations td.value > select {
	width: auto !important;
	min-width: 200px;
	max-width: 100%;
	height: 42px !important;
	margin: 0;
	padding: 0 34px 0 14px !important;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font, inherit);
	font-size: 14px;
	background: var(--mcwf-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px !important;
	border: 2px solid var(--mcwf-border) !important;
	border-radius: var(--mcwf-input-radius) !important;
	-webkit-appearance: none;
	appearance: none;
}

.mcwf-single div.product form.cart .reset_variations,
.mcwf-single div.product form.cart .reset_variations:visited {
	display: inline-block;
	margin: 8px 0 0;
	color: var(--mcwf-text);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mcwf-single div.product form.cart .reset_variations:hover {
	color: var(--mcwf-title);
}

/* WooCommerce hides the link with inline visibility, which would still leave a gap. */
.mcwf-single div.product form.cart .reset_variations[style*="hidden"] {
	display: none !important;
}

.mcwf-single div.product form.cart .woocommerce-variation {
	margin: 0 0 14px;
}

.mcwf-single div.product form.cart .woocommerce-variation:empty {
	margin: 0;
}

.mcwf-single div.product form.cart .woocommerce-variation-description p {
	margin: 0 0 10px;
}

.mcwf-single div.product form.cart .woocommerce-variation-price .price {
	display: block;
	margin: 0 0 8px;
	font-size: 20px;
}

.mcwf-single div.product form.cart .woocommerce-variation-availability .stock {
	margin: 0;
}

/* Quantity */

.mcwf-single div.product form.cart div.quantity {
	display: inline-flex;
	align-items: stretch;
	float: none !important;
	height: 42px;
	margin: 0 !important;
}

.mcwf-single div.product form.cart div.quantity:has(input[type="hidden"]) {
	display: none;
}

.mcwf-single div.product form.cart div.quantity input.qty {
	width: 46px !important;
	min-width: 0;
	height: 100% !important;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font, inherit);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	background: var(--mcwf-surface) !important;
	border: 1px solid var(--mcwf-border) !important;
	border-radius: var(--mcwf-input-radius) !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
	appearance: textfield;
}

.mcwf-single div.product form.cart div.quantity input.qty::-webkit-outer-spin-button,
.mcwf-single div.product form.cart div.quantity input.qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

/* With plus / minus buttons the input sits between them. */
.mcwf-single div.product form.cart div.quantity .mcwf-qty__btn ~ input.qty,
.mcwf-single div.product form.cart div.quantity:has(.mcwf-qty__btn) input.qty {
	border-width: 1px 0 !important;
	border-radius: 0 !important;
}

/* Buttons */

.mcwf-single div.product form.cart button.single_add_to_cart_button.button,
.mcwf-single div.product form.cart button.single_add_to_cart_button.button:hover,
.mcwf-single div.product form.cart button.single_add_to_cart_button.button:focus,
.mcwf-single div.product form.cart button.mcwf-buy-now-single.mcwf-buy-now-single.button.alt,
.mcwf-single div.product form.cart button.mcwf-buy-now-single.mcwf-buy-now-single.button.alt:hover,
.mcwf-single div.product form.cart button.mcwf-buy-now-single.mcwf-buy-now-single.button.alt:focus {
	float: none;
	min-width: 140px;
	min-height: 42px;
	margin: 0;
	padding: 5px 24px;
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: var(--mcwf-btn-fs);
	font-weight: var(--mcwf-btn-fw);
	line-height: 18px;
	letter-spacing: 0.3px;
	text-transform: var(--mcwf-btn-tt);
	border: 0;
	border-radius: var(--mcwf-btn-radius);
	transition: box-shadow 0.2s, opacity 0.2s;
}

.mcwf-single div.product form.cart button.single_add_to_cart_button.button,
.mcwf-single div.product form.cart button.single_add_to_cart_button.button:hover,
.mcwf-single div.product form.cart button.single_add_to_cart_button.button:focus {
	color: var(--mcwf-primary-text);
	background-color: var(--mcwf-primary);
}

.mcwf-single div.product form.cart button.single_add_to_cart_button.button:hover,
.mcwf-single div.product form.cart button.mcwf-buy-now-single.mcwf-buy-now-single.button.alt:hover {
	box-shadow: inset 0 0 0 200px rgba(0, 0, 0, 0.1);
}

.mcwf-single div.product form.cart button.single_add_to_cart_button.button.disabled,
.mcwf-single div.product form.cart button.single_add_to_cart_button.button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.mcwf-single div.product .summary .mcwf-wishlist-btn--single {
	margin: 0 0 16px;
}

@media (max-width: 480px) {
	.mcwf-single div.product form.cart button.single_add_to_cart_button.button,
	.mcwf-single div.product form.cart button.mcwf-buy-now-single.mcwf-buy-now-single.button.alt {
		flex: 1 1 130px;
		min-width: 0;
		padding-inline: 12px;
	}
}

/* -------------------------------------------------------------------------
 * 5. Note, meta, share
 * ---------------------------------------------------------------------- */

.mcwf-single__note {
	margin: 0 0 18px;
	padding: 12px 14px;
	color: var(--mcwf-text);
	font-size: 13px;
	line-height: 1.6;
	background: var(--mcwf-light);
	border-radius: var(--mcwf-panel-radius);
}

.mcwf-single .mcwf-single__note p {
	margin: 0 0 6px;
}

.mcwf-single .mcwf-single__note p:last-child {
	margin: 0;
}

.mcwf-single div.product .summary .product_meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 16px;
	padding-top: 18px;
	font-size: 13px;
	border-top: 1px solid var(--mcwf-border);
}

.mcwf-single div.product .summary .product_meta > span {
	display: block;
	color: var(--mcwf-title);
	font-weight: 600;
}

.mcwf-single div.product .summary .product_meta .sku,
.mcwf-single div.product .summary .product_meta a,
.mcwf-single div.product .summary .product_meta a:visited {
	color: var(--mcwf-text);
	font-weight: 400;
	text-decoration: none;
}

.mcwf-single div.product .summary .product_meta a:hover {
	color: var(--mcwf-primary);
}

.mcwf-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: 13px;
}

.mcwf-share__label {
	color: var(--mcwf-title);
	font-weight: 600;
}

ul.mcwf-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-share__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-share .mcwf-share__list .mcwf-share__link,
.mcwf-share .mcwf-share__list .mcwf-share__link:visited {
	--_c: var(--mcwf-muted);
	--_r: 50%;

	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--mcwf-muted);
	border-radius: 50%;
	transition: color 0.2s, background-color 0.2s;
}

.mcwf-share .mcwf-share__list .mcwf-share__link:hover,
.mcwf-share .mcwf-share__list .mcwf-share__link:focus-visible {
	--_c: var(--mcwf-title);
	--_bg: var(--mcwf-light);

	color: var(--mcwf-title);
	background-color: var(--mcwf-light);
}

.mcwf-share__link .mcwf-icon {
	width: 17px;
	height: 17px;
}

/* -------------------------------------------------------------------------
 * 6. Tabs and accordion
 * ---------------------------------------------------------------------- */

.mcwf-single div.product .woocommerce-tabs {
	margin: 0 0 40px;
	padding: 0;
	border-top: 1px solid var(--mcwf-border);
	clear: both;
}

.mcwf-single div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 34px;
	margin: 0 0 30px;
	padding: 0;
	overflow: visible;
	list-style: none;
	border: 0;
}

.mcwf-single div.product .woocommerce-tabs ul.tabs::before,
.mcwf-single div.product .woocommerce-tabs ul.tabs::after,
.mcwf-single div.product .woocommerce-tabs ul.tabs li::before,
.mcwf-single div.product .woocommerce-tabs ul.tabs li::after {
	content: none;
	display: none;
	border: 0;
}

.mcwf-single div.product .woocommerce-tabs ul.tabs li,
.mcwf-single div.product .woocommerce-tabs ul.tabs li.active {
	position: relative;
	z-index: auto;
	margin: 0;
	padding: 0;
	list-style: none;
	background: none;
	border: 0;
	border-radius: 0;
}

.mcwf-single div.product .woocommerce-tabs ul.tabs li a,
.mcwf-single div.product .woocommerce-tabs ul.tabs li a:visited {
	position: relative;
	display: block;
	padding: 16px 0;
	color: var(--mcwf-muted);
	font-size: 16px;
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	letter-spacing: 0.3px;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s;
}

/* A line grows across the top of the active tab. */
.mcwf-single div.product .woocommerce-tabs ul.tabs li a::after {
	content: "";
	position: absolute;
	top: -1px;
	inset-inline-start: 0;
	width: 0;
	height: 2px;
	background: var(--mcwf-primary);
	transition: width 0.3s;
}

.mcwf-single div.product .woocommerce-tabs ul.tabs li a:hover,
.mcwf-single div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--mcwf-title);
}

.mcwf-single div.product .woocommerce-tabs ul.tabs li a:hover::after,
.mcwf-single div.product .woocommerce-tabs ul.tabs li.active a::after {
	width: 100%;
}

.mcwf-single div.product .woocommerce-tabs .panel,
.mcwf-accordion__panel {
	margin: 0;
	padding: 0;
	color: var(--mcwf-text);
	font-size: 14px;
	line-height: 1.7;
}

.mcwf-single div.product .woocommerce-tabs .panel > h2:first-child {
	margin: 0 0 16px;
	color: var(--mcwf-title);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}

/* Details table and reviews inside the panels */

.mcwf-single div.product table.shop_attributes {
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--mcwf-border);
}

.mcwf-single div.product table.shop_attributes th,
.mcwf-single div.product table.shop_attributes td {
	padding: 10px 14px;
	font-style: normal;
	text-align: start;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--mcwf-border);
}

.mcwf-single div.product table.shop_attributes th {
	width: 200px;
	color: var(--mcwf-title);
	font-weight: 600;
}

.mcwf-single div.product table.shop_attributes td p {
	margin: 0;
	padding: 0;
}

.mcwf-single div.product #reviews #comments > h2,
.mcwf-single div.product #reviews .comment-reply-title {
	margin: 0 0 16px;
	color: var(--mcwf-title);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.mcwf-accordion {
	margin: 0 0 40px;
	border-top: 1px solid var(--mcwf-border);
	clear: both;
}

.mcwf-accordion__item {
	border-bottom: 1px solid var(--mcwf-border);
}

.mcwf-accordion__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 0;
	color: var(--mcwf-title);
	font-size: 16px;
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	list-style: none;
	cursor: pointer;
	transition: color 0.2s;
}

.mcwf-accordion__title::-webkit-details-marker {
	display: none;
}

.mcwf-accordion__title:hover {
	color: var(--mcwf-primary);
}

.mcwf-accordion__title .mcwf-icon {
	transition: transform 0.25s;
}

.mcwf-accordion__item[open] > .mcwf-accordion__title .mcwf-icon {
	transform: rotate(180deg);
}

.mcwf-accordion .mcwf-accordion__panel {
	padding: 2px 0 26px;
}

/* The section title already names the description and details panels. */
.mcwf-accordion__item--description .mcwf-accordion__panel > h2:first-child,
.mcwf-accordion__item--additional_information .mcwf-accordion__panel > h2:first-child {
	display: none;
}

@media (max-width: 767px) {
	.mcwf-single div.product .woocommerce-tabs ul.tabs {
		gap: 0 22px;
		justify-content: flex-start;
	}

	.mcwf-single div.product .woocommerce-tabs ul.tabs li a {
		padding: 13px 0;
		font-size: 14px;
	}

	.mcwf-single div.product .summary .product_title {
		font-size: 24px;
	}
}

/* -------------------------------------------------------------------------
 * 7. Related products and upsells
 * ---------------------------------------------------------------------- */

.mcwf-single div.product > .related,
.mcwf-single div.product > .upsells {
	margin: 0 0 40px;
	padding-top: 36px;
	border-top: 1px solid var(--mcwf-border);
	clear: both;
}

.mcwf-single div.product > .related > h2,
.mcwf-single div.product > .upsells > h2 {
	margin: 0 0 24px;
	padding: 0;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: 22px;
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

/* -------------------------------------------------------------------------
 * 8. Sticky add to cart bar
 * ---------------------------------------------------------------------- */

.mcwf-sticky-cart {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9985;
	background: var(--mcwf-surface);
	box-shadow: 0 0 9px rgba(0, 0, 0, 0.14);
	visibility: hidden;
	transform: translateY(105%);
	transition: transform 0.3s ease, visibility 0s linear 0.3s;
}

.mcwf-sticky-cart.is-visible {
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.mcwf-sticky-cart__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	max-width: var(--mcwf-container, 1222px);
	margin: 0 auto;
	padding: 10px 15px;
}

.mcwf-sticky-cart__product {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.mcwf-sticky-cart .mcwf-sticky-cart__img {
	flex: none;
	width: 50px;
	height: auto;
	margin: 0;
	border-radius: calc(var(--mcwf-card-radius) / 2);
}

.mcwf-sticky-cart__text {
	min-width: 0;
}

.mcwf-sticky-cart__title {
	display: block;
	overflow: hidden;
	color: var(--mcwf-title);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mcwf-sticky-cart__price {
	display: block;
	color: var(--mcwf-price, var(--mcwf-primary));
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.mcwf-sticky-cart__price del {
	margin-inline-end: 4px;
	color: var(--mcwf-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.mcwf-sticky-cart__price ins {
	color: inherit;
	text-decoration: none;
	background: none;
}

.mcwf-sticky-cart .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.mcwf-sticky-cart__btn {
	flex: none;
}

/* Keep the floating cart button and toasts above the bar. */
html.mcwf-sticky-cart-visible .mcwf-floating-cart,
html.mcwf-sticky-cart-visible .mcwf-toasts {
	bottom: 90px;
}

@media (max-width: 767px) {
	.mcwf-sticky-cart__inner {
		padding: 8px 12px;
	}

	.mcwf-sticky-cart .mcwf-sticky-cart__img {
		width: 42px;
	}

	.mcwf-sticky-cart__btn {
		--_p: 5px 14px;
	}

	html.mcwf-sticky-cart-visible .mcwf-floating-cart {
		bottom: 76px;
	}

	html.mcwf-sticky-cart-visible .mcwf-toasts {
		bottom: auto;
	}
}

/* -------------------------------------------------------------------------
 * 9. Embedded product (widget or shortcode on any page)
 *
 * On a product page the layout can follow the screen width. Embedded, the
 * product may sit in a narrow column on a wide screen, so the wrapper is a
 * size container and the rules below follow the width of that column. Being
 * a container also keeps everything inside the wrapper: nothing can spill
 * over a neighbouring column or the next section.
 * ---------------------------------------------------------------------- */

.mcwf-single--embedded {
	container: mcwf-single / inline-size;

	/* A size container has no width of its own; this keeps it usable where the parent gives it none. */
	min-inline-size: min(100%, 280px);
}

/* Narrow column: image on top, details below, thumbnails in a strip under the image. */
@container mcwf-single (max-width: 639px) {
	.mcwf-single__top {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 24px;
		margin-bottom: 30px;
	}

	.mcwf-single div.product .mcwf-single__top > .summary {
		position: static;
		grid-column: 1;
	}

	.mcwf-single--thumbs-left div.product .woocommerce-product-gallery:has(.flex-control-thumbs) {
		--mcwf-gallery-offset: 0px;
	}

	.mcwf-single--thumbs-left .mcwf-single__top:has(.flex-control-thumbs) > .mcwf-single__badges {
		inset-inline-start: 15px;
	}

	.mcwf-single--thumbs-left div.product div.images .flex-control-thumbs {
		position: static;
		flex-direction: row;
		width: auto;
		margin: 10px 0 0;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.mcwf-single--thumbs-left div.product div.images .flex-control-thumbs li {
		flex: 0 0 calc((100% - 30px) / 4);
		width: auto;
	}

	.mcwf-single div.product .summary .product_title {
		font-size: 24px;
	}

	.mcwf-single div.product .woocommerce-tabs ul.tabs {
		gap: 0 22px;
		justify-content: flex-start;
	}

	.mcwf-single div.product .woocommerce-tabs ul.tabs li a {
		padding: 13px 0;
		font-size: 14px;
	}
}

/* Very narrow column: the buttons share the row, or take a row each. */
@container mcwf-single (max-width: 400px) {
	.mcwf-single div.product .summary .product_title {
		font-size: 21px;
	}

	.mcwf-single div.product form.cart button.single_add_to_cart_button.button,
	.mcwf-single div.product form.cart button.mcwf-buy-now-single.mcwf-buy-now-single.button.alt {
		flex: 1 1 120px;
		min-width: 0;
		padding-inline: 12px;
	}

	.mcwf-single div.product .mcwf-single__badges {
		top: 10px;
		inset-inline-start: 10px;
	}
}
