/* [kw_megamenu] — category mega menu. Design: html-design/megamenu-a.html (variant A).
   Tokens follow html-design/design-plan.md; brand blue/yellow come from Flatsome's primary/secondary. */

.kw-megamenu,
.kw-mm {
	--kw-mm-field: var(--primary-color, #2a5996);
	--kw-mm-field-deep: color-mix(in oklab, var(--kw-mm-field) 82%, #15253d);
	--kw-mm-ink: #15253d;
	--kw-mm-muted: color-mix(in oklab, #15253d 74%, #fff);
	--kw-mm-surface: #edf2f8;
	--kw-mm-line: #cfd9e6;
	--kw-mm-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--kw-mm-r-btn: 8px;   /* buttons and clickable rows (same as the homepage) */
	--kw-mm-r-card: 12px; /* boxes */
}

/* ---------- trigger (header) ---------- */
.kw-megamenu { display: flex; align-items: stretch; height: 100%; }
.kw-megamenu__btn,
.kw-megamenu__burger { display: inline-flex; align-items: center; gap: 8px; margin: 0; border: 0; border-radius: 0; cursor: pointer; font: inherit; line-height: 1; text-transform: none; letter-spacing: 0; }
.kw-megamenu { align-items: center; }
.kw-megamenu__btn { min-height: 44px; min-width: 250px; padding: 0 16px; border-radius: var(--kw-mm-r-btn); background: var(--kw-mm-field); color: #fff; font-size: 0.9375rem; font-weight: 700; } /* 8px like every other button; centred in the 50px bar */
.kw-megamenu__btn span { flex: 1; text-align: left; }
.kw-megamenu__btn:hover,
.kw-megamenu__btn[aria-expanded="true"] { background: var(--kw-mm-field-deep); color: #fff; }
.kw-megamenu__btn .kw-mm-ic--chevron { width: 16px; height: 16px; transition: transform 150ms var(--kw-mm-ease); }
.kw-megamenu__btn[aria-expanded="true"] .kw-mm-ic--chevron { transform: rotate(180deg); }
.kw-megamenu__burger { display: none; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; color: var(--kw-mm-ink); border-radius: var(--kw-mm-r-btn); }
.kw-megamenu__burger:hover { background: var(--kw-mm-surface); }
.kw-megamenu :focus-visible, .kw-mm :focus-visible { outline: 3px solid var(--kw-mm-field); outline-offset: 2px; }

.kw-mm-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- menu root ---------- */
.kw-mm { position: fixed; inset: var(--kw-mm-top, 0px) 0 0; z-index: 100000; /* above the store notice bar */ color: var(--kw-mm-ink); font-size: 0.9375rem; line-height: 1.4; }
.kw-mm[hidden] { display: none; }
.kw-mm a { color: inherit; text-decoration: none; }
.kw-mm ul { margin: 0; padding: 0; list-style: none; }
.kw-mm li { margin: 0; }
.kw-mm h2, .kw-mm h3, .kw-mm p { margin: 0; }
.kw-mm__scrim { position: absolute; inset: 0; background: color-mix(in oklab, #15253d 45%, transparent); }
.kw-mm__panel { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border-top: 1px solid var(--kw-mm-line); box-shadow: 0 18px 48px -12px color-mix(in oklab, #15253d 38%, transparent); animation: kw-mm-in 220ms var(--kw-mm-ease); }
@keyframes kw-mm-in { from { opacity: 0; transform: translateY(-4px); } }
.kw-mm__head, .kw-mm__back, .kw-mm__search, .kw-mm__pages, .kw-mm__allbar { display: none; }
.kw-mm__body { display: grid; grid-template-columns: 300px minmax(0, 1fr); flex: 1; min-height: 0; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 30px; }

/* rail */
.kw-mm__nav { min-height: 0; overflow-y: auto; padding: 12px 12px 12px 0; border-right: 1px solid var(--kw-mm-line); }
.kw-mm__top { display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px 8px 16px; border-radius: var(--kw-mm-r-btn); font-weight: 600; line-height: 1.25; }
.kw-mm__top:hover { background: var(--kw-mm-surface); }
.kw-mm__top.is-active { background: var(--kw-mm-field); color: #fff; }
.kw-mm__top .kw-mm-ic { width: 16px; height: 16px; transform: rotate(-90deg); opacity: 0.7; }

/* panes */
.kw-mm__panes { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.kw-mm__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 24px 0 24px 32px; }
.kw-mm__panehead { padding-bottom: 16px; border-bottom: 1px solid var(--kw-mm-line); }
.kw-mm__h { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--kw-mm-ink); }
.kw-mm__note { margin-top: 4px; color: var(--kw-mm-muted); font-size: 0.875rem; }
.kw-mm__cols { columns: 4 210px; column-gap: 32px; padding-top: 16px; }
.kw-mm__cols--few { columns: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.kw-mm__group { margin-bottom: 28px; }
/* group heading (Po vrsti, Sesalniki za panogo, Znamke …): dark, bold, brand-blue rule under it */
.kw-mm__gh { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--kw-mm-field); break-after: avoid; font-size: 1rem; font-weight: 800; line-height: 1.25; color: var(--kw-mm-ink); letter-spacing: 0; text-transform: none; }
.kw-mm__list > li { break-inside: avoid; }
.kw-mm__link { display: block; padding: 6px 0; font-size: 0.875rem; line-height: 1.3; }
.kw-mm__link:hover { color: var(--kw-mm-field); text-decoration: underline; text-underline-offset: 3px; }
.kw-mm__kids { margin: 0 0 8px 12px !important; padding-left: 12px !important; border-left: 1px solid var(--kw-mm-line); }
.kw-mm__link--kid { padding: 4px 0; font-size: 0.8125rem; color: var(--kw-mm-muted); }
/* long sub-lists (13 brands of central units): one wrapped line of links instead of a 13-row column that makes
   the pane scroll while the other columns stay short */
.kw-mm__kids:has(> li:nth-child(7)) { display: flex; flex-wrap: wrap; gap: 0 14px; }
.kw-mm__kids:has(> li:nth-child(7)) .kw-mm__link--kid { padding: 3px 0; }

/* help box, pinned at the bottom */
.kw-mm__foot { padding: 12px 0 16px 32px; background: #fff; }
.kw-mm__help { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 24px; border-radius: var(--kw-mm-r-card); background: var(--kw-mm-surface); font-size: 0.875rem; }
.kw-mm__help strong { font-weight: 700; }
.kw-mm__helptel { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--kw-mm-field) !important; }
.kw-mm__helptel:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.kw-mm__helptel .kw-mm-ic { width: 18px; height: 18px; }

/* group / category elements outside the menu (UX Builder block preview) look like the menu */
.kw-mm__group { --kw-mm-field: var(--primary-color, #2a5996); --kw-mm-ink: #15253d; --kw-mm-muted: color-mix(in oklab, #15253d 74%, #fff); --kw-mm-line: #cfd9e6; max-width: 320px; color: var(--kw-mm-ink); }
.kw-mm .kw-mm__group { max-width: none; }
.kw-mm__list, .kw-mm__kids { margin: 0; padding: 0; list-style: none; }
.kw-mm__list li, .kw-mm__kids li { margin: 0; }
.kw-mm__group a { color: inherit; text-decoration: none; }
.kw-mm__item.is-empty > .kw-mm__link { opacity: 0.5; }
.kw-mm__item .kw-mm__note { display: block; font-size: 0.75rem; color: var(--kw-mm-muted); }
.kw-mm__empty { padding: 6px 0; font-size: 0.875rem; color: var(--kw-mm-muted); font-style: italic; }

html.kw-mm-lock { overflow: hidden; }

/* short laptop screens (≤820 px high): tighter spacing so the longest list (Sesalniki) fits without scrolling */
@media (min-width: 850px) and (max-height: 820px) {
	.kw-mm__scroll { padding-top: 16px; padding-bottom: 8px; }
	.kw-mm__panehead { padding-bottom: 10px; }
	.kw-mm__h { font-size: 1.375rem; }
	.kw-mm__cols { padding-top: 12px; }
	.kw-mm__group { margin-bottom: 18px; }
	.kw-mm__link { padding: 4px 0; }
	.kw-mm__foot { padding-top: 8px; padding-bottom: 10px; }
	.kw-mm__help { padding: 10px 20px; }
}

/* low windows (laptop with browser bars): the help box gives its room to the list; the phone is in the top bar */
@media (min-width: 850px) and (max-height: 760px) {
	.kw-mm__foot { display: none; }
	.kw-mm__scroll { padding-bottom: 16px; }
}

@media (max-width: 1200px) {
	.kw-mm__body { grid-template-columns: 260px minmax(0, 1fr); }
	.kw-mm__cols { columns: 3 200px; }
}

/* ---------- mobile drawer (≤849 px, Flatsome "medium") ---------- */
@media (max-width: 849px) {
	.kw-megamenu__btn { display: none; }
	.kw-megamenu__burger { display: inline-flex; }

	.kw-mm { inset: 0; z-index: 100000; }
	.kw-mm__scrim { display: none; }
	.kw-mm__panel { border: 0; box-shadow: none; animation: kw-mm-slide 240ms var(--kw-mm-ease); }
	@keyframes kw-mm-slide { from { transform: translateX(-100%); } }
	.kw-mm__head { display: flex; align-items: center; min-height: 60px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--kw-mm-line); }
	.kw-mm__title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
	.kw-mm__close { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: var(--kw-mm-r-btn); background: none; color: var(--kw-mm-ink); }
	.kw-mm__body { display: block; position: relative; padding: 0; overflow: hidden; }
	.kw-mm__nav, .kw-mm__panes { position: absolute; inset: 0; }
	.kw-mm__nav { display: flex; flex-direction: column; padding: 0; border: 0; -webkit-overflow-scrolling: touch; }
	.kw-mm__search { display: block; padding: 12px 16px 4px; }
	.kw-mm__search form { margin: 0; }
	.kw-mm__search input[type="search"] { min-height: 44px; margin: 0; font-size: 16px; }
	.kw-mm .kw-mm__rail { padding: 0 16px; }
	.kw-mm__rail li + li .kw-mm__top { border-top: 1px solid var(--kw-mm-line); }
	.kw-mm__top { grid-template-columns: minmax(0, 1fr) 16px; min-height: 60px; padding: 8px 0; border-radius: 0; font-size: 1rem; }
	.kw-mm__top.is-active { background: none; color: inherit; }
	.kw-mm__top:hover { background: none; }
	.kw-mm__pages { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: auto; padding: 12px 16px 20px; border-top: 1px solid var(--kw-mm-line); background: var(--kw-mm-surface); }
	.kw-mm__pages a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
	.kw-mm__pages .kw-mm__tel { flex-basis: 100%; color: var(--kw-mm-field); font-weight: 700; }
	.kw-mm__pages .kw-mm-ic { width: 18px; height: 18px; }

	/* level 2 slides over the list */
	.kw-mm__panes { display: block; background: #fff; transform: translateX(100%); visibility: hidden; transition: transform 200ms var(--kw-mm-ease), visibility 0s 200ms; }
	.kw-mm.is-drilled .kw-mm__panes { transform: none; visibility: visible; transition: transform 240ms var(--kw-mm-ease); }
	.kw-mm__scroll { height: 100%; padding: 0; overflow-y: auto; }
	.kw-mm__pane { display: flex; flex-direction: column; min-height: 100%; padding: 8px 16px 0; }
	.kw-mm__back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 44px; margin: 0 0 0 -8px; padding: 0 8px; border: 0; border-radius: var(--kw-mm-r-btn); background: none; color: var(--kw-mm-field); font: inherit; font-weight: 700; text-transform: none; letter-spacing: 0; }
	.kw-mm__back .kw-mm-ic { width: 16px; height: 16px; transform: rotate(90deg); }
	.kw-mm__panehead { padding: 8px 0 12px; border: 0; }
	.kw-mm__h { font-size: 1.5rem; }
	.kw-mm__note { display: none; }
	.kw-mm__cols, .kw-mm__cols--few { display: block; columns: auto; padding: 0; flex: 1; }
	.kw-mm__group { margin: 20px 0 0; }
	/* mobile: full-width tinted band so a group start is obvious while scrolling */
	.kw-mm .kw-mm__gh { margin: 0 -16px; padding: 12px 16px; border: 0; background: var(--kw-mm-surface); font-size: 1rem; }
	.kw-mm__list > li { border-bottom: 1px solid var(--kw-mm-line); }
	.kw-mm__link { display: flex; align-items: center; min-height: 52px; padding: 8px 0; font-size: 1rem; }
	.kw-mm__kids { margin: 0 0 8px 4px !important; }
	.kw-mm__link--kid { min-height: 44px; font-size: 0.9375rem; }
	.kw-mm__allbar { display: block; position: sticky; bottom: 0; margin: 20px -16px 0; padding: 12px 16px; background: #fff; border-top: 1px solid var(--kw-mm-line); }
	.kw-mm__all { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border-radius: var(--kw-mm-r-btn); background: var(--kw-mm-field); color: #fff !important; font-weight: 700; }
	.kw-mm__all .kw-mm-ic { width: 16px; height: 16px; transform: rotate(-90deg); }
	.kw-mm__foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.kw-mm__panel, .kw-mm__panes, .kw-mm.is-drilled .kw-mm__panes { animation: none; transition: none; }
	.kw-megamenu__btn .kw-mm-ic--chevron { transition: none; }
}
