/*
 * WM Home Category Menu for OpenCart 3.x
 * Author: WM group
 * Version: 1.0.1
 */
.wm-home-category-menu {
	--wm-hcm-panel-width: 900px;
	--wm-hcm-panel-height: 360px;
	display: none;
	position: relative;
	width: var(--wm-hcm-width);
	min-width: 0;
	height: var(--wm-hcm-panel-height);
	z-index: 40;
	box-sizing: border-box;
	font: inherit;
}
.wm-home-category-menu[hidden] { display: none !important; }
.wm-home-category-menu.is-ready { display: block; }
.wm-home-category-menu.is-open { z-index: 80; }

.wm-home-category-menu-row {
	display: block;
	width: 100%;
	min-width: 0;
	position: relative;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: visible !important;
}
.wm-home-category-menu-row.wm-home-category-menu-row--with-menu {
	display: grid !important;
	grid-template-columns: var(--wm-hcm-grid-width, 292px) minmax(0, 1fr) !important;
	grid-template-rows: auto;
	align-items: stretch;
	column-gap: var(--wm-hcm-grid-gap, 18px) !important;
	position: relative;
	overflow: visible !important;
}
.wm-home-category-menu-row > .wm-home-category-menu {
	grid-column: 1;
	grid-row: 1;
}
.wm-home-category-menu-row > .wm-ali-slider {
	display: block;
	grid-column: 2;
	grid-row: 1;
	width: 100%;
	min-width: 0;
	max-width: none;
	gap: 0;
	border-radius: var(--wm-border-radius, 18px);
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(16, 24, 40, .06);
}

.wm-home-category-menu *,
.wm-home-category-menu *::before,
.wm-home-category-menu *::after { box-sizing: border-box; }

.wm-home-category-menu__surface {
	height: 100%;
	min-height: 0;
	border: 1px solid #e5e9f0;
	border-radius: var(--wm-border-radius, 18px);
	background: #fff;
	box-shadow: 0 4px 15px rgba(16, 24, 40, .06);
	overflow: hidden;
}
.wm-home-category-menu__nav { height: 100%; min-height: 0; }
.wm-home-category-menu__list {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 7px;
	list-style: none;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #c8d0dd transparent;
}
.wm-home-category-menu__list::-webkit-scrollbar { width: 5px; }
.wm-home-category-menu__list::-webkit-scrollbar-thumb { border-radius: 10px; background: #c8d0dd; }
.wm-home-category-menu__item { flex: 0 0 auto; margin: 0; padding: 0; }
.wm-home-category-menu__link {
	display: grid;
	grid-template-columns: var(--wm-hcm-icon-size) minmax(0, 1fr) 12px;
	align-items: center;
	gap: 11px;
	min-height: 46px;
	padding: 8px 10px;
	border-radius: 11px;
	color: #172033;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.25;
	text-decoration: none !important;
	transition: color .16s ease, background-color .16s ease, transform .16s ease;
}
.wm-home-category-menu__item.is-active > .wm-home-category-menu__link,
.wm-home-category-menu__link:hover,
.wm-home-category-menu__link:focus-visible {
	background: #f3f6fb;
	color: var(--wm-primary-color, #ff4f47);
	outline: none;
}
.wm-home-category-menu__item.is-active > .wm-home-category-menu__link { transform: translateX(2px); }
.wm-home-category-menu__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wm-hcm-icon-size);
	height: var(--wm-hcm-icon-size);
	color: #667085;
	font-size: calc(var(--wm-hcm-icon-size) * .68);
}
.wm-home-category-menu__icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wm-home-category-menu__name { min-width: 0; overflow-wrap: anywhere; }
.wm-home-category-menu__arrow {
	width: 8px;
	height: 8px;
	margin-right: 2px;
	border-top: 1.8px solid currentColor;
	border-right: 1.8px solid currentColor;
	transform: rotate(45deg);
}

.wm-home-category-menu__panels { position: absolute; inset: 0 auto auto 0; pointer-events: none; }
.wm-home-category-menu__panel {
	display: block;
	position: absolute;
	top: 0;
	left: var(--wm-hcm-width);
	width: calc(var(--wm-hcm-panel-width) + var(--wm-hcm-gap));
	height: var(--wm-hcm-panel-height);
	padding-left: var(--wm-hcm-gap);
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-7px);
	transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.wm-home-category-menu__panel.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(0);
}
.wm-home-category-menu__panel-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
	border: 1px solid #e5e9f0;
	border-radius: var(--wm-border-radius, 18px);
	background: #fff;
	box-shadow: 0 18px 48px rgba(16, 24, 40, .18);
	overflow: hidden;
}
.wm-home-category-menu__panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex: 0 0 auto;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #edf0f5;
}
.wm-home-category-menu__eyebrow {
	display: block;
	margin-bottom: 2px;
	color: #98a2b3;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .08em;
	line-height: 1.2;
	text-transform: uppercase;
}
.wm-home-category-menu__panel-header h2 { margin: 0; font-size: 24px; font-weight: 750; line-height: 1.2; }
.wm-home-category-menu__panel-header h2 a { color: #101828; text-decoration: none; }
.wm-home-category-menu__panel-header h2 a:hover { color: var(--wm-primary-color, #ff4f47); }
.wm-home-category-menu__view-all {
	flex: 0 0 auto;
	color: #344054;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
}
.wm-home-category-menu__view-all:hover { color: var(--wm-primary-color, #ff4f47); }

.wm-home-category-menu__children {
	display: grid;
	grid-template-columns: repeat(var(--wm-hcm-columns), minmax(0, 1fr));
	align-content: start;
	gap: 0;
	min-height: 0;
	padding: 14px 16px 20px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #c8d0dd transparent;
}
.wm-home-category-menu__children--without-images { padding-top: 8px; }
.wm-home-category-menu__child {
	min-width: 0;
	margin: 0;
	padding: 10px 12px 14px;
	border-right: 1px solid #edf0f5;
}
.wm-home-category-menu__child:nth-child(n+1) { border-bottom: 1px solid #edf0f5; }
.wm-home-category-menu__child-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 84px;
	margin-bottom: 9px;
	border-radius: 10px;
	background: #f7f8fb;
	color: #a8b0bd;
	font-size: 30px;
	overflow: hidden;
}
.wm-home-category-menu__child-image img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.wm-home-category-menu__child h3 { margin: 0 0 7px; font-size: 14px; font-weight: 750; line-height: 1.3; }
.wm-home-category-menu__child h3 a { color: #182230; text-decoration: none; }
.wm-home-category-menu__child h3 a:hover { color: var(--wm-primary-color, #ff4f47); }
.wm-home-category-menu__third-level { margin: 0; padding: 0; list-style: none; }
.wm-home-category-menu__third-level li { margin: 0 0 4px; }
.wm-home-category-menu__third-level a {
	display: block;
	color: #667085;
	font-size: 12px;
	line-height: 1.35;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.wm-home-category-menu__third-level a:hover { color: var(--wm-primary-color, #ff4f47); }

@media (prefers-reduced-motion: reduce) {
	.wm-home-category-menu__link,
	.wm-home-category-menu__panel { transition: none; }
}
