/*
JQuery Simple MobileMenu Slide
https://github.com/Position2/jQuery-Simple-MobileMenu
*/

/* Hide parts of menu that don't fit the screen */
body.mmactive { overflow: hidden; }

/* Hide header icons (cart, favorites) when mobile menu is open */
body.mmactive .et_pb_icon_list_0_tb_header,
body.mmactive .et_pb_icon_list_1_tb_header {
	visibility: hidden !important;
}

/* Keep the hamburger visible when menu is open */
body.mmactive .pdt-hamburger-wrapper {
	visibility: visible !important;
}

/* Hide mobile menu by default */
.mobile_menu { display: none; }

/* Show mobile menu when active */
.sm_menu_outer.active .mobile_menu { display: block; }

.sm_menu_outer.active {	opacity: 1; z-index: 999; display: block; }

/* Base menu styling */
.sm_menu_outer {
	height: calc(100vh - 88px);
	overflow-y: scroll;
	overflow-x: hidden;
	position: fixed;
	right: 0;
	bottom: 0;
	z-index: -9;
	width: 100%;
	opacity: 0;
	display: none; /* Hidden by default on page load */
	background-color: #FDFBF9;
	-webkit-transition: opacity 0.2s;
	-moz-transition: opacity 0.2s;
	transition: opacity 0.2s;
}

/* Adjust for WordPress admin bar when logged in */
.admin-bar .sm_menu_outer {
	height: calc(100vh - 88px - 32px);  /* Account for 32px admin bar */
}

.admin-bar .sm_menu_outer.slide {
	top: 32px !important;
	height: calc(100vh - 32px) !important;
}

/* Admin bar on mobile is 46px */
@media screen and (max-width: 782px) {
	.admin-bar .sm_menu_outer {
		height: calc(100vh - 88px - 46px);
	}
	
	.admin-bar .sm_menu_outer.slide {
		top: 46px !important;
		height: calc(100vh - 46px) !important;
	}
}
		
.sm_menu_outer.slide a, .sm_menu_outer.slide span {	font-family: var(--pdt_global_heading_font); }	

.sm_menu_outer .mobile_menu a {
	color: #32568C;
	display: block;
	padding: 20px 0;
	text-decoration: none;
	text-align: left;
	font-size: 18px;
	font-weight: 700;
}

/* Breadcrumb styles */
.sm_menu_breadcrumb {
	color: black;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background-color: #FDFBF9;
	min-height: 68px;
	padding: 15px 15px 15px 15px;
	text-align: left;
	font-size: 14px;
	display: flex;
	align-items: center;
}

.sm_menu_breadcrumb .active { font-weight: 700; }

.sm_menu_home.active { color: #1C1818; }
.sm_menu_home.inactive { color: #AAADB0; }

.sm_menu_breadcrumb_links {
	position: relative;
	flex-wrap: wrap;
	line-height: 1.5;
	z-index: 9999;
}

.sm_menu_home.inactive::before,
.sm_menu_breadcrumb_seperator::before {
	font-family: ETmodules;
	font-size: 24px;
	font-weight: 800;
	color: #32568C;
	position: relative;
	top: 4px;
}

.sm_menu_home.inactive::before {
	content: "4";
	padding: 4px;
	border: 1px solid #E4945A;
	border-radius: 50%;
	margin-right: 5px;
}

.sm_menu_breadcrumb_seperator::before { 
	content: "5";
	padding: 0 5px;
}

.sm_menu_breadcrumb_links a,
.sm_menu_breadcrumb_links span {
	display: inline;
	word-break: break-word;
}

.sm_menu_outer:has(.sm_menu_breadcrumb).slide .mobile_menu .submenu {
	height: auto;
	min-height: calc(100% - 68px);
	/*bottom: 68px !important;*/
}

.pdt-mobile-menu-panel { 
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	pointer-events: none; /* Allow clicks to pass through when menu is closed */
}

.pdt-mobile-menu-panel .sm_menu_outer {
	pointer-events: auto; /* Re-enable clicks on the menu panel */
}

.pdt-mobile-menu-panel .sm_menu_outer.active {
	pointer-events: auto;
}

/* Hamburger wrapper in header icon list */
.pdt-hamburger-wrapper {
	display: flex !important;
	align-items: center;
	justify-content: center;
	margin-left: 0;
	margin-right: 20px;  /* Push 20px to the left of the other icons */
	cursor: pointer;
	padding: 10px;  /* Increase tap target */
	position: relative;
	z-index: 100000;
}

.pdt-hamburger-wrapper #sm_menu_ham {
	pointer-events: auto;
}

/* Fixed position fallback for hamburger */
#sm_menu_ham.pdt-fixed-hamburger {
	position: fixed !important;
	top: 20px;
	right: 20px;
	z-index: 100001;
}

.sm_menu_outer.slide {
	position: fixed;
	left: 0;
	top: 0;
	width: 100vw !important;
	height: 100vh !important;
}

/* Push menu down to account for breadcrumbs - dynamically set by JavaScript */	
.mobile_menu_slide { margin-top: 68px; } /* Fallback value */

/* Submenu animation */
.sm_menu_outer.slide .mobile_menu .submenu {
	background-color: #FFFFFF;
	height: 100%;
	position: absolute;
	right: -100%;
	top: 0;
	padding-top: 68px;
	transition: all 0.5s ease 0s;
	width: 100%;
	z-index: 999;
}

.sm_menu_outer.slide .mobile_menu li.active > .submenu { right: 0; }

.sm_menu_outer .mobile_menu li {
	list-style-type: none;
	border-bottom: 1px solid #9B9EA1;
}

/* Back button styling */
.sm_menu_outer .mobile_menu li.back {
	background-color: #f5f5f5;
	border-bottom: 2px solid #32568C;
}

.sm_menu_outer .mobile_menu li.back a {
	position: relative;
	padding-left: 35px !important;
	font-weight: 600 !important;
	color: #32568C !important;
}

.sm_menu_outer .mobile_menu li.back a:before {
	content: "";
	position: absolute;
	left: 15px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-left: 3px solid #32568C;
	border-bottom: 3px solid #32568C;
	transform: translateY(-50%) rotate(45deg);
}

.sm_menu_outer.slide .mobile_menu li.hasChild > a {
	position: relative;
	padding-right: 40px !important;
}

.sm_menu_outer.slide .mobile_menu li.hasChild > a:after {
	content: "";
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 10px;
	border-right: 3px solid #32568C;
	border-bottom: 3px solid #32568C;
	transform: translateY(-50%) rotate(-45deg);
}

/* Main Hamburger positioning styling */
#sm_menu_ham {
	cursor: pointer;
	height: 20px;
	width: 20px;
	position: relative; 
	-webkit-transform: rotate(0deg);
	-moz-transform: rotate(0deg);
	transform: rotate(0deg);
	-webkit-transition: all 0.5s ease-in-out 0s;
	-moz-transition: all 0.5s ease-in-out 0s;
	-o-transition: all 0.5s ease-in-out 0s;
	transition: all 0.5s ease-in-out 0s;
	z-index: 100000;
}

/* Style Hamburger lines */
#sm_menu_ham span {
	background-color: #000;
	border-radius: 5px;
	display: block;
	height: 3px;
	width: 20px;
	left: 0;
	opacity: 1;
	position: absolute;
	-webkit-transform: rotate(0deg);
	-moz-transform: rotate(0deg);
	transform: rotate(0deg);
	-webkit-transition: all 0.25s ease-in-out 0s;
	-moz-transition: all 0.25s ease-in-out 0s;
	-o-transition: all 0.25s ease-in-out 0s;
	transition: all 0.25s ease-in-out 0s;	
}

#sm_menu_ham span:nth-child(1) { top: 1px; }
#sm_menu_ham span:nth-child(2), #sm_menu_ham span:nth-child(3) { top: 9px; }
#sm_menu_ham span:nth-child(4) { top: 17px; width: 15px; }

/* Hamburger Animation */
#sm_menu_ham.open span:nth-child(1) {
	left: 50%;
	top: 18px;
	width: 0;
}

#sm_menu_ham.open span:nth-child(2) {
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	transform: rotate(45deg);
}

#sm_menu_ham.open span:nth-child(3) {
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	transform: rotate(-45deg);
}

#sm_menu_ham.open span:nth-child(4) {
	left: 50%;
	top: 18px;
	width: 0;
}

/* Hide mobile menu on desktop - USE EVEN WITH DIVI VISIBILITY SET */
@media (min-width: 1024px) {
		#sm_menu_ham,
		.sm_menu_outer {
			display: none;
	}
}