/* ==========================================================================
   Mega Header Styles
   ========================================================================== */

:root {
	--mh-bg: #ffffff;
	--mh-text: #333333;
	--mh-accent: #007bff;
	--mh-transition: all 0.3s ease;
	--mh-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	--mh-height-fixed: 100px;
	--mh-height-scrolled: 70px;
}

.mh-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background: var(--mh-bg);
	z-index: 9999;
	box-shadow: var(--mh-shadow);
	transition: var(--mh-transition);
	height: var(--mh-height-fixed);
	display: flex;
	align-items: center;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mh-header.is-scrolled {
	height: var(--mh-height-scrolled);
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(10px);
}

.mh-header-spacer {
	height: var(--mh-height-fixed);
}

.mh-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
}

.mh-logo {
	display: flex;
	align-items: center;
}

.mh-logo-img {
	transition: var(--mh-transition);
	display: block;
	object-fit: contain;
}

.mh-header.is-scrolled .mh-logo-img {
	/* altura controlada dinamicamente via style tag */
}

/* Navigation Desktop */
.mh-nav {
	height: 100%;
}

.mh-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	height: 100%;
	align-items: center;
	gap: 30px;
}

.mh-menu-item {
	height: 100%;
	display: flex;
	align-items: center;
}

.mh-menu-link {
	text-decoration: none;
	color: var(--mh-text);
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: color 0.2s ease;
	position: relative;
}

.mh-menu-link:hover {
	color: var(--mh-accent);
}

.mh-arrow {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
	transition: transform 0.3s ease;
}

/* Mega Menu Dropdown */
.mh-mega-menu {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	border-top: 1px solid #eee;
	padding: 30px 0;
	z-index: -1;
}

@media (min-width: 992px) {
	/* 1.0.18: abre so ao passar o mouse no texto do menu; fica aberto enquanto o mouse estiver na vitrine */
	.mh-menu-link:hover ~ .mh-mega-menu,
	.mh-mega-menu:hover {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.mh-menu-link:hover .mh-arrow,
	.mh-menu-item:has(.mh-mega-menu:hover) .mh-arrow {
		transform: rotate(180deg);
	}

	/* 1.0.18: ponte invisivel do texto ate a vitrine, para o menu nao fechar no caminho */
	.mh-has-dropdown .mh-menu-link::after {
		content: '';
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		height: calc(var(--mh-height-fixed) / 2);
	}

	.mh-header.is-scrolled .mh-has-dropdown .mh-menu-link::after {
		height: calc(var(--mh-height-scrolled) / 2);
	}
}

/* Swiper inside Mega Menu */
.mh-swiper {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 60px;
	/* Space for arrows */
}

.mh-product-card a {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: var(--mh-text);
	transition: transform 0.3s ease;
}

.mh-product-card:hover a {
	transform: translateY(-5px);
}

.mh-img-wrapper {
	width: 100%;
	height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 15px;
	overflow: hidden;
}

.mh-img-wrapper img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: opacity 0.3s ease;
}

.mh-img-wrapper.mh-has-hover {
	position: relative;
}

.mh-img-wrapper .mh-img-hover {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0;
	z-index: 2;
}

.mh-product-card:hover .mh-has-hover .mh-img-main {
	opacity: 0;
}

.mh-product-card:hover .mh-has-hover .mh-img-hover {
	opacity: 1;
}

.mh-product-title {
	font-size: 15px;
	font-weight: 500;
	text-align: center;
}

.mh-swiper-next {
	right: 0 !important;
}

.mh-swiper-prev {
	left: 0 !important;
}

.mh-swiper-next,
.mh-swiper-prev {
	color: var(--mh-text) !important;
	transform: scale(0.6);
	background: #fff;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	margin-top: -25px;
}

/* Mobile Toggle */
.mh-mobile-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	padding: 10px;
}

.mh-mobile-toggle span {
	width: 25px;
	height: 2px;
	background: var(--mh-text);
	transition: var(--mh-transition);
}

/* Mobile Responsive */
@media (max-width: 991px) {
	.mh-mobile-toggle {
		display: flex;
	}

	.mh-nav {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: #fff;
		height: calc(100vh - var(--mh-height-fixed));
		overflow-y: auto;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
	}

	.mh-header.is-scrolled .mh-nav {
		height: calc(100vh - var(--mh-height-scrolled));
	}

	.mh-nav.is-open {
		transform: translateX(0);
	}

	.mh-menu {
		flex-direction: column;
		height: auto;
		gap: 0;
		padding: 20px;
	}

	.mh-menu-item {
		width: 100%;
		height: auto;
		flex-direction: column;
		align-items: flex-start;
		border-bottom: 1px solid #eee;
	}

	.mh-menu-link {
		width: 100%;
		padding: 15px 0;
		justify-content: space-between;
	}

	/* Remove Accordion elements on Mobile */
	.mh-mega-menu {
		display: none !important;
	}

	.mh-arrow {
		display: none !important;
	}

	.mh-swiper {
		padding: 0;
	}

	.mh-swiper-next,
	.mh-swiper-prev {
		display: none !important;
		/* Hide arrows on mobile, let them swipe */
	}

	.mh-product-card a {
		flex-direction: row;
		justify-content: flex-start;
		gap: 15px;
	}

	.mh-img-wrapper {
		width: 60px;
		height: 60px;
		margin: 0;
	}

	.mh-product-title {
		text-align: left;
	}

	/* 1.0.17: miniatura da categoria no menu mobile */
	.mh-menu-link.mh-has-mob-thumb {
		padding: 6px 0;
	}

	.mh-mob-thumb {
		display: block;
		width: 48px;
		height: 48px;
		flex: 0 0 48px;
		margin-left: 12px;
		object-fit: contain;
		background: #fff;
		border: 1px solid #e6e9ee;
		border-radius: 10px;
	}
}

/* 1.0.17: miniatura so aparece no mobile (display none tambem evita o download no desktop) */
@media (min-width: 992px) {
	.mh-mob-thumb {
		display: none;
	}
}

/* Mobile Toggle Animation */
.mh-mobile-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.mh-mobile-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.mh-mobile-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}