/* =====================================================================
 * EP-NAV-V3 2026-10-02 - desktop menu "Toate categoriile" + homepage hero
 * Loaded only when the V3 switch is on (inc/menu-v3.php). Desktop only.
 *
 * Every selector starts with ":root .ep-nav--v3" (or ":root body.ep-v3")
 * so the type scale (":root li", ":root p" at 0,1,1) and Shoptimizer's
 * generic button styles can never win against the menu.
 *
 * Panels that are not shown use visibility + height 0, never
 * display:none (house rule: all links stay in the render tree).
 * ===================================================================== */

@media (min-width: 1024px) {

:root .ep-nav--v3 {
	--v3-ink: #0e1116;
	--v3-red: #cc1f2b;
	--v3-blue: #1a73e8;
	--v3-text: #374151;
	--v3-muted: #6b7280;
	--v3-line: #e9ebee;
	--v3-line2: #f0f2f5;
	--v3-soft: #f6f7f9;
	--v3-font: var(--ep-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
	font-family: var(--v3-font);
}
:root .ep-nav--v3 ul { list-style: none; margin: 0; padding: 0; }
:root .ep-nav--v3 li { margin: 0; padding: 0; font-size: 14px; line-height: 1.3; }
:root .ep-nav--v3 a { text-decoration: none; }
:root .ep-nav--v3 a:focus-visible,
:root .ep-nav--v3 button:focus-visible { outline: 2px solid var(--v3-blue); outline-offset: 2px; }

/* ---------- bar ---------- */
:root .ep-nav--v3 .ep-v3-bar {
	display: flex;
	align-items: stretch;
	gap: 4px;
	height: 64px;
	padding: 0 40px;
}
:root .ep-nav--v3 .ep-v3-dept {
	position: relative;
	display: flex;
	align-items: center;
	margin-right: 14px;
}
:root .ep-nav--v3 .ep-v3-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: auto;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 18px 0 14px;
	border: 0;
	border-radius: 12px;
	box-shadow: none;
	background: var(--v3-ink);
	color: #fff;
	font: 600 15px/1 var(--v3-font);
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease;
}
:root .ep-nav--v3 .ep-v3-btn:hover,
:root .ep-nav--v3 .ep-v3-dept.is-open > .ep-v3-btn { background: var(--v3-red); color: #fff; }
:root .ep-nav--v3 .ep-v3-burger { display: grid; gap: 4px; width: 18px; }
:root .ep-nav--v3 .ep-v3-burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; }

:root .ep-nav--v3 .ep-v3-quick { display: flex; align-items: stretch; height: 64px; }
:root .ep-nav--v3 .ep-v3-quick > li { display: flex; }
:root .ep-nav--v3 .ep-v3-q {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 100%;
	padding: 0 14px;
	color: var(--v3-ink);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1;
	white-space: nowrap;
	transition: color .15s ease;
}
:root .ep-nav--v3 .ep-v3-q::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--v3-red);
	transform: scaleX(0);
	transition: transform .16s ease;
}
:root .ep-nav--v3 .ep-v3-q:hover { color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-q:hover::after { transform: scaleX(1); }
:root .ep-nav--v3 .ep-v3-q.is-new { color: var(--v3-blue); }
:root .ep-nav--v3 .ep-v3-q.is-sale { color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-sep { width: 1px; margin: 20px 8px; background: var(--v3-line); }

:root .ep-nav--v3 .ep-v3-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--v3-muted); }
:root .ep-nav--v3 .ep-v3-dot--drifter { background: #cc1f2b; }
:root .ep-nav--v3 .ep-v3-dot--iqos { background: #8a6d3b; }
:root .ep-nav--v3 .ep-v3-dot--vuse { background: #6b4fbb; }
:root .ep-nav--v3 .ep-v3-dot--veev { background: #0f8a7a; }
:root .ep-nav--v3 .ep-v3-dot--elfbar { background: #c2185b; }
:root .ep-nav--v3 .ep-v3-dot--vozol { background: #d06a00; }

/* ---------- the box ---------- */
:root .ep-nav--v3 .ep-v3-box {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	display: grid;
	grid-template-columns: 268px minmax(0, 1fr);
	width: min(1240px, calc(100vw - 96px));
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--v3-line);
	border-radius: 0 0 16px 16px;
	box-shadow: 0 30px 50px -20px rgba(14, 17, 22, .3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
}
:root .ep-nav--v3 .ep-v3-dept { align-self: stretch; }
:root .ep-nav--v3 .ep-v3-dept.is-open > .ep-v3-box { opacity: 1; visibility: visible; transform: none; }
/* Before the script runs: plain hover / focus, with a short delay so a quick pass does not open it. */
:root .ep-nav--v3:not(.is-js) .ep-v3-dept:hover > .ep-v3-box,
:root .ep-nav--v3:not(.is-js) .ep-v3-dept:focus-within > .ep-v3-box {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: .18s;
}

/* Height cap sits on the two columns (a cap on the grid box itself would
   only clip them). --ep-v3-mph is set by nav-v3.js from the screen height. */
:root .ep-nav--v3 .ep-v3-list,
:root .ep-nav--v3 .ep-v3-fly { max-height: calc(var(--ep-v3-mph, calc(100vh - 170px)) - 2px); }
:root .ep-nav--v3 .ep-v3-list {
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	padding: 8px 0 12px;
	border-right: 1px solid var(--v3-line);
}
:root .ep-nav--v3 .ep-v3-list-h {
	display: block;
	margin: 8px 20px 2px;
	color: var(--v3-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .09em;
	line-height: 1.6;
	text-transform: uppercase;
}
:root .ep-nav--v3 .ep-v3-row {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 38px;
	padding: 0 18px 0 20px;
	color: var(--v3-ink);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
}
:root .ep-nav--v3 .ep-v3-row > span { flex: 1; }
:root .ep-nav--v3 .ep-v3-chev {
	flex: none;
	width: 7px;
	height: 7px;
	border-right: 1.8px solid #9ca3af;
	border-bottom: 1.8px solid #9ca3af;
	transform: rotate(-45deg);
}
:root .ep-nav--v3 .ep-v3-row.is-active { background: var(--v3-soft); color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-row.is-active .ep-v3-chev { border-color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-row:focus-visible { outline-offset: -2px; }

:root .ep-nav--v3 .ep-v3-fly {
	position: relative;
	min-width: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}
:root .ep-nav--v3 .ep-v3-pane {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0;
	overflow: hidden;
	visibility: hidden;
}
:root .ep-nav--v3 .ep-v3-pane.is-active {
	position: static;
	height: auto;
	overflow: visible;
	visibility: inherit; /* hidden with the box, never on its own */
}
:root .ep-nav--v3 .ep-v3-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 28px 12px;
	border-bottom: 1px solid var(--v3-line2);
}
:root .ep-nav--v3 .ep-v3-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--v3-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
:root .ep-nav--v3 .ep-v3-all span { color: var(--v3-red); transition: transform .15s ease; }
:root .ep-nav--v3 .ep-v3-all:hover span { transform: translateX(3px); }
:root .ep-nav--v3 .ep-v3-x {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 34px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--v3-line);
	border-radius: 50%;
	box-shadow: none;
	background: #fff;
	color: var(--v3-muted);
	cursor: pointer;
}
:root .ep-nav--v3 .ep-v3-x:hover { color: var(--v3-ink); border-color: var(--v3-ink); background: #fff; }
:root .ep-nav--v3 .ep-v3-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

:root .ep-nav--v3 .ep-v3-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px 28px;
	padding: 18px 28px 26px;
}
:root .ep-nav--v3 .ep-v3-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	grid-auto-flow: row dense;
	gap: 22px 26px;
	align-content: start;
	min-width: 0;
}
:root .ep-nav--v3 .ep-v3-col { min-width: 0; }
:root .ep-nav--v3 .ep-v3-col--w2 { grid-column: span 2; }
:root .ep-nav--v3 .ep-v3-col--w3 { grid-column: span 3; }
:root .ep-nav--v3 .ep-v3-sec + .ep-v3-sec { margin-top: 18px; }
:root .ep-nav--v3 .ep-v3-h {
	display: block;
	margin: 0 0 9px;
	color: var(--v3-muted);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .07em;
	line-height: 1.4;
	text-transform: uppercase;
}
:root .ep-nav--v3 a.ep-v3-h { color: var(--v3-ink); }
:root .ep-nav--v3 a.ep-v3-h::after { content: " \2192"; color: var(--v3-red); }
:root .ep-nav--v3 a.ep-v3-h:hover { color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-ul { display: grid; gap: 6px; }
:root .ep-nav--v3 .ep-v3-ul--c2,
:root .ep-nav--v3 .ep-v3-ul--c3 { display: block; column-gap: 22px; }
:root .ep-nav--v3 .ep-v3-ul--c2 { columns: 2; }
:root .ep-nav--v3 .ep-v3-ul--c3 { columns: 3; }
:root .ep-nav--v3 .ep-v3-ul--c2 > li,
:root .ep-nav--v3 .ep-v3-ul--c3 > li { break-inside: avoid; padding-bottom: 6px; }
:root .ep-nav--v3 .ep-v3-a {
	color: var(--v3-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	transition: color .12s ease;
}
:root .ep-nav--v3 .ep-v3-a:hover { color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-a.is-bold { color: var(--v3-ink); font-weight: 600; }
:root .ep-nav--v3 .ep-v3-a.is-bold:hover { color: var(--v3-red); }
:root .ep-nav--v3 .ep-v3-a.is-promo { color: var(--v3-red); font-weight: 500; }

/* banner: right of the links on wide screens, under them on narrow ones */
:root .ep-nav--v3 .ep-v3-ban {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	align-self: start;
	padding: 20px;
	border-radius: 14px;
	color: #fff;
	background: linear-gradient(135deg, #6b6b73 0%, #3d3d44 100%);
}
:root .ep-nav--v3 .ep-v3-ban-tag {
	margin-bottom: 6px;
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1.4;
	text-transform: uppercase;
}
:root .ep-nav--v3 .ep-v3-ban-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
:root .ep-nav--v3 .ep-v3-ban-sub { margin-bottom: 12px; font-size: 12.5px; line-height: 1.5; opacity: .92; }
:root .ep-nav--v3 .ep-v3-ban-cta {
	padding: 8px 14px;
	border-radius: 999px;
	background: #fff;
	color: var(--v3-ink);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	transition: transform .15s ease;
}
:root .ep-nav--v3 .ep-v3-ban-cta:hover { transform: translateX(2px); color: var(--v3-ink); }
:root .ep-nav--v3 .ep-v3-ban--iqos { background: linear-gradient(135deg, #5a4a3a 0%, #1f1f1f 100%); }
:root .ep-nav--v3 .ep-v3-ban--arome { background: linear-gradient(135deg, #ff8a3d 0%, #e64a19 100%); }
:root .ep-nav--v3 .ep-v3-ban--atomizoare { background: linear-gradient(135deg, #b8860b 0%, #5d4621 100%); }
:root .ep-nav--v3 .ep-v3-ban--pouch { background: linear-gradient(135deg, #2d6e3e 0%, #1f4d2c 100%); }
:root .ep-nav--v3 .ep-v3-ban--accessorii { background: linear-gradient(135deg, #6b6b73 0%, #3d3d44 100%); }
:root .ep-nav--v3 .ep-v3-ban--drifter { background: linear-gradient(135deg, #b3141f 0%, #4a0a10 100%); }
:root .ep-nav--v3 .ep-v3-ban--vuse { background: linear-gradient(135deg, #5b45a8 0%, #251b4a 100%); }
:root .ep-nav--v3 .ep-v3-ban--veev { background: linear-gradient(135deg, #0f7d70 0%, #0b2f2b 100%); }
:root .ep-nav--v3 .ep-v3-ban--elfbar { background: linear-gradient(135deg, #b0174f 0%, #3d0a1f 100%); }
:root .ep-nav--v3 .ep-v3-ban--vozol { background: linear-gradient(135deg, #a34f00 0%, #3a1d05 100%); }
:root .ep-nav--v3 .ep-v3-body.has-ban .ep-v3-ban {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 14px;
}

/* dim layer under the open box (created by nav-v3.js) */
:root .ep-nav--v3 .ep-v3-dim {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: var(--ep-v3-top, 100vh);
	z-index: 39;
	background: rgba(14, 17, 22, .28);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, visibility .15s ease;
}
:root .ep-nav--v3.has-open .ep-v3-dim { opacity: 1; visibility: visible; pointer-events: auto; }

/* ---------- homepage hero: full width under the menu ----------
   Same 40px side gutters as the header and the menu bar, so its left edge
   lines up with the logo and the "Toate categoriile" button. 8:3 is kept
   (the 1920 x 720 banners are never cropped). #content becomes a size
   container only so 100cqw = page width without the scrollbar (100vw
   would count the scrollbar and leave the gutters uneven). Measured: no
   other element on the homepage moves because of it. */
:root body.ep-v3.ep-flat-home-page #content { container-type: inline-size; }
:root body.ep-v3.ep-flat-home-page main.ep-flat-home {
	display: flex;
	flex-direction: column;
}
:root body.ep-v3.ep-flat-home-page main.ep-flat-home > .ep-hero-slider {
	--ep-hero-w: calc(100cqw - 80px);
	order: -1;
	width: var(--ep-hero-w);
	max-width: none;
	aspect-ratio: 8 / 3;
	margin: 28px 0 0 calc((100% - var(--ep-hero-w)) / 2);
	border-radius: 16px;
	isolation: isolate;
}

} /* end min-width: 1024px */

/* 1024-1199 px: 9 quick links still fit on one row with the 40px gutters
   (room left for a 17px Windows scrollbar). */
@media (min-width: 1024px) and (max-width: 1199.98px) {
	:root .ep-nav--v3 .ep-v3-dept { margin-right: 6px; }
	:root .ep-nav--v3 .ep-v3-q { gap: 6px; padding: 0 9px; font-size: 14.5px; }
	:root .ep-nav--v3 .ep-v3-q::after { left: 8px; right: 8px; }
	:root .ep-nav--v3 .ep-v3-sep { margin: 20px 4px; }
}

/* Short laptop screens (1366 x 768, 1920 x 1080 at 125%): tighter list so
   all rows fit more often. When they still do not fit, the list scrolls and
   a soft shadow at its edge shows there is more. */
@media (min-width: 1024px) and (max-height: 820px) {
	:root .ep-nav--v3 .ep-v3-list { padding: 4px 0 8px; }
	:root .ep-nav--v3 .ep-v3-list-h { margin: 6px 20px 0; }
	:root .ep-nav--v3 .ep-v3-row { height: 34px; }
}
@media (min-width: 1024px) {
	:root .ep-nav--v3 .ep-v3-list,
	:root .ep-nav--v3 .ep-v3-fly {
		background:
			linear-gradient(#fff 30%, rgba(255, 255, 255, 0)) top / 100% 28px no-repeat local,
			linear-gradient(rgba(255, 255, 255, 0), #fff 70%) bottom / 100% 28px no-repeat local,
			radial-gradient(farthest-side at 50% 0, rgba(14, 17, 22, .16), rgba(14, 17, 22, 0)) top / 100% 10px no-repeat scroll,
			radial-gradient(farthest-side at 50% 100%, rgba(14, 17, 22, .16), rgba(14, 17, 22, 0)) bottom / 100% 10px no-repeat scroll;
		background-color: #fff;
	}
}

@media (min-width: 1280px) {
	:root .ep-nav--v3 .ep-v3-body.has-ban { grid-template-columns: minmax(0, 1fr) 240px; }
	:root .ep-nav--v3 .ep-v3-body.has-ban .ep-v3-ban { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	:root .ep-nav--v3 .ep-v3-box,
	:root .ep-nav--v3 .ep-v3-dim,
	:root .ep-nav--v3 .ep-v3-q::after { transition: none; }
}
