/**
 * Midwest Armor — Native Product Category page ("Mist" light mode)
 * Replaces the Elementor product-category archive. Preview-gated via
 * mw_catview_is_active(); see inc/category/category-view.php.
 *
 * Fonts (Inter + JetBrains Mono) are already loaded by the new chrome;
 * the @import below is a safety net for when chrome is off.
 *
 * All selectors are namespaced `.mwc-` so nothing leaks into Elementor pages.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

.mwc-wrap {
	--mwc-bg: #ffffff;
	--mwc-fg: #141416;
	--mwc-muted: rgba(20, 20, 22, 0.55);
	--mwc-border: rgba(20, 20, 22, 0.12);
	--mwc-strip: #f1f2f4;
	--mwc-sale: #c5453b;
	--mwc-amber: #b5701c;
	--mwc-sans: 'Inter', system-ui, -apple-system, sans-serif;
	--mwc-mono: 'JetBrains Mono', ui-monospace, monospace;

	background: var(--mwc-bg);
	color: var(--mwc-fg);
	font-family: var(--mwc-sans);
}
.mwc-wrap *,
.mwc-wrap *::before,
.mwc-wrap *::after { box-sizing: border-box; }

/* Reset link color so the theme/Elementor global blue can't leak into
   product + rail links. Elements needing a specific link color override below. */
.mwc-wrap a { color: inherit; text-decoration: none; }

.mwc-mono { font-family: var(--mwc-mono); }

/* Shared centered content container — matches the live site's boxed width so
   the cover text, breadcrumb, results bar and grid all share one left edge. */
/* Full-bleed: content runs edge-to-edge, sharing the chrome header's 48px
   gutter so the header and page content line up on one left edge. */
.mwc-cover__inner,
.mwc-breadcrumb,
.mwc-main {
	max-width: none;
}

/* ============================================================
   COVER
   ============================================================ */
.mwc-cover {
	position: relative;
	min-height: 224px;
	background: #0c0c0d;
	overflow: hidden;
	display: flex;
}
.mwc-cover__img {
	position: absolute;
	inset: 0;
	/* !important defeats the theme's global `img { height:auto }`, which was
	   killing object-fit and leaving a stretched-looking crop. Cover + center
	   matches the live banner (background-size:cover, position 50% 50%). */
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	object-position: center center;
	filter: brightness(0.5);
}
.mwc-cover__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.22) 55%, rgba(0,0,0,0) 100%);
}
.mwc-cover__inner {
	position: relative;
	z-index: 2;
	padding: 40px 48px;
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
}
.mwc-wrap .mwc-cover__title {
	margin: 0;
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	line-height: 1.05;
	/* !important + compound selector beat the Elementor kit's global `h1` color. */
	color: #fff !important;
	font-family: var(--mwc-sans) !important;
}
.mwc-cover__desc {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	max-width: 880px;
}
.mwc-cover__desc a,
.mwc-cover__desc a:link,
.mwc-cover__desc a:visited,
.mwc-cover__desc a:hover,
.mwc-cover__desc a:focus {
	/* Matches the design's cover accent (#6BA8E0). !important + :visited keep the
	   theme's default link/visited blue from leaking through on visited links. */
	color: #6ba8e0 !important;
	text-decoration: none;
	border-bottom: none;
}
.mwc-cover__desc a:hover { text-decoration: underline; }

/* ============================================================
   BREADCRUMB + RESULTS BAR
   ============================================================ */
.mwc-breadcrumb {
	padding: 18px 48px 0;
	font-size: 13px;
	color: var(--mwc-muted);
}
.mwc-breadcrumb a {
	color: var(--mwc-muted);
	text-decoration: none;
}
.mwc-breadcrumb a:hover { color: var(--mwc-fg); }
.mwc-breadcrumb .sep { margin: 0 8px; }
.mwc-breadcrumb .current { color: var(--mwc-fg); }

/* Results bar lives at the top of the grid column (right of the rail), with a
   rule under it separating it from the grid. */
.mwc-resultbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 0 16px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--mwc-border);
	font-family: var(--mwc-mono);
	font-size: 10.5px;
	letter-spacing: 1.4px;
	color: var(--mwc-muted);
}
.mwc-resultbar__sort {
	color: var(--mwc-fg);
	font-weight: 600;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
	letter-spacing: inherit;
}

/* ============================================================
   MAIN LAYOUT — rail + grid
   ============================================================ */
.mwc-main {
	display: grid;
	grid-template-columns: 232px 1fr;
	gap: 44px;
	align-items: flex-start;
	padding: 30px 48px 64px;
}

/* ── Left rail ── */
.mwc-rail { font-family: var(--mwc-sans); }
.mwc-rail__label {
	font-family: var(--mwc-mono);
	font-size: 10px;
	letter-spacing: 2px;
	color: var(--mwc-muted);
	padding-bottom: 12px;
	border-bottom: 1px solid var(--mwc-border);
}
.mwc-rail__label--spaced { padding: 28px 0 4px; border-bottom: none; }

.mwc-rail__cats { list-style: none; margin: 0; padding: 0; }
.mwc-rail__cats ul.children { list-style: none; margin: 0; padding: 0 0 0 14px; display: none; }
.mwc-rail__cats li.open > ul.children { display: block; }
.mwc-rail__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 11px 0;
	border-bottom: 1px solid var(--mwc-border);
	font-size: 13.5px;
	font-weight: 400;
	color: var(--mwc-fg);
}
.mwc-rail__row a {
	color: inherit;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 9px;
	flex: 1;
	min-width: 0;
}
.mwc-rail__cats li.current-cat > .mwc-rail__row { font-weight: 600; }
.mwc-rail__dot { width: 4px; height: 4px; background: var(--mwc-fg); flex-shrink: 0; }
.mwc-wrap .mwc-rail__toggle {
	font-family: var(--mwc-mono);
	font-size: 14px;
	color: var(--mwc-muted);
	cursor: pointer;
	user-select: none;
	padding: 0 4px;
	/* !important to beat the theme/Woo global <button> background (was showing blue). */
	background: none !important;
	border: none !important;
	box-shadow: none !important;
}

.mwc-rail__new { display: flex; flex-direction: column; }
.mwc-rail__new-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--mwc-border);
	text-decoration: none;
	color: inherit;
}
.mwc-rail__new-thumb {
	width: 54px;
	height: 54px;
	flex-shrink: 0;
	background: var(--mwc-strip);
	overflow: hidden;
}
.mwc-rail__new-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mwc-rail__new-name { font-size: 12.5px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.mwc-rail__new-price { font-family: var(--mwc-mono); font-size: 11px; font-weight: 600; }

/* ============================================================
   PRODUCT GRID + CARD
   ============================================================ */
.mwc-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px;
}

.mwc-card { display: block; text-decoration: none; color: inherit; background: transparent; }
.mwc-card__imgwrap {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--mwc-strip);
	overflow: hidden;
	background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0 8px, transparent 8px 20px);
}
.mwc-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.25s;
}
.mwc-card__img--alt { opacity: 0; }
.mwc-card:hover .mwc-card__img--primary.has-alt { opacity: 0; }
.mwc-card:hover .mwc-card__img--alt { opacity: 1; }

.mwc-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
}
.mwc-badge {
	display: inline-block;
	padding: 4px 8px;
	font-family: var(--mwc-mono);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 1.6px;
	line-height: 1;
}
.mwc-badge--new     { background: var(--mwc-fg); color: #fff; }
.mwc-badge--sale    { background: var(--mwc-sale); color: #fff; }
.mwc-badge--bundle  { background: transparent; color: var(--mwc-fg); border: 1px solid var(--mwc-fg); }
.mwc-badge--low     { background: transparent; color: var(--mwc-amber); border: 1px solid var(--mwc-amber); }
.mwc-badge--soldout { background: transparent; color: var(--mwc-muted); border: 1px solid var(--mwc-border); }

/* Click-to-product overlay link covering the image (heart/badge sit above it). */
.mwc-card__imglink {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
}

/* Real wishlist heart (plugin-rendered .mwa-heart) styled to match the card:
   white square, top-right, revealed on hover. !important beats the plugin's own
   .mwa-heart--card rules AND the theme's global <button> background. */
.mwc-card__imgwrap .mwa-heart {
	position: absolute !important;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 34px;
	height: 34px;
	padding: 0;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.92) !important;
	border: 1px solid var(--mwc-border) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--mwc-fg);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.18s, transform 0.18s;
}
.mwc-card__imgwrap .mwa-heart svg { width: 15px; height: 15px; }
.mwc-card:hover .mwc-card__imgwrap .mwa-heart,
.mwc-card__imgwrap .mwa-heart.is-saved,
.mwc-card__imgwrap .mwa-heart:focus-visible { opacity: 1; transform: translateY(0); }
.mwc-card__imgwrap .mwa-heart.is-saved { color: var(--mwc-sale); }
/* Touch devices have no hover — always show the heart so it's tappable. */
@media (hover: none) {
	.mwc-card__imgwrap .mwa-heart { opacity: 1; transform: none; }
}

.mwc-card--oos .mwc-card__img--primary { filter: grayscale(1); opacity: 0.42; }
.mwc-card__oos {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Visual only — let the image link underneath stay clickable. */
	pointer-events: none;
}
.mwc-card__oos span {
	padding: 10px 18px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--mwc-fg);
	color: var(--mwc-fg);
	font-family: var(--mwc-mono);
	font-size: 12px;
	letter-spacing: 2px;
	font-weight: 700;
}

.mwc-card__foot {
	padding: 14px 2px 0;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
}
.mwc-card__name {
	font-size: 14px;
	font-weight: 500;
	letter-spacing: -0.1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--mwc-fg);
}
.mwc-card--oos .mwc-card__name { color: var(--mwc-muted); }
.mwc-card__price {
	font-family: var(--mwc-mono);
	font-size: 13px;
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
	color: var(--mwc-fg);
}
.mwc-card--oos .mwc-card__price { color: var(--mwc-muted); }
.mwc-card__price del { color: var(--mwc-muted); font-weight: 400; margin-right: 6px; }
.mwc-card__price ins { text-decoration: none; color: var(--mwc-sale); }
.mwc-card__price .amount { font-family: var(--mwc-mono); }

/* ============================================================
   LOAD MORE (design treatment A)
   ============================================================ */
.mwc-loadmore {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: 48px;
}
.mwc-loadmore__bar {
	width: 220px;
	height: 2px;
	background: var(--mwc-border);
	position: relative;
	overflow: hidden;
}
.mwc-loadmore__fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: var(--mwc-fg);
	transition: width 0.3s ease;
}
.mwc-loadmore__count {
	font-family: var(--mwc-mono);
	font-size: 10.5px;
	letter-spacing: 1.2px;
	color: var(--mwc-muted);
}
/* Pin every state — it's an <a>, so the theme/Elementor link + :focus blue
   leaks onto its border/outline. !important + compound selector beat it. */
.mwc-wrap .mwc-loadmore__btn,
.mwc-wrap .mwc-loadmore__btn:link,
.mwc-wrap .mwc-loadmore__btn:visited,
.mwc-wrap .mwc-loadmore__btn:focus,
.mwc-wrap .mwc-loadmore__btn:active {
	padding: 15px 34px;
	background: transparent !important;
	color: var(--mwc-fg) !important;
	border: 1px solid var(--mwc-fg) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	cursor: pointer;
	font-family: var(--mwc-mono);
	font-size: 11px;
	letter-spacing: 2px;
	font-weight: 700;
	text-decoration: none !important;
}
.mwc-wrap .mwc-loadmore__btn:hover {
	background: var(--mwc-fg) !important;
	color: var(--mwc-bg) !important;
	border-color: var(--mwc-fg) !important;
}
/* Keyboard focus still gets a visible (ink) ring. */
.mwc-wrap .mwc-loadmore__btn:focus-visible {
	outline: 2px solid var(--mwc-fg) !important;
	outline-offset: 2px;
}
.mwc-loadmore__btn[aria-busy="true"] { opacity: 0.6; cursor: default; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.mwc-empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 64px 40px;
}
.mwc-empty__icon {
	width: 64px;
	height: 64px;
	border: 1px solid var(--mwc-border);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 26px;
	color: var(--mwc-muted);
}
.mwc-empty__kicker {
	font-family: var(--mwc-mono);
	font-size: 10px;
	letter-spacing: 2px;
	color: var(--mwc-muted);
	margin-bottom: 14px;
}
.mwc-wrap .mwc-empty h2 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.6px; color: var(--mwc-fg) !important; font-family: var(--mwc-sans) !important; }
.mwc-empty p { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--mwc-muted); max-width: 430px; }
.mwc-empty__actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.mwc-btn {
	padding: 14px 26px;
	font-family: var(--mwc-mono);
	font-size: 11px;
	letter-spacing: 1.6px;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid var(--mwc-border);
	background: transparent;
	color: var(--mwc-fg);
	text-decoration: none;
	display: inline-block;
}
.mwc-btn--solid { background: var(--mwc-fg); color: var(--mwc-bg); border-color: var(--mwc-fg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
	.mwc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.mwc-main {
		grid-template-columns: 1fr;
		gap: 0;
		padding: 20px 16px 48px;
	}
	/* Categories live in the chrome hamburger on mobile; hide the rail. */
	.mwc-rail { display: none; }
	.mwc-cover__inner { padding: 20px 18px; }
	.mwc-breadcrumb { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) {
	.mwc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
