/**
 * Midwest Armor - Helmets page (native /helmets).
 * Reuses the category "Mist" tokens + .mwc-grid cards (assets/css/category.css).
 * This file styles only what's new: the featured-helmet hero + section heads.
 * Aligns to the category content column (48px side padding) and uses the same
 * Inter + JetBrains Mono / ink #141416 system.
 */

.mwh-wrap {
	--mwh-accent: #b5701c; /* warm amber accent, ties to the category low-stock tone */
}

/* ============================================================
   FEATURED HELMET HERO
   ============================================================ */
.mwh-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
	padding: 40px 48px 44px;
}

.mwh-hero__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: var(--mwc-strip);
	background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.04) 0, rgba(0, 0, 0, 0.04) 1px, transparent 1px, transparent 7px);
}
.mwh-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mwh-hero__medialink { position: absolute; inset: 0; z-index: 1; }

.mwh-hero__body { max-width: 580px; }

.mwh-hero__top {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; margin-bottom: 18px;
}
.mwh-hero__eyebrow {
	display: inline-flex; align-items: center; gap: 9px;
	font-family: var(--mwc-mono); font-size: 11px; font-weight: 600;
	letter-spacing: 2px; text-transform: uppercase; color: var(--mwc-muted);
}
.mwh-hero__sq { width: 8px; height: 8px; background: var(--mwh-accent); display: block; flex-shrink: 0; }

/* Star rating (clipped gold overlay over grey stars) */
.mwh-stars { display: inline-flex; align-items: center; gap: 8px; }
.mwh-stars__track { position: relative; display: inline-block; font-size: 15px; line-height: 1; }
.mwh-stars__track::before { content: "\2605\2605\2605\2605\2605"; letter-spacing: 3px; color: #d8d8da; }
.mwh-stars__fill { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; white-space: nowrap; }
.mwh-stars__fill::before { content: "\2605\2605\2605\2605\2605"; letter-spacing: 3px; color: #e8a33d; }
.mwh-stars__n { font-family: var(--mwc-mono); font-size: 11px; color: var(--mwc-muted); }

.mwh-hero__title {
	margin: 0 0 16px; font-family: var(--mwc-sans);
	font-size: clamp(26px, 2.8vw, 38px); font-weight: 700;
	letter-spacing: -0.6px; line-height: 1.1; color: var(--mwc-fg);
}
.mwh-hero__title a { color: inherit; text-decoration: none; }
.mwh-hero__title a:hover { color: var(--mwh-accent); }

.mwh-hero__desc {
	margin: 0 0 26px; font-size: 15px; line-height: 1.6;
	color: var(--mwc-muted); max-width: 540px;
}
.mwh-hero__more { color: var(--mwc-fg); text-decoration: underline; white-space: nowrap; }

/* Spec row: Weight / NIJ / Cut / Shroud — flex so 3 or 4 items stay even, and
   long values (e.g. a multi-option Shroud) wrap instead of clipping. */
.mwh-spec {
	display: flex; flex-wrap: wrap;
	margin: 0 0 26px; border: 1px solid var(--mwc-border);
}
.mwh-spec__item {
	flex: 1 1 0; min-width: 130px;
	padding: 13px 16px; border-right: 1px solid var(--mwc-border);
}
.mwh-spec__item:last-child { border-right: 0; }
.mwh-spec__k {
	margin: 0 0 6px; font-family: var(--mwc-mono); font-size: 9.5px; font-weight: 600;
	letter-spacing: 1.4px; text-transform: uppercase; color: var(--mwc-muted);
}
.mwh-spec__v {
	margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--mwc-fg);
	overflow-wrap: anywhere;
}

/* Colors + sizes */
.mwh-hero__opts { display: flex; gap: 36px; flex-wrap: wrap; margin: 0 0 30px; }
.mwh-opt { display: flex; flex-direction: column; gap: 9px; }
.mwh-opt__k {
	font-family: var(--mwc-mono); font-size: 9.5px; font-weight: 600;
	letter-spacing: 1.4px; text-transform: uppercase; color: var(--mwc-muted);
}
.mwh-swatches { display: flex; gap: 8px; align-items: center; }
.mwh-swatch {
	width: 22px; height: 22px; border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.18); background-size: cover; background-position: center;
	display: inline-block;
}
.mwh-swatch--label {
	width: auto; height: auto; border-radius: 2px; padding: 5px 9px; border-color: var(--mwc-border);
	font-family: var(--mwc-mono); font-size: 10px; letter-spacing: 0.4px; color: var(--mwc-fg); background: var(--mwc-strip);
}
.mwh-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.mwh-size {
	font-family: var(--mwc-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.4px;
	padding: 6px 11px; border: 1px solid var(--mwc-border); border-radius: 2px; color: var(--mwc-fg);
}

/* Actions */
.mwh-hero__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
/* Primary CTA — force white ink over the dark fill (theme/Elementor global <a>
   color would otherwise leave the label dark on the dark button). */
.mwh-btn--primary,
.mwh-btn--primary:link,
.mwh-btn--primary:visited,
.mwh-btn--primary:hover,
.mwh-btn--primary span {
	color: #fff !important;
}
.mwh-btn--primary {
	display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
	font-family: var(--mwc-mono); font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
	text-transform: uppercase; padding: 15px 24px; border-radius: 2px; text-decoration: none;
	background: var(--mwc-fg); border: 1px solid var(--mwc-fg);
	transition: background .18s ease, border-color .18s ease;
}
.mwh-btn--primary:hover { background: var(--mwh-accent); border-color: var(--mwh-accent); }
.mwh-btn__arrow { transition: transform .18s ease; }
.mwh-btn--primary:hover .mwh-btn__arrow { transform: translateX(3px); }

/* "View accessories" — plain underlined text link (per design), not a button. */
.mwh-hero__acclink {
	font-family: var(--mwc-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.6px;
	color: var(--mwc-fg); text-decoration: underline; text-underline-offset: 3px;
	transition: color .15s ease;
}
.mwh-hero__acclink:hover { color: var(--mwh-accent); }

.mwh-hero__price { font-family: var(--mwc-mono); font-size: 14px; font-weight: 700; color: var(--mwc-fg); margin-left: auto; }
.mwh-hero__price del { color: var(--mwc-muted); font-weight: 400; margin-right: 6px; }
.mwh-hero__price ins { color: var(--mwc-sale); text-decoration: none; }
/* Price baked into the CTA — mobile only (desktop shows it separately, right). */
.mwh-btn__price { display: none; }

/* ============================================================
   SECTIONS (More Helmets / Accessories) - reuse .mwc-grid cards
   ============================================================ */
.mwh-sec { padding: 46px 48px 6px; }
/* More Helmets flows straight out of the hero — no heading, no divider. */
.mwh-sec--more { padding-top: 6px; }
.mwh-sec--acc { padding-top: 30px; padding-bottom: 72px; scroll-margin-top: 24px; }
.mwh-sec__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--mwc-border);
}
.mwh-sec__title {
	margin: 0; font-family: var(--mwc-mono); font-size: 13px; font-weight: 700;
	letter-spacing: 1.6px; text-transform: uppercase; color: var(--mwc-fg);
}
.mwh-sec__count { font-family: var(--mwc-mono); font-size: 10.5px; letter-spacing: 1.2px; color: var(--mwc-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
	.mwh-hero { gap: 40px; }
}
@media (max-width: 900px) {
	.mwh-hero {
		grid-template-columns: 1fr; gap: 28px; padding: 28px 32px 40px;
	}
	.mwh-hero__body { max-width: none; }
	.mwh-sec { padding: 40px 32px 6px; }
	.mwh-sec--acc { padding-bottom: 56px; }
}
/* ----- Mobile featured hero: image -> title -> 2x2 specs -> full-width price
   CTA. The eyebrow/rating/description/colors/sizes/accessories-link are hidden
   here to keep the card compact (per the mobile design). ----- */
@media (max-width: 640px) {
	.mwh-hero {
		grid-template-columns: 1fr; gap: 20px; padding: 0 0 30px; align-items: stretch;
	}
	.mwh-hero__media { aspect-ratio: 1 / 1; }
	.mwh-hero__body { max-width: none; padding: 0 20px; }

	/* Trim to the essentials on mobile */
	.mwh-hero__top,
	.mwh-hero__desc,
	.mwh-hero__opts,
	.mwh-hero__acclink,
	.mwh-hero__price { display: none; }

	.mwh-hero__title { font-size: 25px; line-height: 1.15; margin: 0 0 20px; }

	/* 2x2 spec grid with full borders around each cell (collapsed: cells carry
	   top+left, the grid carries right+bottom, so lines never double up). */
	.mwh-spec {
		display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 22px; border: 0;
		border-right: 1px solid var(--mwc-border); border-bottom: 1px solid var(--mwc-border);
	}
	.mwh-spec__item {
		min-width: 0; padding: 13px 14px; border: 0;
		border-top: 1px solid var(--mwc-border); border-left: 1px solid var(--mwc-border);
	}

	/* Single full-width CTA carrying the price */
	.mwh-hero__actions { display: block; }
	.mwh-btn--primary {
		display: flex; width: 100%; justify-content: center; gap: 8px; padding: 17px 20px;
	}
	.mwh-btn__arrow { display: none; }
	.mwh-btn__price { display: inline; font-weight: 700; }
	.mwh-btn__price .amount,
	.mwh-btn__price del,
	.mwh-btn__price ins { color: #fff !important; }

	.mwh-sec { padding: 30px 20px 6px; }
}
