/**
 * Каркас страницы: контейнер, шапка, подвал, двухколоночная раскладка каталога.
 */

.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-padding);
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site__content {
	flex: 1 0 auto;
	padding: 30px 0;
}

/* ===== Шапка сайта (порядок и размеры — как на Tilda) ===== */

.header {
	background: var(--color-white);
	position: sticky;
	top: 0;
	z-index: var(--z-header);
}

/*
 * На Tilda верхний ряд и бирюзовая (полупрозрачная) полоса меню
 * имеют одну ширину ~1042px и совпадают по левому/правому краю.
 * Без горизонтальных padding у контейнера шапки.
 */
.header .container {
	max-width: 1042px;
	padding-inline: 0;
}

.header__top {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 38px 0 16px 0;
}

.header__logo {
	flex-shrink: 0;
}

.header__logo img,
.header__logo .custom-logo {
	display: block;
	width: 238px;
	max-width: 100%;
	height: auto;
	max-height: 56px;
	object-fit: contain;
}

.header__phone-block {
	flex-shrink: 0;
	margin-left: 40px;
	text-align: left;
	line-height: 1.2;
}

.header__phone {
	display: block;
	font-size: 26px;
	font-weight: 400;
	line-height: 40px;
	color: var(--color-text);
	white-space: nowrap;
}

.header__phone:hover,
.header__phone:focus-visible {
	color: var(--color-accent);
}

.header__hours {
	font-size: 16px;
	font-weight: 300;
	line-height: 25px;
	color: var(--color-text);
}

.header__search-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 178px;
	height: 42px;
	margin-left: auto;
	padding: 0 12px;
	background: var(--color-white);
	color: #5c5c5c;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	text-transform: uppercase;
	text-align: center;
	box-shadow: 0 0 8px 2px rgba(61, 61, 61, 0.2);
	transition: color var(--transition-fast), box-shadow var(--transition-fast);
}

.header__search-btn:hover,
.header__search-btn:focus-visible {
	color: var(--color-accent);
	box-shadow: 0 0 10px 2px rgba(0, 130, 168, 0.35);
}

.header__actions {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-shrink: 0;
}

.header__cart {
	position: relative;
	display: inline-flex;
	width: 58px;
	height: 57px;
	flex-shrink: 0;
}

.header__cart-icon {
	display: block;
	width: 58px;
	height: 57px;
}

.header__cart-count {
	position: absolute;
	left: 33px;
	bottom: 4px;
	min-width: 20px;
	height: 19px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-white);
	font-size: 12px;
	font-weight: 400;
	line-height: 12px;
	pointer-events: none;
}

.header__ask-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 199px;
	height: 42px;
	padding: 0 12px;
	background: var(--color-accent);
	color: var(--color-white);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.55;
	text-transform: uppercase;
	text-align: center;
	box-shadow: 0 1px 7px 1px rgba(0, 130, 168, 0.5);
	transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.header__ask-btn:hover,
.header__ask-btn:focus-visible {
	background: var(--color-accent-dark);
	color: var(--color-white);
	box-shadow: 0 2px 12px 2px rgba(0, 130, 168, 0.6);
}

.header__nav-strip {
	position: relative;
	background: transparent;
}
.header__nav-strip__close {
	border: none;
	outline: none;
	background: none;
	padding: 0;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	right: 10px;
	top: 10px;
	z-index: 10;
}

/* На Tilda: background #0082a8 + opacity 0.1 → бледно-голубая полоса */
.header__nav {
	display: flex;
	align-items: center;
	min-height: 55px;
	background: rgba(0, 130, 168, 0.1);
	box-shadow: 0px 0px 10px 2px rgba(0, 130, 168, 0.1);
}

.header__burger {
	display: none;
	background: none;
	border: none;
	color: var(--color-accent);
	padding: 8px;
}

/*
 * Поиск как на Tilda (t985): полноширинная белая панель сверху,
 * поле по центру, крестик справа. Затемнения страницы нет.
 */
.search-overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--z-header) + 50);
}

.search-overlay[hidden] {
	display: none;
}

body.has-search-open .header {
	visibility: hidden;
}

.search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: transparent;
}

.search-overlay__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	height: auto;
	padding: 45px 0;
	background: var(--color-white);
	box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
}

.search-overlay__form {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
}

.search-overlay__input-wrap {
	position: relative;
	width: min(760px, calc(100% - 80px));
}

.search-overlay__input {
	width: 100%;
	height: 60px;
	padding: 0 55px;
	border: none;
	font-size: 16px;
	color: var(--color-text);
	background: transparent;
	border: 1px solid rgba(196, 196, 196, 1);
}

.search-overlay__input:focus {
	outline: none;
}

.search-overlay__input::placeholder {
	color: #b6b6b6;
}

.search-overlay__submit {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #b6b6b6;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.search-overlay__close {
	width: 68px;
	height: 60px;
	background: none;
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text);
	padding: 0;
}

.search-overlay__close svg {
	display: block;
	width: 28px;
	height: 28px;
}

.search-overlay__close:hover,
.search-overlay__submit:hover {
	color: var(--color-accent);
}

/* ===== Подвал сайта (как на Tilda: тёмный, 3 колонки, без Made on Tilda) ===== */

.footer {
	background: #000000;
	color: var(--color-white);
	padding: 23px 0 46px 0;
	flex-shrink: 0;
	border-top: none;
}

.footer .container,
.footer__inner {
	max-width: 1042px;
	padding-inline: 0;
}

.footer__inner {
	display: grid;
	grid-template-columns: 232px 1fr 220px;
	gap: 40px 48px;
	align-items: start;
	width: 100%;
	margin-inline: auto;
}

.footer__logo img {
	display: block;
	width: 232px;
	height: auto;
	max-height: 54px;
	object-fit: contain;
}

.footer__col--center {
	text-align: center;
	justify-self: center;
	max-width: 420px;
}

.footer__phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: var(--color-white);
	font-size: 18px;
	font-weight: 400;
	line-height: 28px;
	margin-bottom: 2px;
}

.footer__phone:hover,
.footer__phone:focus-visible {
	color: var(--color-white);
	opacity: 0.85;
}

.footer__phone-icon {
	display: block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.footer__email {
	color: var(--color-white);
	font-size: 17px;
	font-weight: 400;
	line-height: 26px;
	margin-bottom: 2px;
}

.footer__email a {
	color: var(--color-white);
}

.footer__email a:hover,
.footer__email a:focus-visible {
	text-decoration: underline;
}

.footer__tagline {
	color: var(--color-white);
	font-size: 16px;
	font-weight: 400;
	line-height: 25px;
	margin-bottom: 2px;
}

.footer__policy {
	display: inline-block;
	color: var(--color-white);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
	margin-bottom: 8px;
	opacity: 0.7;
}

.footer__policy:hover,
.footer__policy:focus-visible {
	color: var(--color-white);
	text-decoration: underline;
}

.footer__legal {
	color: var(--color-white);
	font-size: 12px;
	font-weight: 400;
	line-height: 19px;
	opacity: 0.7;
	display: block;
}

.footer__col--help {
	text-align: right;
	justify-self: end;
}

.footer__help-title {
	color: var(--color-white);
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
	margin-bottom: 12px;
}

.footer__help-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0px;
}

.footer__help-list a,
.footer__help-list .menu__link,
.footer__help-list li a {
	color: var(--color-white);
	font-size: 16px;
	font-weight: 400;
	line-height: 25px;
	text-transform: none;
	padding: 0;
	display: inline;
	letter-spacing: normal;
}

.footer__help-list a:hover,
.footer__help-list a:focus-visible,
.footer__help-list .menu__link:hover {
	color: var(--color-white);
	text-decoration: underline;
	opacity: 0.85;
}

.footer__help-list .menu__item,
.footer__help-list li {
	position: static;
}

/* ===== Раскладка каталога (сайдбар + контент) ===== */

.shop-layout {
	display: flex;
	align-items: flex-start;
	gap: var(--gap-xl);
	max-width: 1042px;
	margin: 0 auto;
}

.shop-layout__sidebar {
	width: 260px;
	flex-shrink: 0;
}

.shop-layout__content {
	flex: 1 1 auto;
	min-width: 0;
}

.shop-layout .section-title {
	text-align: center;
}

/* ===== Адаптивность ===== */
@media (min-width: 783px) {
	.header__nav-strip__close {
		display: none;
	}
}
@media (max-width: 1042px) {
	.header__top {
		display: grid;
		grid-template-columns: auto auto;
		justify-content: center;
	}
	.header__search-btn {
		width: 100%;
	}

	.page-main--with-sidebar .page-sidebar,
	.shop-layout__sidebar {
		display: none;
	}

	.page-main__content {
		padding-left: 20px;
		padding-right: 20px;
	}
}
@media (max-width: 960px) {
	.footer__inner {
		grid-template-columns: 1fr;
		gap: 32px;
		text-align: center;
		padding-inline: 16px;
	}

	.footer__col--logo,
	.footer__col--center,
	.footer__col--help {
		justify-self: center;
		text-align: center;
	}

	.footer__help-list {
		align-items: center;
	}

	.footer__logo img {
		margin-inline: auto;
	}
}

@media (max-width: 782px) {
	.header__top {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		padding-block: 16px;
		min-height: 0;
	}

	.header .container {
		padding-inline: 16px;
	}
	.header__nav {
		box-shadow: none;
		padding: 0 !important;
	}

	.header__logo img,
	.header__logo .custom-logo {
		width: 180px;
		max-height: 42px;
	}

	.header__phone-block {
		margin-left: 0;
		order: 2;
	}

	.header__phone {
		font-size: 18px;
		line-height: 1.3;
	}

	.header__hours {
		font-size: 13px;
		line-height: 1.3;
	}

	.header__search-btn {
		order: 4;
		flex-basis: 100%;
		width: 100%;
		margin-left: 0;
	}

	.header__actions {
		margin-left: auto;
		gap: 12px;
	}

	.header__ask-btn {
		width: auto;
		min-width: 140px;
		padding-inline: 14px;
	}

	.header__burger {
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		width: 48px;
		height: 48px;
		background-color: rgba(0, 130, 168, 0.1);
	}

	.header__nav {
		background: transparent;
		min-height: 0;
		display: block;
	}

	.search-overlay__panel {
		height: 100px;
	}

	.container {
		padding-inline: 16px;
	}
}

@media (max-width: 560px) {
	.header__ask-btn {
		display: none;
	}

	.header__cart {
		width: 48px;
		height: 47px;
	}

	.header__cart-icon {
		width: 48px;
		height: 47px;
	}

	.header__cart-count {
		left: 25px;
		bottom: 2px;
	}
}
