/**
 * Alican Premium 1.5.3 — desktop dropdown hover corridor.
 * Removes the dead zone between a top-level WordPress menu item and its
 * submenu so dropdowns open immediately and stay reachable while the pointer
 * moves down into any submenu link.
 */

@media (min-width: 981px) {
	/* All desktop WordPress dropdown parents, including live Information/Categories/Brands. */
	.site-menu > .menu-item-has-children {
		position: relative !important;
	}

	/*
	 * Keep the dropdown physically connected to the header item.
	 * Earlier versions used top: calc(100% + 12px) plus a translate animation;
	 * that created a real pointer gap and :hover was lost while moving downward.
	 */
	.site-menu > .menu-item-has-children > .sub-menu {
		top: calc(100% - 1px) !important;
		transform: translate(-50%, 0) !important;
		transition: opacity 80ms ease !important;
		will-change: opacity;
	}

	/* Invisible safety corridor for slightly diagonal mouse movement. */
	.site-menu > .menu-item-has-children::before {
		position: absolute;
		top: calc(100% - 2px);
		left: -18px;
		right: -18px;
		height: 18px;
		z-index: 119;
		background: transparent;
		content: "";
		pointer-events: auto;
	}

	.site-menu > .menu-item-has-children > .sub-menu {
		z-index: 120 !important;
	}

	/* Immediate reveal: no hover-intent delay. */
	.site-menu > .menu-item-has-children:hover > .sub-menu,
	.site-menu > .menu-item-has-children:focus-within > .sub-menu {
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		transform: translate(-50%, 0) !important;
	}

	/* Make every submenu row a stable, full-width click target. */
	.site-menu > .menu-item-has-children > .sub-menu > li,
	.site-menu > .menu-item-has-children > .sub-menu > li > a {
		width: 100% !important;
	}

	.site-menu > .menu-item-has-children > .sub-menu > li > a {
		position: relative;
		z-index: 121;
		cursor: pointer;
	}
}
