/* Mega Menu Kowalscy — front-end styles
   All colors/sizes come from CSS custom properties injected inline
   by MMK_Render::build_css_vars() based on admin settings. */

.mmk-header,
.mmk-header * {
	box-sizing: border-box;
}

.mmk-header {
	position: var(--mmk-sticky, sticky);
	top: 0;
	z-index: 9999;
	padding: 18px 24px 0;
	font-family: var(--mmk-font);
	font-size: var(--mmk-font-size);
	color: var(--mmk-ink);
}

.mmk-header a {
	text-decoration: none;
}

/* Defensive reset: this menu is dropped inside an unknown theme's own
   header markup, so its own global "button"/"a" styles (uppercase
   buttons, blue underlined links, custom fonts, etc.) must not leak
   into it. Re-establish a neutral baseline here; every real style
   below this point wins on top of it. */
.mmk-header button,
.mmk-header a {
	text-transform: none;
	text-decoration: none;
	letter-spacing: normal;
	font-family: inherit;
	font-style: normal;
	background: none;
	border: 0;
	margin: 0;
	box-shadow: none;
	line-height: normal;
}

.mmk-header ul,
.mmk-header ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mmk-header button {
	font: inherit;
}

.mmk-header-inner {
	position: relative;
	max-width: var(--mmk-container);
	margin: 0 auto;
	min-height: 88px;
	display: flex;
	align-items: center;
	gap: 30px;
	padding: 16px 22px;
	border: 1px solid rgba(22, 59, 44, .08);
	border-radius: 999px;
	background: rgba(255, 255, 255, .96);
	box-shadow: var(--mmk-shadow);
	backdrop-filter: blur(16px);
}

/* Brand */
.mmk-brand {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	min-width: 60px;
	gap: 10px;
}

.mmk-brand-img {
	display: block;
	max-width: 210px;
	height: auto;
}

.mmk-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.mmk-brand-name {
	font-weight: 850;
	letter-spacing: -.01em;
	color: var(--mmk-brand-900);
	font-size: 1.15em;
}

.mmk-brand-tagline {
	font-size: .7em;
	color: var(--mmk-muted);
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* Main nav */
.mmk-main-nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	flex: 1 1 auto;
	flex-wrap: wrap;
}

.mmk-nav-link,
.mmk-menu-trigger {
	appearance: none;
	border: 0;
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 14px;
	border-radius: 999px;
	color: var(--mmk-brand-900) !important;
	font-weight: var(--mmk-font-weight-nav);
	font-size: 1em;
	letter-spacing: -.01em;
	text-transform: none !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, transform .18s ease;
}

.mmk-nav-link:hover,
.mmk-menu-trigger:hover,
.mmk-offer-wrap.mmk-dropdown-open .mmk-menu-trigger,
.mmk-about-wrap.mmk-dropdown-open .mmk-menu-trigger,
.mmk-lang-switcher.mmk-dropdown-open .mmk-menu-trigger,
.mmk-offer-wrap:focus-within .mmk-menu-trigger,
.mmk-about-wrap:focus-within .mmk-menu-trigger,
.mmk-lang-switcher:focus-within .mmk-menu-trigger {
	color: var(--mmk-brand-800) !important;
	background: var(--mmk-soft-green);
}

.mmk-chevron {
	width: 8px;
	height: 8px;
	margin-left: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .18s ease;
}

.mmk-offer-wrap.mmk-dropdown-open .mmk-chevron,
.mmk-about-wrap.mmk-dropdown-open .mmk-chevron,
.mmk-offer-wrap:hover .mmk-chevron,
.mmk-about-wrap:hover .mmk-chevron,
.mmk-offer-wrap:focus-within .mmk-chevron,
.mmk-about-wrap:focus-within .mmk-chevron {
	transform: rotate(225deg) translateY(-1px);
}

/* Contact */
.mmk-header-contact {
	display: grid;
	gap: 4px;
	justify-items: flex-end;
	flex: 0 0 auto;
	white-space: nowrap;
}

.mmk-phone {
	font-size: 1em;
	font-weight: 800;
	color: var(--mmk-brand-900) !important;
	text-transform: none !important;
	text-decoration: none !important;
}

.mmk-mail {
	font-size: .87em;
	color: var(--mmk-brand-700) !important;
	font-weight: 650;
	text-transform: none !important;
	text-decoration: none !important;
}

/* Dropdown wraps */
.mmk-offer-wrap {
	position: static;
}

.mmk-about-wrap {
	position: relative;
}

.mmk-about-menu {
	position: absolute;
	left: 0;
	top: calc(100% + 16px);
	width: min(360px, calc(100vw - 48px));
	padding: 10px;
	border: 1px solid rgba(22, 59, 44, .1);
	border-radius: 22px;
	background: rgba(255, 255, 255, .98);
	box-shadow: var(--mmk-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(.985);
	transform-origin: top left;
	transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
	z-index: 20;
}

.mmk-about-wrap.mmk-dropdown-open .mmk-about-menu,
.mmk-about-wrap:hover .mmk-about-menu,
.mmk-about-wrap:focus-within .mmk-about-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.mmk-about-list {
	display: grid;
	gap: 8px;
}

.mmk-about-item {
	display: grid;
	grid-template-columns: 51px 1fr;
	align-items: center;
	gap: 12px;
	min-height: 72px;
	padding: 10px;
	border-radius: var(--mmk-radius-md);
	color: var(--mmk-brand-900) !important;
	font-size: .93em;
	font-weight: 750;
	letter-spacing: -.01em;
	text-transform: none !important;
	text-decoration: none !important;
	transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.mmk-about-item:hover {
	transform: translateY(-2px);
	background: var(--mmk-panel);
	box-shadow: 0 12px 24px rgba(20, 39, 30, .07);
}

.mmk-about-icon {
	width: 51px;
	height: 51px;
	padding: 9px;
	border-radius: var(--mmk-radius-sm);
	color: var(--mmk-brand-800);
	background: var(--mmk-soft);
	border: 1px solid rgba(22, 59, 44, .08);
	transition: color .18s ease, background .18s ease, transform .18s ease;
}

.mmk-about-item:hover .mmk-about-icon {
	color: var(--mmk-brand-900);
	background: var(--mmk-soft-green);
	transform: scale(1.04);
}

/* Mega menu */
.mmk-mega-menu {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 16px);
	max-width: 100vw;
	padding: 0 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(.985);
	transform-origin: top left;
	transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
	z-index: 20;
}

.mmk-offer-wrap.mmk-dropdown-open .mmk-mega-menu,
.mmk-offer-wrap:hover .mmk-mega-menu,
.mmk-offer-wrap:focus-within .mmk-mega-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.mmk-mega-shell {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	padding: 22px;
	border: 1px solid rgba(22, 59, 44, .1);
	border-radius: var(--mmk-radius-lg);
	background: rgba(255, 255, 255, .99);
	box-shadow: var(--mmk-shadow);
	max-width: var(--mmk-container);
	margin: 0 auto;
}

.mmk-mega-feature {
	position: relative;
	overflow: hidden;
	flex: 1 1 200px;
	max-width: 260px;
	padding: 24px 22px;
	border-radius: 24px;
	color: #fff;
	background:
		radial-gradient(circle at 95% 15%, color-mix(in srgb, var(--mmk-brand-500) 55%, transparent), transparent 9rem),
		linear-gradient(140deg, var(--mmk-brand-900), var(--mmk-brand-800));
}

.mmk-mega-feature::after {
	content: "";
	position: absolute;
	right: -52px;
	bottom: -44px;
	width: 180px;
	height: 180px;
	border-radius: 50%;
	border: 28px solid rgba(255, 255, 255, .08);
}

.mmk-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	color: var(--mmk-brand-500);
	font-size: .8em;
	font-weight: 850;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.mmk-mega-feature .mmk-eyebrow {
	color: #a5ed76;
}

.mmk-mega-feature h2 {
	margin: 0 0 12px;
	font-size: clamp(20px, 1.7vw, 26px);
	line-height: 1.08;
	letter-spacing: -.02em;
	color: #fff !important;
}

.mmk-mega-feature p {
	margin: 0 0 22px;
	color: rgba(255, 255, 255, .8) !important;
	font-size: .93em;
	line-height: 1.55;
}

.mmk-feature-link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 999px;
	background: #fff !important;
	color: var(--mmk-brand-900) !important;
	font-size: .93em;
	font-weight: 800;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none;
}

.mmk-mega-section {
	flex: 1 1 220px;
	padding: 8px 0;
	min-width: 210px;
}

.mmk-mega-section h3 {
	margin: 0 0 14px;
	padding: 0 4px;
	color: var(--mmk-brand-900) !important;
	font-size: .87em;
	font-weight: 850;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.mmk-mega-section-title-link {
	display: block;
	border-radius: 6px;
	transition: color .18s ease;
}

.mmk-mega-section-title-link:hover h3,
.mmk-mega-section-title-link:focus-visible h3 {
	color: var(--mmk-brand-700);
	text-decoration: underline;
}

.mmk-mega-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.mmk-mega-grid.mmk-two-col {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* The two-column layout packs items into half-width cells, so it keeps
   the older, more compact icon size — otherwise labels would get
   squeezed. The (now-default) one-column layout gets the bigger icons. */
.mmk-mega-grid.mmk-two-col .mmk-mega-item {
	grid-template-columns: 48px 1fr;
	gap: 10px;
	min-height: 74px;
}
.mmk-mega-grid.mmk-two-col .mmk-item-icon {
	width: 48px;
	height: 48px;
	padding: 9px;
}

.mmk-mega-item {
	display: grid;
	grid-template-columns: 54px 1fr;
	align-items: center;
	gap: 12px;
	min-height: 80px;
	padding: 12px;
	border: 1px solid transparent;
	border-radius: var(--mmk-radius-md);
	background: var(--mmk-panel);
	color: var(--mmk-brand-900) !important;
	font-size: .93em;
	font-weight: 750;
	letter-spacing: -.01em;
	text-transform: none !important;
	text-decoration: none !important;
	transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mmk-item-icon,
.mmk-item-icon-preview {
	width: 54px;
	height: 54px;
	padding: 9px;
	border-radius: var(--mmk-radius-sm);
	color: var(--mmk-brand-800);
	background: var(--mmk-soft);
	border: 1px solid rgba(22, 59, 44, .08);
	transition: color .18s ease, background .18s ease, transform .18s ease;
}

.mmk-mega-item:hover {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--mmk-brand-500) 35%, transparent);
	background: var(--mmk-panel);
	box-shadow: 0 14px 30px rgba(20, 39, 30, .08);
}

.mmk-mega-item:hover .mmk-item-icon {
	color: var(--mmk-brand-900);
	background: var(--mmk-soft-green);
	transform: scale(1.04);
}

.mmk-mega-card {
	margin-top: 14px;
	padding: 16px;
	border-radius: var(--mmk-radius-md);
	background: linear-gradient(180deg, var(--mmk-soft), #fff);
	border: 1px solid var(--mmk-line);
}

.mmk-mega-card strong,
.mmk-mega-card span {
	display: block;
}

.mmk-mega-card strong {
	margin-bottom: 6px;
	color: var(--mmk-brand-900) !important;
	font-size: .93em;
}

/* Belt-and-braces: force every item/label text node to take its
   already-hardened parent color, in case the host theme has its own
   generic "span" styling that would otherwise win by beating pure
   CSS inheritance (inheritance has no specificity of its own). */
.mmk-about-item span,
.mmk-mega-item span,
.mmk-lang-item span,
.mmk-nav-link span,
.mmk-menu-trigger span {
	color: inherit !important;
	text-transform: none !important;
	text-decoration: none !important;
}

.mmk-mega-card span {
	color: var(--mmk-muted) !important;
	font-size: .87em;
	line-height: 1.45;
}

/* Mobile toggle */
.mmk-mobile-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: var(--mmk-soft-green);
	color: var(--mmk-brand-900);
	padding: 12px;
	cursor: pointer;
}

.mmk-mobile-toggle span {
	display: block;
	height: 2px;
	margin: 4px 0;
	border-radius: 99px;
	background: currentColor;
	transform-origin: center;
	transition: transform .2s ease, opacity .2s ease;
}

/* Turns into an "X" while the full-screen panel is open. */
.mmk-mobile-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}
.mmk-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.mmk-mobile-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* "Menu only" mode: no logo, no contact block, no decorative pill —
   just the nav, meant to be dropped inside the theme's own header.
   NOTE: position stays controlled by --mmk-sticky (sticky/relative),
   never "static" — the header must remain a positioning context so
   the mega menu / mobile panel don't jump somewhere else on the page. */
.mmk-header.mmk-menu-only {
	padding: 0;
}

.mmk-header.mmk-menu-only .mmk-header-inner {
	max-width: none;
	min-height: auto;
	margin: 0;
	padding: 0;
	gap: 4px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
}

.mmk-header.mmk-menu-only .mmk-main-nav {
	flex: 0 1 auto;
}

.mmk-header.mmk-menu-only .mmk-mobile-toggle {
	margin-left: 12px;
}

@media (min-width: 861px) {
	.mmk-header.mmk-menu-only .mmk-mobile-toggle {
		display: none;
	}
	/* Right-align nav items in "menu only" mode — desktop only.
	   Scoped here (not left as a general rule) specifically so it can
	   never fight with the mobile full-screen panel's own top-aligned
	   column layout, where "justify-content" means something entirely
	   different (vertical instead of horizontal). */
	.mmk-header.mmk-menu-only .mmk-main-nav {
		justify-content: flex-end;
	}
}

/* Language switcher (WPML) */
.mmk-lang-switcher {
	position: relative;
}

.mmk-lang-trigger {
	gap: 8px;
}

.mmk-lang-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mmk-lang-flag,
.mmk-lang-item img {
	width: 20px;
	height: 14px;
	object-fit: cover;
	border-radius: 2px;
	display: inline-block;
	flex: 0 0 auto;
}

.mmk-lang-name {
	white-space: nowrap;
}

.mmk-lang-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 16px);
	width: max-content;
	min-width: 180px;
	padding: 10px;
	border: 1px solid rgba(22, 59, 44, .1);
	border-radius: 18px;
	background: rgba(255, 255, 255, .98);
	box-shadow: var(--mmk-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(.985);
	transform-origin: top right;
	transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
	z-index: 20;
}

.mmk-lang-switcher.mmk-dropdown-open .mmk-lang-menu,
.mmk-lang-switcher:hover .mmk-lang-menu,
.mmk-lang-switcher:focus-within .mmk-lang-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.mmk-lang-list {
	display: grid;
	gap: 6px;
}

.mmk-lang-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 12px;
	color: var(--mmk-brand-900) !important;
	font-size: .93em;
	font-weight: 650;
	text-transform: none !important;
	text-decoration: none !important;
	transition: background .18s ease;
}

.mmk-lang-item:hover {
	background: var(--mmk-soft-green);
}


@media (max-width: 1400px) {
	.mmk-main-nav {
		gap: 2px;
	}
	.mmk-nav-link,
	.mmk-menu-trigger {
		padding: 0 12px;
	}
}

@media (max-width: 1180px) {
	.mmk-header-inner {
		border-radius: 28px;
	}
	.mmk-brand-img {
		max-width: 168px;
	}
	.mmk-header-contact {
		display: none;
	}
	.mmk-mega-feature {
		flex: 1 1 100%;
		max-width: 100%;
	}
	.mmk-main-nav {
		gap: 0;
	}
	.mmk-nav-link,
	.mmk-menu-trigger {
		padding: 0 10px;
		font-size: .94em;
	}
	.mmk-chevron {
		margin-left: 6px;
	}
}

@media (max-width: 860px) {
	.mmk-header {
		padding: 12px;
	}
	.mmk-header-inner {
		min-height: 76px;
		padding: 14px 16px;
	}
	.mmk-mobile-toggle {
		display: inline-block;
		margin-left: auto;
		position: relative;
		z-index: 10001; /* stays above the full-screen panel so it can close it again */
	}
	/* While open, detach it from the header's own position and pin it
	   to the corner of the screen — it must stay reachable no matter
	   where in the theme's markup the header itself sits. */
	.mmk-mobile-toggle[aria-expanded="true"] {
		position: fixed;
		top: 16px;
		right: 16px;
		margin-left: 0;
	}

	/* Full-screen takeover: covers and blocks the page behind it,
	   scrolls internally so long menus (with mega-menu content) are
	   always reachable. */
	.mmk-main-nav {
		display: none;
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100vh;
		height: 100dvh;
		margin: 0;
		align-items: stretch;
		justify-content: flex-start;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 6px;
		padding: 84px 18px 32px;
		border-radius: 0;
		background: var(--mmk-panel);
		box-shadow: none;
		max-height: none;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 10000;
	}
	/* The "menu only" mode has its own higher-specificity rule
	   (.mmk-header.mmk-menu-only .mmk-main-nav) that right-aligns the
	   nav on desktop — it isn't scoped to desktop only, so it still
	   wins here unless explicitly reset back to top-aligned. */
	.mmk-header.mmk-menu-only .mmk-main-nav {
		justify-content: flex-start;
	}
	.mmk-main-nav.mmk-nav-open {
		display: flex;
	}
	.mmk-main-nav > * {
		flex: 0 0 auto;
	}
	.mmk-nav-link,
	.mmk-menu-trigger {
		justify-content: space-between;
		width: 100%;
	}

	.mmk-about-menu {
		position: static !important;
		display: none;
		width: 100%;
		padding: 8px 0 4px;
		border: 0;
		border-radius: 18px;
		box-shadow: none;
		background: transparent;
		opacity: 1;
		visibility: visible;
		transform: none !important;
	}
	.mmk-about-wrap.mmk-dropdown-open .mmk-about-menu {
		display: block;
	}
	.mmk-about-list {
		display: grid;
		gap: 6px;
	}
	.mmk-about-item {
		display: grid;
		min-height: 62px;
		background: var(--mmk-soft);
	}

	.mmk-mega-menu {
		position: static !important;
		display: none;
		width: 100%;
		padding: 10px 0 4px;
		opacity: 1;
		visibility: visible;
		transform: none !important;
	}
	.mmk-offer-wrap.mmk-dropdown-open .mmk-mega-menu {
		display: block;
	}
	.mmk-mega-shell {
		display: flex;
		flex-direction: column;
		padding: 12px;
		border-radius: 22px;
		box-shadow: none;
		background: var(--mmk-soft);
	}
	.mmk-mega-grid,
	.mmk-mega-grid.mmk-two-col {
		display: grid;
		grid-template-columns: 1fr;
	}

	.mmk-lang-menu {
		position: static !important;
		display: none;
		width: 100%;
		padding: 8px 0 0;
		border: 0;
		border-radius: 18px;
		box-shadow: none;
		background: transparent;
		opacity: 1;
		visibility: visible;
		transform: none !important;
	}
	.mmk-lang-switcher.mmk-dropdown-open .mmk-lang-menu {
		display: block;
	}
	.mmk-lang-list {
		display: grid;
	}
	.mmk-lang-item {
		background: var(--mmk-soft);
	}
}

/* While the mobile menu is open, freeze the page behind it so only
   the menu itself scrolls (class toggled by frontend.js). */
body.mmk-scroll-lock {
	overflow: hidden !important;
}
