/**
 * Ersoy masaüstü mega menü — sınıflar Journal'da <html> üzerinde (desktop-header-active, has-epa-mega-menu)
 */
html.desktop-header-active.has-epa-mega-menu .desktop-main-menu-wrapper .main-menu-1 > .main-menu,
html.desktop-header-active.has-epa-mega-menu .desktop-main-menu-wrapper .main-menu-1 > #main-menu,
html.desktop-header-active.has-epa-mega-menu .desktop-main-menu-wrapper .main-menu-1 > [id^="main-menu"] {
	display: none !important;
}

html.desktop-header-active.has-epa-mega-menu .desktop-main-menu-wrapper .main-menu-1 > .menu-trigger.menu-trigger-1 {
	display: none !important;
}

html.desktop-header-active.has-epa-mega-menu .main-menu-1 {
	flex: 1 1 auto;
	min-width: 0;
}

html.desktop-header-active.has-epa-mega-menu .desktop-main-menu-wrapper.menu-bar,
html.desktop-header-active.has-epa-mega-menu .desktop-main-menu-wrapper .main-menu-1,
html.desktop-header-active.has-epa-mega-menu .header-classic .menu-bar {
	overflow: visible;
}

/*
 * Nav şeridi: classic/mega → .menu-bar; compact/slim → .menu-top (EPA burada).
 * Dikey konum: JS --epa-mm-panel-top = menü şeridi altı (fixed panel; kategori sayfasında bar fallback).
 */
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) {
	position: relative;
	/* Journal varsayılanı (~1); 300 vermek mid-bar üye giriş dropdown’unu şeridin altına iter */
	z-index: 1;
	overflow: visible;
}

/* Üye girişi, sepet, dil: mavi kategori şeridinin üstünde açılsın (EPA paneli fixed z-index: 310) */
html.desktop-header-active.has-epa-mega-menu .header .mid-bar,
html.desktop-header-active.has-epa-mega-menu .header .top-bar,
html.desktop-header-active.has-epa-mega-menu .header .classic-cart-wrapper {
	position: relative;
	z-index: 5;
}

html.desktop-header-active.has-epa-mega-menu .header .mid-bar .dropdown-menu,
html.desktop-header-active.has-epa-mega-menu .header .mid-bar .j-dropdown,
html.desktop-header-active.has-epa-mega-menu .header .classic-cart-wrapper .dropdown-menu,
html.desktop-header-active.has-epa-mega-menu .header .classic-cart-wrapper .j-dropdown,
html.desktop-header-active.has-epa-mega-menu .header .top-bar .dropdown-menu,
html.desktop-header-active.has-epa-mega-menu .header .top-bar .j-dropdown {
	z-index: 320;
}

html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) {
	align-items: stretch !important;
}

html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) > .main-menu-1,
html.desktop-header-active.has-epa-mega-menu .header .epa-mm-host {
	position: static;
	display: flex;
	align-items: stretch;
	align-self: stretch;
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
}

.epa-mm {
	--epa-navy: #0b1f3a;
	--epa-navy-deep: #071528;
	--epa-blue: #1a5fb4;
	--epa-blue-hover: #0f4a94;
	--epa-yellow: #f5c518;
	--epa-white: #ffffff;
	--epa-muted: #6b7c93;
	--epa-border: #e8edf3;
	--epa-transition: 180ms ease;
	/* En uzun 2 sütunlu liste: 6 satır (Ambalaj) — tüm paneller aynı yükseklik */
	--epa-mm-sub-rows: 6;
	--epa-mm-sub-row-h: 40px;
	--epa-mm-subs-vert: 36px;
	--epa-mm-subs-label-block: 22px;
	/* + aside-link-drop: ek yükseklik sol sütunda margin-top:auto ile “Keşfet”i Opp satırına indirir */
	--epa-mm-aside-link-drop: 20px;
	--epa-mm-panel-content-h: calc(
		var(--epa-mm-subs-vert) + var(--epa-mm-subs-label-block) +
		(var(--epa-mm-sub-rows) * var(--epa-mm-sub-row-h)) + var(--epa-mm-aside-link-drop)
	);
	/* Journal google-fonts ile yüklü Inter (harici kaynak ekleme) */
	--epa-mm-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	position: static;
	display: flex;
	align-items: stretch;
	align-self: stretch;
	width: 100%;
	height: 100%;
	font-family: var(--epa-mm-font-family);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: normal;
	text-transform: none;
	font-feature-settings: 'liga' 1, 'calt' 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* menu-bar / .j-menu kalıtımını kır; yalnızca EPA içi */
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) .epa-mm a,
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) .epa-mm p,
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) .epa-mm h2,
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) .epa-mm .epa-mm__tab-text,
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) .epa-mm .epa-mm__sub-text {
	font-family: var(--epa-mm-font-family);
	letter-spacing: normal;
	text-transform: none;
}

/* Journal .navbar-nav link margin/padding — sarı zemin şeritten taşmasın */
html.desktop-header-active.has-epa-mega-menu .header .desktop-main-menu-wrapper:has([data-epa-mega-menu]) .epa-mm a.epa-mm__tab {
	margin-block: 0 !important;
	padding-block: 0 !important;
}

.epa-mm__bar {
	display: flex;
	align-items: stretch;
	align-self: stretch;
	justify-content: flex-start;
	gap: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	flex-wrap: nowrap;
}

.epa-mm__item {
	position: static;
	display: flex;
	align-items: stretch;
	align-self: stretch;
	margin: 0 !important;
	padding: 0 !important;
}

.epa-mm a.epa-mm__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	flex: 1 1 auto;
	box-sizing: border-box;
	min-height: 100%;
	height: auto;
	margin: 0 !important;
	padding: 0 18px !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--epa-white) !important;
	text-decoration: none !important;
	white-space: nowrap;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	transition: color var(--epa-transition), background var(--epa-transition);
}

.epa-mm__tab-text {
	pointer-events: none;
	color: inherit !important;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.epa-mm__item:hover > .epa-mm__tab,
.epa-mm__item.is-open > .epa-mm__tab,
.epa-mm__item.is-active > .epa-mm__tab,
.epa-mm__item:focus-within > .epa-mm__tab,
.epa-mm a.epa-mm__tab:focus-visible {
	color: var(--epa-navy-deep) !important;
	background: var(--epa-yellow) !important;
	box-shadow: none !important;
}

.epa-mm__tab:focus {
	outline: none;
}

.epa-mm__tab:focus-visible {
	outline: 2px solid var(--epa-yellow);
	outline-offset: 2px;
}

.epa-mm__panel {
	position: fixed;
	left: var(--epa-mm-panel-left, 50%);
	top: var(--epa-mm-panel-top, 0);
	right: auto;
	transform: translateX(-50%);
	width: var(--epa-mm-panel-width, min(760px, calc(100vw - 32px)));
	max-width: calc(100vw - 32px);
	margin: 0;
	padding: 0;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	z-index: 310;
	transition: opacity var(--epa-transition), visibility var(--epa-transition);
}

.epa-mm__item:hover .epa-mm__panel,
.epa-mm__item:focus-within .epa-mm__panel,
.epa-mm__item.is-open .epa-mm__panel {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
}

/* Sekmeden panele geçerken boşlukta kapanmayı önle (görünür boşluk oluşturmaz) */
.epa-mm__item:hover .epa-mm__panel::before,
.epa-mm__item:focus-within .epa-mm__panel::before,
.epa-mm__item.is-open .epa-mm__panel::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 10px;
}

.epa-mm__panel-inner {
	display: flex;
	align-items: stretch;
	height: var(--epa-mm-panel-content-h);
	min-height: var(--epa-mm-panel-content-h);
	max-height: var(--epa-mm-panel-content-h);
	margin-top: 0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 18px 48px rgba(7, 21, 40, 0.18);
	background: var(--epa-white);
}

.epa-mm__aside {
	flex: 0 0 240px;
	width: 240px;
	max-width: 240px;
	padding: 20px 20px 14px;
	background: linear-gradient(165deg, var(--epa-navy) 0%, var(--epa-navy-deep) 100%);
	color: var(--epa-white);
	display: flex;
	flex-direction: column;
}

.epa-mm__aside-accent {
	display: block;
	width: 36px;
	height: 3px;
	background: var(--epa-yellow);
	border-radius: 2px;
	margin-bottom: 16px;
}

.epa-mm__aside-title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
	color: #ffffff !important;
}

.epa-mm__aside-desc {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.78) !important;
	flex-grow: 0;
}

.epa-mm a.epa-mm__aside-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--epa-yellow) !important;
	text-decoration: none !important;
	transition: opacity var(--epa-transition);
}

.epa-mm a.epa-mm__aside-link:hover,
.epa-mm a.epa-mm__aside-link:focus-visible {
	opacity: 0.9;
	color: var(--epa-yellow) !important;
	text-decoration: underline !important;
}

.epa-mm__subs {
	flex: 1 1 auto;
	padding: 18px 20px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	box-sizing: border-box;
}

.epa-mm__subs-label {
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #5a6d82;
}

.epa-mm__subs-scroll {
	flex: 0 0 auto;
	min-height: calc(var(--epa-mm-sub-rows) * var(--epa-mm-sub-row-h));
	overflow-x: hidden;
	overflow-y: hidden;
	width: 100%;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.epa-mm__subs-scroll::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.epa-mm__grid {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
	/* Sabit satır; fazla dikey boşluk alta kalır (3 öğe = 3 satır, sıkıştırma yok) */
	align-content: start;
	grid-auto-rows: var(--epa-mm-sub-row-h);
}

/* Beyaz alt kategori alanı: panelde kalan genişliği doldurur, sol/sağ padding eşit (20px) */
.epa-mm__panel-inner .epa-mm__subs {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	max-width: none;
}

.epa-mm__grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 12px;
	row-gap: 0;
	width: 100%;
	max-width: 100%;
}

.epa-mm__panel-inner:not(.epa-mm__panel-inner--narrow) .epa-mm__subs {
	padding-left: 16px;
	padding-right: 16px;
}

.epa-mm__grid--cols-2 .epa-mm a.epa-mm__sub-link {
	--epa-mm-sub-inset: 10px;
	gap: 8px;
	width: 100%;
	max-width: none;
}

.epa-mm__grid--cols-2 .epa-mm a.epa-mm__sub-link .epa-mm__sub-text {
	flex: 1 1 auto;
	min-width: 0;
}

.epa-mm__grid--cols-2 .epa-mm__sub-arrow {
	margin-left: auto;
	flex-shrink: 0;
	width: 14px;
	text-align: center;
}

/* 1 sütun (Elektronik, Etiketleme, Temizlik): tam genişlik, 2 col ile aynı dış simetri */
.epa-mm__grid--cols-1 {
	grid-template-columns: minmax(0, 1fr);
	column-gap: 0;
	width: 100%;
	max-width: 100%;
}

.epa-mm__grid--cols-1 .epa-mm a.epa-mm__sub-link {
	width: 100%;
	max-width: none;
}

.epa-mm__grid--cols-1 .epa-mm a.epa-mm__sub-link .epa-mm__sub-text {
	flex: 1 1 auto;
	min-width: 0;
}

.epa-mm__grid--cols-1 .epa-mm__sub-arrow {
	margin-left: auto;
}

.epa-mm__grid-item {
	border-bottom: 1px solid #eef2f6;
	min-width: 0;
	min-height: 0;
	align-self: start;
}

.epa-mm a.epa-mm__sub-link {
	--epa-mm-sub-inset: 12px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	box-sizing: border-box;
	height: var(--epa-mm-sub-row-h);
	min-height: var(--epa-mm-sub-row-h);
	max-height: var(--epa-mm-sub-row-h);
	padding: 8px var(--epa-mm-sub-inset);
	border: none;
	border-radius: 0;
	color: #2c3e50 !important;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	background: transparent !important;
	transition:
		color 180ms ease,
		background 180ms ease;
}

.epa-mm__sub-mark {
	flex: 0 0 3px;
	width: 2px;
	height: 20px;
	border-radius: 1px;
	background-color: rgba(26, 95, 180, 0.28);
	transition:
		width 180ms ease,
		background-color 180ms ease;
}

.epa-mm a.epa-mm__sub-link .epa-mm__sub-text {
	flex: 1 1 auto;
	min-width: 0;
	color: #2c3e50 !important;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.epa-mm a.epa-mm__sub-link:hover,
.epa-mm a.epa-mm__sub-link:focus-visible {
	color: var(--epa-blue) !important;
	background: transparent !important;
}

.epa-mm a.epa-mm__sub-link:hover .epa-mm__sub-mark,
.epa-mm a.epa-mm__sub-link:focus-visible .epa-mm__sub-mark {
	width: 3px;
	background-color: var(--epa-blue);
}

.epa-mm a.epa-mm__sub-link:hover .epa-mm__sub-text,
.epa-mm a.epa-mm__sub-link:focus-visible .epa-mm__sub-text {
	color: var(--epa-blue) !important;
}

.epa-mm__sub-link:focus {
	outline: none;
}

.epa-mm__sub-link:focus-visible {
	outline: 2px solid var(--epa-blue);
	outline-offset: 1px;
}

.epa-mm__sub-arrow {
	flex-shrink: 0;
	margin-left: 8px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	color: #b0bcc9;
	transition: transform 180ms ease, color 180ms ease;
}

.epa-mm a.epa-mm__sub-link:hover .epa-mm__sub-arrow,
.epa-mm a.epa-mm__sub-link:focus-visible .epa-mm__sub-arrow {
	transform: translateX(3px);
	color: var(--epa-blue) !important;
}

/* Mobil / tablet: mega menü hiç render edilmez; yedek gizleme */
@media (max-width: 1024px) {
	.epa-mm {
		display: none !important;
	}
}
