/* ==========================================================
   Mansons Catalog Navigation
   ========================================================== */

:root {
	--mcn-accent: #f6c515;
	--mcn-dark: #1a1a1a;
	--mcn-text: #1a1a1a;
	--mcn-muted: #6b6b6b;
	--mcn-border: #ececec;
	--mcn-panel-bg: #ffffff;
	--mcn-column-width: 280px;
	--mcn-z: 99999;
}

.mcn-root { position: relative; display: inline-flex; }

/* ---------- Hamburger trigger ---------- */

.mcn-trigger {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	line-height: 0;
}

.mcn-trigger-circle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--mcn-accent);
	transition: transform 0.2s ease;
}

.mcn-trigger:hover .mcn-trigger-circle { transform: scale(1.05); }

.mcn-trigger-bar {
	width: 18px;
	height: 2px;
	background: var(--mcn-dark);
	border-radius: 1px;
}

.mcn-trigger[aria-expanded="true"] .mcn-trigger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mcn-trigger[aria-expanded="true"] .mcn-trigger-bar:nth-child(2) { opacity: 0; }
.mcn-trigger[aria-expanded="true"] .mcn-trigger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mcn-trigger-bar { transition: transform 0.2s ease, opacity 0.2s ease; }

/* ---------- Overlay + panel ---------- */

.mcn-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: var(--mcn-z);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.mcn-overlay.is-open { opacity: 1; }
.mcn-overlay[hidden] { display: none; }

.mcn-panel {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(100vw, 1320px);
	max-width: 100vw;
	background: var(--mcn-panel-bg);
	z-index: calc(var(--mcn-z) + 1);
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	box-shadow: 6px 0 24px rgba(0, 0, 0, 0.12);
}
.mcn-panel.is-open { transform: translateX(0); }

.mcn-panel-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--mcn-border);
	flex: 0 0 auto;
}

.mcn-back {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--mcn-text);
	cursor: pointer;
	white-space: nowrap;
}
.mcn-back[hidden] { display: none; }

.mcn-breadcrumb {
	flex: 1 1 auto;
	overflow-x: auto;
	white-space: nowrap;
	font-size: 13px;
	color: var(--mcn-muted);
}
.mcn-breadcrumb button {
	background: none;
	border: none;
	font: inherit;
	color: var(--mcn-muted);
	cursor: pointer;
	padding: 4px 2px;
}
.mcn-breadcrumb button.is-current {
	color: var(--mcn-text);
	font-weight: 700;
	cursor: default;
}
.mcn-breadcrumb .mcn-crumb-sep { margin: 0 6px; color: #c9c9c9; }

.mcn-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: var(--mcn-muted);
	flex: 0 0 auto;
}
.mcn-close:hover { color: var(--mcn-text); }

.mcn-columns {
	flex: 1 1 auto;
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
}

/* ---------- Category column ---------- */

.mcn-column {
	flex: 0 0 var(--mcn-column-width);
	width: var(--mcn-column-width);
	border-right: 1px solid var(--mcn-border);
	overflow-y: auto;
	height: 100%;
	padding: 6px 0;
	margin-left: 55px;
}

.mcn-view-all {
	display: block;
	padding: 10px 18px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: var(--mcn-accent);
	text-decoration: none;
	border-bottom: 1px solid var(--mcn-border);
}
.mcn-view-all:hover { text-decoration: underline; }

.mcn-cat-list { list-style: none; margin: 0; padding: 0; }

.mcn-cat-item button {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	text-align: left;
	padding: 11px 18px;
	font-size: 14px;
	color: var(--mcn-text);
	cursor: pointer;
}
.mcn-cat-item button:hover,
.mcn-cat-item.is-active button {
	background: #fcde5e;
}
.mcn-cat-item.is-active button { font-weight: 700; }

.mcn-cat-thumb {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
	background: #f2f2f2;
}

.mcn-cat-name { flex: 1 1 auto; }

.mcn-cat-count {
	font-size: 12px;
	color: var(--mcn-muted);
	flex: 0 0 auto;
}

.mcn-cat-chevron {
	flex: 0 0 auto;
	color: #000;
	font-size: 25px;
}

.mcn-empty {
	padding: 24px 18px;
	font-size: 13px;
	color: var(--mcn-muted);
}

/* ---------- Product column ---------- */

.mcn-column.mcn-column-products {
	flex-basis: min(560px, calc(100vw - var(--mcn-column-width) * 2));
	width: auto;
}

.mcn-product-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	padding: 14px 18px;
}

.mcn-product-card {
	display: block;
	text-decoration: none;
	color: var(--mcn-text);
	border: 1px solid var(--mcn-border);
	border-radius: 6px;
	overflow: hidden;
}
.mcn-product-card img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	background: #f6f6f6;
}
.mcn-product-info { padding: 8px 10px; }
.mcn-product-name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mcn-product-price { font-size: 13px; color: var(--mcn-dark); margin-top: 4px; }
.mcn-product-stock { font-size: 11px; margin-top: 2px; }
.mcn-product-stock.out { color: #c0392b; }
.mcn-product-stock.in { color: #2e7d32; }

.mcn-load-more-wrap { padding: 4px 18px 18px; }
.mcn-load-more {
	width: 100%;
	padding: 10px;
	border: 1px solid var(--mcn-border);
	background: #fff;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.mcn-load-more:hover { background: #faf7ea; }
.mcn-load-more:disabled { opacity: 0.5; cursor: default; }

.mcn-loading {
	padding: 24px 18px;
	font-size: 13px;
	color: var(--mcn-muted);
}

body.mcn-lock { overflow: hidden; }

/* ==========================================================
   Mobile: single-column drill-down instead of side-by-side
   ========================================================== */
@media (max-width: 992px) {
	.mcn-panel { width: 100vw; }

	.mcn-columns { overflow-x: hidden; }

	.mcn-column,
	.mcn-column.mcn-column-products {
		flex: 0 0 100%;
		width: 100%;
		border-right: none;
	}

	.mcn-product-grid { grid-template-columns: repeat(2, 1fr); }

	.mcn-breadcrumb { display: none; } /* mobile relies on the Back button + a single current-level label */
	.mcn-panel-header .mcn-current-label {
		flex: 1 1 auto;
		font-size: 14px;
		font-weight: 700;
	}
}

@media (min-width: 993px) {
	.mcn-current-label { display: none; }
}
