/* ==========================================================================
   Magnetic Control — header search, page hero and WooCommerce catalog
   ========================================================================== */

/* Header search ------------------------------------------------------------ */
.mc-search { position: relative; }
.mc-search__toggle {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mc-ink);
	font-size: 20px;
}
.mc-search__toggle:hover { color: var(--mc-green); }
.mc-search__form {
	position: absolute;
	top: calc(100% + 26px);
	right: -10px;
	z-index: 20;
	display: flex;
	width: 320px;
	padding: 10px;
	background: var(--mc-white);
	border-top: 2px solid var(--mc-green);
	border-radius: 0 0 var(--mc-radius) var(--mc-radius);
	box-shadow: var(--mc-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.mc-search.is-open .mc-search__form { opacity: 1; visibility: visible; transform: none; }
.mc-search__form input {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid var(--mc-line);
	border-radius: 6px 0 0 6px;
	font: inherit;
	font-size: 14px;
	color: var(--mc-ink);
	outline: 0;
}
.mc-search__form input:focus { border-color: var(--mc-green); }
.mc-search__form button {
	display: grid;
	place-items: center;
	width: 44px;
	border: 0;
	border-radius: 0 6px 6px 0;
	background: var(--mc-green);
	color: var(--mc-white);
	font-size: 18px;
}

/* Page hero (inner pages / catalog) --------------------------------------- */
.mc-page-hero {
	position: relative;
	overflow: hidden;
	background: var(--mc-navy);
	color: var(--mc-white);
}
.mc-page-hero::before {
	content: "";
	position: absolute;
	inset: 0 0 0 38%;
	background: var(--hero-image) center / cover no-repeat;
}
.mc-page-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #0f1b2b 0%, #0f1b2b 36%, rgba(15, 27, 43, .85) 46%, rgba(15, 27, 43, .35) 66%, rgba(15, 27, 43, .1) 100%);
}
.mc-page-hero__inner { position: relative; z-index: 1; padding-top: 44px; padding-bottom: 32px; }
.mc-page-hero .mc-eyebrow { color: var(--mc-white); font-weight: 600; }
.mc-page-hero__title {
	margin: 4px 0 14px;
	font-size: clamp(32px, 4vw, 44px);
	font-weight: 600;
	line-height: 1.12;
	color: var(--mc-white);
}
.mc-page-hero__lead { max-width: 440px; margin-bottom: 20px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .9); }

.mc-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; font-weight: 400; }
.mc-breadcrumb a { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); }
.mc-breadcrumb a:hover { color: var(--mc-green); }
.mc-breadcrumb a .mc-icon { font-size: 15px; color: var(--mc-green); }
.mc-breadcrumb > .mc-icon { font-size: 13px; opacity: .8; }
.mc-breadcrumb span { font-weight: 500; color: var(--mc-white); }

/* Catalog layout ----------------------------------------------------------- */
.mc-shop {
	display: grid;
	grid-template-columns: 245px 1fr;
	gap: 28px;
	align-items: start;
	padding-top: 18px;
	padding-bottom: 20px;
}

/* Filters ------------------------------------------------------------------ */
.mc-filters {
	position: sticky;
	top: 110px;
	padding: 16px 14px 14px;
	background: var(--mc-white);
	border: 1px solid var(--mc-line);
	border-radius: 8px;
	box-shadow: 0 4px 18px rgba(17, 29, 46, .05);
}
.admin-bar .mc-filters { top: 142px; }
.mc-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--mc-line);
}
.mc-filters__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 500; }
.mc-filters__head h2 .mc-icon { font-size: 18px; color: var(--mc-green); }
.mc-filters__head a { font-size: 12px; color: var(--mc-green); }
.mc-filters__head a:hover { text-decoration: underline; }

.mc-filters__group { margin: 0; padding: 14px 0 12px; border: 0; border-bottom: 1px solid var(--mc-line); }
.mc-filters__group:last-of-type { border-bottom: 0; }
.mc-filters__group legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; font-size: 14px; font-weight: 500; color: var(--mc-ink); }
.mc-filters__group ul { clear: both; }
.mc-filters__group li + li { margin-top: 6px; }

.mc-check {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	font-weight: 300;
	color: var(--mc-ink);
	cursor: pointer;
}
.mc-check input { position: absolute; opacity: 0; pointer-events: none; }
.mc-check__box {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border: 1px solid #c9ced6;
	border-radius: 3px;
	background: var(--mc-white);
	color: var(--mc-white);
	font-size: 11px;
	transition: background .2s, border-color .2s;
}
.mc-check__box .mc-icon { opacity: 0; stroke-width: 3; }
.mc-check input:checked + .mc-check__box { background: var(--mc-green); border-color: var(--mc-green); }
.mc-check input:checked + .mc-check__box .mc-icon { opacity: 1; }
.mc-check input:focus-visible + .mc-check__box { outline: 2px solid var(--mc-green); outline-offset: 2px; }
.mc-check:hover .mc-check__box { border-color: var(--mc-green); }
.mc-check__label { flex: 1; }
.mc-check__count { font-size: 12px; color: var(--mc-text); }

.mc-filters__apply { width: 100%; margin-top: 16px; padding: 12px 20px; border-radius: 6px; font-size: 13px; }
.mc-filters__apply:hover .mc-icon { transform: none; }

/* Toolbar ------------------------------------------------------------------ */
.mc-shop__toolbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 14px;
}
.mc-shop__title { margin: 0 0 2px; font-size: 22px; font-weight: 600; }
.mc-shop__count { margin: 0; font-size: 12px; color: var(--mc-text); }
.mc-shop__tools { display: flex; align-items: center; gap: 12px; }
.mc-shop__filter-toggle { display: none; }

.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select {
	appearance: none;
	min-width: 200px;
	padding: 10px 38px 10px 14px;
	border: 1px solid var(--mc-line);
	border-radius: 6px;
	background: var(--mc-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111d2e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
	font: inherit;
	font-size: 12.5px;
	color: var(--mc-ink);
	cursor: pointer;
}
.woocommerce-ordering select:focus { border-color: var(--mc-green); outline: 0; }

/* Product grid ------------------------------------------------------------- */
.mc-shop ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
}
.mc-shop ul.products::before,
.mc-shop ul.products::after { display: none; }

.mc-pcard {
	display: flex;
	flex-direction: column;
	padding: 8px;
	background: var(--mc-white);
	border: 1px solid var(--mc-line);
	border-radius: 8px;
	transition: transform .35s var(--mc-ease), box-shadow .35s var(--mc-ease), border-color .35s;
}
.mc-pcard:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--mc-shadow-lg); }

.mc-pcard__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 6px;
	background: linear-gradient(180deg, #f6f7f9, #eef0f3);
}
.mc-pcard__media > a { position: absolute; inset: 0; }
.mc-shop ul.products li.mc-pcard .mc-pcard__media img {
	position: absolute;
	inset: 10px;
	width: calc(100% - 20px);
	height: calc(100% - 20px);
	margin: 0;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform .5s var(--mc-ease);
}
.mc-pcard:hover .mc-pcard__media img { transform: scale(1.06); }

.mc-pcard__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 4px 11px;
	border-radius: 4px;
	background: var(--mc-green);
	color: var(--mc-white);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
}
.mc-pcard__badge--sale { background: #e3342f; }

.mc-pcard__wish {
	position: absolute;
	top: 8px;
	right: 8px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--mc-ink);
	font-size: 15px;
	transition: color .2s, transform .2s;
}
.mc-pcard__wish:hover { color: #e3342f; transform: scale(1.1); }
.mc-pcard__wish[aria-pressed="true"] { color: #e3342f; }
.mc-pcard__wish[aria-pressed="true"] .mc-icon { fill: currentColor; }

.mc-pcard__body { display: flex; flex: 1; flex-direction: column; padding: 12px 6px 6px; }
.mc-pcard__title { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.mc-pcard__title a { color: var(--mc-ink); }
.mc-pcard__title a:hover { color: var(--mc-green); }
.mc-pcard__subtitle { margin: 2px 0 0; font-size: 12px; color: var(--mc-muted); }

.mc-pcard__specs { margin: 12px 0 0; }
.mc-pcard__specs li { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 1.4; color: var(--mc-text); }
.mc-pcard__specs li + li { margin-top: 8px; }
.mc-pcard__specs .mc-icon { font-size: 14px; color: var(--mc-green); }

.mc-pcard__price { display: flex; align-items: baseline; gap: 8px; margin: auto 0 0; padding-top: 18px; }
.mc-pcard__price span { font-size: 12px; font-weight: 500; color: var(--mc-ink); }
.mc-pcard__price strong,
.mc-pcard__price strong .amount { font-size: 18px; font-weight: 600; color: var(--mc-green); }
.mc-pcard__price .mc-pcard__poa { font-size: 15px; }

.mc-pcard__actions { display: flex; gap: 10px; margin-top: 10px; }
.mc-pcard__details { flex: 1; padding: 11px 14px; border-radius: 6px; font-size: 12px; }
.mc-pcard__cart {
	position: relative;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 38px;
	border: 1.5px solid var(--mc-green);
	border-radius: 6px;
	color: var(--mc-green);
	font-size: 16px;
	transition: background .25s, color .25s;
}
.mc-pcard__cart:hover { background: var(--mc-green); color: var(--mc-white); }
.mc-pcard__cart.loading { opacity: .6; pointer-events: none; }
.mc-pcard__cart.added { background: var(--mc-green); color: var(--mc-white); }
.mc-pcard .added_to_cart { display: none; }

/* Pagination --------------------------------------------------------------- */
.mc-pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.mc-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid var(--mc-line);
	border-radius: 6px;
	background: var(--mc-white);
	font-size: 12px;
	color: var(--mc-ink);
	transition: background .2s, border-color .2s, color .2s;
}
.mc-pagination a.page-numbers:hover { border-color: var(--mc-green); color: var(--mc-green); }
.mc-pagination .page-numbers.current { border-color: var(--mc-green); background: var(--mc-green); color: var(--mc-white); }
.mc-pagination .page-numbers.dots { border: 0; background: none; }

.mc-shop__empty {
	padding: 60px 30px;
	border: 1px dashed var(--mc-line);
	border-radius: 8px;
	text-align: center;
}
.mc-shop__empty > .mc-icon { display: block; margin: 0 auto 12px; font-size: 36px; color: var(--mc-green); }
.mc-shop__empty h3 { font-size: 18px; }

.mc-shop .woocommerce-message,
.mc-shop .woocommerce-info,
.mc-shop .woocommerce-error {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-left: 3px solid var(--mc-green);
	background: var(--mc-green-soft);
	font-size: 13px;
	list-style: none;
}
.mc-shop .woocommerce-error { border-color: #e3342f; background: #fdecec; }

/* Assurance strip ---------------------------------------------------------- */
.mc-assurance { margin-top: 10px; margin-bottom: 0; }
.mc-assurance__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	padding: 18px 0;
	border-radius: 8px;
	background: var(--mc-bg-soft);
}
.mc-assurance__item { display: flex; gap: 22px; padding: 4px 26px; border-left: 1px solid var(--mc-line); }
.mc-assurance__item:first-child { border-left: 0; }
.mc-assurance__item > .mc-icon { font-size: 30px; color: var(--mc-green); stroke-width: 1.5; }
.mc-assurance__item h3 { margin: 4px 0 6px; font-size: 13px; font-weight: 500; }
.mc-assurance__item p { margin: 0; font-size: 11.5px; line-height: 1.6; }
.mc-main:has(.mc-assurance) { padding-bottom: 10px; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1199px) {
	.mc-shop ul.products { grid-template-columns: repeat(2, 1fr); }
	.mc-assurance__grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
	.mc-assurance__item:nth-child(3) { border-left: 0; }
}

@media (max-width: 991px) {
	.mc-search__form { position: fixed; top: auto; left: 16px; right: 16px; width: auto; margin-top: 26px; }
	.mc-page-hero::before { inset: 0; }
	.mc-page-hero::after { background: linear-gradient(90deg, rgba(15, 27, 43, .95), rgba(15, 27, 43, .7)); }

	.mc-shop { grid-template-columns: 1fr; }
	.mc-shop__filter-toggle { display: inline-flex; }
	.mc-filters {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 220;
		width: min(320px, 88vw);
		overflow-y: auto;
		border-radius: 0;
		transform: translateX(-100%);
		transition: transform .35s var(--mc-ease);
	}
	.admin-bar .mc-filters { top: 0; }
	.mc-filters.is-open { transform: none; box-shadow: var(--mc-shadow-lg); }
	.mc-filters-open::after {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 210;
		background: rgba(15, 27, 43, .5);
	}
}

@media (max-width: 767px) {
	.mc-shop__toolbar { flex-direction: column; }
	.mc-shop__tools { width: 100%; }
	.woocommerce-ordering { flex: 1; }
	.woocommerce-ordering select { width: 100%; min-width: 0; }
	.mc-shop ul.products { grid-template-columns: 1fr; }
	.mc-pagination { justify-content: center; }
	.mc-assurance__grid { grid-template-columns: 1fr; }
	.mc-assurance__item { border-left: 0; }
}
