/* ============================================
   Helpers — cookie, breadcrumb, no-select
   ============================================ */

/* Cookie - Start */
#cookie-consent {
	position: fixed;
	/* Над липучкою покупки, якщо вона видна */
	transition: bottom 0.3s ease;
	bottom: calc(var(--container-indent) / 3 + var(--bottom-bar));
	right: calc(var(--container-indent) / 2);
	display: flex;
	flex-direction: column;
	gap: var(--blocks-indent);
	width: 500px;
	max-width: calc(100% - var(--container-indent));
	padding: 20px;
	background: var(--white);
	border-radius: var(--radius-large);
	box-shadow: 0px 0px 15px 0px var(--shadow-soft);
	z-index: 1000;
}
#cookie-consent a {
	word-break: break-word;	
}
/* Cookie - End */

/* Breadcrumb - Start */
.woocommerce-breadcrumb {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 14px;
	padding: 30px calc(var(--container-indent) / 2) 30px calc(var(--container-indent) / 2);
	margin: 0;
	color: var(--black);
	overflow-x: auto;
}
.woocommerce .woocommerce-breadcrumb:before {
	display: none;
}
.woocommerce-breadcrumb a {
	color: var(--gray);
	white-space: nowrap;
	transition: all 0.3s ease;
}
.woocommerce-breadcrumb a:hover {
	color: var(--black);
	white-space: nowrap;
	transition: all 0.3s ease;
}
.woocommerce-breadcrumb span {
	color: var(--black);
	white-space: nowrap;
}
.woocommerce-breadcrumb svg {
	transform: translateY(0px);
}
@media (min-width: 1280px) {
	.woocommerce-breadcrumb {
		overflow-x: clip;
	}
}
/* Breadcrumb - End */

/* No Select - Start */
.no-select,
.quantity-btn,
.dropdown-simple,
.dropdown-wrapper > :first-child,
.faq-question,
.tab-btn,
.category-tabs a {
	user-select: none;
}
/* No Select - End */

:where(.menu .menu-item-has-children:not(.has-submenu)) > .sub-menu li a {
	font-family: var(--font-family-1);
	font-size: 14px;
	line-height: 18px;
	font-weight: 400;
	text-decoration: none;
	transition: all 0.2s ease;
}

:where(.menu:not(.menu-vertical)) > .menu-item-has-children:where(:not(.has-submenu)) {
	flex-wrap: wrap;
}

:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
}
:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li {
	list-style: none;
}
:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li a:hover {
	color: var(--primary);
}

:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .submenu-toggle {
	width: 16px;
	height: 16px;
	min-width: 16px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform 0.3s ease;
}
:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)).expanded > .submenu-toggle {
	transform: rotate(180deg);
}
:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .submenu-toggle .submenu-arrow {
	display: block;
	width: 12px;
	height: 12px;
	background: url('/wp-content/themes/shop/img/icons/dropdown.svg') no-repeat center / contain;
}

:where(.menu:not(.menu-vertical)) .submenu-open-parent > a {
	color: var(--primary) !important;
	font-weight: 500;
}
:where(.menu:not(.menu-vertical)) .submenu-open-parent {
	border-bottom: 1px solid var(--border);
	padding-bottom: 6px;
	margin-bottom: 4px;
}

@media (max-width: 1279px) {
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > a {
		min-width: 0;
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu {
		display: flex;
		flex-direction: column;
		flex-basis: 100%;
		width: 100%;
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		gap: 0;
		padding-left: 15px;
		margin-top: 0;
		border-left: 2px solid var(--border);
		transition: max-height 0.35s ease, opacity 0.25s ease, gap 0.25s ease, margin-top 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease;
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)).expanded > .sub-menu {
		max-height: 800px;
		opacity: 1;
		gap: 8px;
		margin-top: 10px;
		padding-top: 8px;
		padding-bottom: 4px;
	}
}

@media (min-width: 1280px) {
	:where(.menu:not(.menu-vertical)) .menu-item-has-children:where(:not(.has-submenu)) {
		position: relative;
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > a::after {
		content: '';
		display: inline-block;
		width: 9px;
		height: 9px;
		margin-left: 6px;
		background: url('/wp-content/themes/shop/img/icons/dropdown.svg') no-repeat center / contain;
		opacity: 0.8;
		transition: transform 0.2s ease;
	}
	.top-bar-menu :where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > a::after {
		filter: brightness(0) invert(1);
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)):hover > a::after,
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)):focus-within > a::after {
		transform: rotate(180deg);
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 1000;
		padding: 8px 0;
		min-width: 220px;
		background: var(--white);
		border: 1px solid var(--border);
		border-radius: var(--radius-small);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-5px);
		transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)):hover > .sub-menu,
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)):focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li {
		display: block;
		width: 100%;
		margin: 0;
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li a {
		display: block;
		padding: 8px 16px;
		white-space: nowrap;
		color: var(--black);
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li a:hover {
		background: var(--light-gray);
		color: var(--primary);
	}
	:where(.menu:not(.menu-vertical)) :where(.menu-item-has-children:not(.has-submenu)) > .submenu-toggle {
		display: none;
	}
	:where(.menu:not(.menu-vertical)) .submenu-open-parent {
		display: none !important;
	}
}

:where(.menu.menu-vertical) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu {
	list-style: none;
	margin: 6px 0 0;
	padding: 0 0 0 15px;
}
:where(.menu.menu-vertical) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li {
	list-style: none;
}
:where(.menu.menu-vertical) :where(.menu-item-has-children:not(.has-submenu)) > .sub-menu li a {
	padding: 4px 0;
}