/* Шапка, меню, подвал, cookie-плашка. Дополняет базовые стили в base.css. */

.bl-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1100;
	padding: .7rem 1.1rem;
	background: var(--bl-accent);
	color: #fff;
	border-radius: 0 0 8px 0;
}

.bl-skip-link:focus { left: 0; }

/* --- Верхняя инфо-строка --- */
.bl-topbar {
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	font-size: .82rem;
}

.bl-topbar__inner {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-height: 40px;
	flex-wrap: wrap;
}

.bl-topbar__item { opacity: .75; }
.bl-topbar__socials { margin-left: auto; display: flex; gap: .85rem; }
.bl-topbar__socials a { color: inherit; text-decoration: none; opacity: .75; }
.bl-topbar__socials a:hover { opacity: 1; color: var(--bl-accent); }

/* --- Выбор города --- */
.bl-city { position: relative; }

.bl-city__current {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: .82rem;
	font-weight: 600;
	cursor: pointer;
	border-bottom: 1px dashed currentColor;
}

.bl-city__current svg { width: .95rem; height: .95rem; color: var(--bl-accent); }

.bl-city__list {
	position: absolute;
	top: calc(100% + .5rem);
	left: 0;
	z-index: 60;
	min-width: 190px;
	margin: 0;
	padding: .4rem;
	list-style: none;
	border-radius: 12px;
	background: var(--bl-color-surface, #fff);
	color: var(--bl-color-text, #12141a);
	box-shadow: 0 16px 40px rgba(10, 12, 20, .18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.bl-city.is-open .bl-city__list { opacity: 1; visibility: visible; transform: none; }

.bl-city__list button {
	width: 100%;
	padding: .5rem .7rem;
	border: 0;
	border-radius: 8px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: .88rem;
	text-align: left;
	cursor: pointer;
}

.bl-city__list button:hover { background: color-mix(in srgb, var(--bl-accent) 12%, transparent); color: var(--bl-accent); }

/* --- Варианты шапки --- */
.bl-site-header--centered .bl-site-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-template-areas: "nav logo actions";
	align-items: center;
}

.bl-site-header--centered .bl-site-header__logo { grid-area: logo; justify-self: center; }
.bl-site-header--centered .bl-site-header__nav { grid-area: nav; }
.bl-site-header--centered .bl-site-header__actions { grid-area: actions; justify-self: end; }

.bl-site-header--transparent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.bl-site-header--transparent.is-scrolled {
	position: fixed;
	background: rgba(14, 16, 22, .88);
	backdrop-filter: blur(12px);
	border-bottom-color: transparent;
}

/* --- Телефон в шапке --- */
.bl-site-header__phone {
	display: grid;
	line-height: 1.2;
	text-decoration: none;
	color: inherit;
}

.bl-site-header__phone small { font-size: .68rem; opacity: .6; }
.bl-site-header__phone span { font-weight: 700; font-size: .98rem; }
.bl-site-header__phone:hover span { color: var(--bl-accent); }

.bl-site-header__search-toggle {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
	transition: border-color .18s ease, color .18s ease;
}

.bl-site-header__search-toggle:hover { border-color: var(--bl-accent); color: var(--bl-accent); }
.bl-site-header__search-toggle svg { width: 1.05rem; height: 1.05rem; }

.bl-header-search[hidden] { display: none; }

.bl-header-search {
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	padding: .9rem 0;
}

.bl-header-search form { display: flex; gap: .6rem; }

.bl-header-search input {
	flex: 1;
	padding: .7rem 1rem;
	border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.bl-header-search input:focus { outline: none; border-color: var(--bl-accent); }

/* --- Подменю и мегаменю --- */
.bl-menu-item { position: relative; }

.bl-menu-item > a {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
}

.bl-menu-caret { width: .85rem; height: .85rem; opacity: .55; transition: transform .2s ease; }
.bl-menu-item:hover > a .bl-menu-caret { transform: rotate(180deg); }
.bl-menu-toggle { display: none; }

.bl-submenu {
	position: absolute;
	top: calc(100% + .55rem);
	left: -1rem;
	z-index: 70;
	min-width: 230px;
	margin: 0;
	padding: .5rem;
	list-style: none;
	border-radius: 14px;
	background: var(--bl-color-surface, #fff);
	color: var(--bl-color-text, #12141a);
	box-shadow: 0 20px 50px rgba(10, 12, 20, .18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.bl-menu-item:hover > .bl-submenu,
.bl-menu-item:focus-within > .bl-submenu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.bl-submenu a {
	display: block;
	padding: .55rem .8rem;
	border-radius: 9px;
	color: inherit;
	text-decoration: none;
	font-size: .92rem;
	font-weight: 550;
}

.bl-submenu a:hover { background: color-mix(in srgb, var(--bl-accent) 12%, transparent); color: var(--bl-accent); }

.bl-submenu .bl-submenu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	padding: 0 0 .3rem .7rem;
	min-width: 0;
	background: none;
}

/* Мегаменю: подменю раскладывается колонками на всю ширину контейнера. */
.bl-menu-item--mega { position: static; }

.bl-menu-item--mega > .bl-submenu {
	left: 0;
	right: 0;
	width: min(1180px, calc(100vw - 3rem));
	margin-inline: auto;
	padding: 1.35rem;
	columns: 4;
	column-gap: 1.5rem;
}

.bl-menu-item--mega > .bl-submenu > .bl-menu-item {
	break-inside: avoid;
	margin-bottom: 1rem;
}

.bl-menu-item--mega > .bl-submenu > .bl-menu-item > a {
	font-weight: 720;
	font-size: .95rem;
}

.bl-menu-item--mega .bl-submenu .bl-submenu a { font-weight: 500; opacity: .8; }

/* --- Навигация по секциям страницы --- */
.bl-anchor-nav { display: none; }

.bl-anchor-nav.is-ready {
	display: block;
	position: sticky;
	top: 0;
	z-index: 80;
	background: var(--bl-color-surface, #fff);
	border-bottom: 1px solid var(--bl-color-border-light, rgba(0, 0, 0, .08));
}

.bl-anchor-nav .bl-container {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	scrollbar-width: none;
	padding-block: .85rem;
}

.bl-anchor-nav .bl-container::-webkit-scrollbar { display: none; }

.bl-anchor-nav a {
	position: relative;
	white-space: nowrap;
	color: inherit;
	text-decoration: none;
	font-size: .9rem;
	font-weight: 600;
	opacity: .65;
	padding-bottom: .2rem;
}

.bl-anchor-nav a:hover { opacity: 1; }

.bl-anchor-nav a.is-active {
	opacity: 1;
	color: var(--bl-accent);
	box-shadow: inset 0 -2px 0 var(--bl-accent);
}

/* --- Мобильное меню на весь экран --- */
.bl-site-header__nav-close,
.bl-site-header__nav-contacts { display: none; }

@media (max-width: 1023px) {
	body.bl-menu-open { overflow: hidden; }

	/* backdrop-filter у шапки делает её системой координат для position:fixed,
	   из-за чего полноэкранное меню схлопывалось до ширины шапки. */
	body.bl-menu-open .bl-site-header {
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.bl-site-header__nav {
		position: fixed;
		inset: 0;
		z-index: 1050;
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
		padding: 5rem 1.5rem 2rem;
		background: var(--bl-color-surface, #fff);
		color: var(--bl-color-text, #12141a);
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform .28s cubic-bezier(.3, .8, .3, 1);
	}

	.bl-site-header__nav.is-open { transform: none; }

	.bl-site-header__nav-close {
		position: absolute;
		top: 1.2rem;
		right: 1.2rem;
		display: grid;
		place-items: center;
		width: 2.4rem;
		height: 2.4rem;
		border: 0;
		border-radius: 50%;
		background: color-mix(in srgb, currentColor 8%, transparent);
		color: inherit;
		cursor: pointer;
	}

	.bl-site-header__nav-close svg { width: 1.2rem; height: 1.2rem; }

	.bl-site-header__menu {
		display: grid;
		gap: .2rem;
	}

	.bl-site-header__menu > .bl-menu-item > a {
		display: block;
		padding: .75rem 0;
		font-size: 1.15rem;
		font-weight: 650;
	}

	.bl-menu-item--parent > a { padding-right: 3rem; }

	.bl-menu-caret { display: none; }

	.bl-menu-toggle {
		position: absolute;
		top: .35rem;
		right: 0;
		display: grid;
		place-items: center;
		width: 2.2rem;
		height: 2.2rem;
		border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
		border-radius: 50%;
		background: none;
		color: inherit;
		cursor: pointer;
	}

	.bl-menu-toggle::before,
	.bl-menu-toggle::after {
		content: "";
		position: absolute;
		background: currentColor;
		transition: transform .2s ease, opacity .2s ease;
	}

	.bl-menu-toggle::before { width: .8rem; height: 2px; }
	.bl-menu-toggle::after { width: 2px; height: .8rem; }
	.bl-menu-item.is-open > .bl-menu-toggle::after { opacity: 0; }

	.bl-submenu,
	.bl-menu-item--mega > .bl-submenu {
		position: static;
		width: auto;
		columns: 1;
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: none;
		padding: 0 0 .5rem .9rem;
		min-width: 0;
	}

	.bl-menu-item.is-open > .bl-submenu { display: block; }

	.bl-site-header__nav-contacts {
		display: grid;
		gap: .6rem;
		margin-top: auto;
		padding-top: 1.5rem;
		border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	}

	.bl-site-header__nav-phone {
		font-size: 1.3rem;
		font-weight: 750;
		color: inherit;
		text-decoration: none;
	}

	.bl-site-header__nav-contacts span { font-size: .85rem; opacity: .65; }
	.bl-site-header__nav-contacts .bl-btn { text-align: center; }

	.bl-site-header__phone small { display: none; }
	.bl-site-header__cta { display: none; }
	.bl-topbar__item { display: none; }
	.bl-site-header--centered .bl-site-header__inner { grid-template-columns: auto 1fr auto; grid-template-areas: "logo . actions"; }
}

/* --- Подвал --- */
.bl-site-footer__inner {
	display: grid;
	grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
	gap: clamp(1.5rem, 3vw, 3rem);
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.bl-site-footer--compact .bl-site-footer__inner { grid-template-columns: 1fr auto; align-items: center; }

.bl-site-footer__col h4 {
	margin: 0 0 .9rem;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .07em;
	opacity: .55;
}

.bl-site-footer__logo {
	display: inline-block;
	margin-bottom: .9rem;
	font-size: 1.15rem;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: inherit;
	text-decoration: none;
}

.bl-site-footer__logo img { max-height: 42px; width: auto; }

.bl-site-footer__about {
	margin: 0 0 1.1rem;
	font-size: .88rem;
	line-height: 1.65;
	opacity: .6;
	max-width: 34ch;
}

.bl-site-footer__links,
.bl-site-footer__menu {
	display: grid;
	gap: .55rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bl-site-footer__links a,
.bl-site-footer__menu a,
.bl-site-footer__contact,
.bl-site-footer__messengers a {
	color: inherit;
	text-decoration: none;
	font-size: .92rem;
	opacity: .72;
	transition: opacity .18s ease, color .18s ease;
}

.bl-site-footer__links a:hover,
.bl-site-footer__menu a:hover,
.bl-site-footer__messengers a:hover { opacity: 1; color: var(--bl-accent); }

.bl-site-footer__col--contacts { display: grid; gap: .5rem; align-content: start; }

.bl-site-footer__phone {
	font-size: 1.25rem;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: inherit;
	text-decoration: none;
}

.bl-site-footer__contact { display: block; }
.bl-site-footer__messengers { display: flex; gap: 1rem; margin-top: .2rem; }
.bl-site-footer__cta { margin-top: .8rem; justify-self: start; }

.bl-site-footer__socials { display: flex; gap: .7rem; flex-wrap: wrap; }

.bl-site-footer__socials a {
	display: grid;
	place-items: center;
	min-width: 2.3rem;
	height: 2.3rem;
	padding: 0 .6rem;
	border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	border-radius: 50%;
	color: inherit;
	text-decoration: none;
	font-size: .78rem;
	transition: border-color .18s ease, color .18s ease;
}

.bl-site-footer__socials a:hover { border-color: var(--bl-accent); color: var(--bl-accent); }
.bl-site-footer__socials img { max-width: 1.1rem; max-height: 1.1rem; }

.bl-site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem 1.5rem;
	padding-block: 1.25rem;
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	font-size: .82rem;
	opacity: .6;
}

.bl-site-footer__legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.bl-site-footer__legal a { color: inherit; }

.bl-site-footer__requisites {
	flex-basis: 100%;
	margin: 0;
	font-size: .74rem;
	line-height: 1.5;
	opacity: .7;
}

.bl-footer-subscribe {
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.bl-footer-subscribe__inner {
	display: grid;
	grid-template-columns: 1fr minmax(280px, 420px);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: center;
	padding-block: clamp(1.75rem, 3vw, 2.5rem);
}

.bl-footer-subscribe h3 { margin: 0 0 .3rem; font-size: 1.25rem; font-weight: 720; letter-spacing: -0.02em; }
.bl-footer-subscribe p { margin: 0; font-size: .88rem; opacity: .65; }

@media (max-width: 860px) {
	.bl-site-footer__inner,
	.bl-site-footer--compact .bl-site-footer__inner,
	.bl-footer-subscribe__inner { grid-template-columns: 1fr; }
}

/* --- Cookie --- */
/* Плашка показывается скриптом только тем, кто её ещё не закрывал. */
.bl-cookie[hidden] { display: none; }

.bl-cookie {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 950;
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: 720px;
	margin-inline: auto;
	padding: 1rem 1.25rem;
	border-radius: 14px;
	background: var(--bl-color-surface, #fff);
	color: var(--bl-color-text, #12141a);
	box-shadow: 0 18px 46px rgba(10, 12, 20, .24);
}

.bl-cookie p { margin: 0; font-size: .85rem; line-height: 1.55; }
.bl-cookie a { color: var(--bl-accent); }
.bl-cookie .bl-btn { flex-shrink: 0; }

@media (max-width: 600px) {
	.bl-cookie { flex-direction: column; align-items: stretch; text-align: center; bottom: 5rem; }
}

/* --- Мессенджеры в шапке --- */
.bl-site-header__messengers {
	display: flex;
	gap: .4rem;
}

.bl-site-header__messenger {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	color: inherit;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.bl-site-header__messenger .bl-icon { width: 1.1rem; height: 1.1rem; }
.bl-site-header__messenger--wa:hover { background: #25d366; border-color: #25d366; color: #fff; }
.bl-site-header__messenger--tg:hover { background: #2481cc; border-color: #2481cc; color: #fff; }

@media (max-width: 1023px) {
	.bl-site-header__messengers { display: none; }
}

/* --- Текстовый логотип ---
   Знак рисуется монограммой в фирменном цвете: пустое место вместо логотипа
   сразу выдаёт шаблон, а у покупателя своя картинка появляется не сразу. */
.bl-logo {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	color: inherit;
	text-decoration: none;
	line-height: 1.15;
}

.bl-logo img { max-height: 46px; width: auto; }

.bl-logo__mark {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex-shrink: 0;
	border-radius: calc(var(--bl-card-radius) * .55);
	background: var(--bl-accent);
	color: #fff;
	font-size: .92rem;
	font-weight: 800;
	letter-spacing: .01em;
}

.bl-logo__text { display: grid; }

.bl-logo__name {
	font-size: 1.08rem;
	font-weight: 750;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.bl-logo__tagline {
	font-size: .7rem;
	font-weight: 500;
	opacity: .6;
	letter-spacing: .01em;
	max-width: 22ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bl-site-footer__logo { margin-bottom: .9rem; }
.bl-site-footer__logo .bl-logo__mark { background: var(--bl-accent); }

@media (max-width: 1023px) {
	.bl-logo__tagline { display: none; }
	.bl-logo__name { font-size: 1rem; }
}

@media (max-width: 420px) {
	.bl-logo__mark { width: 2.1rem; height: 2.1rem; font-size: .8rem; }
	.bl-logo__name { font-size: .92rem; }
}
