.xd-menu-nav {
	width: 100%;
}

.xd-menu {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.xd-menu-item {
	position: relative;
}

.xd-menu-item > a {
	display: block;
	text-decoration: none;
	white-space: nowrap;
	transition: color .2s ease;
}

.xd-menu-item > a i {
	font-size: 11px;
	margin-left: 6px;
}

/* ===== Mega menu / dropdown =====
   Dùng position: fixed + JS tính top/left, để tránh bị overflow:hidden
   của các container/section cha (Elementor) cắt mất nội dung. */
.xd-menu-mega {
	position: fixed;
	top: 0;
	left: 0;
	width: max-content;
	max-width: 100vw;
	z-index: 999;
	display: none;
}

.xd-menu-mega-full {
	left: 0 !important;
	right: 20px;
	width: auto;
}

.xd-menu-item.xd-menu-has-mega:hover > .xd-menu-mega,
.xd-menu-item.xd-menu-open > .xd-menu-mega {
	display: block;
}

/* ===== Mobile trigger + overlay =====
   Hiển thị/ẩn và vị trí drawer được sinh động theo breakpoint của từng
   widget (xem class-xd-menu-widget.php), CSS dưới đây chỉ là phần dùng chung. */
.xd-menu-trigger {
	display: none;
	width: 100%;
}

.xd-menu-trigger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	cursor: pointer;
	line-height: 1;
}

.xd-trigger-icon-open,
.xd-trigger-icon-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.xd-menu-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
}

body.xd-mobile-menu-open {
	overflow: hidden;
}

/* ===== Grid card xe (shortcode xd_xe_grid) ===== */
.xd-mm-grid {
	display: grid;
	gap: 20px;
}

.xd-mm-card {
	display: block;
	text-decoration: none;
	color: #222;
	text-align: center;
}

.xd-mm-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.xd-mm-name {
	margin-top: 8px;
	font-weight: 600;
	font-size: 14px;
	color: #1e3a8a;
}

.xd-mm-price {
	margin-top: 4px;
	font-size: 13px;
	font-weight: 700;
	color: #dc2626;
}

.xd-mm-empty {
	text-align: center;
	color: #888;
	grid-column: 1 / -1;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
	.xd-mm-grid {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.xd-mm-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
