/* =========================================================================
   Discount Upholstery — main.css
   Глобальные стили, работающие на всём сайте.
   Постраничную вёрстку выноси в отдельные файлы (front.css и т.д.).
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Переменные
   ------------------------------------------------------------------------- */
:root {
	/* Шрифты */
	--font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--font-script: 'Herr Von Muellerhoff', 'Brush Script MT', cursive;

	/* Контейнер: фиксированные значения со ступенчатым ростом на широких экранах.
	   1215px (эталон 1440) → ступени до 1620px на 1920+.
	   На планшете/мобайле ширина регулируется боковыми отступами. */
	--container-max: 1215px;
	--container-pad: 20px;

	/* Цвета (заглушки — поменяй под брендбук) */
	--color-text: #1a1a1a;
	--color-bg: #ffffff;
	--color-muted: #6b6b6b;
	--color-accent: #8a6d3b;
	--color-border: #e6e6e6;
}

/* Ступенчатый рост контейнера на широких экранах */
@media (min-width: 1600px) {
	:root {
		--container-max: 1360px;
	}
}

@media (min-width: 1760px) {
	:root {
		--container-max: 1480px;
	}
}

@media (min-width: 1920px) {
	:root {
		--container-max: 1620px;
	}
}

/* Планшет */
@media (max-width: 1024px) {
	:root {
		--container-pad: 32px;
	}
}

/* Мобайл */
@media (max-width: 600px) {
	:root {
		--container-pad: 16px;
	}
}

/* -------------------------------------------------------------------------
   2. Сброс / базовая нормализация
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font: inherit;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
   3. Типографика
   ------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	color: var(--color-text);
}

h1 { font-size: 52px; }
h2 { font-size: 40px; }
h3 { font-size: 30px; }
h4 { font-size: 22px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

@media (max-width: 768px) {
	h1 { font-size: 40px; }
	h2 { font-size: 32px; }
	h3 { font-size: 25px; }
}

@media (max-width: 480px) {
	h1 { font-size: 32px; }
	h2 { font-size: 26px; }
	h3 { font-size: 22px; }
}

p {
	margin: 0 0 1em;
}

/* Декоративный рукописный акцент (Herr Von Muellerhoff).
   Использование: <span class="script-accent">Discount</span> */
.script-accent {
	font-family: var(--font-script);
	font-weight: 400;
	line-height: 1;
}

/* -------------------------------------------------------------------------
   4. Контейнер
   ------------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

/* -------------------------------------------------------------------------
   5. Кнопки
   ------------------------------------------------------------------------- */
.btn {
	display: inline-block;
	padding: 14px 32px;
	font-family: var(--font-body);
	font-weight: 600;
	color: #fff;
	background-color: var(--color-accent);
	border: none;
	border-radius: 4px;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.btn:hover {
	background-color: var(--color-text);
}

/* -------------------------------------------------------------------------
   6. Шапка — прозрачная, поверх контента (на главной над hero)
   ------------------------------------------------------------------------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	color: #fff;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Смещение под админ-бар WordPress (виден только авторизованным) */
.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

/* Закреплённое состояние при скролле — непрозрачный фон для читаемости.
   Без backdrop-filter: он создаёт containing block и ломает fixed-шторку меню. */
.site-header.is-scrolled {
	background-color: rgba(26, 26, 26, 0.75);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* На страницах без hero — фон непрозрачный всегда,
   а контент отодвигаем из-под фиксированной шапки */
body .site-header {
	background-color: var(--color-text);
}

body .site-main {
	padding-top: 173px;
}

/* Страницы с hero (главная + services/gallery/designers):
   вверху шапка прозрачная, контент не отодвигаем (hero под шапкой). */
body.dz-hero-page .site-header:not(.is-scrolled) {
	background-color: transparent;
	box-shadow: none;
}

body.dz-hero-page .site-main {
	padding-top: 0;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding-block: 20px;
}

.site-header__logo {
	display: inline-flex;
	flex-shrink: 0;
}

.site-header__logo img {
	width: 184px;
	height: auto;
	max-height: 133px;
	object-fit: contain;
}

.site-header__title {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 700;
	color: #fff;
}

.site-header__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.site-header__menu a {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	transition: opacity 0.2s ease;
}

.site-header__menu a:hover {
	opacity: 0.7;
}

/* Телефон (кликабельный) */
.site-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 32px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #d9b487; /* тёплый золотой — можно поменять под бренд */
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.site-header__phone:hover {
	opacity: 0.8;
}

.site-header__phone-icon {
	flex-shrink: 0;
}

/* Дубликат телефона для мобильного меню — на десктопе скрыт */
.site-header__phone--drawer {
	display: none;
}

/* Бургер (скрыт на десктопе) */
.site-header__burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	width: 34px;
	height: 26px;
	padding: 0;
	background: none;
	border: none;
}

.site-header__burger span {
	display: block;
	width: 100%;
	height: 2px;
	background-color: #fff;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

/* В прозрачном состоянии (не проскроллено) добавляем тень логотипу и бургеру,
   чтобы они были видны и над светлыми участками фона */
.site-header:not(.is-scrolled) .site-header__logo img {
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.site-header:not(.is-scrolled) .site-header__burger span {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------------------------
   7. Подвал
   ------------------------------------------------------------------------- */
.site-footer {
	--footer-ink: #3a3a53;          /* тёмный серо-синий — заголовки, меню, часы */
	--footer-accent: #bf9b6b;       /* тёплый золотой — лейбл, телефон, иконки */
	--footer-muted: #9a9aa5;        /* приглушённый текст правового блока */
	--footer-hours-offset: 42px;    /* высота заголовка BUSINESS HOURS — опускает меню к строкам */

	margin-top: 80px;
	padding-block: 72px;
	background-color: var(--color-bg);
	color: var(--footer-ink);
}

.site-footer__inner {
	display: flex;
	flex-direction: column;
}

/* Крупный заголовок над колонками */
.site-footer__lead {
	max-width: 1020px;
	margin: 0 auto 60px;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 42px;
	line-height: 1.1;
	letter-spacing: 0;
	text-align: center;
	color: var(--footer-ink);
}

/* Сетка: лого | (гибкий зазор) | меню | 35px | часы | 40px | контакты | (гибкий зазор)
   Две равные гибкие дорожки по краям делят свободное место поровну,
   поэтому на широких экранах зазор лого→меню не разрастается. */
.site-footer__grid {
	display: grid;
	grid-template-columns: auto minmax(48px, 1fr) auto 35px auto 40px auto minmax(0, 1fr);
	align-items: start;
}

.site-footer__col {
	min-width: 0;
}

/* --- Колонка: логотип (по центру по вертикали, слева) --- */
.site-footer__col--logo {
	grid-column: 1;
	align-self: center;
}

.site-footer__logo {
	display: inline-flex;
}

.site-footer__logo img {
	width: 215px;
	height: auto;
}

/* Меню опускаем к строкам Business Hours (ниже заголовка) */
.site-footer__col--nav {
	grid-column: 3;
	margin-top: var(--footer-hours-offset, 42px);
}

.site-footer__col--hours {
	grid-column: 5;
}

.site-footer__col--contacts {
	grid-column: 7;
}

/* --- Колонка: меню в 2 столбца (по 4 пункта), зазор 25px --- */
.site-footer__menu {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(3, auto);
	column-gap: 25px;
	align-content: start;
}

.site-footer__menu a {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	line-height: 32px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--footer-ink);
	transition: color 0.2s ease;
}

.site-footer__menu a::before {
	content: '';
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--footer-ink);
	transition: background-color 0.2s ease;
}

.site-footer__menu a:hover {
	color: var(--footer-accent);
}

.site-footer__menu a:hover::before {
	background-color: var(--footer-accent);
}

/* --- Колонка: часы работы --- */
.site-footer__heading {
	margin: 0 0 21px;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 24px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--footer-accent);
}

.site-footer__hours {
	display: flex;
	flex-direction: column;
}

.site-footer__hours-row {
	display: flex;
	align-items: baseline;
	gap: 0 56px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	line-height: 32px;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--footer-ink);
	white-space: nowrap;
}

.site-footer__hours-day {
	flex: 0 0 110px;
}

.site-footer__hours-time {
	color: var(--footer-ink);
}

.site-footer__hours-row--single {
	display: block;
	white-space: normal;
}

/* --- Колонка: контакты --- */
.site-footer__col--contacts {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* --- Соцсети (под контактами) --- */
.site-footer__socials {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	margin-top: 4px;
}

.site-footer__social {
	display: inline-flex;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__social:hover {
	opacity: 0.75;
	transform: translateY(-1px);
}

.site-footer__social img {
	display: block;
	width: auto;
	height: 32px;
}

.site-footer__contact {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: var(--footer-ink);
	transition: opacity 0.2s ease;
}

.site-footer__contact-icon {
	flex: 0 0 auto;
	color: var(--footer-accent);
}

.site-footer__contact-text {
	min-width: 0;
}

.site-footer__contact--phone {
	align-items: center;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 32px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--footer-accent);
}

.site-footer__contact--phone .site-footer__contact-icon {
	width: 28px;
	height: 28px;
}

.site-footer__contact--email,
.site-footer__contact--address {
	align-items: flex-start;
}

.site-footer__contact--email .site-footer__contact-text,
.site-footer__contact--address .site-footer__contact-text {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.45;
}

a.site-footer__contact:hover {
	opacity: 0.75;
}

/* --- Нижний правовой блок --- */
.site-footer__legal {
	margin-top: 30px;
	max-width: 900px;
	margin-inline: auto;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.6;
	text-align: center;
	color: #46446099;

}

.site-footer__legal :where(p) {
	margin: 0;
}

.site-footer__legal a {
	color: #46446099;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.2s ease;
}

.site-footer__legal a:hover {
	color: var(--footer-accent);
}

.site-footer__copyright {
	margin: 16px 0 0;
	font-family: var(--font-body);
	font-size: 14px;
	text-align: center;
	color: var(--footer-muted);
}

/* --- Адаптив подвала --- */

/* Планшет: 2×2 — лого+меню сверху, часы+контакты снизу.
   Сбрасываем явное размещение по колонкам и зазорные дорожки. */
@media (max-width: 1100px) {
	.site-footer__grid {
		grid-template-columns: auto auto;
		justify-content: space-between;
		gap: 56px 48px;
	}

	.site-footer__col--logo,
	.site-footer__col--nav,
	.site-footer__col--hours,
	.site-footer__col--contacts {
		grid-column: auto;
	}

	.site-footer__col--nav {
		margin-top: 0;
	}
}

/* Планшет/мобайл: уменьшаем крупные значения подвала */
@media (max-width: 768px) {
	.site-footer {
		padding-block: 48px;
	}

	.site-footer__lead {
		margin-bottom: 36px;
		font-size: 32px;
	}

	.site-footer__logo img {
		width: 180px;
	}
}

/* Мобайл: одна колонка, по центру */
@media (max-width: 600px) {
	.site-footer__grid {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
		gap: 40px;
	}

	.site-footer__col {
		width: 100%;
	}

	.site-footer__menu {
		justify-content: center;
		width: max-content;
		margin-inline: auto;
		text-align: left;
	}

	.site-footer__heading {
		text-align: center;
	}

	.site-footer__hours {
		align-items: center;
	}

	.site-footer__hours-row {
		justify-content: center;
		gap: 0 24px;
	}

	.site-footer__hours-day {
		flex: 0 0 auto;
		text-align: right;
	}

	.site-footer__col--contacts {
		align-items: center;
		justify-self: center;
	}

	.site-footer__contact--email,
	.site-footer__contact--address {
		align-items: center;
		text-align: left;
	}
}

/* -------------------------------------------------------------------------
   8. Мобильное меню (бургер + выезжающая панель)
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.site-header__inner {
		gap: 16px;
	}

	body .site-main {
		padding-top: 136px;
	}

	.site-header__logo img {
		width: 130px;
		max-height: 96px;
	}

	/* Десктопный телефон прячем — он появится внутри меню */
	.site-header__phone:not(.site-header__phone--drawer) {
		display: none;
	}

	.site-header__burger {
		display: flex;
		position: relative;
		z-index: 110;
	}

	.site-header__nav {
		position: fixed;
		inset: 0 0 0 auto;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: 32px;
		width: 340px;
		padding: 120px 40px 40px;
		background-color: var(--color-text);
		box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
		transform: translateX(100%);
		transition: transform 0.3s ease;
		z-index: 100;
		overflow-y: auto;
	}

	.site-header__menu {
		flex-direction: column;
		gap: 22px;
	}

	.site-header__menu a {
		font-size: 16px;
	}

	.site-header__phone--drawer {
		display: inline-flex;
		font-size: 28px;
	}

	body.nav-open {
		overflow: hidden;
	}

	body.nav-open .site-header__nav {
		transform: translateX(0);
	}

	body.nav-open .site-header__burger span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	body.nav-open .site-header__burger span:nth-child(2) {
		opacity: 0;
	}

	body.nav-open .site-header__burger span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}
}

/* -------------------------------------------------------------------------
   9. Страница 404
   ------------------------------------------------------------------------- */
.error-404 {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding-block: 80px;
}

.error-404__inner {
	max-width: 640px;
	text-align: center;
}

.error-404__code {
	display: block;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 140px;
	line-height: 1;
	color: #c09570;
}

.error-404__title {
	margin: 12px 0 0;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 44px;
	line-height: 1.1;
	color: #464460;
}

.error-404__text {
	margin: 18px auto 0;
	max-width: 520px;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 26px;
	color: #4a4a4a;
}

.error-404__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px 28px;
	margin-top: 36px;
}

.error-404__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding: 16px 44px;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	background-color: #c09570;
	border-radius: 9999px;
	transition: background-color 0.25s ease, transform 0.2s ease;
}

.error-404__btn:hover {
	background-color: #a97e59;
	transform: translateY(-1px);
}

.error-404__link {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 15px;
	color: #464460;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.error-404__link:hover {
	color: #c09570;
}

@media (max-width: 600px) {
	.error-404__code {
		font-size: 96px;
	}

	.error-404__title {
		font-size: 32px;
	}

	.error-404__btn {
		width: 100%;
		max-width: 340px;
	}
}
