/* ==========================================================================
   LEFT MENU - DANH MỤC SẢN PHẨM
   ========================================================================== */

#menuwrapper {
	position: relative;
	z-index: 900;
	background-color: #e7f6fd;
	border-bottom: 2px solid #12a2d8;
	border-radius: 20px;
	overflow: visible;
	box-shadow: 0 4px 15px rgba(18, 162, 216, 0.08);
}

.title_h2_menu {
	text-align: left;
	font-size: 17px;
	font-weight: 600;
	color: #fff !important;
	background: #12a2d8;
	padding: 11px 16px;
	margin: -1px -1px 0 -1px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(18, 162, 216, 0.25);
}

.title_h2_menu span {
	color: #fff;
}

.title_h2_menu i {
	font-size: 14px;
	color: #fff;
	transition: transform 0.2s ease;
}

/* Fallback caret if i is not present */
.title_h2_menu:not(:has(i))::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #fff;
	margin-left: 10px;
}

/* 1st Level Menu */
#menuwrapper>ul {
	padding: 6px 4px 10px 14px;
	margin: 0;
	list-style: none;
}

#menuwrapper>ul>li {
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
	position: relative;
	border-bottom: 1px dotted #b0c9d6;
	background: transparent;
	transition: background-color 0.2s ease;
}

#menuwrapper>ul>li:last-child {
	border-bottom: none;
}

#menuwrapper>ul>li>a {
	display: flex;
	align-items: center;
	padding: 8px 2px;
	color: #000;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
	line-height: 1.35;
	width: 100%;
}

#menuwrapper>ul>li:hover>a,
#menuwrapper>ul>li.active>a,
#menuwrapper>ul>li>a.active {
	color: #12a2d8;
	text-decoration: none;
}

#menuwrapper>ul>li>a .menu_bullet {
	font-size: 16px;
	line-height: 1;
	margin-right: 4px;
	flex-shrink: 0;
}

#menuwrapper>ul>li>a img,
#menuwrapper>ul>li>a .menu_icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	margin-right: 10px;
	flex-shrink: 0;
}

#menuwrapper>ul>li>a .menu_text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#menuwrapper .sub_arrow {
	font-size: 12px;
	color: #7bbcd7;
	margin-left: 6px;
	transition: transform 0.2s ease, color 0.2s ease;
}

#menuwrapper li:hover>a .sub_arrow {
	color: #12a2d8;
	transform: translateX(2px);
}

/* Hide checkbox by default */
#menuwrapper input.show-submenu {
	display: none;
}

/**** 2ND & 3RD LEVEL FLYOUT MENUS ****/
#menuwrapper ul li ul {
	position: absolute;
	top: -1px;
	left: 100%;
	width: 240px;
	min-width: 200px;
	background: #e7f6fd;
	border-bottom: 2px solid #12a2d8;
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	padding: 0;
	margin: 0 0 0 2px;
	list-style: none;
	display: none;
	z-index: 1000;
	overflow: visible;
}

/* Invisible hover bridge to prevent losing hover when moving mouse */
#menuwrapper ul li ul::before {
	content: '';
	position: absolute;
	top: 0;
	left: -8px;
	width: 8px;
	height: 100%;
}

#menuwrapper ul li:hover>ul {
	display: block;
}

#menuwrapper ul li ul li {
	list-style: none;
	width: 100%;
	position: relative;
	border-bottom: 1px dotted #cce4f0;
	background: transparent;
}

#menuwrapper ul li ul li:last-child {
	border-bottom: none;
}

#menuwrapper ul li ul li:first-child,
#menuwrapper ul li ul li:first-child>a {
	border-top-left-radius: 12px;
	border-top-right-radius: 12px;
}

#menuwrapper ul li ul li:last-child,
#menuwrapper ul li ul li:last-child>a {
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 12px;
}

#menuwrapper ul li ul li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	color: #000 !important;
	font-size: 15px !important;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
	line-height: 1.4;
	box-sizing: border-box;
	width: 100%;
}

#menuwrapper ul li ul li a .menu_text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#menuwrapper ul li ul li:hover>a,
#menuwrapper ul li ul li.active>a,
#menuwrapper ul li ul li>a.active {
	background-color: #e7f6fd;
	color: #12a2d8 !important;
}

/**** THIRD LEVEL FLYOUT MENU Z-INDEX ****/
#menuwrapper ul li ul li ul {
	z-index: 1010;
}

/* Slideshow rounded corners to match the design */
#wrap_block_slide .callbacks,
#wrap_block_slide .rslides,
#wrap_block_slide .rslides img {
	border-radius: 20px;
	overflow: hidden;
}

/* Responsive adjustment */
@media (max-width: 767px) {
	#menuwrapper {
		margin-bottom: 25px;
	}

	#menuwrapper ul li:hover>ul {
		position: static;
		width: 100%;
		box-shadow: none;
		border-radius: 8px;
		margin: 5px 0;
	}
}