/* Mega-menu "מוצרי חשמל" — Ohev Zion. Figma node 2-33. Dark panel to match header (#090909).
   NOTE: theme header is position:fixed (transparent -> #090909 on .scroll). We do NOT touch
   header positioning here (that would break sticky). Panel anchors to the fixed header. */

.main-menu ul li.menu-item-megamenu { position: static; }

.menu-item-megamenu .mm-trigger {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}
.menu-item-megamenu .mm-trigger .mm-chev-down { transition: transform .25s ease; flex: 0 0 auto; }
.menu-item-megamenu:hover .mm-trigger .mm-chev-down,
.menu-item-megamenu:focus-within .mm-trigger .mm-chev-down { transform: rotate(180deg); }

/* dark dropdown panel — full viewport width, drops below the fixed header */
.megamenu-panel {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100vw;
	margin-left: -30px;            /* cancel header padding-left (30px) so panel is flush to viewport */
	background: #090909;
	box-shadow: 0 18px 30px rgba(0, 0, 0, .35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .22s ease, transform .22s ease, visibility .22s;
	z-index: 1001;
}
.menu-item-megamenu:hover .megamenu-panel,
.menu-item-megamenu:focus-within .megamenu-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
/* when the mega-menu is open, make the whole header solid dark for cohesion */
header:has(.menu-item-megamenu:hover),
header:has(.menu-item-megamenu:focus-within) { background: #090909 !important; }

.megamenu-inner {
	direction: rtl;
	max-width: 1720px;
	margin: 0 auto;
	padding: 34px 100px 42px;
	display: flex;
	justify-content: flex-start !important;
	gap: 53px;
	box-sizing: border-box;
}

.mm-col { flex: 0 0 auto !important; width: 345px; text-align: right; margin: 0 !important; }
.mm-col:last-child { width: 240px; }

.mm-col-head {
	display: flex !important;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	font-size: 19px !important;
	font-weight: 700;
	line-height: 1;
	color: #fff !important;
	text-decoration: none;
}
.mm-col-head span { color: #fff !important; }
.mm-col-head .mm-chev-left { flex: 0 0 auto; color: #fff !important; }
.mm-col-head:after { display: none !important; }        /* kill theme nav underline */

.mm-col-divider {
	display: block;
	height: 1px;
	background: rgba(255, 255, 255, .18);
	margin: 15px 0 10px;
}

.mm-col-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mm-col-list li {
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	float: none !important;
	width: 100% !important;
}
.mm-col-list li a {
	display: block !important;
	font-size: 17px !important;
	font-weight: 400;
	line-height: 35px !important;
	color: #cfcfcf !important;
	text-decoration: none !important;
	white-space: nowrap;
	transition: color .15s ease;
	position: relative;
}
.mm-col-list li a:after { display: none !important; }   /* kill theme nav underline */
.mm-col-list li a:hover { color: #fff !important; }

/* responsive fallback */
@media (max-width: 1200px) {
	.megamenu-inner { flex-wrap: wrap; padding: 28px 40px 34px; gap: 28px 40px; }
	.mm-col { width: 45% !important; }
}
@media (max-width: 1024px) {
	.megamenu-panel { position: static; width: auto; margin-left: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; }
	.megamenu-inner { padding: 10px 0 4px; gap: 14px; flex-direction: column; }
	.mm-col { width: 100% !important; }
	.mm-col-head, .mm-col-head span, .mm-col-list li a { color: inherit !important; }
	.mm-col-divider { background: rgba(0,0,0,.12); margin: 8px 0 6px; }
	.mm-col-list li a { line-height: 30px !important; font-size: 16px !important; }
}
