/* Megamenu overlay */
.catalog-mega-menu {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: none;
}

.catalog-mega-menu.is-open {
	display: block;
}

.catalog-mega-menu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.catalog-mega-menu__container {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #fff;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

@media (min-width: 992px) {
	.catalog-mega-menu__container {
		top: 0;
		height: 100%;
		max-height: 100vh;
		box-shadow: none;
	}
}

.catalog-mega-menu__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #e9ecef;
	flex-shrink: 0;
}

.catalog-mega-menu__title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
	color: var(--brand-secondary, #2c3e50);
}

.catalog-mega-menu__all-link {
	margin-left: auto;
	font-weight: 600;
	color: var(--brand-primary);
	text-decoration: none;
}

.catalog-mega-menu__all-link:hover {
	text-decoration: underline;
}

.catalog-mega-menu__close {
	margin-left: auto;
	background: none;
	border: none;
	font-size: 1.25rem;
	color: #666;
	padding: 0.25rem 0.5rem;
	cursor: pointer;
	line-height: 1;
}

@media (min-width: 992px) {
	.catalog-mega-menu__close {
		margin-left: 0.5rem;
	}
}

.catalog-mega-menu__body {
	flex: 1;
	overflow: hidden;
	min-height: 0;
}

.catalog-mega-menu__body--desktop {
	height: 100%;
}

.catalog-mega-menu__l1 {
	width: 30%;
	flex-shrink: 0;
	border-right: 1px solid #e9ecef;
	background: #f8f9fa;
	overflow-y: auto;
	padding: 0.5rem 0;
}

.catalog-mega-l1-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.75rem 1.25rem;
	border: none;
	background: transparent;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	font-size: 0.95rem;
	font-weight: 500;
	color: #333;
}

.catalog-mega-l1-item:hover,
.catalog-mega-l1-item.is-active {
	background: #fff;
	color: var(--brand-primary);
}

.catalog-mega-l1-item__thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	background: #e9ecef;
}

.catalog-mega-l1-item__name {
	flex: 1;
	line-height: 1.3;
}

.catalog-mega-l1-item__arrow {
	font-size: 0.75rem;
	opacity: 0.5;
}

.catalog-mega-menu__l2 {
	width: 70%;
	overflow-y: auto;
	padding: 1.5rem;
}

.catalog-mega-l2-panel {
	display: none;
}

.catalog-mega-l2-panel.is-active {
	display: block;
}

.catalog-mega-l2-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

/* Mobile mega menu panels */
.catalog-mega-menu__body--mobile {
	overflow-y: auto;
	padding: 0;
	position: relative;
}

.catalog-mega-mobile-panel {
	display: none;
	padding: 0.5rem 1rem 1.5rem;
}

.catalog-mega-mobile-panel.is-active {
	display: block;
}

.catalog-mega-mobile-l1 {
	list-style: none;
	margin: 0;
	padding: 0;
}

.catalog-mega-mobile-l1-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.85rem 0;
	border: none;
	background: none;
	border-bottom: 1px solid #eee;
	text-decoration: none;
	color: #333;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	text-align: left;
}

.catalog-mega-mobile-l1-item img {
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.catalog-mega-mobile-l1-item span {
	flex: 1;
}

.catalog-mega-mobile-l1-item i {
	color: #aaa;
	font-size: 0.85rem;
}

.catalog-mega-mobile-back {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 0.75rem 0 1rem;
	border: none;
	background: none;
	font-weight: 600;
	color: var(--brand-primary);
	cursor: pointer;
	font-size: 0.95rem;
}

body.catalog-mega-open,
body.mobile-nav-open {
	overflow: hidden;
}
