#catalogPopover.dropdown-menu-popover {
	overflow: visible;
	background: transparent;
}

@keyframes fadeOutUp {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
		transform: translate3d(0, -100%, 0);
	}
}
@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translate3d(0, -15px, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

#catalogBtn {
	anchor-name: --catalog-button;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	.cats-menu-open,
	.cats-menu-close {
		width: 24px;
		height: 24px;
		justify-content: center;
		align-items: center;
		flex-shrink: 0;
		svg {
			width: 1.28em;
			height: auto;
			display: block;
		}
	}
	.cats-menu-open {
		display: inline-flex;
	}
	.cats-menu-close {
		display: none;
	}
}

body:has(#catalogPopover:popover-open) {
	overflow: hidden;
	padding-right: 1rem;

	.header-fixed {
		padding-right: 1rem;
	}

	&::backdrop {
		pointer-events: none;
	}

	.mega-menu-container .mega-menu {
		display: flex;
		animation: fadeInDown 0.3s cubic-bezier(0.25, 1, 0.5, 1) both;
	}
}

.mega-menu-container {
	position: relative;
	width: 100%;

	.mega-menu {
		display: flex;
		align-items: flex-start;
		overflow: visible;
		background: transparent;
		box-shadow: none;
	}

	.category-list {
		min-width: max-content;
		background: #fff;
		padding: 1rem;
		border-radius: 1rem;
		box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 12px 0px;
		height: fit-content;
		.list-group {
			margin: 0;
		}
		.list-group-item {
			border: none;
			padding: 10px 20px;
			cursor: pointer;
			margin: 2px 0;
			border-radius: 12px;
			color: var(--color-black);
			.cat-href {
				display: flex;
				align-items: center;
				justify-content: flex-start;
				gap: 1ch;
				font-size: 1rem;
			}

			.category_img {
				background: #f5f7fa;
				border-radius: 0.4rem;

				img {
					width: 35px;
					padding: 0.3rem;
					mix-blend-mode: multiply;
					background-color: unset;
					border-radius: unset;
				}
			}

			&:hover,
			&.active {
				background-color: var(--color-gray-60);
			}
		}
		@media (max-width: 1100px) {
			min-width: unset;
			width: 30%;
		}
	}

	.subcategory-list {
		flex: 1;
		height: auto;
		list-style-type: none;
		padding-left: 0;
		padding-top: 0;
		overflow: visible;
		
		li {
			margin-bottom: 5px;

			a {
				text-decoration: none;
				color: var(--color-black);
				&:hover {
					color: var(--blue);
				}
			}
		}
	}

	.subcategory {
		margin-left: 10px;
		border: none;
		border-radius: 1rem;
		padding: 1rem;
		background: #fff;
		box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 12px 0px;
		height: auto;
		min-height: 400px;
		display: none;

		
		@media (max-width: 1205px) {
			margin-left: 10px;
		}
	}

	.subcategory-container {
		display: flex;
		gap: 30px;
		margin-bottom: 20px;
	}

	.category-title {
		margin-bottom: 20px;
		a {
			font-weight: bold;
			font-size: 1.35rem;
			color: var(--color-black);
			line-height: 1;
		}
	}
	.subcategory-title {
		font-size: 1.125rem;
		font-weight: bold;
		margin-bottom: 10px;
		color: var(--color-black);
		&:hover {
			color: var(--blue);
		}
	}
	.subcategory-column {
		flex: 1;
		display: flex;
		flex-direction: column;
		gap: 30px;
	}
	.subsubcategory-item {
		width: 100%;
	}
	.subsubcategory-list {
		max-height: none;
		overflow: visible;
		page-break-inside: avoid;
		gap: 0;
		width: 100%;
		display: flex;
		flex-direction: column;
		margin: 0;
		padding: 0;
		list-style: none;
		transition: max-height 0.3s ease;
		&.collapsed {
			max-height: 149px;
			overflow: hidden;
		}
	}

	.expand-btn {
		cursor: pointer;
		text-decoration: none;
		display: inline-block;
		margin-top: 5px;
	}
}
