/**
 * Motyw Błyskawiczni Online. Autor: Matenet.
 *
 * Część projektu tego serwisu: przechodzi na Zamawiającego razem z motywem.
 *
 * Pasek menu pod wyszukiwarką: przycisk „Wszystkie kategorie” z panelem,
 * Nowości i Bestsellery na końcu menu, Promocje po prawej stronie paska.
 * Na telefonie wszystko jest w menu pod przyciskiem „Menu”, a Promocje
 * stoją w nim na górze.
 */

.cat-menu,
.nav-promo {
	display: none;
}

.site-header__menu .menu-item--promocje > a {
	color: var(--color-error);
	font-weight: 600;
}

@media (min-width: 1000px) {
	.site-header__nav .container {
		position: relative;
		display: flex;
		align-items: center;
		gap: var(--s-5);
	}

	.site-header__nav .site-header__menu {
		flex: 1 1 auto;
		min-width: 0;
	}

	.site-header__menu > li > a {
		white-space: nowrap;
	}

	.site-header__menu > .menu-item--promocje {
		display: none;
	}

	.nav-promo {
		display: inline-flex;
		flex: none;
		align-items: center;
		min-height: var(--control-h);
		margin-left: auto;
		color: var(--color-error);
		font-weight: 600;
		text-decoration: none;
		white-space: nowrap;
	}

	.nav-promo:hover,
	.nav-promo[aria-current] {
		color: var(--color-error);
		text-decoration: underline;
		text-underline-offset: 4px;
	}

	.site-header__nav--kategorie .site-header__menu {
		justify-content: flex-start;
	}

	.site-header__nav--kategorie .site-header__menu .sub-menu,
	.site-header__nav--kategorie .site-header__submenu-toggle,
	.site-header__nav--kategorie .site-header__menu > .menu-item--sklep {
		display: none !important;
	}

	.cat-menu {
		display: flex;
		flex: none;
		align-self: center;
		width: 272px;
	}

	body:has(.shop-layout--filters) .cat-menu {
		width: var(--filters-width, 272px);
	}

	.cat-menu__toggle {
		display: flex;
		flex: 1 1 auto;
		align-items: center;
		justify-content: center;
		gap: var(--s-3);
		min-height: 40px;
		padding: 0 var(--s-4);
		border: 1px solid transparent;
		border-radius: var(--r-sm);
		background: color-mix(in srgb, var(--color-brand) 85%, #fff);
		color: #fff;
		font: inherit;
		font-weight: 500;
		line-height: 1.2;
		white-space: nowrap;
		cursor: pointer;
		transition: background-color var(--transition);
	}

	.cat-menu__toggle:hover,
	.cat-menu.is-open .cat-menu__toggle {
		background: var(--color-brand);
	}

	.cat-menu__panel {
		position: absolute;
		top: 100%;
		left: var(--gutter);
		z-index: 20;
		display: none;
		width: min(960px, calc(100% - 2 * var(--gutter)));
		max-height: calc(100vh - var(--header-h) - 64px - var(--admin-bar));
		overflow-y: auto;
		padding: var(--s-5) var(--s-6);
		border: 1px solid var(--border-soft);
		border-radius: var(--r-md);
		background: var(--surface-raised);
		box-shadow: var(--shadow-lg);
	}

	.cat-menu.is-open .cat-menu__panel,
	html:not(.js) .cat-menu:focus-within .cat-menu__panel {
		display: block;
	}

	.cat-menu__groups {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: var(--s-5) var(--s-6);
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.cat-menu__parent {
		color: var(--heading);
		font-weight: 600;
		text-decoration: none;
	}

	.cat-menu__children {
		margin: var(--s-2) 0 0;
		padding: 0;
		list-style: none;
	}

	.cat-menu__children a {
		display: block;
		padding: 5px 0;
		color: var(--text);
		font-size: var(--fs-sm);
		text-decoration: none;
	}

	.cat-menu__parent:hover,
	.cat-menu__children a:hover,
	.cat-menu__all:hover {
		color: var(--accent-text);
		text-decoration: underline;
	}

	.cat-menu__all {
		display: inline-flex;
		align-items: center;
		gap: var(--s-2);
		margin-top: var(--s-5);
		color: var(--accent-text);
		font-weight: 500;
		text-decoration: none;
	}
}

@media (min-width: 1000px) and (max-width: 1279px) {
	.site-header__nav .container,
	.site-header__nav--kategorie .site-header__menu {
		gap: 0 var(--s-4);
	}

	.site-header__nav--kategorie .site-header__menu > .menu-item--bestsellery {
		display: none;
	}
}

@media (min-width: 1000px) and (max-width: 1099px) {
	.site-header__nav--kategorie .site-header__menu > .menu-item--nowosci {
		display: none;
	}
}

@media (min-width: 1000px) and (max-width: 1023px) {
	.cat-menu {
		width: auto;
	}
}

:root[data-contrast="high"] .cat-menu__toggle {
	border-color: currentColor;
}

@media print {
	.cat-menu,
	.nav-promo {
		display: none !important;
	}
}
