/* ==========================================================================
   Masterfit theme — implements the "Masterfit Medical Design System".
   Tokens → base → layout → header → homepage → shop → filters → card → Woo → footer
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
	/* Brand core — masterfit.net palette (see assets/branding/BRANDING.md).
	   "blue" = the brand navy used for actions/links; "navy" = the deep navy for chrome. */
	--mf-navy-900: #0f1d45;
	--mf-navy: #162c63;
	--mf-navy-500: #213e92;
	--mf-blue: #213e92;
	--mf-blue-600: #182958;
	--mf-blue-400: #3d5bb0;
	--mf-blue-rgb: 33, 62, 146;
	--mf-navy-rgb: 22, 44, 99;
	--mf-accent: #6ebd43;          /* logo green: decorative accents, badges on navy text */
	--mf-accent-600: #5aa732;
	--mf-accent-strong: #3d7f1f;   /* green that passes contrast as text on white */
	--mf-accent-tint: #eef7e8;
	--mf-accent-light: #b9e39d;    /* green on the navy footer / top bar */

	/* States */
	--mf-success: #3d7f1f;
	--mf-danger: #c0392b;
	--mf-danger-bg: #fdecec;
	--mf-warn: #b0691c;
	--mf-warn-bg: #fdf3e3;
	--mf-star: #f0b400;

	/* Surfaces + neutrals */
	--mf-white: #ffffff;
	--mf-tint: #f1f3f8;
	--mf-wash: #ebeef4;
	--mf-page: #ebeef4;
	--mf-subtle: #f6f7fa;
	--mf-blue-tint: #e9edf7;
	--mf-blue-line: #c8d2ea;
	--mf-border: #e3e6ec;
	--mf-border-soft: #edeff3;
	--mf-input: #d3d8e0;
	--mf-switch-off: #d9dde5;
	--mf-muted: #767d89;   /* 4.6:1 on white (WCAG AA for text) */
	--mf-faint: #c9ced7;   /* decorative only, never for text */
	--mf-text-2: #6b717c;
	--mf-text: #555b66;

	/* Type */
	--mf-font-display: "Poppins", system-ui, sans-serif;
	--mf-font-body: "Mulish", system-ui, sans-serif;

	/* Radius */
	--mf-r-sm: 6px;
	--mf-r-input: 8px;
	--mf-r-md: 10px;
	--mf-r-card: 12px;
	--mf-r-lg: 16px;
	--mf-r-pill: 999px;

	/* Elevation */
	--mf-shadow-sm: 0 1px 2px rgba(var(--mf-navy-rgb), 0.06), 0 0 0 1px rgba(var(--mf-navy-rgb), 0.05);
	--mf-shadow-md: 0 4px 12px rgba(var(--mf-navy-rgb), 0.08);
	--mf-shadow-lg: 0 12px 32px rgba(var(--mf-navy-rgb), 0.14);
	--mf-shadow-hover: 0 16px 36px rgba(var(--mf-navy-rgb), 0.16);

	/* Layout */
	--mf-container: 1240px;
	--mf-gutter: 32px;
	--mf-ease: 0.18s ease;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: var(--mf-white);
	color: var(--mf-text);
	font-family: var(--mf-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--mf-navy-500); color: #fff; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--mf-font-display);
	color: var(--mf-navy);
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
}
h1 { font-size: 40px; font-weight: 700; line-height: 1.1; }
h2 { font-size: 30px; font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.3; }

a { color: var(--mf-blue); text-decoration: none; transition: color var(--mf-ease); }
a:hover { color: var(--mf-blue-600); }

img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--mf-blue); outline-offset: 2px; }

button { font: inherit; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 1000;
	top: 8px;
	left: 8px;
	padding: 10px 16px;
	background: var(--mf-white);
	color: var(--mf-navy);
	border-radius: var(--mf-r-input);
	box-shadow: var(--mf-shadow-lg);
}

.mf-icon { display: block; flex-shrink: 0; }

/* ---------- 3. Layout ---------- */
.mf-container {
	width: 100%;
	max-width: var(--mf-container);
	margin: 0 auto;
	padding: 0 var(--mf-gutter);
}
.mf-main { display: block; }
.mf-content { padding-top: 48px; padding-bottom: 72px; }

.mf-eyebrow {
	font-family: var(--mf-font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mf-blue);
	margin: 0 0 14px;
}
.mf-eyebrow--lined { display: inline-flex; align-items: center; gap: 12px; }
.mf-eyebrow--lined::before,
.mf-eyebrow--lined::after { content: ""; width: 24px; height: 2px; background: var(--mf-accent); }

.mf-section-head { text-align: center; margin-bottom: 48px; }
.mf-section-head__title { font-size: 38px; font-weight: 700; margin: 0; }

.mf-page-head { margin-bottom: 32px; }
.mf-page-head__title { font-size: 34px; font-weight: 700; }

.mf-prose { max-width: 760px; }
.mf-prose > :first-child { margin-top: 0; }
.woocommerce-cart .mf-prose,
.woocommerce-checkout .mf-prose,
.woocommerce-account .mf-prose { max-width: none; }
.mf-entry--summary { padding: 24px 0; border-bottom: 1px solid var(--mf-border); }
.mf-entry__title { font-size: 22px; }

/* ---------- 4. Buttons ---------- */
.mf-btn,
.woocommerce a.button.mf-btn,
.woocommerce button.button.mf-btn,
.woocommerce a.masterfit-cfp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--mf-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	text-align: center;
	color: #fff;
	background: var(--mf-blue);
	border: 1.5px solid var(--mf-blue);
	border-radius: var(--mf-r-pill);
	padding: 13px 30px;
	cursor: pointer;
	transition: background var(--mf-ease), border-color var(--mf-ease), color var(--mf-ease), box-shadow var(--mf-ease);
	text-decoration: none;
}
.mf-btn:hover,
.woocommerce a.button.mf-btn:hover,
.woocommerce button.button.mf-btn:hover {
	background: var(--mf-blue-600);
	border-color: var(--mf-blue-600);
	color: #fff;
	box-shadow: 0 6px 16px rgba(var(--mf-blue-rgb), 0.4);
}
.mf-btn--block,
.woocommerce a.button.mf-btn--block,
.woocommerce a.masterfit-cfp-button { width: 100%; }
.mf-btn--sm { padding: 9px 18px; font-size: 12px; }
.mf-btn--sq { border-radius: var(--mf-r-input); padding: 9px 16px; font-size: 12px; letter-spacing: 0.05em; }

.mf-btn--outline,
.woocommerce a.button.mf-btn--outline,
.woocommerce a.masterfit-cfp-button {
	background: transparent;
	color: var(--mf-blue);
	border-color: var(--mf-blue);
}
.mf-btn--outline:hover,
.woocommerce a.button.mf-btn--outline:hover,
.woocommerce a.masterfit-cfp-button:hover {
	background: var(--mf-blue);
	color: #fff;
	box-shadow: none;
}
.mf-btn--dark { background: var(--mf-navy); border-color: var(--mf-navy); }
.mf-btn--dark:hover { background: var(--mf-navy-500); border-color: var(--mf-navy-500); box-shadow: none; }
.mf-btn--accent { background: var(--mf-accent); border-color: var(--mf-accent); color: var(--mf-navy); }
.mf-btn--accent:hover { background: var(--mf-accent-600); border-color: var(--mf-accent-600); color: var(--mf-navy); box-shadow: 0 4px 12px rgba(110, 189, 67, 0.35); }

.mf-textlink {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 15px;
}
.mf-linkbtn {
	background: none;
	border: 0;
	padding: 0;
	color: var(--mf-blue);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.mf-linkbtn:hover { color: var(--mf-blue-600); }

.mf-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mf-navy);
	cursor: pointer;
}
.mf-iconbtn--ring { border: 1px solid var(--mf-input); color: var(--mf-blue); transition: border-color var(--mf-ease), background var(--mf-ease); }
.mf-iconbtn--ring:hover { border-color: var(--mf-blue); background: var(--mf-blue-tint); }

/* ---------- 5. Utility bar + header ---------- */
.mf-utility { background: var(--mf-navy); color: #fff; font-size: 13px; }
.mf-utility__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 11px;
	padding-bottom: 11px;
}
.mf-utility__msg {
	margin: 0;
	font-family: var(--mf-font-display);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.mf-utility__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.mf-utility__links a { color: #fff; }
.mf-utility__links a:hover { color: var(--mf-accent-light); }

.mf-header {
	position: relative;
	z-index: 50;
	background: var(--mf-white);
	border-bottom: 1px solid var(--mf-border-soft);
}
.mf-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	padding-top: 20px;
	padding-bottom: 20px;
}
.mf-header__menu { display: none; }
.mf-header__logo { flex-shrink: 0; }
.mf-header__logo .custom-logo { display: block; max-height: 56px; width: auto; }

.mf-logo {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	font-family: var(--mf-font-display);
	line-height: 1;
	color: var(--mf-blue);
}
.mf-logo:hover { color: var(--mf-blue); }
.mf-logo__word {
	font-weight: 700;
	font-size: 30px;
	letter-spacing: -0.02em;
	padding-bottom: 4px;
	border-bottom: 3px solid var(--mf-accent);
}
.mf-logo__sub {
	margin-top: 5px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}
.mf-logo--light,
.mf-logo--light:hover { color: #fff; }

.mf-nav { display: flex; align-items: center; gap: 28px; }
.mf-nav__menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.mf-nav__link,
.mf-nav__menu a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 0;
	background: none;
	border: 0;
	font-family: var(--mf-font-display);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--mf-navy);
	cursor: pointer;
}
.mf-nav__menu a:hover,
.mf-nav__menu .current-menu-item > a { color: var(--mf-blue); }
.mf-nav__link--accent { position: relative; color: var(--mf-blue); }
.mf-nav__link--accent::after { content: ""; position: absolute; left: 0; right: 20px; bottom: 2px; height: 2px; border-radius: 1px; background: var(--mf-accent); }
.mf-nav__link--accent .mf-icon { color: var(--mf-accent-strong); }
.mf-nav__link .mf-icon { transition: transform var(--mf-ease); }
.mf-nav__mega.is-open .mf-nav__link .mf-icon { transform: rotate(180deg); }

.mf-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--mf-white);
	border-top: 1px solid var(--mf-border-soft);
	box-shadow: var(--mf-shadow-lg);
	padding: 28px 0 32px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity var(--mf-ease), transform var(--mf-ease), visibility 0s linear 0.18s;
}
.mf-nav__mega.is-open .mf-mega {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity var(--mf-ease), transform var(--mf-ease), visibility 0s;
}
@media (hover: hover) and (min-width: 961px) {
	.mf-nav__mega:hover .mf-mega,
	.mf-nav__mega:focus-within .mf-mega {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity var(--mf-ease), transform var(--mf-ease), visibility 0s;
	}
}
.mf-mega__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2px 32px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}
.mf-mega__grid a {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px;
	margin: 0 -10px;
	border-radius: var(--mf-r-sm);
	color: var(--mf-navy);
	font-weight: 600;
	font-size: 14px;
}
.mf-mega__grid a:hover { background: var(--mf-tint); color: var(--mf-blue-600); }
.mf-mega__count { color: var(--mf-muted); font-weight: 400; font-size: 12px; }

.mf-search {
	flex: 1;
	display: flex;
	align-items: center;
	max-width: 560px;
	margin-left: auto;
	padding: 3px 3px 3px 20px;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-pill);
	background: var(--mf-white);
	transition: border-color var(--mf-ease), box-shadow var(--mf-ease);
}
.mf-search:focus-within { border-color: var(--mf-blue); box-shadow: 0 0 0 3px rgba(var(--mf-blue-rgb), 0.15); }
.mf-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: var(--mf-font-body);
	font-size: 14px;
	color: var(--mf-text);
}
.mf-search input::-webkit-search-cancel-button { display: none; }
.mf-search__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: var(--mf-blue);
	color: #fff;
	cursor: pointer;
	transition: background var(--mf-ease);
}
.mf-search__btn:hover { background: var(--mf-blue-600); }

/* Live suggestions under the search box (built by theme.js). */
.mf-search { position: relative; }
.mf-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 60;
	max-height: min(70vh, 460px);
	overflow-y: auto;
	padding: 6px;
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-r-card);
	background: var(--mf-white);
	box-shadow: var(--mf-shadow-lg);
	text-align: left;
}
.mf-suggest[hidden] { display: none; }
@media (min-width: 961px) {
	/* The search box is narrow next to the menu; let the list grow to the left of it. */
	.mf-suggest { left: auto; width: max(100%, 420px); }
}
.mf-suggest__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: var(--mf-r-sm);
	color: var(--mf-navy);
}
.mf-suggest__item:hover,
.mf-suggest__item.is-active,
.mf-suggest__all:hover,
.mf-suggest__all.is-active { background: var(--mf-tint); }
.mf-suggest__img {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: var(--mf-r-sm);
	background: var(--mf-white);
	object-fit: contain;
}
.mf-suggest__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-suggest__title {
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mf-suggest__meta { font-size: 12px; color: var(--mf-muted); }
.mf-suggest__stock { margin-left: 8px; color: var(--mf-warn); font-weight: 600; white-space: nowrap; }
.mf-suggest__all {
	display: block;
	margin-top: 4px;
	padding: 10px 8px;
	border-top: 1px solid var(--mf-border-soft);
	border-radius: 0 0 var(--mf-r-sm) var(--mf-r-sm);
	color: var(--mf-blue);
	font-size: 13px;
	font-weight: 600;
}
.mf-suggest__note { padding: 8px; font-size: 13px; color: var(--mf-text-2); }

.mf-header__actions { display: flex; align-items: center; gap: 14px; }
.mf-header__actions .mf-btn { white-space: nowrap; }
.mf-nav__request,
.mf-nav .mf-nav__menu--more { display: none; } /* phone menu drawer only */
.mf-cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: var(--mf-r-pill);
	background: var(--mf-accent);
	color: var(--mf-navy);
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.mf-cart-count.is-empty { display: none; }

/* ---------- 6. Homepage: category grid ---------- */
.mf-catgrid { background: var(--mf-tint); padding: 72px 0 84px; }
.mf-catgrid__grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.mf-catgrid__grid > li { display: flex; }
.mf-cattile {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 18px 18px 22px;
	background: var(--mf-white);
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-r-card);
	transition: box-shadow var(--mf-ease), border-color var(--mf-ease), transform var(--mf-ease);
}
.mf-cattile:hover {
	box-shadow: 0 12px 28px rgba(var(--mf-navy-rgb), 0.12);
	border-color: var(--mf-blue-line);
	transform: translateY(-3px);
}
.mf-cattile__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 132px;
	margin-bottom: 16px;
}
.mf-cattile__media img { max-height: 100%; width: auto; object-fit: contain; }
.mf-cattile__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: var(--mf-r-input);
	background: var(--mf-wash);
	color: #a9b6c8;
}
.mf-cattile__name {
	font-family: var(--mf-font-display);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.35;
	color: var(--mf-navy);
}
.mf-cattile--cta {
	justify-content: center;
	gap: 16px;
	padding: 18px;
	border: 0;
	background: linear-gradient(160deg, #2c4fae 0%, var(--mf-blue-600) 100%);
	box-shadow: 0 10px 26px rgba(var(--mf-blue-rgb), 0.32);
}
.mf-cattile--cta:hover { box-shadow: 0 16px 34px rgba(var(--mf-blue-rgb), 0.42); }
.mf-cattile--cta .mf-cattile__name { color: #fff; font-size: 16px; line-height: 1.3; }
.mf-cattile__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	color: #fff;
}

/* ---------- 7. Shop archive ---------- */
.mf-shop { background: var(--mf-page); padding: 28px 0 80px; }

.mf-breadcrumb { font-size: 13px; color: var(--mf-muted); margin-bottom: 8px; }
.mf-breadcrumb a { color: var(--mf-blue); }
.mf-breadcrumb__sep { color: var(--mf-faint); margin: 0 2px; }
.mf-woo-main { padding: 28px 0 72px; }

.mf-shop__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 28px;
}
.mf-shop__title { font-size: 30px; font-weight: 700; margin: 0 0 4px; }
.mf-shop__count { margin: 0; font-size: 14px; color: var(--mf-text-2); }
.mf-shop__count strong { color: var(--mf-navy); }
.mf-shop__tools { display: flex; align-items: center; gap: 12px; }
.mf-shop__filter-btn { display: none; background: var(--mf-white); }
.mf-shop__filter-count {
	min-width: 20px;
	height: 20px;
	border-radius: var(--mf-r-pill);
	background: var(--mf-accent);
	color: var(--mf-navy);
	font-size: 12px;
	line-height: 20px;
	letter-spacing: 0;
}
.term-description,
.woocommerce-products-header__description { max-width: 760px; margin: -12px 0 24px; color: var(--mf-text-2); }

.mf-sort { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mf-text-2); }
.mf-sort .woocommerce-ordering { margin: 0; float: none; }
.mf-sort select.orderby {
	appearance: none;
	-webkit-appearance: none;
	min-width: 190px;
	padding: 9px 38px 9px 14px;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-input);
	background: var(--mf-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
	font-family: var(--mf-font-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--mf-navy);
	cursor: pointer;
}
.mf-sort select.orderby:focus { outline: 0; border-color: var(--mf-blue); box-shadow: 0 0 0 3px rgba(var(--mf-blue-rgb), 0.15); }

.mf-shop__layout {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.mf-shop__didyoumean {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--mf-blue-600);
}

.mf-resultbar {
	margin-bottom: 20px;
	padding: 12px 18px;
	border-radius: var(--mf-r-md);
	background: #e1e6f2;
	color: var(--mf-blue-600);
	font-size: 13px;
	font-weight: 600;
}

.mf-empty {
	text-align: center;
	padding: 64px 24px;
	background: var(--mf-white);
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-r-card);
	color: var(--mf-text-2);
}
.mf-empty .mf-icon { margin: 0 auto 12px; color: var(--mf-muted); }
.mf-empty h1,
.mf-empty h2 { font-size: 24px; }

/* Pagination */
.woocommerce nav.woocommerce-pagination { margin-top: 36px; text-align: center; }
.woocommerce nav.woocommerce-pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	max-width: 100%;
	gap: 6px;
	border: 0;
	margin: 0;
}
.woocommerce nav.woocommerce-pagination ul li { border: 0; float: none; overflow: visible; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-r-input);
	background: var(--mf-white);
	color: var(--mf-navy);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
}
.woocommerce nav.woocommerce-pagination ul li a:hover { border-color: var(--mf-blue); background: var(--mf-white); color: var(--mf-blue); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--mf-blue); border-color: var(--mf-blue); color: #fff; }

/* ---------- 8. Filter sidebar ---------- */
.mf-filters {
	background: var(--mf-white);
	border: 1px solid var(--mf-border);
	border-radius: 14px;
	overflow: hidden;
}
.mf-filters__form { margin: 0; }
.mf-filters__top { padding: 20px 22px 18px; background: var(--mf-tint); border-bottom: 1px solid var(--mf-border); }
.mf-filters__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mf-filters__title {
	font-family: var(--mf-font-display);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mf-navy);
}
.mf-filters__clear { margin-left: auto; font-size: 12px; font-weight: 600; }
.mf-filters__close { display: none; background: none; border: 0; padding: 4px; color: var(--mf-navy); cursor: pointer; }
.mf-filters__hint { margin: 6px 0 0; font-size: 13px; color: var(--mf-text-2); }
.mf-filters__apply { padding: 18px 22px 22px; }
.mf-filters.has-js .mf-filters__apply { display: none; }

.mf-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.mf-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 10px;
	border: 1px solid var(--mf-blue-line);
	border-radius: var(--mf-r-pill);
	background: var(--mf-white);
	color: var(--mf-blue-600);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}
.mf-chip:hover { border-color: var(--mf-blue); color: var(--mf-blue-600); }
.mf-chip__x { color: var(--mf-muted); font-size: 12px; }
.mf-chip:hover .mf-chip__x { color: var(--mf-danger); }

.mf-facet { padding: 20px 22px; border-bottom: 1px solid var(--mf-border-soft); }
.mf-facet:last-of-type { border-bottom: 0; }
.mf-facet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	cursor: pointer;
	text-align: left;
}
.mf-facet__title {
	font-family: var(--mf-font-display);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mf-navy);
}
.mf-facet__sign { position: relative; width: 12px; height: 12px; }
.mf-facet__sign::before,
.mf-facet__sign::after {
	content: "";
	position: absolute;
	left: 0;
	top: 5px;
	width: 12px;
	height: 2px;
	border-radius: 1px;
	background: var(--mf-muted);
	transition: transform var(--mf-ease);
}
.mf-facet__sign::after { transform: rotate(90deg) scaleX(0); }
.mf-facet.is-collapsed .mf-facet__sign::after { transform: rotate(90deg); }
.mf-facet__body { padding-top: 16px; }
.mf-facet.is-collapsed .mf-facet__body { display: none; }

.mf-input {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-input);
	background: var(--mf-white);
	color: var(--mf-muted);
	font-size: 13px;
	transition: border-color var(--mf-ease), box-shadow var(--mf-ease);
}
.mf-input:focus-within { border-color: var(--mf-blue); box-shadow: 0 0 0 3px rgba(var(--mf-blue-rgb), 0.15); }
.mf-input input {
	flex: 1;
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: var(--mf-font-body);
	font-size: 13px;
	color: var(--mf-text);
}
.mf-input--search { margin-bottom: 14px; }
.mf-input--money input { color: var(--mf-navy); font-weight: 600; -moz-appearance: textfield; }
.mf-input--money input::-webkit-outer-spin-button,
.mf-input--money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Checklist (brand, UOM) */
.mf-checklist { display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; }
.mf-checklist[data-expanded="false"] .is-extra,
.mf-checklist .is-filtered-out { display: none; }
.mf-linkbtn[data-mf-list-more] { margin-top: 14px; }

.mf-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.mf-check input,
.mf-toggle input,
.mf-optchip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}
.mf-check__box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--mf-faint);
	border-radius: 5px;
	color: transparent;
	transition: background var(--mf-ease), border-color var(--mf-ease);
}
.mf-check:hover .mf-check__box { border-color: var(--mf-blue); }
.mf-check input:checked + .mf-check__box { background: var(--mf-blue); border-color: var(--mf-blue); color: #fff; }
.mf-check input:focus-visible + .mf-check__box { outline: 2px solid var(--mf-blue); outline-offset: 2px; }
.mf-check__label { flex: 1; color: var(--mf-text); }
.mf-check input:checked ~ .mf-check__label { color: var(--mf-navy); font-weight: 600; }
.mf-check__count { color: var(--mf-muted); font-size: 12px; }

/* Price slider */
.mf-price__track { position: relative; height: 4px; margin: 6px 8px 22px; border-radius: 2px; background: var(--mf-border); }
.mf-price__fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: 2px; background: var(--mf-blue); }
.mf-price__range {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	left: -8px;
	top: -6px;
	width: calc(100% + 16px);
	height: 16px;
	margin: 0;
	background: none;
	pointer-events: none;
}
.mf-price__range::-webkit-slider-runnable-track { background: none; border: 0; }
.mf-price__range::-moz-range-track { background: none; border: 0; }
.mf-price__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	border: 2px solid var(--mf-blue);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 5px rgba(var(--mf-navy-rgb), 0.18);
	cursor: grab;
	pointer-events: auto;
}
.mf-price__range::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border: 2px solid var(--mf-blue);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 5px rgba(var(--mf-navy-rgb), 0.18);
	cursor: grab;
	pointer-events: auto;
}
.mf-price__inputs { display: flex; align-items: center; gap: 10px; }
.mf-price__inputs .mf-input { flex: 1; min-width: 0; }
.mf-price__dash { color: var(--mf-faint); }

/* Toggle switches (availability, clinical attributes) */
.mf-toggles { display: flex; flex-direction: column; gap: 16px; }
.mf-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.mf-toggle__text { display: flex; flex-direction: column; }
.mf-toggle__label { font-weight: 600; color: var(--mf-navy); font-size: 14px; }
.mf-toggle__meta { font-size: 12px; color: var(--mf-muted); }
.mf-toggle__switch {
	position: relative;
	flex-shrink: 0;
	width: 42px;
	height: 24px;
	border-radius: var(--mf-r-pill);
	background: var(--mf-switch-off);
	transition: background var(--mf-ease);
}
.mf-toggle__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform var(--mf-ease);
}
.mf-toggle input:checked + .mf-toggle__switch { background: var(--mf-blue); }
.mf-toggle input:checked + .mf-toggle__switch::after { transform: translateX(18px); }
.mf-toggle input:focus-visible + .mf-toggle__switch { outline: 2px solid var(--mf-blue); outline-offset: 2px; }

/* Option chips (size-style attributes) */
.mf-optchips { display: flex; flex-wrap: wrap; gap: 8px; }
.mf-optchip { position: relative; cursor: pointer; }
.mf-optchip span {
	display: block;
	min-width: 44px;
	padding: 9px 10px;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-input);
	color: var(--mf-text-2);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	transition: border-color var(--mf-ease), background var(--mf-ease), color var(--mf-ease);
}
.mf-optchip:hover span { border-color: var(--mf-blue); }
.mf-optchip input:checked + span {
	padding: 8.5px 9.5px;
	border: 1.5px solid var(--mf-blue);
	background: var(--mf-blue-tint);
	color: var(--mf-blue-600);
	font-weight: 700;
}
.mf-optchip input:focus-visible + span { outline: 2px solid var(--mf-blue); outline-offset: 2px; }

.mf-filters-overlay { display: none; }

/* ---------- 9. Product grid + card ---------- */
.woocommerce ul.products.mf-grid,
.woocommerce-page ul.products.mf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products.mf-grid.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.woocommerce ul.products.mf-grid::before,
.woocommerce ul.products.mf-grid::after { display: none; }

.woocommerce ul.products.mf-grid li.product.mf-card,
.woocommerce-page ul.products.mf-grid li.product.mf-card {
	display: flex;
	flex-direction: column;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	background: var(--mf-white);
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-r-card);
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.woocommerce ul.products.mf-grid li.product.mf-card:hover {
	border-color: var(--mf-blue-line);
	box-shadow: var(--mf-shadow-hover);
	transform: translateY(-4px);
}

.mf-card__media {
	position: relative;
	height: 210px;
	background: var(--mf-white);
	border-bottom: 1px solid #f0f3f7;
	overflow: hidden;
}
.mf-card__image { position: absolute; inset: 20px; display: flex; align-items: center; justify-content: center; }
.woocommerce ul.products li.product .mf-card__image img {
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	transition: transform 0.2s ease;
}
.woocommerce ul.products li.product.mf-card:hover .mf-card__image img { transform: scale(1.06); }
.mf-card__noimage {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: var(--mf-r-input);
	background: repeating-linear-gradient(45deg, #f4f7fb, #f4f7fb 10px, #eef2f8 10px, #eef2f8 20px);
	color: #a9b6c8;
}

.mf-badge {
	position: absolute;
	z-index: 2;
	top: 14px;
	left: 14px;
	padding: 5px 10px;
	border-radius: var(--mf-r-sm);
	font-family: var(--mf-font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}
.mf-badge--in { background: var(--mf-accent-tint); color: var(--mf-accent-strong); }
.mf-badge--backorder { background: var(--mf-warn-bg); color: var(--mf-warn); }
.mf-badge--out { background: var(--mf-danger-bg); color: var(--mf-danger); }

.mf-card__actions {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	opacity: 0;
	transform: translateX(6px);
	transition: opacity var(--mf-ease), transform var(--mf-ease);
}
.mf-card:hover .mf-card__actions,
.mf-card:focus-within .mf-card__actions { opacity: 1; transform: none; }
.mf-card__action {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 4px 12px rgba(var(--mf-navy-rgb), 0.14);
	color: var(--mf-blue);
}
.mf-card__action--wish { color: var(--mf-accent-strong); }
.mf-card__action:hover { color: var(--mf-blue-600); }
.mf-card__action--wish:hover { color: var(--mf-blue); }

.mf-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 22px; }
.mf-card__brand {
	margin-bottom: 7px;
	font-family: var(--mf-font-display);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mf-blue);
}
.woocommerce ul.products li.product .mf-card__title {
	min-height: 42px;
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--mf-font-body);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0;
}
.mf-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--mf-navy);
}
.mf-card:hover .mf-card__title a,
.mf-card__title a:hover { color: var(--mf-blue-600); }

.mf-card__ids { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; font-size: 12px; color: var(--mf-muted); }
.mf-card__ids b { color: var(--mf-text); font-weight: 600; }

.mf-card__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.woocommerce .mf-card__rating .star-rating { float: none; margin: 0; font-size: 13px; color: var(--mf-star); }
.woocommerce .mf-card__rating .star-rating::before { color: var(--mf-input); }
.mf-card__rating-count { font-size: 12px; color: var(--mf-muted); }

.mf-card__label {
	margin-bottom: 8px;
	font-family: var(--mf-font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mf-muted);
}
.mf-seg { display: flex; margin-bottom: 16px; border: 1px solid var(--mf-input); border-radius: var(--mf-r-input); overflow: hidden; }
.mf-seg__opt { flex: 1; padding: 8px 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--mf-text-2); }
.mf-seg__opt + .mf-seg__opt { border-left: 1px solid var(--mf-input); }
.mf-seg__opt.is-active { background: var(--mf-blue); color: #fff; font-weight: 700; }

.mf-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: auto 0 16px; padding-top: 4px; }
.mf-card__amount { font-family: var(--mf-font-display); font-weight: 700; font-size: 26px; line-height: 1.2; color: var(--mf-navy); }
.mf-card__amount del { font-size: 15px; font-weight: 500; color: var(--mf-muted); }
.mf-card__amount ins { text-decoration: none; }
.mf-card__amount .masterfit-call-for-pricing { font-size: 18px; color: var(--mf-navy); }
.mf-card__per { font-size: 12px; color: var(--mf-muted); }

/* B2B-only storefront: placeholder where price + add-to-cart sit for visitors / pending accounts. */
.mf-gate { margin-top: auto; padding-top: 4px; }
.mf-gate__msg { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--mf-navy); }
.mf-gate__msg .mf-icon { flex: none; margin-top: 2px; color: var(--mf-blue); }
.mf-gate__actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.mf-gate--pending .mf-gate__msg,
.mf-gate--staff .mf-gate__msg { margin-bottom: 0; font-weight: 500; color: var(--mf-text-2); }
.mf-card__price + .mf-gate { margin-top: 0; }
.mf-card__cta .button { margin: 0 !important; }
.woocommerce ul.products li.product .mf-card__cta .button { margin-top: 0; }
.mf-card__cta .added_to_cart {
	display: block;
	margin-top: 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
}
.woocommerce a.button.mf-btn.loading { opacity: 0.7; padding-right: 30px; }
.woocommerce a.button.mf-btn.added::after { margin-left: 6px; }

/* Out-of-stock state */
.mf-card--stock-out .mf-card__media { background: #fafbfc; }
.mf-card--stock-out .mf-card__image { opacity: 0.4; filter: grayscale(1); }
.mf-card--stock-out .mf-card__brand { color: #a9b6c8; }
.mf-card--stock-out .mf-card__title a { color: #8996ab; }
.mf-card--stock-out .mf-card__ids,
.mf-card--stock-out .mf-card__ids b,
.mf-card--stock-out .mf-card__per { color: #b3bdcc; }
.mf-card--stock-out .mf-card__amount { color: var(--mf-muted); }

/* ---------- 10. WooCommerce single product / cart / checkout ---------- */
.woocommerce .mf-woo-main div.product .product_title { font-size: 30px; font-weight: 700; }
.woocommerce div.product p.price,
.woocommerce div.product span.price { font-family: var(--mf-font-display); font-weight: 700; font-size: 28px; color: var(--mf-navy); }
.woocommerce div.product .stock { font-weight: 700; }
.woocommerce div.product .stock.in-stock { color: var(--mf-success); }
.woocommerce div.product .stock.out-of-stock { color: var(--mf-danger); }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: var(--mf-r-input) var(--mf-r-input) 0 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--mf-navy); }
.woocommerce .mf-woo-main .related > h2,
.woocommerce .mf-woo-main .upsells > h2 { font-size: 22px; margin: 48px 0 20px; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wc-block-components-button:not(.is-link) {
	font-family: var(--mf-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: var(--mf-r-pill);
	padding: 13px 28px;
	background: var(--mf-blue);
	color: #fff;
	line-height: 1.2;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background: var(--mf-blue-600);
	color: #fff;
}
.woocommerce button.button.alt.disabled,
.woocommerce button.button:disabled[disabled] { background: var(--mf-faint); color: #fff; }

.woocommerce .quantity .qty,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-cart table.cart td.actions .coupon .input-text {
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-input);
	font-family: var(--mf-font-body);
	font-size: 15px;
	color: var(--mf-navy);
	background: #fff;
}
.woocommerce #review_form #respond input[type="text"],
.woocommerce #review_form #respond input[type="email"],
.woocommerce #review_form #respond textarea {
	width: 100%;
	max-width: 520px;
	padding: 10px 14px;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-input);
	font-family: var(--mf-font-body);
	font-size: 15px;
}
.woocommerce #review_form #respond textarea { max-width: none; }

.woocommerce .quantity .qty:focus,
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce #review_form #respond input:focus,
.woocommerce #review_form #respond textarea:focus {
	outline: 0;
	border-color: var(--mf-blue);
	box-shadow: 0 0 0 3px rgba(var(--mf-blue-rgb), 0.15);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: var(--mf-r-md);
	border-top-width: 0;
	border-left: 4px solid var(--mf-blue);
	background: var(--mf-tint);
	color: var(--mf-navy);
}
.woocommerce-message::before,
.woocommerce-info::before { color: var(--mf-blue); }
.woocommerce-error { border-left-color: var(--mf-danger); background: var(--mf-danger-bg); }

.masterfit-call-for-pricing { font-family: var(--mf-font-display); font-weight: 700; color: var(--mf-navy); }
.masterfit-cfp-notice { padding: 16px 18px; border-radius: var(--mf-r-md); background: var(--mf-tint); }

/* ---------- 11. Footer ---------- */
.mf-footer { margin-top: auto; background: var(--mf-navy); color: #c9d1e6; font-size: 14px; line-height: 1.55; }
.mf-footer__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 28px 64px;
	padding-top: 40px;
	padding-bottom: 32px;
}
.mf-footer__brand { flex: 1 1 240px; }
.mf-footer__col { flex: 0 1 auto; min-width: 160px; }
.mf-footer__brand p { max-width: 280px; margin: 12px 0 0; }
.mf-footer__title {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
}
.mf-footer address { font-style: normal; }
.mf-footer__hours { margin: 8px 0 0; color: #9aa6c8; }
.mf-footer__label { display: inline-block; min-width: 72px; color: #9aa6c8; }
.mf-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mf-footer a { color: var(--mf-accent-light); }
.mf-footer a:hover { color: #fff; }
.mf-footer .mf-logo,
.mf-footer .mf-logo:hover { color: #fff; }
.mf-logo-panel {
	display: inline-flex;
	align-items: center;
	padding: 12px 16px;
	border-radius: var(--mf-r-md);
	background: #fff;
}
.mf-logo-panel img { display: block; width: auto; max-height: 56px; }
.mf-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 0; font-size: 13px; color: #9aa6c8; }
.mf-footer__social { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.mf-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #fff;
	transition: background var(--mf-ease), border-color var(--mf-ease);
}
.mf-footer__social a:hover { background: var(--mf-accent); border-color: var(--mf-accent); color: var(--mf-navy); }
.mf-header__email { margin-left: 12px; }

/* Comments (legacy posts only) */
.mf-comments { max-width: 760px; margin: 48px auto 0; padding-top: 32px; border-top: 1px solid var(--mf-border); }
.mf-comments__title { font-size: 22px; }
.mf-comments__list { list-style: none; margin: 0 0 24px; padding: 0; }
.mf-comments__list .comment { padding: 16px 0; border-bottom: 1px solid var(--mf-border-soft); }
.mf-comments__list .comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.mf-comments__list .comment-metadata { font-size: 12px; color: var(--mf-text-2); }
.mf-comments__list .children { list-style: none; margin: 0; padding-left: 32px; }
.comment-form textarea,
.comment-form input:not([type="checkbox"]):not([type="submit"]) {
	width: 100%;
	font: inherit;
	border: 1px solid var(--mf-input);
	border-radius: var(--mf-r-input);
	padding: 10px 14px;
}

/* ---------- 12. Responsive ---------- */
@media (max-width: 1340px) {
	.mf-header__inner { gap: 20px; }
	.mf-nav,
	.mf-nav__menu { gap: 20px; }
}

@media (max-width: 1070px) {
	.mf-header__request { display: none; } /* no room next to the menu; Log In leads to the same page */
}

@media (max-width: 1100px) {
	.mf-search { min-width: 140px; } /* may shrink below its natural width so the header fits down to 961px */
}

@media (max-width: 1180px) {
	.mf-catgrid__grid { grid-template-columns: repeat(4, 1fr); }
	.mf-mega__grid { grid-template-columns: repeat(3, 1fr); }
	.woocommerce ul.products.mf-grid,
	.woocommerce ul.products.mf-grid.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
	:root { --mf-gutter: 20px; }

	.mf-utility__msg { display: none; }
	.mf-utility__inner { justify-content: center; }

	.mf-header__inner { flex-wrap: wrap; gap: 12px 14px; padding-top: 14px; padding-bottom: 14px; }
	.mf-header__menu { display: inline-flex; margin-left: -8px; }
	.mf-nav__link--accent::after { display: none; }
	.mf-logo { font-size: 26px; }
	.mf-header__actions { margin-left: auto; gap: 10px; }
	.mf-nav__request { display: flex; color: var(--mf-blue); }
	.mf-nav .mf-nav__menu--more { display: flex; }
	/* The top bar keeps the phone number and its last link (Contact); the rest are in the drawer. */
	.mf-utility__links .menu-item:not(:last-child) { display: none; }
	.mf-search { order: 10; flex-basis: 100%; max-width: none; margin-left: 0; }

	.mf-nav {
		display: none;
		order: 11;
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		border-top: 1px solid var(--mf-border-soft);
		padding-top: 8px;
	}
	.mf-nav.is-open { display: flex; }
	.mf-nav__menu { flex-direction: column; gap: 0; }
	.mf-nav__link,
	.mf-nav__menu a { width: 100%; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--mf-border-soft); }
	.mf-mega {
		position: static;
		display: none;
		padding: 8px 0 12px;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}
	.mf-nav__mega.is-open .mf-mega { display: block; }
	.mf-mega .mf-container { padding: 0; }
	.mf-mega__grid { grid-template-columns: 1fr 1fr; gap: 0 16px; }

	.mf-section-head__title { font-size: 30px; }
	.mf-catgrid { padding: 48px 0 56px; }
	.mf-catgrid__grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }

	.mf-shop__layout { grid-template-columns: minmax(0, 1fr); }
	.mf-shop__filter-btn { display: inline-flex; }
	.mf-filters {
		position: fixed;
		z-index: 200;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(360px, 88vw);
		border: 0;
		border-radius: 0;
		overflow-y: auto;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
	}
	.mf-filters.is-open { transform: none; box-shadow: var(--mf-shadow-lg); }
	.mf-filters__close { display: inline-flex; }
	.mf-filters-overlay {
		display: block;
		position: fixed;
		z-index: 199;
		inset: 0;
		background: rgba(15, 29, 69, 0.5);
	}
	.mf-filters-overlay[hidden] { display: none; }
	body.mf-lock { overflow: hidden; }

}

@media (max-width: 600px) {
	h1 { font-size: 32px; }
	.mf-header__request { display: none; } /* still in the menu drawer (.mf-nav__request) */
	.mf-utility__links { gap: 18px; }
	.mf-catgrid__grid { grid-template-columns: repeat(2, 1fr); }
	.mf-cattile__media { height: 104px; }
	.mf-shop__title { font-size: 26px; }
	.mf-shop__tools { width: 100%; justify-content: space-between; }
	.mf-sort__label { display: none; }
	.mf-sort select.orderby { min-width: 0; }
	.mf-footer__grid { gap: 24px 40px; }
}

@media (max-width: 520px) {
	.woocommerce ul.products.mf-grid,
	.woocommerce ul.products.mf-grid.columns-4 { grid-template-columns: minmax(0, 1fr); }
	.mf-card__actions { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after { transition-duration: 0.01ms !important; }
}
