/* =========================================================
   Woo Category Mega Menu
   ---------------------------------------------------------
   COLOURS: change the variables below to match your theme.
   They are taken from your site's blue/navy header.
   ========================================================= */
.wcmm {
	--wcmm-primary:      #2c357f; /* navy bar / view-all button            */
	--wcmm-primary-dark: #232b6b;
	--wcmm-button:       #3a46a3; /* "Пазарувай по категория" button       */
	--wcmm-button-hover: #2c357f;
	--wcmm-accent:       #e30613; /* red accent (links hover, view-all hover) */
	--wcmm-text:         #ffffff;
	--wcmm-panel-bg:     #ffffff;
	--wcmm-panel-border: #e3e6f0;
	--wcmm-divider:      #e7e9f2; /* the line between columns                */
	--wcmm-heading:      #1f2350;
	--wcmm-link:         #444b6e;
	--wcmm-list-hover:   #f3f4fb;
	--wcmm-main-width:   316px;   /* width of the left category list       */
	--wcmm-dropdown-w:   1140px;  /* total width of the open mega menu      */
	--wcmm-radius:       8px;     /* corner rounding                        */

	position: relative;
	display: inline-block;
	font-family: inherit;
	box-sizing: border-box;
}
.wcmm *,
.wcmm *::before,
.wcmm *::after { box-sizing: border-box; }

/* ---------- Toggle button ---------- */
.wcmm-toggle {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--wcmm-button);
	color: var(--wcmm-text);
	border: 0;
	cursor: pointer;
	padding: 14px 22px;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	line-height: 1;
	border-radius: var(--wcmm-radius);
}
.wcmm-toggle:hover { background: var(--wcmm-button-hover); }
.wcmm-toggle-bars { position: relative; width: 18px; height: 2px; background: currentColor; }
.wcmm-toggle-bars::before,
.wcmm-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.wcmm-toggle-bars::before { top: -6px; }
.wcmm-toggle-bars::after  { top: 6px; }
.wcmm-toggle-caret {
	width: 0; height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid currentColor;
}

/* ---------- Dropdown wrapper ---------- */
.wcmm-dropdown {
	position: absolute;
	z-index: 99999;
	top: 100%;
	left: 0;
	width: var(--wcmm-dropdown-w);
	max-width: 96vw;
	min-height: 380px;
	background: var(--wcmm-panel-bg);
	border: 1px solid var(--wcmm-panel-border);
	border-radius: var(--wcmm-radius);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
	display: none;
}
.wcmm--hover:hover .wcmm-dropdown,
.wcmm.open .wcmm-dropdown { display: block; }

/* trigger="always" : in-flow open menu (no button), reserves layout space. */
.wcmm--always .wcmm-dropdown {
	position: static;
	display: block;
	max-width: 100%;
	box-shadow: none;
}

/* Pinned (homepage / home_open) : stays open, anchored to its own position,
   dropping down and OVERLAYING the page instead of sitting at the page corner. */
.wcmm--pinned { position: relative; }
.wcmm--pinned .wcmm-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	display: block;
}
/* The toggle button is still shown on the homepage as the menu header; it can
   collapse the pinned dropdown. The menu is OPEN by default (no .wcmm--collapsed). */
.wcmm--pinned.wcmm--collapsed .wcmm-dropdown { display: none; }

/* ----- "No default panel" fly-out mode -----
   The category list stays open; each panel floats out to the side only on
   hover, overlaying the page instead of reflowing it. */
.wcmm--nodefault { display: inline-block; vertical-align: top; }
.wcmm--nodefault .wcmm-dropdown {
	width: var(--wcmm-main-width);
	min-height: 0;
	border: 1px solid var(--wcmm-panel-border);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .10);
}
.wcmm--nodefault .wcmm-main-list { border-right: 0; }
.wcmm--nodefault .wcmm-panel {
	left: var(--wcmm-main-width);
	right: auto;
	bottom: auto;
	width: calc(var(--wcmm-dropdown-w) - var(--wcmm-main-width));
	max-width: 80vw;
	min-height: 100%;
	border: 1px solid var(--wcmm-panel-border);
	border-radius: var(--wcmm-radius);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}

/* ---------- Left main-category list ---------- */
.wcmm-main-list {
	list-style: none;
	margin: 0;
	padding: 0;
	width: var(--wcmm-main-width);
	min-height: 100%;
	background: #fff;
	border-right: 1px solid var(--wcmm-panel-border);
}
.wcmm-main-item { position: static; margin: 0; }
.wcmm-main-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 8px;
	color: var(--wcmm-link);
	text-decoration: none;
	font-size: 13px;
	line-height: 1.25;
	border-bottom: 1px solid #f0f1f6;
}
.wcmm-main-item:first-child > .wcmm-main-link {
	border-top-left-radius: var(--wcmm-radius);
	border-top-right-radius: var(--wcmm-radius);
}
.wcmm-main-item:last-child > .wcmm-main-link {
	border-bottom: 0;
	border-bottom-left-radius: var(--wcmm-radius);
	border-bottom-right-radius: var(--wcmm-radius);
}
.wcmm-main-item.active > .wcmm-main-link,
.wcmm-main-link:hover {
	background: var(--wcmm-list-hover);
	color: var(--wcmm-primary);
}
.wcmm-icon { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.wcmm-icon img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
.wcmm-icon--placeholder { width: 8px; height: 8px; border-radius: 50%; background: var(--wcmm-panel-border); }
.wcmm-main-name { flex: 1 1 auto; }
.wcmm-count { color: #9aa0bd; font-size: 12px; }
.wcmm-main-arrow {
	flex: 0 0 auto;
	width: 0; height: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 5px solid currentColor;
	opacity: .45;
}

/* ---------- Right panels ---------- */
.wcmm-panel {
	position: absolute;
	top: 0; left: var(--wcmm-main-width); right: 0; bottom: 0;
	display: none;
	padding: 24px 28px;
	overflow: auto;
	background: var(--wcmm-panel-bg);
	border-radius: 0 var(--wcmm-radius) var(--wcmm-radius) 0;
}
.wcmm-main-item.active > .wcmm-panel { display: flex; flex-direction: column; }

.wcmm-columns {
	flex: 1 1 auto;
	display: block;
	/* column-count is set inline (per panel) so the dividers stay even. */
	column-gap: 40px;
	column-rule: 1px solid var(--wcmm-divider);
}
.wcmm-col {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	margin: 0 0 22px;
	max-width: 100%;
}
.wcmm-col-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--wcmm-heading); }
.wcmm-col-title a { color: inherit; text-decoration: none; }
.wcmm-col-title a:hover { color: var(--wcmm-accent); }
.wcmm-sublist { list-style: none; margin: 0; padding: 0; }
.wcmm-sublist li { margin: 0 0 7px; }
.wcmm-sublist a { color: var(--wcmm-link); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.wcmm-sublist a:hover { color: var(--wcmm-accent); text-decoration: underline; }
.wcmm-col-viewall {
	display: inline-block;
	margin-top: 4px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wcmm-accent);
	text-decoration: none;
}
.wcmm-col-viewall:hover { text-decoration: underline; }

.wcmm-panel-footer { margin-top: 16px; text-align: right; }
.wcmm-viewall {
	display: inline-block;
	background: var(--wcmm-primary);
	color: #fff;
	text-decoration: none;
	padding: 11px 26px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	border-radius: var(--wcmm-radius);
}
.wcmm-viewall:hover { background: var(--wcmm-accent); color: #fff; }

/* ===================== Mobile ===================== */
@media (max-width: 782px) {
	.wcmm { display: block; }
	.wcmm-toggle { width: 100%; justify-content: flex-start; }
	.wcmm-toggle-caret { margin-left: auto; }

	.wcmm-dropdown {
		position: static;
		width: 100%;
		max-width: 100%;
		min-height: 0;
		box-shadow: none;
		border-top: 0;
	}
	.wcmm--hover:hover .wcmm-dropdown { display: none; } /* require a tap on mobile */
	.wcmm.open .wcmm-dropdown { display: block; }

	.wcmm-main-list { width: 100%; border-right: 0; }
	.wcmm-main-item { border-bottom: 1px solid #f0f1f6; }

	.wcmm-main-arrow {
		border: 0;
		width: 9px; height: 9px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		opacity: .55;
		transition: transform .2s ease;
	}
	.wcmm-main-item.open > .wcmm-main-link .wcmm-main-arrow { transform: rotate(-135deg); }

	.wcmm-panel {
		position: static;
		display: none;
		padding: 6px 16px 18px;
		background: #fafbff;
	}
	.wcmm-main-item.active > .wcmm-panel { display: none; } /* override desktop default */
	.wcmm-main-item.open > .wcmm-panel { display: block; }

	/* Open / pinned / fly-out modes collapse to the normal full-width accordion. */
	.wcmm--nodefault, .wcmm--pinned { display: block; }
	.wcmm--pinned .wcmm-dropdown,
	.wcmm--nodefault .wcmm-dropdown {
		position: static;
		width: 100%;
		min-height: 0;
		border: 0;
		box-shadow: none;
	}
	.wcmm--nodefault .wcmm-panel {
		position: static;
		left: auto;
		width: auto;
		max-width: 100%;
		min-height: 0;
		border: 0;
		box-shadow: none;
	}

	.wcmm-columns { column-count: 1 !important; column-rule: 0; }
	.wcmm-col {
		max-width: 100%;
		margin: 0;
		padding-top: 12px;
		border-top: 1px solid var(--wcmm-divider);
	}
	.wcmm-col:first-child { padding-top: 0; border-top: 0; }
	.wcmm-panel-footer { text-align: left; }
}
