/**
 * DKM Category Menu.
 *
 * Desktop: kaup24's mega menu - a rail of primary categories, and beside it
 * the one under the pointer in columns, all on white.
 * Phone: 1a's drawer, one level at a time, with the title saying where you
 * are - drawn at kaup24's width. Primary and main rows carry a Lucide icon;
 * sub rows are the name alone.
 */

.wcg-cm {
	/* Diilikaubamaja Visual Identity: white surfaces, ink text, blue only for
	   links and the active marker (its own value, not the Kit's Secondary),
	   ink-100 behind what is under the pointer, ink for the open button. Icons are always ink -
	   never lime, never blue - 2px outline, 24px in the rail. */
	--wcg-cm-accent: var(--action-primary);
	--wcg-cm-text: var(--text-primary);
	--wcg-cm-muted: var(--text-tertiary);
	--wcg-cm-border: var(--border-subtle);
	--wcg-cm-border-control: var(--border-control);
	--wcg-cm-surface: var(--bg-surface);
	--wcg-cm-hover: var(--button-tertiary-hover-bg);
	--wcg-cm-height: var(--control-md);
	--wcg-cm-font: 15px;
	--wcg-cm-top: 64px;
	--wcg-cm-left: 16px;
	--wcg-cm-width: 1200px;

	display: inline-block;
	position: relative;
	max-width: 100%;
	margin: 0;
	padding: 0;
	color: var(--wcg-cm-text);
}

.wcg-cm--size-sm {
	--wcg-cm-height: var(--control-sm);
	--wcg-cm-font: 13px;
}

.wcg-cm--size-lg {
	--wcg-cm-height: var(--control-lg);
	--wcg-cm-font: 17px;
}

/* --------------------------------------------------------------- trigger */

/*
 * The button's look - background, colour, border, corners, padding, weight -
 * is not here: it is the widget's Elementor base style, so the Style tab
 * styles it and wins. What is here is either layout nobody styles (doubled
 * class: themes reach buttons as `.elementor button`) or kept weak with
 * :where(), so a size or font set in the Style tab outranks it.
 */
.wcg-cm .wcg-cm__trigger.wcg-cm__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	margin: 0;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
}

:where(.wcg-cm) .wcg-cm__trigger {
	height: var(--wcg-cm-height);
	font-size: var(--wcg-cm-font);
	font-family: inherit;
}

/* Every state is held here, above the Kit's button rules
   (".elementor-kit-N button:hover/:focus", the global Secondary blue) and the
   theme reset's focus outline, which both reached it. It is the design
   system's secondary button: rest and a click leave the Ink 100 fill, the
   pointer takes it one step darker, the Tab key adds the focus ring. No
   edge in any state - an outline is not a DS button. */
.wcg-cm button.wcg-cm__trigger {
	transition: var(--motion-control);
}

.wcg-cm button.wcg-cm__trigger:focus:not(:focus-visible),
.wcg-cm button.wcg-cm__trigger:active {
	outline: none;
	box-shadow: none;
}

.wcg-cm button.wcg-cm__trigger:focus:not(:hover):not(:focus-visible):not([aria-expanded="true"]) {
	background: var(--button-secondary-bg, var(--wcg-cm-hover));
	color: var(--button-secondary-text, var(--wcg-cm-text));
}

.wcg-cm button.wcg-cm__trigger:is(:hover, :focus-visible):not([aria-expanded="true"]) {
	background: var(--button-secondary-hover-bg, var(--bg-press));
	color: var(--button-secondary-text, var(--wcg-cm-text));
}

.wcg-cm button.wcg-cm__trigger:focus-visible {
	outline: 2px solid var(--border-focus);
	outline-offset: 2px;
}

/* Open, the button is ink and its burger turns into a cross. Stronger than
   the Kit's button hover (".elementor-kit-N button:hover", the global
   Secondary blue) and the widget's base style, which both reached it. */
.wcg-cm button.wcg-cm__trigger[aria-expanded="true"] {
	border-color: var(--wcg-cm-text);
	background: var(--wcg-cm-text);
	color: var(--wcg-cm-surface);
}

.wcg-cm__bar {
	transform-box: fill-box;
	transform-origin: center;
	transition: transform 0.18s ease, opacity 0.12s ease;
}

.wcg-cm__trigger[aria-expanded="true"] .wcg-cm__bar--1 {
	transform: translateY(5px) rotate(45deg);
}

.wcg-cm__trigger[aria-expanded="true"] .wcg-cm__bar--2 {
	opacity: 0;
}

.wcg-cm__trigger[aria-expanded="true"] .wcg-cm__bar--3 {
	transform: translateY(-5px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
	.wcg-cm__bar {
		transition: none;
	}
}

.wcg-cm a:focus-visible,
.wcg-cm button:not(.wcg-cm__trigger):focus-visible {
	outline: 2px solid var(--wcg-cm-accent);
	outline-offset: 2px;
}

.wcg-cm__burger {
	flex: none;
}

@media (max-width: 1024px) {
	.wcg-cm--m-icon .wcg-cm__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.wcg-cm--m-icon .wcg-cm__trigger.wcg-cm__trigger {
		width: var(--wcg-cm-height);
		padding: 0;
		justify-content: center;
		border-color: transparent;
	}

	/* The bare icon keeps no edge in any state. */
	.wcg-cm.wcg-cm--m-icon button.wcg-cm__trigger.wcg-cm__trigger {
		border-color: transparent;
	}
}

@media (max-width: 1024px) {
	/* Icon on a grey tile: the icon alone in a square the control's height,
	   drawn as an 8px Ink 100 tile so it reads as a button rather than a
	   glyph. Hover and focus go one step darker, to Ink 200. */
	.wcg-cm--m-tile .wcg-cm__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.wcg-cm.wcg-cm--m-tile button.wcg-cm__trigger.wcg-cm__trigger {
		width: var(--wcg-cm-height);
		padding: 0;
		justify-content: center;
		border-color: transparent;
		/* 8px, not the 4px button radius: kept by the shop's choice (1.48.0). */
		border-radius: var(--radius-md);
		background: var(--button-secondary-bg);
	}

	/* A click leaves it focused; the shared rule for that would paint it
	   white, so the tile is said again here, above it. */
	.wcg-cm.wcg-cm--m-tile button.wcg-cm__trigger.wcg-cm__trigger:focus:not(:hover):not(:focus-visible):not([aria-expanded="true"]) {
		border-color: transparent;
		background: var(--button-secondary-bg);
	}

	.wcg-cm.wcg-cm--m-tile button.wcg-cm__trigger.wcg-cm__trigger:is(:hover, :focus-visible):not([aria-expanded="true"]) {
		border-color: transparent;
		background: var(--bg-press);
	}

	/* Open, it is the ink tile with the cross, as the other choices are. */
	.wcg-cm.wcg-cm--m-tile button.wcg-cm__trigger.wcg-cm__trigger[aria-expanded="true"] {
		border-color: var(--wcg-cm-text);
		background: var(--wcg-cm-text);
		color: var(--wcg-cm-surface);
	}
}

.wcg-cm svg {
	display: block;
}

/* ------------------------------------------------------------- desktop */

.wcg-cm__mega[hidden],
.wcg-cm__flyout[hidden],
.wcg-cm__drawer[hidden],
.wcg-cm__panel[hidden] {
	display: none !important;
}

.wcg-cm__mega {
	position: fixed;
	z-index: 9990;
	top: var(--wcg-cm-top);
	left: var(--wcg-cm-left);
	display: flex;
	box-sizing: border-box;
	width: var(--wcg-cm-width);
	max-height: calc(100vh - var(--wcg-cm-top) - 16px);
	border: var(--border-hairline) solid var(--wcg-cm-border);
	border-radius: var(--modal-radius);
	background: var(--wcg-cm-surface);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	font-size: 14px;
	line-height: 1.35;
}

.wcg-cm__rail {
	flex: none;
	width: 280px;
	margin: 0;
	padding: 6px;
	list-style: none;
	overflow-y: auto;
}

.wcg-cm__rail li {
	margin: 0;
	padding: 0;
}

.wcg-cm .wcg-cm__rail-item {
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
	min-height: var(--control-md);
	padding: 8px 10px 8px 14px;
	border-radius: var(--button-radius);
	color: var(--wcg-cm-text);
	text-decoration: none;
}

.wcg-cm__rail-name {
	flex: 1;
}

.wcg-cm__rail-item .wcg-cm__icon-slot {
	width: 24px;
	height: 24px;
}

.wcg-cm__rail-item .wcg-cm__chev {
	flex: none;
	color: var(--wcg-cm-muted);
}

.wcg-cm .wcg-cm__rail-item.is-active,
.wcg-cm .wcg-cm__rail-item:hover {
	background: var(--wcg-cm-hover);
	color: var(--wcg-cm-text);
	box-shadow: none;
}

/* The open row: an ink arrow and a short blue marker inside the rounded
   row. Its name keeps its weight - bold is wider, and the longest names
   wrapped to a second line on hover. */
.wcg-cm .wcg-cm__rail-item.is-active::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 4px;
	width: 4px;
	height: 20px;
	border-radius: var(--radius-full);
	background: var(--wcg-cm-accent);
	transform: translateY(-50%);
}

.wcg-cm__rail-item.is-active .wcg-cm__chev {
	color: var(--wcg-cm-text);
}

/* While a row with nothing under it is under the pointer: the rail alone
   (its width is set by the script, like every panel's). */
.wcg-cm__mega.is-bare .wcg-cm__flyouts {
	display: none;
}

/* The line between rail and panel is the panel's own edge, so it leaves
   with the panel: were it the rail's, every row - and its arrow - would
   grow a pixel wider while a row with nothing under it is under the
   pointer, and the arrows would jump. */
.wcg-cm__flyouts {
	flex: 1;
	min-width: 0;
	border-left: 1px solid var(--wcg-cm-border);
	background: var(--wcg-cm-surface);
	overflow-y: auto;
}

.wcg-cm__flyout {
	padding: 20px 28px 28px;
}

.wcg-cm .wcg-cm__all {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-bottom: 16px;
	color: var(--wcg-cm-accent);
	font-weight: 600;
	text-decoration: none;
}

.wcg-cm .wcg-cm__all:hover {
	color: var(--wcg-link-hover, var(--text-link-hover));
	text-decoration: none;
}

.wcg-cm__cols {
	columns: var(--wcg-cm-cols, 3);
	column-gap: 32px;
}

.wcg-cm__group {
	break-inside: avoid;
	padding-bottom: 18px;
}

.wcg-cm .wcg-cm__heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	color: var(--wcg-cm-text);
	font-weight: 700;
	text-decoration: none;
}

.wcg-cm__heading .wcg-cm__icon-slot {
	width: 20px;
	height: 20px;
}

/* Under the heading's name, not its icon. */
.wcg-cm__links {
	margin: 0;
	padding: 0 0 0 28px;
	list-style: none;
}

.wcg-cm__links li {
	margin: 0;
	padding: 0;
}

.wcg-cm .wcg-cm__link {
	display: block;
	padding: 3px 0;
	color: var(--wcg-cm-text);
	text-decoration: none;
}

.wcg-cm .wcg-cm__heading:hover,
.wcg-cm .wcg-cm__link:hover {
	color: var(--wcg-link-hover, var(--text-link-hover));
	text-decoration: none;
}

/* ---------------------------------------------------------------- phone */

.wcg-cm__drawer {
	position: fixed;
	/* Above WooCommerce's store notice (99998), which otherwise covers the
	   drawer's title, back and close buttons. */
	z-index: 100000;
	inset: 0;
}

.wcg-cm__backdrop {
	position: absolute;
	inset: 0;
	background: var(--scrim);
	animation: wcg-cm-fade 0.2s cubic-bezier(.2, .8, .2, 1);
}

.wcg-cm__sheet {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: min(80.3vw, 393px);
	border-radius: 0;
	background: var(--wcg-cm-surface);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	animation: wcg-cm-slide 0.2s cubic-bezier(.2, .8, .2, 1);
}

.wcg-cm__panel {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: var(--wcg-cm-surface);
}

.wcg-cm__head {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
	min-height: 56px;
	margin: 0;
	padding: 0 8px 0 16px;
	border-bottom: 1px solid var(--wcg-cm-border);
	background: var(--wcg-cm-surface);
}

.wcg-cm__head .wcg-cm__icon-btn:first-child {
	margin-left: -8px;
}

.wcg-cm__title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.005em;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.wcg-cm .wcg-cm__icon-btn.wcg-cm__icon-btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--control-md);
	height: var(--control-md);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--button-radius);
	background: var(--button-tertiary-bg);
	color: var(--wcg-cm-text);
	cursor: pointer;
	box-shadow: none;
}

.wcg-cm .wcg-cm__icon-btn.wcg-cm__icon-btn:hover {
	background: var(--wcg-cm-hover);
	color: var(--wcg-cm-text);
}

.wcg-cm__list {
	flex: 1;
	margin: 0;
	padding: 8px 0 24px;
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.wcg-cm__list li {
	margin: 0;
	padding: 0;
}

.wcg-cm .wcg-cm__row.wcg-cm__row {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 6px 16px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wcg-cm-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}

.wcg-cm .wcg-cm__row.wcg-cm__row:hover,
.wcg-cm .wcg-cm__row.wcg-cm__row:active {
	background: var(--wcg-cm-hover);
	color: var(--wcg-cm-text);
}

.wcg-cm .wcg-cm__row--all.wcg-cm__row--all {
	color: var(--wcg-cm-accent);
	font-weight: 600;
}

.wcg-cm__icon-slot {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--wcg-cm-text);
}

.wcg-cm__name {
	flex: 1;
	min-width: 0;
}

.wcg-cm__row .wcg-cm__chev {
	flex: none;
	color: var(--wcg-cm-text);
}

html.wcg-cm-locked,
html.wcg-cm-locked body {
	overflow: hidden;
}

/* The drawer slides in and back out the same way; moving between its levels
   is instant. */
.wcg-cm__drawer.is-closing .wcg-cm__backdrop {
	animation: wcg-cm-fade-out 0.2s cubic-bezier(.4, 0, .2, 1) forwards;
}

.wcg-cm__drawer.is-closing .wcg-cm__sheet {
	animation: wcg-cm-slide-out 0.2s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes wcg-cm-fade {
	from { opacity: 0; }
}

@keyframes wcg-cm-slide {
	from { transform: translateX(-100%); }
}

@keyframes wcg-cm-fade-out {
	to { opacity: 0; }
}

@keyframes wcg-cm-slide-out {
	to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
	.wcg-cm__backdrop,
	.wcg-cm__sheet,
	.wcg-cm__drawer.is-closing .wcg-cm__backdrop,
	.wcg-cm__drawer.is-closing .wcg-cm__sheet {
		animation: none;
	}
}
