/*
 * Lumini — desktop primary navigation ("Bec pe fir" / traveling bulb on a wire).
 *
 * Variant 03 of the "Navigație - Explorări" design. A thin wire crosses the
 * menu; a glowing amber bulb slides along it to the active / hovered item
 * (position driven by assets/js/nav-bulb.js, which writes `left`). The item
 * flagged `has-mega` in Appearance → Menus reveals the Catalog dropdown on
 * hover / focus — pure CSS, so it works without JavaScript.
 *
 * Standalone module, enqueued separately by inc/enqueue.php (handle
 * lumini-header-nav) — NOT bundled into main.css. It is hand-authored plain CSS
 * (no build step), like sections.css / cat-product.css, and relies on the
 * design tokens main.css defines on :root, so colours/fonts track the system by
 * name. Global, because the site header is global.
 */

/* ------------------------------------------------------------------ Nav rail */

.lumini-nav {
	position: relative;
	align-items: center;
	justify-content: center; /* centre the menu within the flex-1 nav region */
}

.lumini-nav__list {
	display: flex;
	align-items: center;
	gap: 34px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lumini-nav__item {
	position: relative;
	list-style: none;
}

.lumini-nav__link {
	position: relative;
	z-index: 2;
	display: inline-block;
	padding: 4px 1px 20px; /* room below the text so the wire/bulb clear the labels */
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 18px;
	line-height: 1;
	white-space: nowrap;
	color: var(--color-ink-3);
	text-decoration: none;
	transition: color 0.25s var(--ease-standard);
}

.lumini-nav__link:hover,
.lumini-nav__link:focus-visible {
	color: var(--color-ink);
}

.lumini-nav__item.current-menu-item > .lumini-nav__link,
.lumini-nav__item.current-menu-ancestor > .lumini-nav__link,
.lumini-nav__item.current-menu-parent > .lumini-nav__link,
.lumini-nav__item.current_page_item > .lumini-nav__link {
	font-weight: 600;
	color: var(--color-ink);
}

/* Inert fallback list for any non-mega submenu. */
.lumini-subnav {
	display: none;
}

/* ----------------------------------------------------------- Wire + bulb */

.lumini-nav__wire {
	position: absolute;
	bottom: 6px;
	height: 1.5px;
	border-radius: 2px;
	background: var(--color-line);
	pointer-events: none;
}

/* Position is driven from nav-bulb.js by writing `left` inline — the same
 * property the source design transitions. Animating `left` interpolates
 * reliably; a custom property fed into transform does not, which made the bulb
 * jump instead of slide. */
.lumini-nav__bulb {
	position: absolute;
	bottom: 6.75px; /* sit on the wire's centreline */
	left: 0;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
	z-index: 3;
}

/* The slide is armed by nav-bulb.js AFTER the first placement (it adds
 * .is-ready), so the bulb appears parked on the active item instead of flying
 * in from the left. From then on every `left` change JS makes eases over .42s —
 * this transition is the whole animation (JS only sets the target position). */
.lumini-nav__bulb.is-ready {
	transition: left 0.42s var(--ease-standard), opacity 0.3s ease;
}

/* The lit length of wire either side of the bulb. */
.lumini-nav__seg {
	position: absolute;
	left: -42px;
	top: -0.75px;
	width: 84px;
	height: 1.5px;
	border-radius: 2px;
	background: linear-gradient(90deg, rgba(245, 184, 0, 0) 0%, var(--color-amber) 50%, rgba(245, 184, 0, 0) 100%);
	box-shadow: 0 0 6px rgba(245, 184, 0, 0.7);
}

/* The bulb itself — a pulsing amber dot centred on the wire. */
.lumini-nav__dot {
	position: absolute;
	left: -6px;
	top: -6px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--color-amber);
	box-shadow: 0 0 7px 1px rgba(245, 184, 0, 0.8), 0 0 13px 3px rgba(245, 184, 0, 0.3);
	animation: lumini-bulb-pulse 2.6s ease-in-out infinite;
}

@keyframes lumini-bulb-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.86; }
}

/* ----------------------------------------------------- Catalog dropdown */

.lumini-mega__pop {
	position: absolute;
	top: 100%;
	left: -16px;
	padding-top: 14px; /* invisible bridge so the pointer can reach the card */
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.22s var(--ease-standard), visibility 0s linear 0.22s;
	z-index: 60;
}

.lumini-nav__item[data-mega]:hover > .lumini-mega__pop,
.lumini-nav__item[data-mega]:focus-within > .lumini-mega__pop {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity 0.2s ease, transform 0.22s var(--ease-standard), visibility 0s;
}

.lumini-mega__card {
	position: relative;
	width: 540px;
	max-width: calc(100vw - 40px);
	padding: 10px;
	background: var(--color-bg);
	border: 0.8px solid var(--color-line);
	border-radius: 14px;
	box-shadow: 0 22px 55px -20px rgba(10, 10, 10, 0.3), 0 8px 20px -10px rgba(10, 10, 10, 0.16);
}

.lumini-mega__arrow {
	position: absolute;
	top: -5.5px;
	left: 30px;
	width: 11px;
	height: 11px;
	background: var(--color-bg);
	border-left: 0.8px solid var(--color-line);
	border-top: 0.8px solid var(--color-line);
	transform: rotate(45deg);
}

.lumini-mega__eyebrow {
	margin: 0;
	padding: 8px 10px;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--color-ink-3);
}

.lumini-mega__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
}

.lumini-mega__item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px;
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.16s ease;
}

.lumini-mega__item:hover {
	background: var(--color-amber-soft);
}

.lumini-mega__ico {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--color-bg-2);
}

/* Icon glyph, masked so it inherits the ink colour. Each child menu item picks
 * its glyph by setting --ico through a `lumini-ico-*` class (below); items with
 * no icon class fall back to the lightbulb. */
.lumini-mega__ico::before {
	content: "";
	width: 19px;
	height: 19px;
	background-color: var(--color-ink);
	-webkit-mask: var(--ico, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14'/%3E%3C/svg%3E")) center / contain no-repeat;
	mask: var(--ico, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14'/%3E%3C/svg%3E")) center / contain no-repeat;
}

.lumini-mega__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.lumini-mega__title {
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	color: var(--color-ink);
}

.lumini-mega__sub {
	font-family: var(--font-sans);
	font-size: 12px;
	line-height: 1.2;
	color: var(--color-ink-3);
}

.lumini-mega__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 6px;
	padding: 12px 10px 6px;
	border-top: 0.8px solid var(--color-line);
}

.lumini-mega__count {
	font-family: var(--font-sans);
	font-size: 13px;
	color: var(--color-ink-3);
}

.lumini-mega__all {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 13px;
	color: var(--color-turquoise);
	text-decoration: none;
	white-space: nowrap;
}

.lumini-mega__all:hover {
	color: var(--color-turquoise-hot);
}

.lumini-mega__all-ico {
	transition: transform 0.18s ease;
}

.lumini-mega__all:hover .lumini-mega__all-ico {
	transform: translateX(2px);
}

/* ------------------------------------------------------------- Icon glyphs */
/* Add one of these classes to a child menu item to set its dropdown icon. */

.lumini-ico-spot {
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14'/%3E%3C/svg%3E");
}

.lumini-ico-smart {
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13a10 10 0 0 1 14 0'/%3E%3Cpath d='M8.5 16.5a5 5 0 0 1 7 0'/%3E%3Cpath d='M2 8.82a15 15 0 0 1 20 0'/%3E%3Cline x1='12' y1='20' x2='12.01' y2='20'/%3E%3C/svg%3E");
}

.lumini-ico-wall {
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 21V9'/%3E%3C/svg%3E");
}

.lumini-ico-bollard {
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='4' x2='8' y2='20'/%3E%3Cline x1='16' y1='4' x2='16' y2='20'/%3E%3Ccircle cx='8' cy='4' r='1.4'/%3E%3Ccircle cx='16' cy='4' r='1.4'/%3E%3C/svg%3E");
}

.lumini-ico-strip {
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 18 12 15 21 9 3 6 12 2 12'/%3E%3C/svg%3E");
}

.lumini-ico-power {
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E");
}
