/* Shared Martfury product cards. List view and carousel sizing remain theme-owned.
 * Existing links, labels, prices and stock markup are reused.
 */
body.theme-martfury {
	--wcqp-card-border: #e2e1dd;
	--wcqp-card-navy: #102845;
	--wcqp-card-red: #d9002b;
}
body.theme-martfury:not(.shop-view-list) ul.products:not(.slick-slider):has(> li.product .wcqp-quantity) {
	--wcqp-card-border: #e2e1dd;
	--wcqp-card-navy: #102845;
	--wcqp-card-red: #d9002b;
	display: grid;
	/* Size against the available catalog width, including the store's sidebar. */
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(265px, calc((100% - 66px) / 4))), 1fr));
	gap: 24px 22px;
	margin: 0;
	padding: 0;
	width: 100%;
}
body.theme-martfury:not(.shop-view-list) ul.products:not(.slick-slider):has(> li.product .wcqp-quantity)::before,
body.theme-martfury:not(.shop-view-list) ul.products:not(.slick-slider):has(> li.product .wcqp-quantity)::after {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products:not(.slick-slider) > li.product:has(.wcqp-quantity) {
	display: flex;
	float: none;
	clear: none;
	width: auto !important;
	min-width: 0;
	max-width: none;
	margin: 0;
	padding: 0;
	font-family: Arial, Helvetica, sans-serif;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .product-inner {
	display: flex;
	flex-direction: column;
	position: relative;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	container: wcqp-card / inline-size;
	border: 1px solid var(--wcqp-card-border);
	border-radius: 0;
	background: #fff;
	box-shadow: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .product-inner:hover {
	border-color: #c4c0b8;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail {
	position: relative;
	float: none;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	background: #f5f5f2;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail > a {
	display: block;
	aspect-ratio: 1.48;
	overflow: hidden;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail > a > img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center;
}
/* Use the existing savings badge near the price; retain the sale ribbon on range prices. */
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.mf-price-discount-info):has(.wcqp-quantity) .mf-product-thumbnail .onsale {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail .ribbons {
	top: 12px;
	left: 12px;
	right: auto;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail .onsale {
	top: 0;
	left: 0;
	right: auto;
	min-width: 0;
	height: auto;
	padding: 5px 9px;
	border-radius: 0;
	background: var(--wcqp-card-red);
	color: #fff;
	font: 700 12px/1.25 Arial, Helvetica, sans-serif;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .onsale .onsep {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .onsale::after {
	content: " OFF";
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-details {
	width: 100%;
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 12px 17px 11px;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-content {
	display: block;
	order: 0;
	min-height: 72px;
	padding: 0 0 10px;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .woo-loop-product__title {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	color: #071727;
	font: 700 22px/1.18 Arial, Helvetica, sans-serif;
	letter-spacing: -0.5px;
	overflow-wrap: anywhere;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .woo-loop-product__title a {
	color: inherit;
	font: inherit;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .woo-loop-product__title a:hover {
	color: var(--wcqp-card-navy);
	text-decoration: underline;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-rating {
	margin: 3px 0 0;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(78px, auto) minmax(62px, auto) auto;
	order: 2;
	float: none;
	min-width: 0;
	width: 100%;
	margin-top: auto;
	padding: 0;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .price {
	display: block;
	grid-row: 1;
	margin: 0;
	padding: 0;
	color: var(--wcqp-card-red);
	font: 700 28px/1.1 Arial, Helvetica, sans-serif;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .price::before {
	content: "Buy Now Price";
	display: block;
	margin-bottom: 3px;
	color: #071727;
	font: 400 12px/1.3 Arial, Helvetica, sans-serif;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:is(.ppl-reserve-now, .ppl-pre-order-now):has(.wcqp-quantity) .mf-product-price-box > .price::before,
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-label) .mf-product-price-box > .price::before {
	content: "Group Buy Price";
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .price bdi {
	white-space: nowrap;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-sale-price-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	position: relative;
	min-height: 51px;
	padding-inline-end: 96px;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) :is(.mf-sale-price, .price ins) {
	color: var(--wcqp-card-red);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) :is(.mf-regular-price, .price del) {
	margin: 0;
	color: #858585;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	opacity: 1;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-price-discount-info {
	display: flex;
	flex-wrap: wrap;
	align-content: center;
	justify-content: center;
	gap: 0 2px;
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	width: 88px;
	min-height: 43px;
	margin: 0;
	padding: 5px 3px;
	border-radius: 4px;
	background: var(--wcqp-card-red);
	color: #fff;
	font: 700 10px/1.25 Arial, Helvetica, sans-serif;
	text-align: center;
	text-transform: uppercase;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-price-discount-info .mf-price-discount-percent {
	order: -1;
	width: 100%;
	color: #fff;
	font: 700 18px/1.1 Arial, Helvetica, sans-serif;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-price-discount-info .amount {
	color: inherit;
	font: inherit;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .wcqp-quantity {
	grid-row: 2;
	align-self: start;
	margin: 0;
	padding: 0 0 10px;
	font: 400 12px/1.35 Arial, Helvetica, sans-serif;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .wcqp-label {
	margin-bottom: 3px;
	font-weight: 600;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .wcqp-remaining {
	font-size: 11px;
}
/* Reveal the existing catalog CTA below stock, retaining AJAX classes and product URLs. */
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .footer-button {
	/* Martfury's homepage product-list widget hides this with !important. */
	display: block !important;
	grid-row: 3;
	position: static;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	opacity: 1;
	visibility: visible;
	transform: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .footer-button > a.button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
	width: 100%;
	height: auto;
	min-height: 36px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid var(--wcqp-card-navy);
	border-radius: 4px;
	background: var(--wcqp-card-navy);
	color: #fff;
	font: 700 14px/1.2 Arial, Helvetica, sans-serif;
	text-align: center;
	text-decoration: none;
	white-space: normal;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .footer-button > a.button:hover {
	border-color: #1d4066;
	background: #1d4066;
	color: #fff;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) a:focus-visible {
	outline: 2px solid #a77e35;
	outline-offset: 3px;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box .button .p-icon {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box .button .add-to-cart-text {
	display: inline;
	padding: 0;
	color: inherit;
	font: inherit;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box .button .add-to-cart-text::after {
	content: "\00a0 \2192";
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box .action-button:empty {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box .added_to_cart {
	display: block;
	margin-top: 7px;
	color: var(--wcqp-card-navy);
	font-size: 12px;
	text-align: center;
	text-decoration: underline;
}
/* Retain thumbnail Quick View/wishlist controls, hiding only the duplicate purchase link. */
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity):has(.mf-product-price-box > .footer-button > .button) .mf-product-thumbnail .footer-button > .button {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail .footer-button {
	display: flex !important;
	justify-content: flex-end;
	gap: 4px;
	top: 9px;
	right: 9px;
	bottom: auto;
	left: auto;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	opacity: 1;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-thumbnail .footer-button > a:not(.button) {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--wcqp-card-navy);
	box-shadow: 0 1px 5px #00000015;
}
/* Keep variation swatches, but remove the hover layer's repeated title/price/stock. */
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-details-hover {
	display: contents;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-details-hover > :is(.woo-loop-product__title, .price, .wcqp-quantity, .button, .meta-brand) {
	display: none;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-attr-swatches {
	order: 1;
	margin: 0 0 10px;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-attr-swatches .swatch-image {
	padding: 0 5px 0 0;
}
body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-attr-swatches img {
	width: 28px;
	height: 28px;
	object-fit: cover;
}
@media (max-width: 1199px) {
	body.theme-martfury:not(.shop-view-list) ul.products:not(.slick-slider):has(> li.product .wcqp-quantity) {
		gap: 20px 16px;
	}
}
@media (max-width: 540px) {
	body.theme-martfury:not(.shop-view-list) ul.products:not(.slick-slider):has(> li.product .wcqp-quantity) {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

/* Slick owns slide widths and transforms. Stretch cards without changing either. */
body.theme-martfury:not(.shop-view-list) ul.products.slick-slider:has(.wcqp-quantity) .slick-track {
	display: flex;
}
body.theme-martfury:not(.shop-view-list) ul.products.slick-slider li.product:has(.wcqp-quantity) {
	display: flex;
	flex-shrink: 0;
	height: auto;
	min-height: 0;
	min-width: 0;
	margin: 0;
	padding: 0 10px;
	font-family: Arial, Helvetica, sans-serif;
}
/* Container sizing also covers narrow carousel slides and nested homepage grids. */
@container wcqp-card (max-width: 264px) {
	body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-details {
		padding: 12px;
	}
	body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .woo-loop-product__title {
		font-size: 18px;
		letter-spacing: -0.2px;
	}
	body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) :is(.price, .mf-sale-price, .price ins) {
		font-size: 24px;
	}
	body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-sale-price-wrap {
		padding-inline-end: 0;
		gap: 4px 8px;
	}
	body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-price-discount-info {
		position: static;
		margin: 4px 0 8px;
	}
	body.theme-martfury:not(.shop-view-list) ul.products li.product:has(.wcqp-quantity) .mf-product-price-box > .price {
		padding-bottom: 8px;
	}
}

/* Compact product widgets and the site's Expiring Deals widget. These contain
 * product links rather than purchase controls; keep their original actions/data.
 * Explicit widget types exclude mini-carts, cart rows and review lists. */
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget,
body.theme-martfury .wcep-widget ul.wcep-items {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget::before,
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget::after {
	display: none;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget > li,
body.theme-martfury .wcep-widget ul.wcep-items > li {
	display: block;
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0 0 14px;
	border: 1px solid var(--wcqp-card-border);
	background: #fff;
	color: #071727;
	font: 400 12px/1.4 Arial, Helvetica, sans-serif;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget > li > a,
body.theme-martfury .wcep-widget .wcep-image {
	display: block;
	float: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget > li > a > img,
body.theme-martfury .wcep-widget .wcep-image img {
	display: block;
	float: none;
	width: 100%;
	height: auto;
	max-width: 100%;
	aspect-ratio: 1.48;
	margin: 0 0 12px;
	object-fit: cover;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget .product-title,
body.theme-martfury .wcep-widget .wcep-name {
	display: block;
	margin: 0 14px 10px;
	color: #071727;
	font: 700 18px/1.2 Arial, Helvetica, sans-serif;
	letter-spacing: -0.2px;
	overflow-wrap: anywhere;
}
body.theme-martfury .wcep-widget .wcep-details {
	min-width: 0;
	padding: 0;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget > li > :is(.price, .star-rating, .wcqp-quantity),
body.theme-martfury .wcep-widget :is(.wcep-price, .wcep-remaining, .wcep-date) {
	display: block;
	float: none;
	margin: 6px 14px 0;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products) ul.product_list_widget .price,
body.theme-martfury .wcep-widget .wcep-price {
	color: var(--wcqp-card-red);
	font: 700 24px/1.2 Arial, Helvetica, sans-serif;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) :is(.price, .wcep-price) .amount {
	color: inherit;
	font: inherit;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) .mf-sale-price-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) :is(.mf-sale-price, ins) {
	color: var(--wcqp-card-red);
	font-size: 24px;
	font-weight: 700;
	text-decoration: none;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) :is(.mf-regular-price, del) {
	color: #858585;
	font-size: 12px;
	font-weight: 400;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) .mf-price-discount-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0 3px;
	position: static;
	width: 100%;
	margin: 4px 0 0;
	padding: 6px;
	border-radius: 4px;
	background: var(--wcqp-card-red);
	color: #fff;
	font: 700 11px/1.3 Arial, Helvetica, sans-serif;
	text-align: center;
	text-transform: uppercase;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) .mf-price-discount-percent {
	display: block;
	order: -1;
	width: 100%;
	color: inherit;
	font-size: 16px;
}
body.theme-martfury .wcep-widget :is(.wcep-remaining, .wcep-date) {
	color: var(--wcqp-card-navy);
	font-size: 12px;
}
body.theme-martfury :is(.widget_products, .widget_recently_viewed_products, .widget_top_rated_products, .wcep-widget) a:focus-visible {
	outline: 2px solid #a77e35;
	outline-offset: 2px;
}
