/* MTEE Mega Menu — desktop: panel thả xuống rộng bằng khung nội dung; mobile (< 850px, như Flatsome): màn hình toàn phần.
 * Trên mobile JS chuyển panel ra <body> (header dính của Flatsome có transform/z-index làm hỏng position: fixed),
 * nên style bên trong panel bám vào .mtee-mm__panel chứ không bám vào .mtee-mm. */

.mtee-mm,
.mtee-mm__panel {
	--mtee-mm-primary: #348eee;
	--mtee-mm-primary-dark: #1e73be;
	--mtee-mm-primary-soft: #eef5fe;
	--mtee-mm-text: #1d2939;
	--mtee-mm-muted: #667085;
	--mtee-mm-line: #eaecf0;
	--mtee-mm-soft: #f7f9fc;
	--mtee-mm-side-w: 200px; /* bằng cột trái của trang chủ Flatsome (large-2) */
	--mtee-mm-top: 0px; /* JS đặt = mép dưới nút, để lớp phủ không che header */

	color: var(--mtee-mm-text);
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
}

.mtee-mm {
	position: relative;
	display: inline-block;
	vertical-align: middle;
}

.mtee-mm.is-open {
	z-index: 1000;
}

.mtee-mm *,
.mtee-mm *::before,
.mtee-mm *::after,
.mtee-mm__panel,
.mtee-mm__panel * {
	box-sizing: border-box;
}

.mtee-mm__panel [hidden] {
	display: none !important;
}

.mtee-mm__icon {
	width: 16px;
	height: 16px;
	flex: none;
}

/* ---- Nút mở (reset style button của Flatsome) ---- */
.mtee-mm .mtee-mm__trigger {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: var(--mtee-mm-side-w);
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0 10px 0 12px;
	border: 0;
	border-radius: 8px;
	background: var(--mtee-mm-primary);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s;
}

.mtee-mm .mtee-mm__trigger:hover,
.mtee-mm.is-open .mtee-mm__trigger {
	background: var(--mtee-mm-primary-dark);
}

.mtee-mm .mtee-mm__trigger .mtee-mm__icon {
	flex: none;
}

.mtee-mm .mtee-mm__trigger .mtee-mm__icon--grid {
	width: 18px;
	height: 18px;
}

/* Chữ co lại (cắt bằng ...) thay vì đẩy mũi tên ra ngoài nút 200px */
.mtee-mm .mtee-mm__trigger-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mtee-mm .mtee-mm__trigger .mtee-mm__icon--down {
	width: 14px;
	height: 14px;
	margin-left: auto;
	opacity: 0.85;
	transition: transform 0.2s;
}

.mtee-mm.is-open .mtee-mm__trigger .mtee-mm__icon--down {
	transform: rotate(180deg);
}

.mtee-mm .mtee-mm__trigger:focus-visible,
.mtee-mm__panel a:focus-visible,
.mtee-mm__panel .mtee-mm__close:focus-visible {
	outline: 2px solid var(--mtee-mm-primary);
	outline-offset: 2px;
}

.mtee-mm.is-open .mtee-mm__trigger,
.mtee-mm--dock .mtee-mm__trigger {
	border-radius: 8px 8px 0 0;
}

.mtee-mm__trigger-label--m {
	display: none;
}

/* ---- Lớp phủ trang (desktop) ---- */
.mtee-mm__overlay {
	position: fixed;
	inset: var(--mtee-mm-top) 0 0 0;
	z-index: 1;
	display: none;
	background: rgba(16, 24, 40, 0.4);
}

.mtee-mm.is-open .mtee-mm__overlay {
	display: block;
}

/* ---- Panel ---- */
.mtee-mm__panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 2;
	display: none;
	flex-direction: column;
	width: var(--mtee-mm-w, 960px);
	max-width: calc(100vw - 32px);
	height: min(560px, calc(100vh - var(--mtee-mm-top) - 16px));
	overflow: hidden;
	border: 1px solid var(--mtee-mm-line);
	border-top: 0;
	border-radius: 0 12px 12px 12px;
	background: #fff;
	box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.28);
}

.mtee-mm__panel.is-open {
	display: flex;
}

.mtee-mm__head {
	display: none;
}

.mtee-mm__body {
	display: flex;
	flex: 1;
	min-height: 0;
}

/* Cột trái: danh mục cấp 1 */
.mtee-mm__side {
	display: block; /* theme hay đặt nav { display: flex } */
	flex: none;
	width: var(--mtee-mm-side-w);
	padding: 6px 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
	border-right: 1px solid var(--mtee-mm-line);
	background: #fff;
}

.mtee-mm__side::-webkit-scrollbar {
	display: none;
}

.mtee-mm__panel .mtee-mm__cat {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 6px 10px 6px 12px;
	color: var(--mtee-mm-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.12s, color 0.12s;
}

.mtee-mm__panel .mtee-mm__cat::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 0;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--mtee-mm-primary);
	opacity: 0;
}

.mtee-mm__cat-ico {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--mtee-mm-soft);
	color: #98a2b3;
}

.mtee-mm__cat-name {
	flex: 1;
	min-width: 0;
}

.mtee-mm__panel .mtee-mm__cat .mtee-mm__icon--chevron {
	width: 14px;
	height: 14px;
	color: var(--mtee-mm-muted);
	opacity: 0.45;
}

.mtee-mm__panel .mtee-mm__cat:hover,
.mtee-mm__panel .mtee-mm__cat.is-active {
	background: var(--mtee-mm-primary-soft);
	color: var(--mtee-mm-primary-dark);
}

.mtee-mm__panel .mtee-mm__cat.is-active {
	font-weight: 600;
}

.mtee-mm__panel .mtee-mm__cat.is-active::before {
	opacity: 1;
}

.mtee-mm__panel .mtee-mm__cat.is-active .mtee-mm__cat-ico {
	background: #fff;
}

.mtee-mm__panel .mtee-mm__cat.is-active .mtee-mm__icon--chevron {
	color: var(--mtee-mm-primary);
	opacity: 1;
}

/* Cột phải: tên danh mục + lưới ảnh */
.mtee-mm__content {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 24px 24px;
}

.mtee-mm__pane-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--mtee-mm-line);
}

.mtee-mm__panel .mtee-mm__pane-title {
	margin: 0;
	padding: 0;
	color: var(--mtee-mm-text);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
	text-transform: none;
}

.mtee-mm__panel .mtee-mm__all {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 2px;
	padding: 6px 10px 6px 14px;
	border-radius: 999px;
	background: var(--mtee-mm-primary-soft);
	color: var(--mtee-mm-primary-dark);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.mtee-mm__panel .mtee-mm__all:hover {
	background: var(--mtee-mm-primary);
	color: #fff;
}

.mtee-mm__panel .mtee-mm__all .mtee-mm__icon,
.mtee-mm__panel .mtee-mm__more .mtee-mm__icon {
	width: 14px;
	height: 14px;
}

.mtee-mm__sec {
	padding-top: 16px;
}

.mtee-mm__sec-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 10px;
}

.mtee-mm__panel .mtee-mm__sec-title {
	margin: 0;
	padding: 0;
	color: #475467;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1.4;
	text-transform: uppercase;
}

.mtee-mm__panel .mtee-mm__more {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 2px;
	color: var(--mtee-mm-primary);
	font-size: 13px;
	text-decoration: none;
}

.mtee-mm__panel .mtee-mm__more:hover {
	text-decoration: underline;
}

.mtee-mm__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 10px;
}

.mtee-mm__panel .mtee-mm__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 12px 6px 10px;
	border: 1px solid var(--mtee-mm-line);
	border-radius: 12px;
	background: #fff;
	color: var(--mtee-mm-text);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, color 0.15s;
}

.mtee-mm__panel a.mtee-mm__tile:hover {
	border-color: #b9d8fb;
	box-shadow: 0 10px 24px -10px rgba(52, 142, 238, 0.45);
	color: var(--mtee-mm-primary-dark);
	transform: translateY(-2px);
}

.mtee-mm__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	color: #98a2b3;
}

.mtee-mm__thumb .mtee-mm__icon {
	width: 36px;
	height: 36px;
}

.mtee-mm__panel .mtee-mm__img {
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply; /* ảnh nền trắng hoà vào nền xám của ô icon */
}

.mtee-mm__label {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow-wrap: anywhere;
}

/* Hotline */
.mtee-mm__foot {
	flex: none;
	padding: 10px 24px;
	border-top: 1px solid var(--mtee-mm-line);
	background: var(--mtee-mm-soft);
}

.mtee-mm__panel .mtee-mm__call {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--mtee-mm-muted);
	font-size: 13px;
	text-decoration: none;
}

.mtee-mm__call-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--mtee-mm-primary);
	color: #fff;
}

.mtee-mm__call-ico .mtee-mm__icon {
	width: 14px;
	height: 14px;
}

.mtee-mm__call-num {
	color: var(--mtee-mm-primary-dark);
	font-size: 15px;
	font-weight: 700;
}

.mtee-mm__panel .mtee-mm__call:hover .mtee-mm__call-num {
	text-decoration: underline;
}

/* ---- Desktop: trang chủ, cột danh mục luôn mở như Vertical Menu của Flatsome ---- */
@media (min-width: 850px) {
	.mtee-mm--dock .mtee-mm__panel {
		display: flex;
	}

	.mtee-mm--dock:not(.is-open) .mtee-mm__panel {
		width: var(--mtee-mm-side-w);
		height: auto;
		border-radius: 0 0 12px 12px;
		box-shadow: 0 6px 16px -8px rgba(16, 24, 40, 0.16);
	}

	.mtee-mm--dock:not(.is-open) .mtee-mm__content,
	.mtee-mm--dock:not(.is-open) .mtee-mm__foot {
		display: none;
	}

	.mtee-mm--dock:not(.is-open) .mtee-mm__side {
		border-right: 0;
	}

	.mtee-mm--dock:not(.is-open) .mtee-mm__cat.is-active:not(:hover) {
		background: none;
		color: var(--mtee-mm-text);
		font-weight: 500;
	}

	.mtee-mm--dock:not(.is-open) .mtee-mm__cat.is-active::before {
		opacity: 0;
	}

	/* Header dính (Flatsome thêm .stuck): chỉ còn nút, như Vertical Menu gốc */
	.stuck .mtee-mm--dock:not(.is-open) .mtee-mm__panel {
		display: none;
	}

	.stuck .mtee-mm--dock:not(.is-open) .mtee-mm__trigger {
		border-radius: 8px;
	}
}

/* ---- Mobile / tablet nhỏ ---- */
@media (max-width: 849px) {
	.mtee-mm .mtee-mm__trigger,
	.mtee-mm.is-open .mtee-mm__trigger {
		flex-direction: column;
		justify-content: center;
		gap: 3px;
		width: auto;
		height: 44px;
		padding: 0 6px;
		border-radius: 8px;
		background: transparent;
		color: var(--mtee-mm-primary);
		font-size: 10px;
		font-weight: 600;
	}

	.mtee-mm .mtee-mm__trigger:hover {
		background: transparent;
	}

	.mtee-mm .mtee-mm__trigger .mtee-mm__icon--grid {
		width: 22px;
		height: 22px;
	}

	.mtee-mm .mtee-mm__trigger .mtee-mm__icon--down,
	.mtee-mm__trigger-label {
		display: none;
	}

	.mtee-mm__trigger-label--m {
		display: inline;
	}

	.mtee-mm.is-open .mtee-mm__overlay {
		display: none;
	}

	.mtee-mm__panel {
		position: fixed;
		inset: 0;
		z-index: 2147483647; /* trên admin bar, header dính của Flatsome và bong bóng chat (Tawk.to dùng 2000000000) */
		display: flex;
		width: auto;
		max-width: none;
		height: auto;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		visibility: hidden;
		transform: translateX(-100%);
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}

	.mtee-mm__panel.is-open {
		visibility: visible;
		transform: none;
		transition: transform 0.25s ease;
	}

	.mtee-mm__head {
		display: flex;
		flex: none;
		align-items: center;
		justify-content: space-between;
		height: 56px;
		padding: 0 12px 0 16px;
		padding-top: env(safe-area-inset-top);
		border-bottom: 1px solid var(--mtee-mm-line);
	}

	.mtee-mm__head-title {
		font-size: 17px;
		font-weight: 700;
	}

	.mtee-mm__panel .mtee-mm__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		min-height: 0;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: var(--mtee-mm-soft);
		color: var(--mtee-mm-muted);
		cursor: pointer;
	}

	.mtee-mm__panel .mtee-mm__close .mtee-mm__icon {
		width: 18px;
		height: 18px;
	}

	.mtee-mm__side {
		width: 92px;
		padding: 0;
		background: var(--mtee-mm-soft);
	}

	.mtee-mm__panel .mtee-mm__cat {
		flex-direction: column;
		justify-content: center;
		gap: 6px;
		min-height: 84px;
		padding: 10px 6px;
		border-bottom: 1px solid var(--mtee-mm-line);
		font-size: 11.5px;
		line-height: 1.3;
		text-align: center;
	}

	.mtee-mm__panel .mtee-mm__cat::before {
		top: 0;
		bottom: 0;
		border-radius: 0;
	}

	.mtee-mm__panel .mtee-mm__cat:hover {
		background: none;
		color: var(--mtee-mm-text);
	}

	.mtee-mm__panel .mtee-mm__cat.is-active {
		background: #fff;
		color: var(--mtee-mm-primary-dark);
	}

	.mtee-mm__cat-ico {
		width: 38px;
		height: 38px;
		background: #fff;
	}

	.mtee-mm__cat-name {
		flex: none;
	}

	.mtee-mm__panel .mtee-mm__cat .mtee-mm__icon--chevron {
		display: none;
	}

	.mtee-mm__content {
		padding: 14px 12px 20px;
	}

	.mtee-mm__pane-head {
		padding-bottom: 12px;
	}

	.mtee-mm__panel .mtee-mm__pane-title {
		font-size: 16px;
	}

	.mtee-mm__panel .mtee-mm__all {
		padding: 5px 8px 5px 12px;
		font-size: 12px;
	}

	.mtee-mm__sec {
		padding-top: 14px;
	}

	.mtee-mm__sec-head {
		padding-bottom: 8px;
	}

	.mtee-mm__panel .mtee-mm__sec-title {
		font-size: 12px;
	}

	.mtee-mm__panel .mtee-mm__more {
		font-size: 12px;
	}

	.mtee-mm__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	.mtee-mm__panel .mtee-mm__tile {
		gap: 6px;
		padding: 8px 4px;
		border-radius: 10px;
		font-size: 12px;
	}

	.mtee-mm__panel a.mtee-mm__tile:hover {
		box-shadow: none;
		transform: none;
	}

	.mtee-mm__thumb {
		width: 52px;
		height: 52px;
	}

	.mtee-mm__foot {
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: #fff;
	}

	.mtee-mm__panel .mtee-mm__call {
		justify-content: center;
		width: 100%;
		height: 46px;
		border-radius: 10px;
		background: var(--mtee-mm-primary);
		color: rgba(255, 255, 255, 0.9);
		font-size: 14px;
	}

	.mtee-mm__call-ico {
		width: auto;
		height: auto;
		background: none;
	}

	.mtee-mm__call-ico .mtee-mm__icon {
		width: 18px;
		height: 18px;
	}

	.mtee-mm__call-num {
		color: #fff;
		font-size: 16px;
	}
}

html.mtee-mm-lock,
html.mtee-mm-lock body {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.mtee-mm__panel,
	.mtee-mm__panel.is-open,
	.mtee-mm__panel .mtee-mm__tile {
		transition: none;
	}
}
