/* Hot Products mega menu — custom panel (9 items + View More) */

.acb-mega-menu-parent > .elementskit-submenu-panel {
	display: none !important;
}

.acb-mega-menu-parent {
	position: relative;
}

/* --- Custom mega panel --- */
.acb-mega-panel {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	width: min(680px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
	padding: 16px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid rgba(255, 46, 46, 0.12);
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.12);
	z-index: 99999;
	font-family: 'Titillium Web', sans-serif;
}

.acb-mega-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.acb-mega-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 10px;
	text-decoration: none !important;
	color: #111827 !important;
	transition: background 0.2s ease, color 0.2s ease;
	min-width: 0;
}

.acb-mega-item:hover {
	background: rgba(255, 46, 46, 0.08);
	color: #ff2e2e !important;
}

.acb-mega-thumb {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	overflow: hidden;
	background: #fff5f5;
	border: 1px solid rgba(255, 46, 46, 0.1);
}

.acb-mega-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.acb-mega-label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acb-mega-footer {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
	text-align: center;
}

.acb-mega-view-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 160px;
	padding: 10px 22px;
	border-radius: 999px;
	background: #ff2e2e;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	letter-spacing: 0.3px;
	transition: background 0.2s ease, transform 0.2s ease;
}

.acb-mega-view-more:hover {
	background: #ff5757;
	color: #fff !important;
	transform: translateY(-1px);
}

/* --- Desktop hover --- */
@media (min-width: 1025px) {
	.acb-mega-menu-parent {
		position: relative;
	}

	.acb-mega-menu-parent:hover > .acb-mega-panel,
	.acb-mega-menu-parent:focus-within > .acb-mega-panel {
		display: block;
	}

	.acb-mega-menu-parent > .acb-mega-panel {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
	}

	/* Nudge panel if near viewport edge */
	.acb-mega-menu-parent > .acb-mega-panel.acb-mega-align-left {
		left: 0;
		transform: none;
	}

	.acb-mega-menu-parent > .acb-mega-panel.acb-mega-align-right {
		left: auto;
		right: 0;
		transform: none;
	}
}

/* --- Mobile / tablet offcanvas --- */
@media (max-width: 1024px) {
	.acb-mega-menu-parent > .acb-mega-panel {
		position: static;
		transform: none;
		width: 100%;
		max-width: 100%;
		margin: 0 0 8px;
		padding: 10px 8px 12px;
		box-shadow: none;
		border: 0;
		border-radius: 0;
		background: transparent;
	}

	.acb-mega-menu-parent.acb-mobile-open > .acb-mega-panel {
		display: block;
	}

	.acb-mega-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.acb-mega-item {
		padding: 10px 6px;
		border-bottom: 1px solid rgba(0, 0, 0, 0.06);
		border-radius: 0;
	}

	.acb-mega-item:last-child {
		border-bottom: 0;
	}

	.acb-mega-label {
		white-space: normal;
	}

	.acb-mega-footer {
		margin-top: 10px;
		padding-top: 10px;
	}

	.acb-mega-view-more {
		width: 100%;
	}

	.acb-mega-menu-parent > a.ekit-menu-nav-link .elementskit-submenu-indicator {
		transition: transform 0.2s ease;
	}

	.acb-mega-menu-parent.acb-mobile-open > a.ekit-menu-nav-link .elementskit-submenu-indicator {
		transform: rotate(180deg);
	}
}
