/* -------------------------------------------------------------------------
   02-header.css — Brutalist двухуровневая шапка Enclave
-------------------------------------------------------------------------- */

/* ── Общая шапка ────────────────────────────────────────────────────────── */
.enclave-nav {
	background: var(--k);
	border-bottom: var(--b);
	position: sticky;
	top: 0;
	z-index: 200;
}

/* Убираем зазор после шапки перед контентом */
.enclave-nav + * {
	margin-top: 0 !important;
}
.enclave-site-header.sheader {
	margin-bottom: 0;
}

/* ── Верхняя строка ─────────────────────────────────────────────────────── */
.enclave-nav-top {
	height: 50px;
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid #333;
	position: relative;
}

/* Логотип */
.enclave-nlogo {
	font-family: var(--enclave-heading-font);
	font-size: 24px;
	letter-spacing: 0.08em;
	color: var(--w);
	padding: 0 28px;
	display: flex;
	align-items: center;
	border-right: 1px solid #333;
	cursor: pointer;
	flex-shrink: 0;
}
.enclave-nlogo .custom-logo-link {
	display: flex;
	align-items: center;
	height: 100%;
	text-decoration: none;
}
.enclave-nlogo .custom-logo-link img {
	display: block;
	max-height: 32px;
	width: auto;
	height: auto;
}
.enclave-nlogo a {
	text-decoration: none;
	color: var(--w);
	display: flex;
	align-items: center;
	height: 100%;
}
.enclave-nlogo span {
	color: var(--a);
}

/* Растяжитель */
.enclave-nav-spacer {
	flex: 1;
}

/* Иконки */
.enclave-nicons {
	display: flex;
}
.enclave-ni {
	width: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-left: 1px solid #333;
	color: #555;
	cursor: pointer;
	transition: color 0.1s;
	position: relative;
	text-decoration: none;
	background: transparent;
	border-top: none;
	border-right: none;
	border-bottom: none;
	outline: none;
	padding: 0;
}
.enclave-ni:hover,
.enclave-ni:focus,
.enclave-ni.on {
	color: var(--a);
}
.enclave-ni i {
	font-size: 17px;
	line-height: 1;
}

/* Бейдж */
.enclave-ni-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	min-width: 14px;
	height: 14px;
	background: var(--a);
	border-radius: 50%;
	font-size: 8px;
	font-weight: 700;
	display: none;
	align-items: center;
	justify-content: center;
	color: var(--k);
	padding: 0 2px;
}
.enclave-ni-badge.show {
	display: flex;
}

/* ── Нижняя строка: ссылки категорий ───────────────────────────────────── */
.enclave-nav-links {
	height: 40px;
	display: flex;
	overflow: hidden;
}
.enclave-nav-links__list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}
.enclave-nav-links__list > li {
	flex: 1;
	display: flex;
}
.enclave-nav-links__list > li > a {
	flex: 1;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: center;
	border-right: 1px solid #333;
	cursor: pointer;
	transition: color 0.1s, background 0.1s;
	white-space: nowrap;
	text-decoration: none;
	padding: 0 8px;
}
.enclave-nav-links__list > li:last-child > a {
	border-right: none;
}
.enclave-nav-links__list > li > a:hover,
.enclave-nav-links__list > li.current-menu-item > a,
.enclave-nav-links__list > li.current-menu-ancestor > a {
	color: var(--w);
	background: #181818;
}
.enclave-nav-links__list > li.menu-item-sale > a {
	color: #ff4444;
}

/* Убираем дефолтные WP стили подменю */
.enclave-nav-links__list > li ul {
	display: none;
}

/* ── Инлайн-поиск в шапке (раскрытие по клику на иконку) ──────────────────── */
.enclave-nav-search-area {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	padding: 0 24px;
	overflow: hidden;
}
.enclave-nav-search {
	display: flex;
	align-items: center;
	width: 0;
	max-width: 0;
	height: 34px;
	border: 1px solid #2a2a2a;
	background: #141414;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	position: relative;
	transition: max-width 0.25s ease, opacity 0.2s ease, border-color 0.15s;
}
.enclave-nav-search__icon {
	padding: 0 10px;
	font-size: 15px;
	color: #888;
	flex-shrink: 0;
}
.enclave-nav-search__input {
	flex: 1;
	min-width: 0;
	width: 100%;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent;
	color: var(--w) !important;
	font-family: var(--enclave-body-font);
	font-size: 13px;
	padding-right: 12px;
	-webkit-appearance: none;
	appearance: none;
	-webkit-text-fill-color: var(--w) !important;
	caret-color: var(--a);
}
.enclave-nav-search__input:focus,
.enclave-nav-search__input:focus-visible {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}
.enclave-nav-search__input::-webkit-search-cancel-button {
	display: none;
}
.enclave-nav-search__input::placeholder {
	color: #555;
}

/* Раскрыто */
.enclave-site-header.enclave-search-on .enclave-nav-search {
	width: 100%;
	max-width: 560px;
	opacity: 1;
	pointer-events: auto;
	border-color: var(--a);
	overflow: visible;
}
.enclave-site-header.enclave-search-on .enclave-nav-search__icon {
	color: var(--a);
}
.enclave-site-header.enclave-search-on #enclave-search-toggle {
	color: var(--a);
}

/* ── Выпадающий список живого поиска ────────────────────────────────────── */
.enclave-live-search {
	position: fixed;
	width: 340px;
	max-width: calc(100vw - 16px);
	background: var(--w);
	border: var(--b);
	z-index: 10000;
	overflow: hidden !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.enclave-live-search[hidden] {
	display: none;
}
.enclave-ls-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: var(--k);
	transition: background 0.1s;
}
.enclave-ls-item:hover {
	background: var(--g);
}
.enclave-ls-img {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	background: var(--g);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.enclave-ls-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.enclave-ls-img i {
	font-size: 18px;
	color: #ccc;
}
.enclave-ls-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.enclave-ls-brand {
	font-size: 8px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #aaa;
}
.enclave-ls-name {
	font-family: var(--enclave-heading-font);
	font-size: 14px;
	text-transform: uppercase;
	color: var(--k);
	line-height: 1.1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.enclave-ls-price {
	flex-shrink: 0;
	font-family: var(--enclave-price-font);
	font-size: 14px;
	color: var(--k);
	white-space: nowrap;
}
.enclave-ls-price .woocommerce-Price-currencySymbol {
	font-family: var(--enclave-price-font);
}
.enclave-ls-all {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px;
	background: var(--k);
	color: var(--w);
	font-family: var(--enclave-heading-font);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	position: sticky;
	bottom: 0;
	z-index: 1;
}
.enclave-ls-all:hover {
	background: #333;
}
.enclave-ls-all:hover i {
	color: var(--a);
}
.enclave-ls-all i {
	font-size: 14px;
	transition: transform 0.15s;
}
.enclave-ls-all:hover i {
	transform: translateX(3px);
}
.enclave-ls-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 26px 16px;
	text-align: center;
	font-size: 12px;
	color: #aaa;
}
.enclave-ls-empty i {
	font-size: 28px;
	color: #e0e0e0;
}

@media (max-width: 767px) {
	.enclave-nav-search-area {
		padding: 0 8px;
	}
	/* Компактнее лого и иконки → больше места под поиск */
	.enclave-nlogo {
		padding: 0 8px;
	}
	.enclave-nlogo .custom-logo-link img {
		max-height: 26px;
	}
	.enclave-ni {
		width: 40px;
	}
	.enclave-site-header.enclave-search-on .enclave-nav-search {
		max-width: 100%;
	}
	/* Раскрытый поиск: текст белый, видимый, шрифт крупнее */
	.enclave-site-header.enclave-search-on .enclave-nav-search__input {
		color: var(--w) !important;
		font-size: 14px;
		padding-right: 8px;
	}
	.enclave-site-header.enclave-search-on .enclave-nav-search__input::placeholder {
		color: #666;
	}
	/* Дропдаун живого поиска: на мобиле на всю ширину (координаты задаёт JS) */
	.enclave-live-search {
		width: auto;
		max-width: none;
	}
}

/* ── Страховка: контент без верхнего отступа после sticky шапки ─────────── */
.home .enclave-site-header + #content,
.home .enclave-site-header + #content > .content-wrap {
	margin-top: 0 !important;
	padding-top: 0 !important;
}
.home .enclave-front-main {
	margin-top: 0;
	padding-top: 0;
}
.home .enclave-front-main > :first-child {
	margin-top: 0 !important;
}

/* ── Мобильная адаптация ────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.enclave-nav-links {
		display: none;
	}
	.enclave-nav-top {
		height: 52px;
	}
	.enclave-nlogo {
		font-size: 20px;
		padding: 0 10px;
	}
	.enclave-ni {
		width: 40px;
	}
}
