/* ============================================
   Header — один ряд: меню, лого по центру,
   пошук, кнопка підбору, кошик і вподобане
   ============================================ */

/* Header Main - Start */
header {
	position: fixed;
	top: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: var(--light-gray);
	width: 100%;
	height: var(--header-height);
	margin: 0;
	padding: 0;
	z-index: 1000;
}
.header-main {
	height: var(--header-height);
}
.header-main > .block-with-cols {
	position: relative;
	flex-wrap: nowrap;
	height: 100%;
	gap: 0;
}
.logo-header {
	position: absolute;
	left: 50%;
	top: 50%;
	display: flex;
	align-items: center;
	transform: translate(-50%, -50%);
}
.logo-header img {
	width: auto;
	height: 68px;
}
header .mega-menu-wrapper {
	display: flex;
	align-items: center;
}
header .mega-menu {
	gap: 24px;
}
header .mega-menu > li {
	padding-left: 0;
}
header .mega-menu > li > a {
	gap: 6px;
	font-size: 16px;
	line-height: 22px;
}
.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}
.header-search {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-right: 32px;
}
.search-call-mob.header-search-label {
	width: auto;
	min-width: 0;
	height: auto;
	font-size: 16px;
	line-height: 22px;
	cursor: pointer;
}
.btn.btn-quiz {
	--btn-pad: 0 24px;
}
@media (max-width: 1680px) {
	.logo-header img {
		height: 60px;
	}
	header .mega-menu > li > a,
	.header-search-label {
		font-size: 14px;
		line-height: 19px;
	}
}
@media (max-width: 1279px) {
	.side-menu-call {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 7px;
		width: 24px;
		height: 16px;
		cursor: pointer;
	}
	.side-menu-call > .menu-line {
		display: flex;
		width: 24px;
		height: 1px;
		background: var(--black);
	}
	.logo-header img {
		height: 40px;
	}
	.header-actions {
		gap: 4px;
		margin-right: -6px;
	}
	.header-search {
		margin-right: 9px;
	}
}
/* Header Main - End */
/* Search - Start */
.search-call-mob {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	min-width: 16px;
	height: 16px;
	cursor: pointer;
}
.search-call-mob img {
	width: 16px;
	height: 16px;
	object-fit: contain;
}
.search-inline-pc {
	display: none;
}
.search-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	justify-content: center;
	width: 100%;
	z-index: 10;
}
.search-background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--overlay);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 1;
}
.search-background.active {
	opacity: 0.16;
	visibility: visible;
	pointer-events: all;
}
.search-popup-mob {
	position: fixed;
	top: var(--header-height);
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	width: 628px;
	max-width: 100%;
	margin: 0 auto;
	padding: 20px;
	background: var(--white);
	z-index: 2;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.search-popup-mob.active {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
}
.search-popup-mob input {
	background: var(--light-gray);
	padding-right: 48px;
}
.search-wrapper .search-box .icon {
	position: absolute;
	top: 50%;
	right: 34px;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	background: url(/wp-content/themes/shop/img/icons/search.svg) no-repeat center center;
	background-size: contain;
	cursor: pointer;
	z-index: 2;
}
.search-wrapper.in-search .search-box .icon {
	background: url(/wp-content/themes/shop/img/icons/close.svg) no-repeat center center;
	background-size: contain;
}
#search-results {
	position: fixed;
	top: calc(var(--header-height) + 88px);
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: 628px;
	max-width: 100%;
	height: fit-content;
	min-height: 250px;
	max-height: 50vh;
	margin: 0 auto;
	padding: 0 20px;
	background: var(--white);
	z-index: 2;
}
#search-results .no-result,
#search-results .search-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 250px;
}
#search-results .search-loading span {
	width: 30px;
	height: 30px;
	border: 3px solid var(--border);
	border-top-color: var(--primary);
	border-radius: var(--radius-max);
	animation: search-spin 0.6s linear infinite;
}
@keyframes search-spin {
	to { transform: rotate(360deg); }
}
#search-results .product-item__actions .btn {
	--btn-pad: 0 16px;
	white-space: nowrap;
}
#search-results .product-item.outofstock .product-item__actions .btn .cart-icon {
	display: none;
}
#search-results .category-tabs {
	position: sticky;
	top: 0;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 16px 0;
	margin: 0 0 16px 0;
	background: var(--white);
	overflow-x: auto;
	overflow-y: hidden;
	z-index: 1;
}
#search-results .category-tabs a {
	display: flex;
	min-width: max-content;
	color: var(--gray-text);
	font-size: 16px;
	line-height: 22px;
}
#search-results .category-tabs a.active,
#search-results .category-tabs a:hover {
	color: var(--black);
}
#search-results .view-all-results {
	position: sticky;
	bottom: -1px;
	display: flex;
	padding: 16px 0;
	margin-top: auto;
	background: var(--white);
}
#search-results .tab-content {
	display: flex;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 5px;
}
#search-results .tab-pane {
	display: none;
	flex-direction: column;
	width: 100%;
}
#search-results .tab-pane.active {
	display: flex;
}
#search-results .product-item__image {
	flex: 0 0 auto;
}
#search-results .product-item__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
#search-results .product-item__name,
#search-results .product-item__price {
	font-weight: 400;
}
@media (max-width: 1279px) {
	.search-call-mob,
	.search-call-mob img {
		width: 14px;
		min-width: 14px;
		height: 14px;
	}
	.search-popup-mob,
	#search-results {
		width: 100%;
		padding-left: 10px;
		padding-right: 10px;
	}
	.search-popup-mob {
		padding-top: 10px;
		padding-bottom: 10px;
	}
	#search-results {
		top: calc(var(--header-height) + 68px);
		max-height: 70vh;
	}
}
/* Kote — Compact Search Results (mob) - Start */
@media (max-width: 1279px) {
	#search-results .category-tabs { gap: 12px; padding: 12px 0; margin-bottom: 8px; }
	#search-results .category-tabs a { font-size: 14px; line-height: 20px; }
	#search-results .view-all-results { padding: 12px 0; }
	#search-results .product-item {
		display: grid;
		grid-template-columns: 80px minmax(0, 1fr) auto;
		column-gap: 12px;
		row-gap: 0;
		align-items: start;
		padding: 12px 0;
		border-bottom: 1px solid var(--border);
	}
	#search-results .product-item__image { grid-column: 1; grid-row: 1 / span 2; flex: 0 0 80px; width: 80px; height: 80px; }
	#search-results .product-item__img { width: 80px; height: 80px; object-fit: cover; }
	#search-results .product-item__info { grid-column: 2 / span 2; grid-row: 1 / span 2; display: flex; flex-direction: column; min-width: 0; max-width: none; }
	#search-results .product-item__name { margin: 0; }
	#search-results .product-item__name,
	#search-results .product-item__name-link,
	#search-results .product-item__price { font-size: 14px; line-height: 17px; }
	#search-results .product-item__name-link { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
	#search-results .product-item__price { margin: auto 0 0; }
	#search-results .product-item__stock-label { margin: 0; font-size: 12px; line-height: 14px; }
	#search-results .product-item__quantity { grid-column: 2; grid-row: 2; justify-self: end; align-self: end; margin: 0; }
	#search-results .product-item__actions { grid-column: 3; grid-row: 2; justify-self: end; align-self: end; height: 40px; margin: 0; }
	#search-results .product-item .custom-quantity-input { height: 40px; }
	#search-results .product-item__actions .btn { --btn-pad: 0 12px; height: 40px; font-size: 14px; line-height: 20px; }
	#search-results .product-item__actions .btn .cart-icon { display: none; }
	#search-results .product-item__actions .btn span { height: 20px; line-height: 20px; }
}
/* Kote — Compact Search Results (mob) - End */
.search-wrapper .search-box input:focus,
.search-wrapper .search-box input:focus-visible {
	outline: none !important;
}
/* Search - End */
/* Shop Buttons - Start */
.header-shop-button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: var(--white);
	cursor: pointer;
}
.header-shop-button .icon-mask {
	width: 16px;
	height: 16px;
}
.cart-counter,
.wishlist-counter,
.compare-counter {
	position: absolute;
	top: 3px;
	right: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	background: var(--primary);
	color: var(--primary-match);
	border-radius: var(--radius-max);
	font-size: 9px;
	line-height: 1;
}
.cart-counter:empty,
.wishlist-counter:empty,
.compare-counter:empty {
	display: none;
}
@media (max-width: 1680px) {
	.header-shop-button {
		width: 48px;
		height: 48px;
	}
	.cart-counter,
	.wishlist-counter,
	.compare-counter {
		top: 1px;
		right: 1px;
		min-width: 14px;
		height: 14px;
	}
}
@media (max-width: 1279px) {
	.header-shop-button {
		width: 40px;
		height: 40px;
	}
	.header-shop-button .icon-mask {
		width: 14px;
		height: 14px;
	}
	.cart-counter,
	.wishlist-counter,
	.compare-counter {
		top: 1px;
		right: 1px;
		min-width: 12px;
		height: 12px;
		padding: 0 3px;
		font-size: 8px;
	}
}
/* Shop Buttons - End */

/* Mega Menu Position - Start */
header .mega-menu > li > .sub-menu.level-1 {
	top: calc(50% + var(--header-height) / 2);
}
/* Mega Menu Position - End */

/* Menu Gap Laptop - Start */
@media (max-width: 1438px) {
	header .mega-menu {
		gap: clamp(12px, 8.8vw - 104px, 24px);
	}
}
/* Menu Gap Laptop - End */
