/*
Theme Name: zhila
Theme URI:
Author: semdestroyer
Author URI:
Description: Жила Лабс темка
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.2
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zhilabs
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/* === Скрываем текст кнопок пагинации === */
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	font-size: 0; /* Скрываем текст */
	line-height: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--zhila-ink);
	text-decoration: none;
	transition: all 0.2s ease;
	position: relative;
}

/* === Стрелка «Назад» (левая) === */
.wp-block-query-pagination-previous::before {
	content: '';
	display: inline-block;
	width: 35px;
	height: 35px;
	/*background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");*/
	background-image: url("assets/icons/Arrow 2.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* === Стрелка «Вперёд» (правая) === */
.wp-block-query-pagination-next::before {
	content: '';
	display: inline-block;
	width: 35px;
	height: 35px;
	/*background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");*/
	background-image: url("assets/icons/Arrow 1.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* === Ховер-эффект === */
/*.wp-block-query-pagination-previous:hover,*/
/*.wp-block-query-pagination-next:hover {*/
/*	background-color: #0073aa;*/
/*	border-color: #0073aa;*/
/*	color: var(--zhila-white);*/
/*}*/

/* === Доступность: оставляем текст для скринридеров === */
/* (опционально, если хочешь сохранить a11y) */
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	/* Если нужно полностью скрыть текст визуально, но оставить для скринридеров: */
	/* text-indent: -9999px; */
	/* Но font-size: 0 + flex-центрирование уже хорошо работает */
}

.wp-block-details summary::marker {
	content: none;
}

.wp-block-details summary {
	list-style: none;
	display: flex;
	align-items: center;      /* точное вертикальное центрирование */
	gap: 18px;                /* отступ, который не ломает строку */
	cursor: pointer;
}

.wp-block-details summary::after {
	content: "";
	width: 16px;              /* реальный размер иконки */
	height: 16px;
	flex-shrink: 0;           /* запрещаем сжатие при узком контейнере */
	background: url("assets/icons/Filter_Arrow_Closed.svg") no-repeat center / contain;
}

.wp-block-details[open] summary::after {
	background-image: url("assets/icons/Filter_Arrow_Open.svg");
}

.wc-block-product-template__responsive {
	text-align: left;
}

.zhila-product-title {
	text-align: left !important;
}

/* 1. Скрываем поле ввода по умолчанию */
.wp-block-search .wp-block-search__input {
	width: 0;
	max-width: 0;
	padding: 0;
	border: none;
	opacity: 0;
	overflow: hidden;
	transition: all 0.3s ease;
	visibility: hidden;
}

/* 2. Когда блок активен (класс добавится через JS) — показываем поле */
.wp-block-search.search-active .wp-block-search__input {
	width: 250px;
	max-width: 250px;
	padding: 8px 12px;
	margin-right: 8px;
	border: 1px solid #ccc;
	opacity: 1;
	visibility: visible;
}

/* 3. Превращаем кнопку в чистую иконку */
.wp-block-search .wp-block-search__button {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0;
	margin: 0;
	min-height: auto;
	color: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

/* Скрываем оригинальную иконку */
.wp-block-search .wp-block-search__button svg,
.wp-block-search .wp-block-search__button .wp-block-search__icon-button {
	display: none !important;
}

.wp-block-search .wp-block-search__button::before {
	content: '';
	display: block;
	width: 24px;
	height: 24px;
	background-image: url('assets/icons/SearchBlack.svg');
	background-size: contain;
	background-repeat: no-repeat;
}

/* Белая иконка нужна только на зелёной шапке главной. Ниже 1440px хиро-шапка
   светлая (см. правило .zhila-home-hero в media-блоках), поэтому белый SVG
   становился невидимым — «пропадали» поиск и корзина. */
@media (min-width: 1440px) {
	.zhila-search-front .wp-block-search__button::before {
		background-image: url('assets/icons/SearchWhite.svg') !important;
	}
}

/* Опционально: убираем обводку при фокусе на кнопке */
.wp-block-search .wp-block-search__button:focus {
	outline: none;
	box-shadow: none;
}

.wp-block-group:has(.zhila-filter) {
	align-items: flex-start !important;
	align-content: flex-start !important;
}

/* Сам фильтр прижимаем к верху */
.zhila-filter {
	align-self: flex-start !important;
	align-content: flex-start !important;
	margin-top: 35% !important;
}

/* === ЦЕНТРИРОВАНИЕ ЗАГОЛОВКА ТОВАРА === */
.wp-block-post-title {
	text-align: left !important;
}

.wp-block-post-title a {
	display: block !important;
	text-align: left !important;
}

/* === СЕПАРАТОР НА ВСЮ ШИРИНУ === */
.wp-block-separator {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.zhila-products-with-filters {
	/* Здесь раньше жёстко ломались ограничения WordPress (`width: 100%`,
	   `padding 40px`, `grid-template-columns: 280px 1fr` — всё с !important).
	   Из-за этого сетка каталога не совпадала с макетом: на 1920 колонка
	   фильтров была 280px вместо ~420px, а карточки начинались на 100px левее.
	   Теперь ширину страницы и колонки задаёт layout system
	   (--zhila-desktop-gutter / --zhila-content, блок ниже по файлу). */
	margin-top: 3%;
	align-items: start;
}

.zhila-products {
	padding: 0 !important;
}

.collab-filter-block a{
	text-decoration: none;
	font-weight: normal;
	font-family: Inter, sans-serif;
	font-weight: 600;
}

/* ==========================================
   СТИЛИЗАЦИЯ КАТЕГОРИЙ ПОД КОЛЛАБОРАЦИИ
   ========================================== */

/* Убираем маркеры списка и отступы */
.zhila-filter .wc-block-product-categories-list,
.zhila-filter .wc-block-product-categories-list ul {
	list-style: none !important;
	padding-left: 0 !important;
	margin: 0 !important;
	font-family: Inter, sans-serif;
	font-weight: 600;
}

.zhila-filter a{
	text-decoration: none;
	font-weight: normal;
	font-family: Inter, sans-serif;
	font-weight: 600;
}

/* Убираем отступы у элементов списка */
.zhila-filter .wc-block-product-categories-list-item {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

/* СКРЫВАЕМ счетчик товаров (14), (1) и т.д. */
.zhila-filter .wc-block-product-categories-list-item-count {
	display: none !important;
}

/* Стилизуем ссылки на категории */
.zhila-filter .wc-block-product-categories-list-item__name {
	text-decoration: none !important;
	color: inherit !important; /* Наследуем цвет от родителя */
	font-weight: normal !important;
	font-size: inherit !important;
	font-family: Inter, sans-serif;
	font-weight: 600;
}


.zhila-filter .wc-block-product-categories-list-item:first-child {
	/* Не скрываем, оставляем все категории */
}

/* 2. Исправляем регистр для коллабораций - делаем как на макете */
.zhila-filter .collab-filter-block a,
.zhila-filter .collab-filter-block li {
	text-transform: none !important; /* Убираем верхний регистр */
	font-weight: 400 !important;
	font-size: 14px !important;
	/* Оставляем как есть: AlinaRin, Flynnflytaggart и т.д. */
}

/* 3. Для категорий оставляем нормальный регистр */
.zhila-filter .wc-block-product-categories-list-item__name {
	text-transform: none !important; /* Убираем uppercase */
	font-weight: 400 !important;
	font-size: 14px !important;
}

/* 4. Заголовки details (КАТЕГОРИИ, КОЛЛАБОРАЦИИ, ЦВЕТ) */
.zhila-filter details summary {
	text-transform: uppercase !important;
	font-weight: 500 !important;
	font-size: 14px !important;
	letter-spacing: 0.05em !important;
}

/* 5. Убираем маркеры списка */
.zhila-filter ul {
	list-style: none !important;
	padding-left: 0 !important;
}

/* ЖЕСТКАЯ СИНХРОНИЗАЦИЯ ШРИФТА И ВЕСА */
.zhila-filter,
.zhila-filter details summary,
.zhila-filter .wc-block-product-categories-list-item__name,
.zhila-filter .collab-filter-block a,
.zhila-filter .collab-filter-block li,
.zhila-filter h2,
.zhila-filter h3,
.wp-block-post-title,
.wp-block-heading {
	/* 1. Принудительно один и тот же шрифт (чтобы не подменялся на Arial) */
	font-family: 'Inter', sans-serif !important;

	/* 2. Одинаковый вес. Поставь 400 (обычный) или 500 (medium). Главное - везде одинаково */
	font-weight: 400 !important;
	color: #4D4C51;
	/* 3. Убираем жирность, которую WooCommerce впихивает инлайном */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.woocommerce-product-gallery__image--placeholder img{
	border: 1px solid;
}

/* ===================================
   Стили для выбора размера одежды
   =================================== */

.size-selector-wrapper {
	width: 100%;
	max-width: 340px;
	margin: 25px 0;
}

.size-buttons {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
	flex-wrap: wrap;
}

/* wpautop оборачивает первую инлайн-ссылку шорткода в <p> — убираем его отступ,
   чтобы он не добавлял лишнюю высоту между подсказкой и кнопками. */
.size-selector-wrapper > p {
	margin: 0;
}

.size-option {
	cursor: pointer;
	appearance: none;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	/* Кнопка — только «обёртка» вокруг .size-btn: убираем собственный
	   line-box, иначе фокус-рамка/ховер-зона больше самой кнопки. */
	font-size: 0;
	line-height: 0;
}

/* wpautop изредка протаскивает <br>/<p> внутрь шорткода селектора —
   такие узлы растягивают кнопку и ломают рамку фокуса. */
.size-option > br,
.size-option > p {
	display: none !important;
}

/* Фокус-рамку рисуем по самой кнопке размера, а не по боксу обёртки. */
.size-option:focus,
.size-option:focus-visible {
	outline: none;
}

.size-option:focus-visible > .size-btn {
	outline: 2px solid var(--zhila-green, #0a856a);
	outline-offset: 2px;
}

.size-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 55px;
	height: 55px;
	padding: 0 15px;
	border: 1px solid #14141E;
	background: #F6F4EB;
	color: var(--zhila-ink);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
	user-select: none;
}

.size-btn:hover {
	border-color: #858485;
	background: #f0f0f0;
}

.size-option.active .size-btn,
.size-option[aria-pressed="true"] .size-btn {
	border-color: var(--zhila-ink);
	background: #0A856A;
	color: #F6F4EB;
	font-weight: 600;

}

.size-add-btn {
	width: 100%;
	height: 52px;
	background: var(--zhila-ink);
	color: var(--zhila-white);
	border: none;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s ease;
	box-sizing: border-box;

	/* 🔧 Фикс: всегда по центру, текст не прыгает */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	white-space: nowrap;
}

.size-add-btn:hover:not(:disabled) {
	background: var(--zhila-ink);
}

.size-add-btn:disabled {
	background: var(--zhila-ink);
	cursor: default;
	opacity: 0.85;
}

@media (max-width: 480px) {
	.size-selector-wrapper {
		max-width: 100%;
	}

	.size-btn {
		min-width: 50px;
		height: 50px;
		padding: 0 12px;
		font-size: 14px;
	}

	.size-add-btn {
		height: 48px;
		font-size: 14px;
	}
}

/* Кастомная корзина на /checkout/ (шорткод [zhila_cart]).
   Базовые правила ниже перекрываются секцией «Zhila layout system». */
.custom-cart__item {
	display: grid;
	grid-template-columns: 200px 1fr auto auto auto;
	gap: 30px;
	align-items: start;
	padding: 30px 0;
}

.custom-cart__image img {
	width: 100%;
	height: auto;
	border: 1px solid #14141E;
}

.custom-cart__title {
	margin: 0 0 5px 0;
	font-size: 18px;
	font-weight: 600;
}

.custom-cart__subtitle {
	margin: 0;
	color: var(--zhila-gray-75);
	font-size: 14px;
}

.custom-cart__info {
	display: flex;
	align-self: stretch;
	flex-direction: column;
}

.custom-cart__options {
	display: flex;
	gap: 15px;
	margin-top: auto;
}

.custom-cart__size,
.custom-cart__qty {
	width: 50px;
	height: 50px;
	/* border-box обязателен: контейнер .custom-cart__options держит ровно
	   50px по высоте, поэтому при content-box нижняя рамка (50 + 1px) уходила
	   за границу и обрезалась — «рамка без одной стороны». */
	box-sizing: border-box;
	flex: 0 0 auto;
	border: 1px solid var(--zhila-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.custom-cart__qty-input {
	width: 100%;
	height: 100%;
	border: none;
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	background: transparent;
}

.custom-cart__qty-input::-webkit-inner-spin-button,
.custom-cart__qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.custom-cart__price {
	font-size: 20px;
	font-weight: 600;
	min-width: 100px;
	text-align: right;
}

.custom-cart__remove {
	color: var(--zhila-ink);
	text-decoration: underline;
	font-size: 14px;
}

.custom-cart__lower {
	align-items: end;
}

.custom-cart__totals {
	margin-top: 40px;
	padding: 30px;
}

.custom-cart__total-row {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
}

.custom-cart__total-row-position {
	border-bottom: 1px solid #ddd;
}

.custom-cart__total-row--total {
	font-weight: 700;
	font-size: 18px;
	margin-top: 10px;
}

@media (max-width: 768px) {
	.custom-cart__item {
		grid-template-columns: 96px minmax(0, 1fr) auto;
		gap: 15px;
	}
	.custom-cart__price {
		font-size: 16px;
	}
}

.zhila-variation-attribute {
	margin: 0;
	padding: 0;
	border: 0;
}

.zhila-variation-status {
	min-height: 1.5em;
	margin-top: 8px;
	color: var(--zhila-red);
	font-size: 13px;
}

.zhila-variation-selector.is-loading {
	opacity: .7;
	pointer-events: none;
}

.zhila-cart-added-notice {
	position: fixed;
	right: 24px;
	top: 24px;
	z-index: 100000;
	display: flex;
	max-width: calc(100vw - 48px);
	padding: 16px 20px;
	align-items: center;
	gap: 24px;
	background: var(--zhila-green, #0a856a);
	color: #f6f4eb;
	box-shadow: 0 8px 30px rgba(20, 20, 30, .18);
	opacity: 0;
	transform: translateY(-12px);
	transition: opacity .2s ease, transform .2s ease;
}

.zhila-cart-added-notice.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.zhila-cart-added-notice a {
	color: inherit;
	font-weight: 700;
}

#custom-wc-toasts {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 100000;
	display: grid;
	width: min(430px, calc(100vw - 48px));
	gap: 10px;
	pointer-events: none;
}

.zhila-toast {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 28px;
	gap: 18px;
	align-items: start;
	padding: 16px 14px 16px 20px;
	color: #f6f4eb;
	background: #0a856a;
	box-shadow: 0 8px 30px rgba(20, 20, 30, .18);
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: auto;
}

.zhila-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.zhila-toast--error {
	background: #af372d;
}

.zhila-toast--info {
	background: #4d4c51;
}

.zhila-toast__content {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 18px;
	font-size: 14px;
	line-height: 1.35;
}

.zhila-toast__content a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
}

.zhila-toast__close {
	display: grid;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	place-items: center;
	cursor: pointer;
}

.zhila-checkout {
	/* Ломаем ограничения WordPress по ширине */
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 200px !important;  /* Отступ от левого края экрана */
	padding-right: 200px !important; /* Отступ от правого края экрана */
	box-sizing: border-box !important;
	/* Включаем сетку: левая колонка 280px, правая занимает всё остальное */
	display: grid !important;
	grid-template-columns: 1fr 0.35fr !important;
	gap: 10px !important; /* Расстояние между фильтрами и товарами */
}

.zhila-checkout-block {
	display: flex;
	justify-content: center; /* по горизонтали */
	align-items: center;    /* по вертикали */
	/*align-content: center;*/
	/*align-self: center;*/
}

.zhila-checkout-details {
	padding-right: 10px;
}

.zhila-checkout-item {
	display: flex;
	justify-content: center; /* по горизонтали */
	align-items: center;    /* по вертикали */
}

/*TODO: уточнить нужно ли скроллить*/
.zhila-proceed {
	position: -webkit-sticky; /* Safari */
	position: sticky;
	top: 0;
}

.zhila-checkout-fields input {
	border: solid var(--zhila-ink) 1px;
	background: #F6F4EB;
}

/*.zhila-checkout-item {*/
/*	align-self: center;*/
/*}*/

/*.z-checkout-row {*/
/*	display: flex;*/
/*}*/

/*.z-checkout-column {*/
/*	flex: 50%; !* Each column takes up 50% of the row's width *!*/
/*	padding: 10px;*/
/*}*/

/* Способы доставки вынесены в отдельный шорткод [zhila_checkout_shipment]
   (сейчас выключен в шаблоне оформления — доставка одна, виджет СДЭК).
   Подпись блока раньше была голым текстом внутри .zhila-checkout-fields. */
.zhila-checkout-shipment__label {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--zhila-gray-75);
}

.shipment-selector-wrapper {
	width: 100%;
	max-width: 540px;
	margin: 25px 0;
}

.shipment-buttons {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
	flex-wrap: wrap;
}

.shipment-option {
	cursor: pointer;
}

.shipment-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 55px;
	height: 55px;
	padding: 0 15px;
	border: 1px solid #14141E;
	background: #F6F4EB;
	color: var(--zhila-ink);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
	user-select: none;
}

.shipment-btn:hover {
	border-color: #858485;
	background: #f0f0f0;
}

.shipment-btn.active {
	border-color: var(--zhila-ink);
	background: #0A856A;
	color: #F6F4EB;
	font-weight: 600;

}

.shipment-add-btn {
	width: 100%;
	height: 52px;
	background: var(--zhila-ink);
	color: var(--zhila-white);
	border: none;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s ease;
	box-sizing: border-box;

	/* 🔧 Фикс: всегда по центру, текст не прыгает */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	white-space: nowrap;
}

.shipment-add-btn:hover:not(:disabled) {
	background: var(--zhila-ink);
}

.shipment-add-btn:disabled {
	background: var(--zhila-ink);
	cursor: default;
	opacity: 0.85;
}

.zhila-delivery-placeholder {}

h2.has-ibm-plex-sans-font-family {
	font-family: 'IBM Plex Sans', sans-serif !important;
	font-weight: 600 !important;
}

.zhila-product-price {
	color: #4D4C51;
	font-family: Inter, serif;
}

/* Checkout completion: the order key in WooCommerce's received URL protects
 * customer-facing order details; payment confirmation itself stays server-side. */
.zhila-order-confirmation {
	max-width: 1120px;
	padding: clamp(32px, 6vw, 80px) clamp(20px, 4vw, 48px);
}

.zhila-order-confirmation > .wc-block-order-confirmation-status {
	border: 1px solid #0a856a;
	background: #e9f5ef;
	color: #075e4b;
	padding: clamp(24px, 4vw, 48px);
	text-align: center;
}

@media (max-width: 1024px) {
	.zhila-checkout {
		padding-inline: clamp(24px, 5vw, 64px) !important;
		grid-template-columns: minmax(0, 1fr) 320px !important;
		gap: 24px !important;
	}

	.wp-block-columns.alignwide {
		padding-inline: 24px;
	}
}

@media (max-width: 782px) {
	body {
		overflow-x: hidden;
	}

	.wp-site-blocks > header .wp-block-group.alignwide,
	.wp-site-blocks > .wp-block-group > .wp-block-group.alignwide {
		padding-inline: 16px;
	}

	.wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}

	.wp-block-navigation__responsive-container-open {
		display: flex;
	}

	.zhila-checkout {
		display: flex !important;
		flex-direction: column !important;
		padding-inline: 16px !important;
	}

	.zhila-checkout-details {
		padding-right: 0;
	}

	.zhila-proceed {
		position: static;
		margin-top: 16px;
		padding: 20px 0;
	}

	.custom-cart__item {
		padding: 20px 0;
	}

	.custom-cart__image img {
		aspect-ratio: 1;
		object-fit: cover;
	}

	.shipment-buttons,
	.size-buttons {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.shipment-btn,
	.size-btn {
		min-width: 0;
		width: 100%;
	}

	.woocommerce.product > main > .wp-block-columns {
		gap: 24px;
	}

	.woocommerce.product .wp-block-column[style*="512px"] {
		flex-basis: auto !important;
	}
}

@media (max-width: 480px) {
	.custom-cart__item {
		grid-template-columns: 80px minmax(0, 1fr);
	}

	.custom-cart__price {
		grid-column: 2;
		text-align: left;
	}

	.custom-cart__title {
		font-size: 16px;
	}

	.wp-block-woocommerce-product-collection .wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

.zhila-product-price-sale {
	color: #0A856A;
}

.zhila-carousel-header {
	color: #14141E;
	font-family: 'IBM Plex Sans', sans-serif !important;
	font-weight: 600 !important;
}

/* Меняем порядок: новая цена слева, старая справа */
.zhila-product-price .wc-block-components-product-price,
.wc-block-grid__product-price {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Новая цена (ins) - первая, крупная, зелёная */
.zhila-product-price ins,
.wc-block-grid__product-price ins {
	order: 1;
	font-size: 20px;
	font-weight: bold;
	color: #0a856a;
	text-decoration: none;
}

/* Старая цена (del) - вторая, зачёркнутая, серая */
.zhila-product-price del,
.wc-block-grid__product-price del {
	order: 2;
	font-size: 16px;
	color: #858485;
	opacity: 0.7;
}

/* Скрываем текст для скринридеров */
.zhila-product-price .screen-reader-text {
	display: none;
}

/* Корзина */
.wc-block-mini-cart__button svg,
.wc-block-components-mini-cart__button svg {
	display: none !important;
}
/* Делаем кнопку контейнером для нашей иконки */
.wc-block-mini-cart__button,
.wc-block-components-mini-cart__button {
	position: relative !important;
	background: transparent !important;
	padding: 0 !important;
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
}

/* Вставляем нашу иконку */
.wc-block-mini-cart__button::before,
.wc-block-components-mini-cart__button::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 24px;
	height: 24px;
	background-image: url('assets/icons/Cart.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	display: block !important;
}

/* Белая корзина — только на зелёной шапке главной (≥1440px), см. иконку поиска. */
@media (min-width: 1440px) {
	.zhila-cart-button-front .wc-block-mini-cart__button::before,
	.zhila-cart-button-front .wc-block-components-mini-cart__button::before {
		background-image: url('assets/icons/CartWhite.svg') !important;
	}
}


/* 1. Разрешаем кнопке и обертке показывать то, что выходит за их края */
.wc-block-mini-cart__button,
.wc-block-mini-cart__quantity-badge {
	overflow: visible !important;
	position: relative !important;
}

/* 2. Настраиваем сам бейдж */
.wc-block-mini-cart__badge {
	/* Прижимаем бейдж к правому верхнему углу иконки: раньше left:100% +
	   margin-left:30px отрывал его от сумки и он висел отдельным кружком. */
	position: absolute !important;
	left: auto !important;
	right: -8px !important;
	top: -6px !important;
	transform: none !important;

	/* Сбрасываем, чтобы не растягивался и был кружком */
	width: auto !important;
	min-width: 18px !important;
	height: 18px !important;
	padding: 0 5px !important;
	border-radius: 9px !important;

	/* Центровка цифры внутри */
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;

	/* Твой дизайн (зеленый, как ты хотел) */
	background-color: #0a856a !important;
	color: var(--zhila-white) !important;
	font-size: 11px !important;
	font-weight: bold !important;
}
.zhila-cart-button-front .wc-block-mini-cart__badge {
	background-color: var(--zhila-white) !important;
	color: #0a856a !important;
}
/*.product-category,*/
/*.wc-block-components-product-category-list {*/
/*	font-size: 12px;*/
/*	color: #858485;*/
/*	margin-bottom: 5px;*/
/*}*/

/*.product-category a,*/
/*.wc-block-components-product-category-list a {*/
/*	color: #4D4C51;*/
/*	text-decoration: none;*/
/*}*/

/*.product-category a:hover,*/
/*.wc-block-components-product-category-list a:hover {*/
/*	color: #0a856a;*/
/*}*/

/* Ярлык типа товара */
.product-type-link {
	display: inline-block;
	font-size: 16px;
	font-weight: 500;
	color: #4D4C51;
	text-transform: lowercase;
	/* В макете подпись набрана без трекинга: с letter-spacing она выходила
	   шире, чем в refs (161px против 155px). */
	letter-spacing: 0;
	text-decoration: none;
	margin: 0;
	transition: color 0.2s ease;
}


/* Если нужно с дефисами (как slug) */
.product-type-link.slug-style {
	font-family: monospace;
	background: #f5f5f5;
	padding: 2px 8px;
	border-radius: 4px;
}

.wc-block-product-categories-list-item a {
	color: #4D4C51;
}

/* ========================================================================== */
/* Zhila layout system — matched to refs/ desktop and 360px compositions.     */
/* ========================================================================== */
:root {
	--zhila-bg: #f6f4eb;
	--zhila-ink: #14141e;
	--zhila-green: #0a856a;
	/* Поля страницы по макету: в refs/ левый край контента = 33px при 1200
	   и 105px при 1920 (линейно: 10vw - 87px). Контент при 1920 занимает
	   1710px, поэтому и верхняя граница ширины поднята с 1460px. */
	--zhila-desktop-gutter: clamp(24px, calc(10vw - 87px), 105px);
	--zhila-content: 1710px;
}

html,
body,
.wp-site-blocks {
	background: var(--zhila-bg);
	color: var(--zhila-ink);
}

body {
	margin: 0;
	font-family: Inter, sans-serif;
}

.wp-site-blocks {
	padding: 0;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

.alignwide,
.zhila-header-inner,
.zhila-footer-inner {
	width: min(calc(100% - (2 * var(--zhila-desktop-gutter))), var(--zhila-content));
	max-width: none !important;
	margin-inline: auto !important;
}

/* Header */
.zhila-home-hero {
	min-height: clamp(520px, 32vw, 650px);
	display: flex;
	flex-direction: column;
}

.zhila-home-header {
	position: relative;
	min-height: 100px;
	padding: 0 !important;
}

.zhila-home-header .wp-block-site-logo {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.zhila-home-intro {
	width: min(calc(100% - (2 * var(--zhila-desktop-gutter))), var(--zhila-content));
	max-width: none !important;
	margin: auto auto 0;
	padding-top: 0 !important;
	padding-bottom: clamp(42px, 4vw, 72px) !important;
}

.zhila-home-intro h2 {
	max-width: 1300px !important;
	font-size: clamp(36px, 3.1vw, 60px) !important;
	line-height: .98 !important;
	letter-spacing: -.025em;
}

.zhila-site-header {
	position: relative;
	z-index: 50;
	background: var(--zhila-bg);
}

.zhila-header-inner {
	display: grid !important;
	grid-template-columns: clamp(220px, 22vw, 340px) auto minmax(0, 1fr);
	align-items: center;
	min-height: 136px;
	padding: 0 !important;
}

.zhila-header-context {
	grid-column: 1;
	margin: 0;
	/* Кегль по макету: в refs/ высота капители 12px (≈16px кегля). */
	font-size: 16px;
	font-weight: 700;
}

.zhila-header-context a,
.zhila-site-header a {
	color: inherit;
	text-decoration: none;
}

.zhila-header-logo {
	position: static;
	grid-column: 2;
	justify-self: start;
	transform: none;
}

.zhila-header-logo img {
	width: clamp(106px, 8vw, 150px);
	height: auto;
	filter: brightness(0);
}

.zhila-header-actions {
	grid-column: 3;
	min-width: 0;
	justify-content: flex-end;
	/* Ритм из макета: 26px между иконками, меню отделено от иконок
	   дополнительным отступом (.zhila-primary-navigation). */
	gap: 26px !important;
}

.zhila-primary-navigation {
	margin-right: 20px;
	/* Кегль по макету: капитель пунктов меню 12px (≈16px кегля), было 14px. */
	font-size: 16px;
	font-weight: 500;
}

.zhila-primary-navigation .wp-block-navigation__container {
	gap: 48px;
}

.zhila-mobile-menu-only {
	display: none !important;
}

.zhila-header-search {
	margin: 0;
}

.zhila-header-search .wp-block-search__inside-wrapper {
	padding: 0;
	border: 0;
}

.zhila-header-search .wp-block-search__button {
	padding: 4px;
	background: transparent;
	color: var(--zhila-ink);
}

/* Раскрытое поле поиска стоит слева от иконки и «висит» на самом блоке поиска.
   Раньше оно было absolute с `right: 100%`, но позиционировалось относительно
   шапки (у .zhila-site-header и .zhila-home-header стоит position: relative):
   при закрытии поле уезжало к левому краю экрана, а в открытом состоянии
   стояло не на линии иконок. Содержащий блок — сам блок поиска (24px), поэтому
   поле и раскрывается, и схлопывается на месте, а `top: 50%` с translateY
   держит его по центру иконки на любой высоте. */
.zhila-header-search,
.zhila-search-front {
	position: relative;
}

.zhila-header-search .wp-block-search__input,
.zhila-search-front .wp-block-search__input {
	position: absolute;
	top: 50%;
	right: 100%;
	transform: translateY(-50%);
	z-index: 3;
	background: var(--zhila-bg);
	/* Поле всегда на кремовом фоне, поэтому текст в нём не должен наследовать
	   цвет шапки: на зелёной шапке героя (404, «спасибо за заказ») он был белым
	   и ввода не было видно. */
	color: var(--zhila-ink);
}

.zhila-header-actions .wc-block-mini-cart__button,
.zhila-header-actions .wp-block-woocommerce-customer-account a {
	padding: 4px;
}

.zhila-header-account {
	display: block;
}

@media (min-width: 783px) {
	.zhila-site-header .zhila-header-account {
		display: flex !important;
		visibility: visible !important;
	}

	.zhila-site-header .zhila-header-account a {
		display: flex !important;
		align-items: center;
		justify-content: center;
	}

	/* Размер тот же, что в общем правиле ниже (29px): коробка больше слота
	   24px, потому что глиф аккаунта нарисован с полями внутри viewBox. */
	.zhila-site-header .zhila-header-account svg {
		width: 29px;
		height: 29px;
	}
}

body.woocommerce-account .zhila-site-header .zhila-header-account,
body.woocommerce-account .zhila-home-header .wp-block-woocommerce-customer-account {
	display: none !important;
}

@media (min-width: 783px) and (max-width: 1439px) {
	.zhila-home-hero {
		min-height: 100px;
		background: var(--zhila-bg) !important;
		color: var(--zhila-ink) !important;
	}

	.zhila-home-intro {
		display: none;
	}

	.zhila-home-header,
	.zhila-home-header a,
	.zhila-home-header button,
	.zhila-home-header .wc-block-mini-cart__button,
	.zhila-home-header .wp-block-search__button,
	.zhila-home-header .wp-block-woocommerce-customer-account a {
		color: var(--zhila-ink) !important;
	}

	.zhila-home-header .wp-block-site-logo img {
		filter: brightness(0);
	}
}

/* 783–1099px: в шапке главной логотип спозиционирован по центру абсолютно, и
   при сужении пункты меню наезжали прямо на него (КАТАЛОГ/О НАС/СОТРУДНИЧЕСТВО
   уходили под «ЖИЛА»). До 1100px переводим шапку главной в компактный режим:
   логотип слева, иконки справа, навигация — в бургер-меню. */
@media (min-width: 783px) and (max-width: 1099px) {
	.zhila-home-header {
		display: flex;
		width: calc(100% - 48px) !important;
		min-height: 96px;
		padding: 0 !important;
		align-items: center;
		box-sizing: border-box;
	}

	.zhila-home-header > .wp-block-group:first-child {
		display: none;
	}

	.zhila-home-header .wp-block-site-logo {
		position: static;
		order: -1;
		margin-right: auto;
		transform: none;
	}

	.zhila-home-header > .wp-block-group:last-child {
		display: flex;
		align-items: center;
		gap: 12px;
		margin-left: auto;
	}

	.zhila-home-header .wp-block-woocommerce-customer-account {
		display: none !important;
	}

	.zhila-menu-toggle {
		display: block;
		flex: 0 0 24px;
		width: 24px;
		height: 24px;
		padding: 0;
		border: 0;
		background: transparent url('assets/icons/Burger.svg') center / 24px 24px no-repeat;
		cursor: pointer;
	}

	.zhila-home-header .wp-block-navigation__responsive-container-open {
		display: none !important;
	}
}

/* Иконки в шапке: одинаковый бокс, без подчёркивания и «прыжков» базовой
   линии. Раньше ♥-ссылка вишлиста рисовала под собой линию от text-decoration. */
.zhila-header-actions > *,
.zhila-header-actions a,
.zhila-header-actions button {
	text-decoration: none !important;
}

.zhila-header-actions .zhila-header-account a,
.zhila-header-actions .wc-block-mini-cart__button,
.zhila-header-actions .wp-block-search__button,
.zhila-home-header .wp-block-woocommerce-customer-account a {
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	line-height: 1;
}

/* WooCommerce отдаёт иконку аккаунта 16×16 (класс svg бывает и `icon`, и
   `wc-block-customer-account__account-icon`) — в шапке она должна совпадать
   по габариту с поиском и корзиной (24×24).

   Внимание: внутри ссылки и обёртки лежат пробельные текстовые ноды, которые
   во flex-контейнере становятся flex-элементами. Из-за них SVG сжимался по
   flex-shrink до ~6px и человечек превращался в «артефакт-полоску». Лечим
   нулевым font-size у обёрток и запретом сжатия самой иконки. */
.zhila-site-header .wp-block-woocommerce-customer-account,
.zhila-home-header .wp-block-woocommerce-customer-account,
.zhila-site-header .wp-block-woocommerce-customer-account a,
.zhila-home-header .wp-block-woocommerce-customer-account a {
	display: flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	font-size: 0;
	line-height: 0;
}

.zhila-site-header .wp-block-woocommerce-customer-account svg,
.zhila-home-header .wp-block-woocommerce-customer-account svg {
	/* 29px, а не 24 и не 20. WooCommerce отдаёт иконку аккаунта с viewBox
	   «1 1 29 29», в котором сам человечек занимает только 18×18.5 единицы
	   (x 7..25, y 7..25.5) — остальное поля. При коробке 24px чернила получались
	   ~15px, при 20px — ~12px, поэтому иконка выглядела заметно мельче поиска
	   и корзины (у их SVG глиф занимает почти всю коробку 24px). Коробка 29px
	   даёт чернила 18×18.5 — столько же, сколько у поиска (18×18) и корзины
	   (18×20). Коробка выходит за слот 24px (по 2.5px с каждой стороны), но глиф
	   центрирован, поэтому иконки остаются на своих местах, а зазор между ними
	   (20–26px по правилам шапки) больше этого прироста. */
	flex: 0 0 29px;
	width: 29px;
	height: 29px;
}

/* Ссылка на корзину вместо mini-cart-блока на страницах корзины и оформления
   (см. zhila_replace_mini_cart_on_cart_pages в inc/woocommerce.php). */
.zhila-header-cart-link {
	display: inline-flex;
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent url('assets/icons/Cart.svg') center / contain no-repeat;
}

@media (min-width: 1440px) {
	.zhila-home-header .zhila-header-cart-link,
	.zhila-home-hero .zhila-header-cart-link {
		background-image: url('assets/icons/CartWhite.svg');
	}
}

/* Вишлист временно выключен (нет страницы /wishlist/ в первой обнове).
   Возврат: раскомментировать блок и вернуть .zhila-header-wishlist в
   parts/header.html + parts/checkout-header.html.
.zhila-header-wishlist {
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
}
*/

/* Product and catalogue grids */
.zhila-products-with-filters {
	display: grid !important;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: clamp(36px, 5vw, 92px);
	width: min(calc(100% - (2 * var(--zhila-desktop-gutter))), var(--zhila-content));
	margin-inline: auto;
	align-items: start;
}

.zhila-products-with-filters > * {
	min-width: 0;
}

/* Коллекция товаров внутри колонки — это блок .alignwide, а общее правило
   .alignwide ужимает его на поля страницы ещё раз: карточки уезжали вправо
   на ширину этих полей. Внутри сетки отдаём ему всю колонку. */
.zhila-products-with-filters .wp-block-woocommerce-product-collection,
.zhila-products-with-filters .zhila-products {
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
}

/* При 1920 в макете колонка фильтров заметно шире (≈25% контента), из-за чего
   сетка карточек начинается примерно на 115px правее, чем при фиксированных
   220px. На 1200 текущие 220px + gap совпадают с макетом, поэтому меняем
   только от 1440. */
@media (min-width: 1440px) {
	.zhila-products-with-filters {
		/* Правки заказчика (1920): колонка фильтров = 2 колонки сетки
		   (2*200 + 16 = 416), между ней и карточками ровно 16px. Раньше gap
		   был 0, и карточки начинались на 17px левее макета. */
		grid-template-columns: minmax(0, var(--zhila-span-2)) minmax(0, 1fr);
		gap: var(--zhila-col-gap);
	}

	.zhila-filter {
		width: 100%;
	}
}

.wp-block-woocommerce-product-template,
.wc-block-product-template {
	gap: 44px 14px !important;
}

.wp-block-woocommerce-product-template.is-flex-container,
.wc-block-product-template.is-flex-container {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.zhila-products .wc-block-product-template {
	align-items: stretch;
}

.zhila-products .wc-block-product {
	display: flex !important;
	align-self: stretch;
	flex-direction: column;
}

.zhila-products .product-type-link {
	margin: 5px 0 0;
}

.zhila-products .zhila-product-price,
.zhila-products .wc-block-components-product-price {
	/* Фиксированный отступ, а не прижатие к низу карточки: в макете цена идёт
	   сразу под подписью на одном и том же расстоянии, даже если подписи нет. */
	margin: 0 !important;
	padding-top: 24px;
	color: var(--zhila-gray-75) !important;
	line-height: 1.25;
}

/* Цена в карточке набрана как подпись (16px), а не «medium» из theme.json:
   в макете цена совпадает по кеглю с подписью типа товара, только жирнее. */
.zhila-products .wc-block-components-product-price,
.zhila-products .wp-block-woocommerce-product-price,
.zhila-recommendations .wc-block-components-product-price,
.zhila-product-rail .wc-block-components-product-price {
	font-size: 16px !important;
	font-weight: 600;
	line-height: 1.25;
}

/* WooCommerce раздувает акционную цену (ins) до 1.25em, а старую (del) держит
   того же кегля. В макете наоборот: новая цена = кегль подписи, старая — мельче. */
.zhila-products .wc-block-components-product-price ins,
.zhila-recommendations .wc-block-components-product-price ins,
.zhila-product-rail .wc-block-components-product-price ins {
	font-size: 1em !important;
}

.zhila-products .wc-block-components-product-price del,
.zhila-recommendations .wc-block-components-product-price del,
.zhila-product-rail .wc-block-components-product-price del {
	font-size: .8em !important;
}

.zhila-products .wc-block-components-product-price > .woocommerce-Price-amount,
.zhila-products .zhila-product-price > .woocommerce-Price-amount {
	color: var(--zhila-gray-75) !important;
}

.zhila-products .wc-block-components-product-price ins,
.zhila-products .wc-block-components-product-price ins .woocommerce-Price-amount,
.zhila-products .zhila-product-price ins,
.zhila-products .zhila-product-price ins .woocommerce-Price-amount {
	color: var(--zhila-green) !important;
}

.zhila-products .wc-block-components-product-price del,
.zhila-products .wc-block-components-product-price del .woocommerce-Price-amount,
.zhila-products .zhila-product-price del,
.zhila-products .zhila-product-price del .woocommerce-Price-amount {
	color: #858485 !important;
}

.wc-block-product,
.product {
	min-width: 0;
}

.wc-block-components-product-image,
.wc-block-grid__product-image,
.wc-block-product .wp-block-woocommerce-product-image {
	position: relative;
	/* Отступ под фото до заголовка — по макету (refs/ Catalogue при 1200 и 1920). */
	margin: 0 0 30px;
}

/* Рамку карточки рисует её обёртка (.zhila-product-image-wrapper), а не сам
   <img>: в макете граница стоит по внешнему прямоугольнику 416×432, а фото
   лежит внутри с safe-зоной. Раньше border был здесь — карточка выглядела
   меньше макета, а фото прижималось к границе.

   Высота задаётся цепочкой «обёртка → WC-обёртка → ссылка → img» как 100%:
   ядро WordPress вешает на `img[sizes="auto"]` правило
   `contain-intrinsic-size: 3000px 1500px` (оптимизация ленивой загрузки), и
   если у картинки высота `auto`, браузер берёт этот «прогноз» — в рейлах
   главной фото становилось 1500px высотой и вылезало из рамки. Пока высота
   определена процентами от рамки, подсказка не используется. */
.wc-block-components-product-image img,
.wc-block-grid__product-image img,
.wp-block-woocommerce-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: auto;
	object-fit: contain;
	box-sizing: border-box;
}

.zhila-product-title,
.wc-block-product .wp-block-post-title {
	margin: 0 !important;
	text-align: left !important;
	/* В макете заголовок карточки заметно крупнее подписи-типа (20px против 16px). */
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: 0;
}

.wc-block-components-product-price,
.wc-block-grid__product-price {
	margin-top: 10px;
	font-size: 14px;
	font-weight: 600;
}

.wc-block-components-product-price .woocommerce-Price-amount:first-child {
	color: var(--zhila-green);
}

/* Single product */
.woocommerce.product > main {
	width: min(calc(100% - (2 * var(--zhila-desktop-gutter))), var(--zhila-content));
	max-width: none !important;
	margin-inline: auto;
}

.woocommerce.product > main > .wp-block-columns {
	display: grid;
	grid-template-columns: minmax(0, clamp(460px, 46vw, 680px)) minmax(300px, 1fr);
	gap: clamp(140px, 13vw, 250px);
	align-items: start;
}

.woocommerce.product .wp-block-post-title {
	font-size: clamp(34px, 3vw, 56px) !important;
	line-height: .98;
	text-transform: uppercase;
}

.woocommerce.product .wp-block-post-excerpt {
	font-size: 15px;
	line-height: 1.55;
}

.woocommerce-product-gallery__wrapper img {
	border: 1px solid var(--zhila-ink);
}

.size-selector-wrapper {
	max-width: 480px;
	margin-top: 52px;
}

.size-buttons {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 20px;
}

.size-btn {
	width: 100%;
	min-width: 0;
	height: 62px;
}

.size-add-btn {
	height: 62px;
	background: var(--zhila-ink);
}

/* Checkout/cart */
.zhila-checkout-block {
	display: block;
}

.zhila-checkout-block > form.checkout {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

.zhila-checkout {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 390px !important;
	gap: clamp(70px, 9vw, 170px) !important;
	width: min(calc(100% - (2 * var(--zhila-desktop-gutter))), var(--zhila-content)) !important;
	padding: 40px 0 120px !important;
	margin-inline: auto !important;
}

@media (min-width: 783px) and (max-width: 1279px) {
	.zhila-checkout {
		grid-template-columns: minmax(0, 1fr) minmax(320px, 360px) !important;
		gap: 48px !important;
	}
}

.custom-cart__item {
	grid-template-columns: 200px minmax(0, 1fr) minmax(90px, 120px);
	gap: clamp(20px, 3vw, 36px);
	align-items: start;
	min-height: 200px;
	padding: 20px 0;
	box-sizing: border-box;
}

.custom-cart__image {
	width: 200px;
	height: 200px;
}

.custom-cart__image img {
	width: 200px;
	height: 200px;
	aspect-ratio: 1;
	object-fit: contain;
}

.custom-cart__info,
.custom-cart__price {
	height: 200px;
	min-height: 200px;
	box-sizing: border-box;
}

.custom-cart__info {
	overflow: hidden;
}

.custom-cart__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.custom-cart__subtitle {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
}

.custom-cart__options {
	flex: 0 0 auto;
	/* Отдаём высоту содержимому: фиксированные 50px + overflow:hidden
	   обрезали нижнюю рамку квадратиков размера/количества. */
	height: auto;
	min-height: 50px;
	overflow: visible;
	margin-top: auto;
}

.custom-cart__price {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.custom-cart__lower {
	margin-top: auto;
}

.custom-cart__totals {
	margin: 0;
	padding: 0;
}

.zhila-proceed {
	top: 28px;
}

.zhila-checkout-fields .form-row {
	margin-bottom: 24px;
}

.zhila-checkout-fields input,
.zhila-checkout-fields select,
.zhila-checkout-fields textarea {
	width: 100%;
	min-height: 62px;
	padding: 14px 18px;
	border-radius: 0;
	box-sizing: border-box;
}

/* Footer */
.zhila-site-footer {
	min-height: 470px;
	padding: 70px 0 48px;
	background: var(--zhila-ink);
	color: var(--zhila-bg);
}

.zhila-site-footer a {
	color: inherit;
	text-decoration: none;
}

.zhila-footer-logo img {
	width: 150px;
	filter: brightness(0) invert(1);
}

.zhila-footer-columns {
	max-width: 850px;
	margin: -42px 0 70px auto;
	gap: 80px;
}

.zhila-footer-column p {
	margin: 0 0 13px;
	font-size: 13px;
	line-height: 1.25;
}

.zhila-footer-heading {
	margin-bottom: 24px !important;
	color: #858485;
	font-size: 11px !important;
}

.zhila-footer-socials {
	display: flex;
	gap: 14px;
	margin-top: 24px;
	font-weight: 700;
}

.zhila-payment-logos {
	margin: 0 0 0 230px;
	color: #bdbcb7;
	font-size: 28px;
	font-weight: 800;
}

@media (max-width: 782px) {
	:root {
		--zhila-desktop-gutter: 20px;
	}

	.alignwide,
	.zhila-header-inner,
	.zhila-footer-inner {
		width: calc(100% - 40px);
	}

	/* Mobile header */
	.zhila-cart-added-notice {
		top: 80px;
		right: 20px;
		left: 20px;
		justify-content: space-between;
		font-size: 12px;
	}

	#custom-wc-toasts {
		top: 78px;
		right: 20px;
		left: 20px;
		width: auto;
	}

	.zhila-toast {
		padding: 13px 10px 13px 14px;
		gap: 10px;
	}

	.zhila-toast__content {
		font-size: 12px;
	}
	.zhila-home-hero {
		min-height: 72px;
		background: var(--zhila-bg) !important;
		color: var(--zhila-ink) !important;
	}

	.zhila-home-header {
		min-height: 72px;
		width: calc(100% - 40px);
		color: var(--zhila-ink);
	}

	.zhila-home-header .wp-block-site-logo {
		position: static;
		transform: none;
		order: -1;
		margin-right: auto;
	}

	.zhila-home-header .wp-block-site-logo img {
		width: 96px;
		filter: brightness(0);
	}

	.zhila-home-header > .wp-block-group:last-child,
	.zhila-home-header .wc-block-mini-cart__button,
	.zhila-home-header .wp-block-search__button,
	.zhila-home-header .wp-block-woocommerce-customer-account a {
		color: var(--zhila-ink) !important;
	}

	.zhila-home-header .wp-block-navigation__container {
		display: none;
	}

	.zhila-home-header .wp-block-navigation__responsive-container-open {
		display: flex;
	}

	.zhila-home-intro {
		display: none;
	}

	.zhila-header-inner {
		display: flex !important;
		min-height: 72px;
	}

	.zhila-header-context,
	.zhila-primary-navigation .wp-block-navigation__container {
		display: none;
	}

	.zhila-header-logo {
		position: static;
		transform: none;
		margin-right: auto;
	}

	.zhila-header-logo img {
		width: 96px;
	}

	.zhila-header-actions {
		flex: 0 0 auto;
		gap: 8px !important;
	}

	.zhila-primary-navigation {
		order: 10;
	}

	.zhila-primary-navigation .wp-block-navigation__responsive-container-open {
		display: flex;
		padding: 4px;
	}

	.zhila-primary-navigation .wp-block-navigation__responsive-container.is-menu-open {
		position: fixed;
		inset: 0;
		display: flex;
		padding: 24px;
		background: var(--zhila-green) !important;
		color: var(--zhila-bg) !important;
	}

	.zhila-primary-navigation .wp-block-navigation__responsive-container-content {
		padding-top: 64px !important;
	}

	.zhila-primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		display: flex;
		width: 100%;
		align-items: stretch;
		gap: 0;
	}

	.zhila-primary-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		display: flex !important;
		width: 100%;
		padding: 14px 0;
		border-bottom: 1px solid rgba(246, 244, 235, .75);
		font-size: 13px;
	}

	.zhila-mobile-menu-only {
		display: flex !important;
	}

	body:has(.wp-block-navigation__responsive-container.is-menu-open) {
		overflow: hidden;
	}

	.zhila-header-search .wp-block-search__input,
	.zhila-header-account,
	/* WooCommerce не переносит className на блок аккаунта, поэтому класса
	   .zhila-header-account в разметке нет — цепляемся за сам блок. */
	.zhila-site-header .wp-block-woocommerce-customer-account {
		display: none;
	}

	/* Mobile catalogue */
	.zhila-products-with-filters {
		display: block !important;
		width: calc(100% - 40px);
		margin-inline: auto;
	}

	.zhila-filter {
		margin-bottom: 28px;
	}

	.zhila-filter details {
		padding: 12px 0;
		border-bottom: 1px solid var(--zhila-gray-25);
	}

	.wp-block-woocommerce-product-template.is-flex-container,
	.wc-block-product-template.is-flex-container,
	.wc-block-product-template__responsive,
	.wp-block-woocommerce-product-collection .wc-block-product-template {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 30px 7px !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.wc-block-product-template__responsive > li,
	.wc-block-product-template > li {
		width: auto !important;
		min-width: 0 !important;
	}

	.wc-block-components-product-image,
	.wc-block-grid__product-image,
	.wp-block-woocommerce-product-image {
		margin-bottom: 10px !important;
	}

	.zhila-product-title,
	.wc-block-product .wp-block-post-title {
		font-size: 12px !important;
	}

	/* В refs/Page_360x подпись и цена в карточке мельче заголовка
	   (≈10px и ≈12px по замеру чернил). */
	.product-type-link,
	.zhila-product-label,
	.taxonomy-product_label {
		font-size: 10px !important;
	}

	.zhila-products .wc-block-components-product-price,
	.zhila-products .wp-block-woocommerce-product-price {
		font-size: 12px !important;
	}

	.wc-block-components-product-price,
	.wc-block-grid__product-price {
		margin-top: 7px;
		font-size: 11px;
	}

	/* Mobile product */
	.woocommerce.product > main {
		width: calc(100% - 40px);
	}

	.woocommerce.product > main > .wp-block-columns {
		display: flex;
		flex-direction: column;
		gap: 22px;
		padding: 0 !important;
	}

	.woocommerce.product > main > .wp-block-columns > .wp-block-column {
		width: 100%;
	}

	.woocommerce.product .wp-block-post-title {
		font-size: 26px !important;
		line-height: .95;
		overflow-wrap: anywhere;
		word-break: normal;
	}

	.woocommerce.product .wc-block-product .wp-block-post-title {
		font-size: 11px !important;
		line-height: 1.25 !important;
		text-transform: none;
	}

	.woocommerce.product .wp-block-post-excerpt {
		font-size: 12px;
		line-height: 1.45;
	}

	.woocommerce-product-gallery {
		width: 100% !important;
		max-width: 100% !important;
		overflow: visible;
	}

	.woocommerce-product-gallery__image img {
		width: 100% !important;
		height: auto !important;
		object-fit: contain;
	}

	.size-selector-wrapper {
		max-width: none;
		margin: 38px 0 0;
	}

	.zhila-variation-selector .size-buttons,
	.size-selector-wrapper .size-buttons {
		display: grid !important;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 8px;
	}

	.size-btn {
		height: 46px;
		padding: 0;
		font-size: 13px;
	}

	.size-add-btn {
		height: 60px;
	}

	/* Mobile checkout */
	.zhila-checkout {
		display: flex !important;
		width: calc(100% - 48px) !important;
		padding: 8px 0 64px !important;
		flex-direction: column !important;
		gap: 42px !important;
	}

	.zhila-checkout > .cdek-zhila-selector {
		order: 2;
	}

	.zhila-checkout > :has(.zhila-proceed) {
		order: 3;
	}

	.custom-cart__item {
		position: relative;
		display: grid;
		grid-template-columns: 112px minmax(0, 1fr);
		grid-template-rows: 112px auto;
		gap: 16px;
		min-height: 0;
		padding: 8px 0;
	}

	.custom-cart__image img {
		width: 112px;
		height: 112px;
	}

	.custom-cart__image {
		width: 112px;
		height: 112px;
	}

	.custom-cart__info {
		height: 112px;
		min-height: 112px;
		padding-right: 30px;
		box-sizing: border-box;
	}

	.custom-cart__title {
		max-width: 100%;
		white-space: normal !important;
		overflow-wrap: anywhere;
		line-height: 1.15;
	}

	.custom-cart__title {
		font-size: 16px;
	}

	.custom-cart__options {
		height: auto;
		max-height: none;
		gap: 8px;
		overflow: hidden;
	}

	.custom-cart__size,
	.custom-cart__qty {
		width: auto;
		height: auto;
		border: 0;
		justify-content: flex-start;
		font-size: 12px;
		font-weight: 400;
	}

	.custom-cart__price {
		grid-column: 2;
		display: block;
		height: auto;
		min-height: 0;
		margin-top: -2px;
		font-size: 18px;
		text-align: left;
	}

	.custom-cart__remove {
		position: absolute;
		top: 10px;
		right: 0;
		width: 24px;
		height: 24px;
		font-size: 0;
		text-decoration: none;
	}

	.custom-cart__remove::before,
	.custom-cart__remove::after {
		content: '';
		position: absolute;
		top: 11px;
		left: 3px;
		width: 18px;
		height: 1px;
		background: currentColor;
		transform: rotate(45deg);
	}

	.custom-cart__remove::after {
		transform: rotate(-45deg);
	}

	.shipment-buttons {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 9px;
	}

	.shipment-btn {
		width: 100%;
		min-width: 0;
		height: 48px;
		padding: 4px;
		font-size: 10px;
		text-align: center;
	}

	.zhila-checkout-fields input {
		min-height: 48px;
	}

	.custom-cart__total-row {
		padding: 13px 0;
		font-size: 16px;
	}

	.zhila-proceed .size-add-btn {
		margin-top: 30px;
		background: var(--zhila-gray-25);
	}

	/* Mobile footer */
	.zhila-site-footer {
		min-height: 0;
		padding: 28px 0 24px;
	}

	.zhila-footer-logo img {
		width: 98px;
	}

	.zhila-footer-columns {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 18px 28px;
		margin: 42px 0 38px;
	}

	.zhila-footer-columns > .wp-block-column {
		width: auto !important;
		flex-basis: auto !important;
		margin: 0 !important;
	}

	.zhila-footer-offer {
		grid-column: 2;
	}

	.zhila-footer-column p {
		font-size: 11px;
	}

	.zhila-footer-heading {
		font-size: 9px !important;
	}

	.zhila-payment-logos {
		margin: 0;
		white-space: nowrap;
		font-size: 23px;
	}
}
.wc-block-components-product-title a,
.wp-block-post-title a {
	color: var(--zhila-ink) !important;
}

/* Анимация тряски для input/select/textarea */
@keyframes zhila-shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
	20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Класс анимации для input */
.zhila-shake-animation {
	animation: zhila-shake 0.5s ease-in-out !important;
}

/* Красные поля */
.form-row.zhila-field-invalid input,
.form-row.zhila-field-invalid select,
.form-row.zhila-field-invalid textarea {
	border-color: #AF372D !important;
	color: #AF372D !important;
}

/* Красные плейсхолдеры */
.form-row.zhila-field-invalid input::placeholder,
.form-row.zhila-field-invalid textarea::placeholder {
	color: #AF372D !important;
	opacity: 0.6;
}

/* Красные лейблы */
.form-row.zhila-field-invalid label {
	color: #AF372D !important;
	position: relative;
	padding-right: 24px; /* место под иконку справа */
}

/* Иконка ошибки */
.zhila-error-icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 6px;
	vertical-align: middle;
}

/* Сама иконка — SVG прямо в CSS (16px, прижата к правому краю лейбла) */
.form-row.zhila-field-invalid label::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	background-image: url("assets/icons/validation_failure.svg");
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
}

.cdek-zhila-selector.zhila-field-invalid {
	border: 2px solid #AF372D !important;
	border-radius: 8px;
	padding: 15px !important;
}
.zhila-cdek-error {
	color: #AF372D;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 15px;
	padding: 10px;
	background-color: #fff5f5;
	border-radius: 4px;
	border-left: 3px solid #AF372D;
}

/*TODO: расскоментить если нужны будут бейджи на распродажу в карточке товара*/
.onsale {
	display: none !important;
}

.wc-block-mini-cart__badge[hidden] {
	display: none !important;
}

.zhila-product-title {
	margin-bottom: 0px !important;
	margin-top: 0px !important;
}

.zhila-product-image-wrapper {
	width: 100% !important;
	height: auto !important;
	min-width: 0;
	box-sizing: border-box;
	/* Рамка карточки в макете 1920 — 416×432, а не квадрат: при ratio 1 весь
	   вертикальный ритм карточек уезжал вверх относительно refs/. */
	aspect-ratio: 416 / 432;
	/* Граница — по внешнему прямоугольнику макета (п.3Б: фото не должно
	   упираться в границу), фото внутри с safe-зоной. */
	border: 1px solid var(--zhila-ink);
	padding: 4%;
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Отступ от фото до заголовка карточки — по макету (refs/: 33px от рамки до
   верхушки букв при 1200 и 1920). */
.zhila-products .zhila-product-image-wrapper {
	margin: 0 0 28px;
}

.zhila-product-image-wrapper img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
}

/* WooCommerce оборачивает картинку в .wc-block-components-product-image и вешает
   на неё margin-bottom (15px в каталоге, 12px в рейлах). Внутри рамки с
   overflow:hidden этот отступ центрируется и сдвигает картинку вверх — верхняя
   граница уезжает за край и обрезается. Прижимаем WC-обёртку к рамке и
   центрируем фото по вертикали.

   `height: 100% !important` нужен всей цепочке (обёртка → ссылка → img):
   если ссылка остаётся с высотой auto, доля 100% у <img> не разрешается и
   в дело вступает `contain-intrinsic-size` из ядра (см. базовое правило <img>
   выше) — фото становится 1500px высотой. */
.wc-block-product .zhila-product-image-wrapper > .wc-block-components-product-image,
.wc-block-product .zhila-product-image-wrapper > .wc-block-grid__product-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100% !important;
	min-height: 0;
	margin: 0 !important;
	aspect-ratio: auto;
}

.wc-block-product .zhila-product-image-wrapper > .wc-block-components-product-image > a,
.wc-block-product .zhila-product-image-wrapper > .wc-block-grid__product-image > a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100% !important;
	max-height: 100%;
}

.zhila-product-image-wrapper > .wc-block-components-product-image > a,
.zhila-product-image-wrapper > .wc-block-grid__product-image > a {
	display: block;
	width: 100%;
	height: 100%;
}

.zhila-products .wc-block-product,
.zhila-products .wc-block-product:hover,
.zhila-products .wc-block-product:focus-within,
.zhila-products .wc-block-components-product-image,
.zhila-products .wc-block-components-product-image:hover,
.zhila-products .zhila-product-image-wrapper,
.zhila-products .zhila-product-image-wrapper:hover,
.zhila-products .wc-block-components-product-image > a,
.zhila-products .wc-block-components-product-image > a:hover {
	background: transparent !important;
	background-color: transparent !important;
}

.zhila-products .wc-block-product a:focus-visible {
	outline: 2px solid var(--zhila-green);
	outline-offset: 3px;
}

/* Mobile corrections for legacy fixed-size home carousel rules above. */
@media (max-width: 782px) {
	.zhila-products-with-filters .zhila-filter {
		margin-top: 0 !important;
	}

	.zhila-products-with-filters .wp-block-woocommerce-product-collection,
	.zhila-products-with-filters .wc-block-product-template {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
	}

	.zhila-products-with-filters .zhila-product-image-wrapper {
		width: 100% !important;
		height: auto !important;
		min-width: 0 !important;
		/* Пропорция рамки одна на всех ширинах: квадрат на мобилке ломал
		   вертикальный ритм карточки относительно desktop-версии и refs/. */
		aspect-ratio: 416 / 432;
	}

	.zhila-products-with-filters .zhila-carousel-header {
		max-width: 100%;
		font-size: 20px !important;
		line-height: 1.1;
		overflow-wrap: anywhere;
	}

	.zhila-checkout .shipment-buttons {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 5px !important;
	}

	.zhila-checkout .shipment-option,
	.zhila-checkout .shipment-btn {
		width: 100% !important;
		min-width: 0 !important;
		padding-inline: 4px !important;
		font-size: 9px;
	}

	.zhila-checkout-fields,
	.zhila-checkout-fields .form-row,
	.zhila-checkout .shipment-selector-wrapper,
	.zhila-checkout .cdek-zhila-selector,
	.zhila-checkout .cdek-zhila-map {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
	}
}

/* Product composition and reusable recommendations rail. */
.zhila-single-product > main {
	width: min(calc(100% - 80px), 1360px);
	max-width: none !important;
	margin-inline: auto;
}

.zhila-single-product .zhila-product-layout {
	--zhila-product-copy-width: 480px;
	display: grid !important;
	grid-template-columns: minmax(0, 560px) minmax(320px, 416px);
	grid-template-areas:
		"gallery breadcrumbs"
		"gallery info";
	column-gap: clamp(72px, 13vw, 160px);
	row-gap: 20px;
	align-items: start;
	justify-content: start;
	width: 100% !important;
	max-width: 1360px !important;
	padding: 54px 0 34px;
	margin-inline: auto !important;
	margin-bottom: 34px !important;
}

.zhila-product-gallery-column,
.zhila-product-breadcrumbs,
.zhila-product-summary,
.zhila-product-info {
	padding-top: 25px;
	min-width: 0;
}

.zhila-product-gallery-column {
	grid-area: gallery;
}

.zhila-product-breadcrumbs {
	grid-area: breadcrumbs;
	justify-self: start;
	width: min(100%, var(--zhila-product-copy-width));
	max-width: var(--zhila-product-copy-width);
	box-sizing: border-box;
	margin: 0;
}

.zhila-product-info {
	grid-area: info;
	justify-self: start;
	width: min(100%, var(--zhila-product-copy-width));
	max-width: var(--zhila-product-copy-width);
	box-sizing: border-box;
	margin: 0;
}

.zhila-single-product .woocommerce-product-gallery {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	opacity: 1 !important;
}

.zhila-product-gallery-column .wp-block-woocommerce-product-image-gallery {
	width: 100% !important;
	max-width: none !important;
}

.zhila-single-product .woocommerce-product-gallery__image > a {
	display: block;
	box-sizing: border-box;
	aspect-ratio: 1;
	overflow: hidden;
	border: 1px solid #14141e;
}

.zhila-single-product .woocommerce-product-gallery__image > a > img,
.zhila-single-product .woocommerce-product-gallery__image--placeholder img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
}

.zhila-single-product .flex-control-thumbs {
	margin: 14px 0 0 !important;
}

.zhila-single-product .flex-control-thumbs img {
	box-sizing: border-box;
	border: 1px solid transparent;
	object-fit: cover;
}

.zhila-single-product .flex-control-thumbs img.flex-active {
	border-color: #14141e;
}

.zhila-product-breadcrumbs > .wc-block-breadcrumbs,
.zhila-product-breadcrumbs > .wp-block-breadcrumbs,
.zhila-product-breadcrumbs .woocommerce-breadcrumb {
	width: 100% !important;
	max-width: none !important;
	box-sizing: border-box;
	margin-right: 0 !important;
	margin-left: 0 !important;
	text-align: left;
}

.zhila-product-breadcrumbs > .wc-block-breadcrumbs,
.zhila-product-breadcrumbs > .wp-block-breadcrumbs {
	justify-self: stretch;
	font-size: 11px !important;
}

.zhila-product-breadcrumbs .woocommerce-breadcrumb {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	color: #858485;
	font-size: inherit !important;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.woocommerce-breadcrumb,
.wc-block-components-breadcrumbs,
.wc-block-breadcrumbs {
	box-sizing: border-box;
	max-width: 100%;
	font-size: clamp(10px, .72vw, 12px);
	line-height: 1.4;
	letter-spacing: .01em;
	overflow-wrap: break-word;
	word-break: normal;
}

.woocommerce-breadcrumb a,
.wc-block-components-breadcrumbs a,
.wc-block-breadcrumbs a {
	white-space: nowrap;
}

.zhila-product-summary > .wp-block-post-title {
	max-width: 520px;
	margin: 0 0 25px !important;
	color: #14141e;
	font-size: clamp(36px, 3vw, 54px) !important;
	font-weight: 700 !important;
	line-height: .98 !important;
	text-transform: uppercase;
}

.zhila-product-summary > .wp-block-post-excerpt,
.zhila-product-summary .zhila-product-description {
	width: 100%;
	max-width: var(--zhila-product-copy-width);
	box-sizing: border-box;
	margin: 0 0 18px;
	color: #4d4c51;
	font-size: 15px;
	line-height: 1.5;
}

.zhila-product-description > :first-child {
	margin-top: 0;
}

.zhila-product-description > :last-child {
	margin-bottom: 0;
}

.zhila-single-product-price,
.zhila-selected-variation-price {
	min-height: 24px;
	margin: 0 0 12px;
	color: #14141e;
	font-size: 18px;
	font-weight: 600;
}

.zhila-product-info > .zhila-single-product-price,
.zhila-product-info .zhila-selected-variation-price {
	width: 100%;
	max-width: var(--zhila-product-copy-width);
	box-sizing: border-box;
}

.zhila-selected-variation-price:empty {
	display: none;
}

.zhila-size-guide {
	display: inline-block;
	margin: 0 0 52px;
	color: #4d4c51;
	font-size: 14px;
	text-decoration: underline;
}

.zhila-product-summary .size-selector-wrapper {
	width: 100%;
	max-width: var(--zhila-product-copy-width);
	margin-top: 0;
}

.zhila-product-summary .size-buttons {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 20px;
}

.zhila-product-summary .size-buttons > br,
.zhila-product-summary .size-buttons > p {
	display: none !important;
}

.zhila-product-summary .size-option,
.zhila-product-summary .size-btn {
	width: 100%;
	min-width: 0;
}

.zhila-product-summary .size-option:disabled .size-btn {
	border-color: var(--zhila-gray-25);
	color: var(--zhila-gray-50);
	text-decoration: line-through;
	cursor: not-allowed;
}

.zhila-product-summary .size-add-btn {
	height: 62px;
}

.zhila-care-guide {
	display: inline-block;
	margin-top: 16px;
	color: #4d4c51;
	font-size: 13px;
	text-decoration: underline;
}

.zhila-simple-product-selector .size-add-btn {
	display: flex;
	box-sizing: border-box;
	width: 100%;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.zhila-variation-selector .added_to_cart.wc-forward {
	display: none !important;
}

.zhila-recommendations,
.zhila-product-rail {
	position: relative;
	width: 100%;
	max-width: none !important;
	overflow: visible;
}

.zhila-recommendations {
	padding: 0 0 110px;
	margin-inline: 0 !important;
}

.zhila-recommendations__title {
	margin: 0 !important;
	font-size: clamp(32px, 3vw, 48px) !important;
	font-weight: 600 !important;
}

.zhila-rail-heading {
	display: flex;
	width: 100%;
	max-width: none !important;
	min-width: 0;
	margin: 0 0 50px !important;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

/* The Product Collection block constrains ordinary children to contentSize.
 * The rail header belongs to the full-width track, so keep both edges aligned. */
.zhila-recommendations > .zhila-rail-heading,
.zhila-product-rail > .zhila-rail-heading {
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
}

body.single-product .zhila-single-product .zhila-recommendations .zhila-rail-heading {
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
}

.zhila-rail-heading .zhila-carousel-header {
	margin: 0 !important;
}

.zhila-rail-controls-mount {
	display: flex;
	flex: 0 0 auto;
}

.zhila-recommendations .wc-block-product-template,
.zhila-product-rail .wc-block-product-template {
	display: flex !important;
	grid-template-columns: none !important;
	align-items: flex-start;
	gap: 14px !important;
	width: 100%;
	padding: 0 0 12px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	flex-wrap: nowrap !important;
}

.zhila-recommendations .wc-block-product-template::-webkit-scrollbar,
.zhila-product-rail .wc-block-product-template::-webkit-scrollbar {
	display: none;
}

.zhila-recommendations .wc-block-product {
	flex: 0 0 calc((100% - 42px) / 4);
	min-width: 240px;
	width: calc((100% - 42px) / 4) !important;
	margin: 0 !important;
	padding: 0 !important;
	align-self: flex-start;
	scroll-snap-align: start;
}

.zhila-product-rail .wc-block-product {
	flex: 0 0 calc((100% - 28px) / 3);
	min-width: 260px;
	width: calc((100% - 28px) / 3) !important;
	margin: 0 !important;
	padding: 0 !important;
	align-self: stretch;
	scroll-snap-align: start;
}

.zhila-recommendations .wc-block-product {
	position: relative !important;
	/* Раньше здесь была grid-сетка с жёсткими строками (auto 36px 30px 25px).
	   На узких карточках (мобильный рейл) заголовок и подпись занимали больше
	   строк, чем предусматривала строка сетки, и текст налезал на цену.
	   Флекс-колонка с прижатой к низу ценой ведёт себя корректно на любой ширине. */
	display: flex !important;
	flex-direction: column;
	align-self: stretch;
	top: auto !important;
	transform: none !important;
	margin-block-start: 0 !important;
}

.zhila-product-rail .wc-block-product-template {
	align-items: stretch;
}

.zhila-product-rail .wc-block-product {
	position: relative !important;
	display: flex !important;
	flex-direction: column;
	top: auto !important;
	transform: none !important;
	margin-block-start: 0 !important;
}

.zhila-product-rail .zhila-product-price,
.zhila-product-rail .wc-block-components-product-price {
	width: 100%;
	align-self: stretch;
	justify-content: flex-start;
	margin-top: auto !important;
	color: var(--zhila-gray-75) !important;
	text-align: left !important;
}

.zhila-product-rail .wp-block-woocommerce-product-image,
.zhila-product-rail .wc-block-components-product-image,
.zhila-product-rail .zhila-product-image-wrapper {
	height: auto !important;
	box-sizing: border-box;
}

/* В рейлах картинку оборачивает .zhila-product-image-wrapper (WC не применяет
   className блока), поэтому отступ до заголовка задаём ей, как в каталоге. */
.zhila-recommendations .zhila-product-image-wrapper,
.zhila-product-rail .zhila-product-image-wrapper {
	margin: 0 0 28px !important;
}

.zhila-product-rail .wc-block-components-product-price > .woocommerce-Price-amount,
.zhila-product-rail .zhila-product-price > .woocommerce-Price-amount {
	color: var(--zhila-gray-75) !important;
}

.zhila-product-rail .wc-block-components-product-price ins,
.zhila-product-rail .wc-block-components-product-price ins .woocommerce-Price-amount,
.zhila-product-rail .zhila-product-price ins,
.zhila-product-rail .zhila-product-price ins .woocommerce-Price-amount {
	color: var(--zhila-green) !important;
}

.zhila-product-rail .wc-block-components-product-price del,
.zhila-product-rail .wc-block-components-product-price del .woocommerce-Price-amount,
.zhila-product-rail .zhila-product-price del,
.zhila-product-rail .zhila-product-price del .woocommerce-Price-amount {
	color: #858485 !important;
}

.zhila-recommendations .wc-block-product > :first-child,
.zhila-product-rail .wc-block-product > :first-child,
.zhila-recommendations .wc-block-product .wp-block-woocommerce-product-image,
.zhila-product-rail .wc-block-product .wp-block-woocommerce-product-image {
	margin-top: 0 !important;
}

.zhila-recommendations .wp-block-woocommerce-product-image,
.zhila-recommendations .wc-block-components-product-image,
.zhila-product-rail .wp-block-woocommerce-product-image,
.zhila-product-rail .wc-block-components-product-image {
	width: 100% !important;
	margin: 0 0 28px !important;
	aspect-ratio: 1;
}

.zhila-recommendations .wp-block-woocommerce-product-image a,
.zhila-recommendations .wc-block-components-product-image a,
.zhila-product-rail .wp-block-woocommerce-product-image a,
.zhila-product-rail .wc-block-components-product-image a {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}

.zhila-recommendations .wp-block-woocommerce-product-image img,
.zhila-recommendations .wc-block-components-product-image img,
.zhila-product-rail .wp-block-woocommerce-product-image img,
.zhila-product-rail .wc-block-components-product-image img {
	display: block;
	width: 100% !important;
	/* 100%, а не auto: иначе срабатывает `contain-intrinsic-size` ядра и фото
	   раздувается до 1500px (см. базовое правило <img> выше). */
	height: 100% !important;
	max-height: 100%;
	margin: 0 !important;
	object-fit: contain;
}

.zhila-recommendations .zhila-product-title,
.zhila-recommendations .wp-block-post-title,
.zhila-product-rail .zhila-product-title,
.zhila-product-rail .wp-block-post-title {
	align-self: start;
	margin: 0 0 8px !important;
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.zhila-recommendations .zhila-product-label,
.zhila-recommendations .taxonomy-product_label,
.zhila-recommendations .product-type-link,
.zhila-product-rail .zhila-product-label,
.zhila-product-rail .taxonomy-product_label,
.zhila-product-rail .product-type-link {
	align-self: start;
	/* Отступ «подпись → цена» задаёт padding-top у цены (как в каталоге),
	   иначе 18px складывались с ним и цена уезжала вниз. */
	margin: 0 !important;
	line-height: 1.25;
}

.zhila-recommendations .zhila-product-price,
.zhila-recommendations .wc-block-components-product-price,
.zhila-product-rail .zhila-product-price,
.zhila-product-rail .wc-block-components-product-price {
	align-self: stretch;
	display: flex;
	/* Такой же фиксированный ритм, как в каталоге: цена сразу под подписью. */
	margin: 0 !important;
	padding-top: 24px;
	align-items: baseline;
	gap: 8px;
	line-height: 1.25;
	white-space: nowrap;
}

.zhila-recommendations .wc-block-components-product-price ins,
.zhila-recommendations .wc-block-components-product-price del,
.zhila-product-rail .wc-block-components-product-price ins,
.zhila-product-rail .wc-block-components-product-price del {
	display: inline-flex;
	margin: 0;
	align-items: baseline;
	line-height: inherit;
}

.zhila-single-product .zhila-recommendations .wp-block-post-title,
.zhila-single-product .zhila-recommendations .zhila-product-title {
	margin: 0 0 8px !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: 0;
	text-transform: uppercase;
}

.zhila-single-product .zhila-recommendations .zhila-product-label,
.zhila-single-product .zhila-recommendations .taxonomy-product_label {
	margin: 0 0 18px !important;
	font-size: 16px !important;
}

.zhila-rail-controls {
	position: static;
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

.zhila-rail-arrow {
	width: 44px;
	height: 44px;
	border: 1px solid #14141e;
	background: #f6f4eb;
	color: #14141e;
	font-size: 22px;
	cursor: pointer;
}

.zhila-rail-arrow:disabled {
	opacity: 0;
	pointer-events: none;
}

/* Catalogue rails use the same muted regular price as the product label. */
.zhila-product-price,
.zhila-product-price .wc-block-components-product-price,
.zhila-recommendations .wc-block-components-product-price {
	color: var(--zhila-gray-75) !important;
}

.zhila-product-price .woocommerce-Price-amount,
.zhila-recommendations .woocommerce-Price-amount {
	color: var(--zhila-gray-75) !important;
}

/* The cart and the single-product price remain black. */
.zhila-single-product-price,
.zhila-selected-variation-price {
	color: #14141e !important;
}

.zhila-single-product-price .woocommerce-Price-amount,
.zhila-selected-variation-price .woocommerce-Price-amount {
	color: #14141e !important;
}

.zhila-product-price ins,
.zhila-recommendations ins,
.zhila-single-product-price ins,
.zhila-selected-variation-price ins,
.zhila-product-price ins .woocommerce-Price-amount,
.zhila-recommendations ins .woocommerce-Price-amount,
.zhila-single-product-price ins .woocommerce-Price-amount,
.zhila-selected-variation-price ins .woocommerce-Price-amount {
	color: #0a856a !important;
	font-weight: 700;
	text-decoration: none;
}

.zhila-product-price del,
.zhila-recommendations del,
.zhila-single-product-price del,
.zhila-selected-variation-price del,
.zhila-product-price del .woocommerce-Price-amount,
.zhila-recommendations del .woocommerce-Price-amount,
.zhila-single-product-price del .woocommerce-Price-amount,
.zhila-selected-variation-price del .woocommerce-Price-amount {
	color: #858485 !important;
	font-size: .8em;
}

.zhila-checkout-agreement {
	margin: 14px 0 0;
	font-size: 11px;
	font-style: italic;
	line-height: 1.35;
}

.zhila-checkout-agreement a {
	color: inherit;
	text-decoration: underline;
}

#z-totals-shipping-cost[data-state="loading"] {
	color: var(--zhila-gray-50);
	font-size: 13px;
}

.zhila-menu-toggle,
.zhila-menu-overlay {
	display: none;
}

@media (min-width: 783px) and (max-width: 1100px) {
	.zhila-single-product > main {
		width: calc(100% - 48px);
	}

	.zhila-single-product .zhila-product-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"breadcrumbs"
			"gallery"
			"info";
		gap: 24px;
		padding-top: 36px;
	}

	.zhila-product-info {
		max-width: var(--zhila-product-copy-width);
	}

	.zhila-product-summary > .wp-block-post-title {
		font-size: clamp(32px, 4vw, 42px) !important;
	}

	.zhila-product-summary .size-buttons {
		gap: 8px;
	}

	.zhila-checkout {
		width: calc(100% - 48px) !important;
		padding-right: 0 !important;
		padding-left: 0 !important;
	}

	.zhila-products-with-filters {
		width: calc(100% - 48px);
		min-width: 0;
	}

	.zhila-products-with-filters .wp-block-woocommerce-product-template.is-flex-container,
	.zhila-products-with-filters .wc-block-product-template.is-flex-container,
	.zhila-products-with-filters .wc-block-product-template__responsive,
	.zhila-products-with-filters .wp-block-woocommerce-product-collection .wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.zhila-product-rail .wc-block-product,
	.zhila-recommendations .wc-block-product {
		min-width: 220px;
	}
}

@media (max-width: 782px) {
	.zhila-product-summary .woocommerce-breadcrumb,
	.woocommerce-breadcrumb,
	.wc-block-components-breadcrumbs,
	.wc-block-breadcrumbs {
		display: -webkit-box;
		max-height: 2.8em;
		margin-bottom: 18px;
		overflow: hidden;
		font-size: 10px;
		line-height: 1.4;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.zhila-single-product > main {
		width: calc(100% - 40px);
		padding-inline: 0;
	}

	.zhila-single-product .zhila-product-layout {
		--zhila-product-copy-width: 100%;
		display: grid !important;
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"breadcrumbs"
			"gallery"
			"info";
		padding: 16px 0 58px;
		gap: 24px;
	}

	.zhila-product-gallery-column,
	.zhila-product-breadcrumbs,
	.zhila-product-summary,
	.zhila-product-info {
		width: 100%;
		max-width: 100%;
	}

	.zhila-product-breadcrumbs > .wc-block-breadcrumbs,
	.zhila-product-breadcrumbs > .wp-block-breadcrumbs {
		font-size: 10px !important;
	}

	.zhila-product-summary > .wp-block-post-title {
		width: 100%;
		max-width: 100%;
		font-size: 28px !important;
		line-height: 1 !important;
		overflow-wrap: anywhere;
	}

	.zhila-product-summary .size-buttons {
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
		gap: 7px;
	}

	.zhila-product-summary .size-btn {
		height: 48px;
		padding: 0;
		font-size: 12px;
	}

	.zhila-size-guide {
		margin-bottom: 28px;
	}

	.zhila-recommendations {
		padding-bottom: 64px;
	}

	.zhila-recommendations__title {
		margin-bottom: 0 !important;
		font-size: 28px !important;
	}

	.zhila-rail-heading {
		margin-bottom: 28px !important;
		gap: 12px;
	}

	.zhila-recommendations .wc-block-product {
		flex-basis: calc((100% - 7px) / 2);
		min-width: 0;
		width: calc((100% - 7px) / 2) !important;
	}

	.zhila-product-rail .wc-block-product {
		flex-basis: calc((100% - 7px) / 2);
		min-width: 0;
		width: calc((100% - 7px) / 2) !important;
	}

	.zhila-rail-controls {
		position: static;
	}

	.zhila-rail-arrow {
		width: 36px;
		height: 36px;
	}

	.wp-block-woocommerce-product-collection .wc-block-components-product-price,
	.wp-block-woocommerce-product-collection .zhila-product-price,
	.zhila-recommendations .wc-block-components-product-price {
		font-size: 11px !important;
		line-height: 1.25;
	}

	.wp-block-woocommerce-product-collection .wc-block-components-product-price ins,
	.wp-block-woocommerce-product-collection .wc-block-components-product-price ins .woocommerce-Price-amount,
	.wp-block-woocommerce-product-collection .zhila-product-price ins,
	.wp-block-woocommerce-product-collection .zhila-product-price ins .woocommerce-Price-amount,
	.zhila-recommendations ins,
	.zhila-recommendations ins .woocommerce-Price-amount {
		font-size: 1em !important;
	}

	.wp-block-woocommerce-product-collection .wc-block-components-product-price del,
	.wp-block-woocommerce-product-collection .wc-block-components-product-price del .woocommerce-Price-amount,
	.wp-block-woocommerce-product-collection .zhila-product-price del,
	.wp-block-woocommerce-product-collection .zhila-product-price del .woocommerce-Price-amount,
	.zhila-recommendations del,
	.zhila-recommendations del .woocommerce-Price-amount {
		font-size: 9px !important;
	}

	.zhila-menu-toggle {
		display: block;
		flex: 0 0 24px;
		width: 24px;
		height: 24px;
		padding: 0;
		border: 0;
		background: transparent url('assets/icons/Burger.svg') center / 24px 24px no-repeat;
		cursor: pointer;
	}

	.wp-block-navigation__responsive-container-open {
		display: none !important;
	}

	.zhila-menu-overlay {
		position: fixed;
		inset: 0;
		z-index: 1000000;
		display: block;
		padding: 22px 24px;
		background: var(--zhila-green);
		color: #f6f4eb;
	}

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

	.zhila-menu-overlay__top {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.zhila-menu-overlay__logo img {
		display: block;
		width: 98px;
		filter: brightness(0) invert(1);
	}

	.zhila-menu-overlay__logo span {
		color: #f6f4eb;
		font-size: 30px;
		font-weight: 800;
	}

	.zhila-menu-overlay__actions {
		display: flex;
		align-items: center;
		gap: 14px;
	}

	.zhila-menu-icon,
	.zhila-menu-close {
		display: inline-flex;
		width: 20px;
		height: 20px;
		padding: 0;
		align-items: center;
		justify-content: center;
		border: 0;
		background: transparent;
		color: #f6f4eb;
		font-size: 24px;
		line-height: 1;
		text-decoration: none;
	}

	.zhila-menu-icon--search {
		background: url('assets/icons/SearchWhite.svg') center / contain no-repeat;
	}

	.zhila-menu-icon--cart {
		background: url('assets/icons/CartWhite.svg') center / contain no-repeat;
	}

	.zhila-menu-overlay__nav {
		display: grid;
		margin-top: 34px;
	}

	.zhila-menu-overlay__nav a {
		padding: 12px 0;
		border-bottom: 1px solid rgba(246, 244, 235, .85);
		color: inherit;
		font-size: 13px;
		text-decoration: none;
	}

	.zhila-menu-overlay__nav a:last-child {
		border-bottom: 0;
	}

	body.zhila-menu-open {
		overflow: hidden;
	}

	.zhila-home-header {
		display: flex;
		width: calc(100% - 40px) !important;
		min-height: 72px;
		padding: 0 !important;
		align-items: center;
		box-sizing: border-box;
	}

	.zhila-home-header > .wp-block-group:first-child {
		display: none;
	}

	.zhila-home-header > .wp-block-group:last-child {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-left: auto;
	}

	.zhila-home-header .wp-block-woocommerce-customer-account {
		display: none !important;
	}

	/* Вишлист временно выключен — см. базовый блок .zhila-header-wishlist.
	.zhila-home-header .zhila-header-wishlist {
		display: inline-flex;
		color: #14141e !important;
	}
	*/

	.custom-cart__total-row > :last-child {
		max-width: 58%;
		text-align: right;
		overflow-wrap: anywhere;
	}

	.zhila-cart-added-notice {
		top: 78px;
		right: 20px;
		left: 20px;
		max-width: none;
	}
}

/* ==========================================================================
   Планшетный диапазон 783–1099px.

   Здесь ещё действуют «десктопные» сетки, но места на них уже нет:
   – шапка: логотип и пункты меню упирались друг в друга;
   – оформление заказа: двухколоночная сетка сжимала строку товара до нуля,
     и цена наезжала на блок итогов;
   – подвал: отрицательный отступ колонок заводил их на логотип.
   Диапазон только этот — 1200 и 1920 из refs/ не затрагиваются.
   ========================================================================== */
@media (min-width: 783px) and (max-width: 1099px) {
	.zhila-header-inner {
		display: flex !important;
		min-height: 96px;
		gap: 24px;
	}

	.zhila-header-logo {
		margin-right: auto;
	}

	.zhila-primary-navigation .wp-block-navigation__container {
		gap: 24px;
	}

	.zhila-checkout {
		display: flex !important;
		width: calc(100% - 72px) !important;
		padding: 24px 0 80px !important;
		flex-direction: column !important;
		gap: 40px !important;
	}

	.custom-cart__item {
		grid-template-columns: 160px minmax(0, 1fr) auto;
		gap: 20px;
		min-height: 0;
	}

	.custom-cart__image,
	.custom-cart__image img {
		width: 160px;
		height: 160px;
	}

	.custom-cart__info,
	.custom-cart__price {
		height: auto;
		min-height: 160px;
	}

	.custom-cart__info {
		overflow: visible;
	}

	.zhila-proceed {
		max-width: 520px;
	}

	.zhila-footer-columns {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 28px 32px;
		margin: 0 0 48px;
	}

	.zhila-footer-columns > .wp-block-column {
		width: auto !important;
		flex-basis: auto !important;
		margin: 0 !important;
	}

	.zhila-payment-logos {
		margin-left: 0;
	}

	/* Базовое `.zhila-menu-toggle { display: none }` стоит в файле ниже первого
	   планшетного блока, поэтому видимость бургера задаём здесь — последним.
	   Бургер нужен только шапке главной: у неё на этом диапазоне скрыто меню,
	   потому что логотип центрируется абсолютно. В шапке каталога/корзины
	   пункты меню остаются в строке. */
	.zhila-home-header .zhila-menu-toggle {
		display: block;
		flex: 0 0 24px;
		width: 24px;
		height: 24px;
		padding: 0;
		border: 0;
		background: transparent url('assets/icons/Burger.svg') center / 24px 24px no-repeat;
		cursor: pointer;
	}
}

/* ==========================================================================
   Мобильный ритм карточки товара (по refs/Page_360x).

   Идёт последним блоком намеренно: «десктопные» правила карточки
   (.zhila-product-image-wrapper, .zhila-recommendations/…-image) объявлены
   ниже середины файла и иначе перебивают мобильные отступы.

   Замеры по чернилам в макете: фото → заголовок ≈19px,
   заголовок → подпись ≈11px, подпись → цена ≈15px.
   ========================================================================== */
@media (max-width: 782px) {
	.zhila-products .zhila-product-image-wrapper,
	.zhila-recommendations .wp-block-woocommerce-product-image,
	.zhila-recommendations .wc-block-components-product-image,
	.zhila-product-rail .wp-block-woocommerce-product-image,
	.zhila-product-rail .wc-block-components-product-image {
		margin-bottom: 14px !important;
	}

	.zhila-products .product-type-link {
		margin-top: 4px;
	}

	.zhila-recommendations .zhila-product-title,
	.zhila-recommendations .wp-block-post-title,
	.zhila-product-rail .zhila-product-title,
	.zhila-product-rail .wp-block-post-title {
		margin-bottom: 4px !important;
	}

	.zhila-recommendations .zhila-product-label,
	.zhila-recommendations .taxonomy-product_label,
	.zhila-recommendations .product-type-link,
	.zhila-product-rail .zhila-product-label,
	.zhila-product-rail .taxonomy-product_label,
	.zhila-product-rail .product-type-link {
		margin-bottom: 8px !important;
	}

	.zhila-products .zhila-product-price,
	.zhila-products .wc-block-components-product-price,
	.zhila-recommendations .zhila-product-price,
	.zhila-recommendations .wc-block-components-product-price,
	.zhila-product-rail .zhila-product-price,
	.zhila-product-rail .wc-block-components-product-price {
		padding-top: 11px;
	}
}

/* ==========================================================================
   ПРАВКИ ЗАКАЗЧИКА — «Правки_1920x1080.pdf» (ревью от 22.10.2026).

   Сетка макета при 1920: контент 1710px = 8 колонок по 200px и 7 межколонников
   по 16px (8*200 + 7*16 = 1712). Поэтому:
     * каталог и главная — элементы стоят в колонках 1..8;
     * внутренние страницы (товар, корзина, оформление) — в колонках 2..7,
       то есть 1280px (6*200 + 5*16) по центру страницы;
     * логотип всегда по левому краю 3-й колонки (105 + 2*200 + 2*16 = 537),
       на внутренних страницах — 320 + 200 + 16 = 536 (та же точка).

   Вертикальный ритм из макета (снят по чернилам в refs/Page_1920x):
     * поля страницы 105px, шапка 156px с чернилами сверху на y=72;
     * от шапки до карточек каталога 82px;
     * от заголовка блока до карточек 64px, между блоками 96px;
     * от переключателя страниц до футера 128px;
     * футер: padding-top 72px, платёжные лого в ряд по колонке 3.
   ========================================================================== */
:root {
	--zhila-white: #f6f4eb;
	--zhila-red: #af372d;
	--zhila-gray-25: #bdbcb7;
	--zhila-gray-50: #858485;
	--zhila-gray-75: #4d4c51;
	--zhila-col-gap: 16px;
	/* Ширина страницы по макету: 1710px при 1920 (поля по 105px). Колонки
	   считаем от неё, поэтому один и тот же `--zhila-col` годится и для сетки
	   каталога, и для шапки: 8 колонок по 199.75px и 7 межколонников. */
	--zhila-page-width: min(calc(100vw - (2 * var(--zhila-desktop-gutter))), var(--zhila-content));
	--zhila-col: calc((var(--zhila-page-width) - (7 * var(--zhila-col-gap))) / 8);
	/* 2 колонки + 1 межколонник (416px при 1920) — колонка фильтров. */
	--zhila-span-2: calc((var(--zhila-page-width) - (7 * var(--zhila-col-gap))) / 4 + var(--zhila-col-gap));
	/* 1 колонка + 1 межколонник (216px) — сдвиг логотипа на внутренних страницах. */
	--zhila-span-1: calc((var(--zhila-page-width) - (7 * var(--zhila-col-gap))) / 8 + var(--zhila-col-gap));
	/* 6 колонок + 5 межколонников (1280px) — контент внутренних страниц. */
	--zhila-span-6: calc((var(--zhila-page-width) - (7 * var(--zhila-col-gap))) * 0.75 + (5 * var(--zhila-col-gap)));
	--zhila-gap-section: 96px;
	--zhila-gap-heading: 64px;
	--zhila-gap-header: 82px;
	--zhila-gap-footer: 128px;
}

/* --------------------------------------------------------------------------
   1. Шапка: иконки в строку, лого по колонке, общий верх по чернилам.
   -------------------------------------------------------------------------- */

/* Иконка корзины «съехала вниз». Обёртка mini-cart — блочный элемент с
   line-height родителя (30.8px при базовом кегле 22px). Кнопка 24×24 стоит
   на базовой линии этой строки, поэтому её центр оказывался на 5.5px ниже
   поиска и аккаунта. Приводим обёртку к боксу ровно 24px без строчных отступов. */
.zhila-site-header .wc-block-mini-cart,
.zhila-home-header .wc-block-mini-cart,
.zhila-header-cart {
	display: flex !important;
	align-items: center !important;
	justify-content: center;
	height: 24px;
	line-height: 0 !important;
	font-size: 0 !important;
}

.zhila-header-cart .wc-block-mini-cart__button {
	display: flex !important;
	align-items: center !important;
	justify-content: center;
	margin: 0;
	line-height: 0 !important;
}

/* Кнопка поиска в макете одного габарита с остальными иконками (24×24),
   раньше она была 24×28.8 из-за line-height кнопки. */
.zhila-site-header .zhila-header-search .wp-block-search__button,
.zhila-home-header .zhila-header-search .wp-block-search__button,
.zhila-search-front .wp-block-search__button {
	width: 24px;
	height: 24px;
	padding: 0;
}

/* Свёрнутая форма поиска занимала 72px (поле ввода спрятано, но бокс оставался),
   из-за чего иконка поиска стояла на 44px левее макета и «отрывалась» от
   аккаунта и корзины. В шапке главной блок называется .zhila-search-front,
   в остальных — .zhila-header-search. В раскрытом состоянии (`search-active`)
   ширину не трогаем. */
.zhila-header-search:not(.search-active),
.zhila-search-front:not(.search-active) {
	width: 24px !important;
}

/* Ширина свёрнутого блока общая для обоих вариантов шапки: и .zhila-header-search,
   и .zhila-search-front. Как поле выносится из потока — см. секцию «Шапка»
   (`.zhila-header-search, .zhila-search-front { position: relative }`). */

/* Логотип в макете 159×38 при 1920. Прежнее правило `clamp(106px, 8vw, 150px)`
   не срабатывало: у блока site-logo стоит `.is-default-size img { width:120px }`,
   у которого специфичность выше. Ниже 1440px размеры прежние (96/106px). */
@media (min-width: 1440px) {
	.zhila-site-header .zhila-header-logo img,
	.zhila-home-header .wp-block-site-logo img,
	.zhila-site-header .wp-block-site-logo img {
		width: clamp(120px, 8.28vw, 159px) !important;
		height: auto !important;
	}
}

@media (min-width: 1440px) {
	/* Шапка по макету: 156px высотой, элементы выровнены по верху чернил (y=72):
	   подпись контекста и меню — кегль 16px, логотип — картинка от y=72,
	   иконки — боксы 24px с чернилами на 2px ниже края. */
	.zhila-header-inner {
		grid-template-columns:
			var(--zhila-span-2)
			auto
			minmax(0, 1fr);
		/* у блока группы включён flex-layout и глобальные стили задают ему gap,
		   поэтому межколонник фиксируем явно — от него зависит позиция логотипа */
		column-gap: var(--zhila-col-gap) !important;
		align-items: start;
		min-height: 156px;
	}

	.zhila-header-context {
		/* чернила «КАТАЛОГ» в макете 72..84 */
		margin-top: 67px !important;
	}

	.zhila-header-logo {
		margin-top: 72px !important;
	}

	.zhila-header-actions {
		align-items: start !important;
		/* иконки в макете 68..87, то есть их чернила на 1.5px выше центра текста
		   меню; box иконки 24px, глиф 20px внутри — отсюда 66px */
		margin-top: 66px !important;
	}

	.zhila-primary-navigation {
		/* пункты меню в макете на той же оптической строке, что иконки: 72..86.
		   Высоту строки задаём явно, а у вложенного ul снимаем margin-top из
		   глобальных стилей — он сдвигал текст на 6px вниз. */
		margin-top: 1px !important;
		line-height: 22.4px !important;
	}

	.zhila-header-actions .wp-block-navigation__container {
		margin-top: 0 !important;
		margin-bottom: 0 !important;
	}

	/* Внутренние страницы: контент в колонках 2..7 (1280px), логотип по левому
	   краю 3-й колонки — то есть уже на одну колонку от края шапки.
	   Первая дорожка = ровно одна колонка: межколонник добавляет сам grid. */
	body.single-product .zhila-header-inner,
	body.woocommerce-cart .zhila-header-inner,
	body.woocommerce-checkout .zhila-header-inner,
	.zhila-site-header--cart .zhila-header-inner {
		width: min(var(--zhila-span-6), 100%);
		grid-template-columns: calc(var(--zhila-span-1) - var(--zhila-col-gap)) auto minmax(0, 1fr);
	}
}

/* --------------------------------------------------------------------------
   2. Главная: размер зелёного блока, поля шапки, отступы между блоками.
   -------------------------------------------------------------------------- */

/* В макете зелёный блок ровно 960px (50vw при 1920) и снизу видна светлая
   полоса следующего блока — сайт «продолжается». Было clamp(520px, 32vw, 650px).
   Только от 1440px: ниже шапка главной светлая и компактная (72/100px),
   и большой зелёный герой там не показывается. */
@media (min-width: 1440px) {
	.zhila-home-hero {
		min-height: clamp(520px, 50vw, 960px);
	}
}

/* Шапка главной стояла внутри constrained-группы с padding-inline: 50px,
   из-за чего весь контент был смещён к центру (155px вместо 105px).
   Заказчик: «шапка смещена в центр от краёв, должно быть выравнивание по бокам». */
.zhila-home-hero > .wp-block-group:first-child {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Шапка главной по тем же правилам, что и шапка каталога: высота 156px, элементы
   выровнены по верху и стоят на тех же y, что в макете (refs/Page_1920x/Main.png:
   меню 72..86, логотип 72..109, иконки 68..87). Раньше шапка была 100px и всё
   центрировалось — на 20–40px выше макета, из-за чего иконки не сходились
   с пунктами меню. */
@media (min-width: 1440px) {
	.zhila-home-header {
		min-height: 156px;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		align-items: start;
	}

	.zhila-home-header > .wp-block-group:first-child {
		margin-top: 65px;
	}

	/* кегль меню на главной такой же, как в шапке каталога (16px): в макете
	   чернила пунктов в обоих случаях 72..86. У навигации в шапке главной нет
	   класса .zhila-primary-navigation (она объявлена в front-page.html), поэтому
	   цепляемся за сам блок навигации. */
	.zhila-home-header .wp-block-navigation,
	.zhila-home-header .wp-block-navigation a,
	.zhila-home-header .wp-block-navigation .wp-block-navigation-item__label {
		font-size: 16px !important;
		line-height: 22.4px !important;
	}

	.zhila-home-header .wp-block-navigation {
		margin-top: 2px;
	}

	/* шаг пунктов меню в макете 48–50px, как в шапке каталога */
	.zhila-home-header .wp-block-navigation ul {
		gap: 48px !important;
	}

	.zhila-home-header .wp-block-navigation ul {
		margin-top: 0 !important;
		margin-bottom: 0 !important;
	}

	.zhila-home-header .wp-block-site-logo {
		top: 72px;
	}

	.zhila-home-header > .wp-block-group:last-child {
		margin-top: 66px;
	}
}

/* Заголовок героя: в макете капитель третьей строки 56px (кегль ≈64px),
   у нас было 52px (кегль 59.5px). Межстрочный в макете 1.2 (шаг строк 76.8px),
   прежнее правило ставило .98 и три строки выходили на 28px ниже макета. */
.zhila-home-intro h2 {
	font-size: clamp(38px, 3.34vw, 64px) !important;
	line-height: 1.2 !important;
}

/* Текст героя в макете начинается по левому краю контента (105px), а не с
   отступом в 10px от внутренней группы. */
.zhila-home-intro {
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-bottom: 68px !important;
}

/* «К КАТАЛОГУ»: в макете от низа заголовка до ссылки 39px по чернилам
   (было 14px). */
.zhila-home-intro h2 + p {
	margin-top: 24px !important;
}

/* Ритм блоков на главной: между блоками 96px, от заголовка до карточек 64px по
   макету. Но эти 96/64 — расстояния между фреймами в Figma, а не чернилами:
   там от цены последней карточки до заголовка следующего блока 99px, а от
   заголовка до карточек 57px. У нас строки боксов выше (заголовок 49.9px при
   line-height 1.12 даёт 55.9px бокса), поэтому те же 96/64 давали 123px и 67px
   по чернилам — блоки «расползались». Подобраны значения, которые дают
   чернильный ритм макета: 72 / 54. */
:root {
	--zhila-rail-heading-size: clamp(26px, 2.6vw, 50px);
	--zhila-rail-gap-top: 72px;
	--zhila-rail-gap-bottom: 54px;
}

.zhila-products-with-filters .zhila-rail-heading {
	margin-top: var(--zhila-rail-gap-top) !important;
	margin-bottom: var(--zhila-rail-gap-bottom) !important;
}

/* Заголовок блока: в макете капитель 42px («НОВАЯ КОЛЛЕКЦИЯ»), у нас было 27px
   при кегле 32px — заказчик и пользователь оба отметили, что он мелкий. */
.zhila-products-with-filters .zhila-carousel-header,
.zhila-rail-heading .zhila-carousel-header {
	font-size: var(--zhila-rail-heading-size) !important;
	line-height: 1.12 !important;
	letter-spacing: -0.01em;
	margin: 0 !important;
}

.zhila-products-with-filters > * > .zhila-rail-heading:first-child,
.zhila-products-with-filters .zhila-rail-heading:first-child {
	margin-top: var(--zhila-gap-heading) !important;
}

/* Фильтры на главной стоят на уровне КАРТОЧЕК первой коллекции, а не на уровне
   заголовка: в макете (refs/Page_1920x/Main.png) первая строка фильтра и верх
   карточек — обе на y=1130. Складываем ритм первого блока: 64 (отступ до
   заголовка) + 44 (высота заголовка «НОВАЯ КОЛЛЕКЦИЯ») + 64 (от заголовка до
   карточек). Высота заголовка одинакова при 1200 и 1920, поэтому правило общее;
   на мобилке фильтры стоят над товарами отдельным блоком — там отступ не нужен. */
@media (min-width: 783px) {
	.zhila-home-collections .zhila-filter {
		margin-top: calc(
			var(--zhila-gap-heading) +
			var(--zhila-rail-heading-size) * 1.12 +
			var(--zhila-rail-gap-bottom)
		) !important;
	}
}

/* --------------------------------------------------------------------------
   3. Каталог: отступ от шапки 82px, верх фильтра на уровне карточек,
   сетка карточек 16px, переключатель страниц по левому краю карточек.
   -------------------------------------------------------------------------- */
/* Отступ от шапки до карточек: 82px по макету 1920 (refs/Page_1920x). На мобилке
   в refs/Page_360x от шапки до фильтра около 24–32px, поэтому там 32px. */
.zhila-products-with-filters {
	padding-top: 32px;
}

@media (min-width: 1440px) {
	.zhila-products-with-filters {
		padding-top: var(--zhila-gap-header);
	}
}

/* На главной над блоком коллекций стоит зелёный герой — отступ «от шапки до
   карточек» там не нужен. */
.zhila-home-collections {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.zhila-home-collections .zhila-products-with-filters {
	margin-top: 0 !important;
	padding-top: 0;
}

.zhila-filter {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

@media (min-width: 1440px) {
	.zhila-products-with-filters .wc-block-product-template,
	.zhila-products-with-filters .wp-block-woocommerce-product-template {
		gap: 44px var(--zhila-col-gap) !important;
	}

	/* рейлы (карусели) главной и «РЕКОМЕНДУЕМ» на карточке товара: шаг между
	   карточками в макете тоже 16px */
	.zhila-product-rail .wc-block-product-template,
	.zhila-recommendations .wc-block-product-template {
		gap: 16px !important;
	}
}

/* Переключатель страниц: в макете стоит по левому краю карточек (а не по
   центру), и до футера от него 128px. */
.zhila-products-with-filters .wp-block-woocommerce-product-collection-pagination,
.zhila-products-with-filters .wc-block-pagination,
.zhila-products-with-filters .wp-block-query-pagination {
	justify-content: flex-start !important;
	margin-left: 0 !important;
	padding-bottom: var(--zhila-gap-footer);
}
/* --------------------------------------------------------------------------
   4. Карточка товара: safe-зона вокруг фото (п.3Б заказчика).

   Базовые правила рамки лежат выше — в `.zhila-product-image-wrapper`
   (border по внешнему прямоугольнику 416×432 + `padding: 4%`). Процент, а не
   пиксели: safe-зона остаётся пропорциональной на любой ширине экрана.
   По макету фото занимает ~92% ширины рамки (в refs/ у PNG были поля, у нас
   файлы загружены без полей, поэтому отступ задаём мы).
   -------------------------------------------------------------------------- */
.zhila-product-image-wrapper img {
	max-width: 100%;
	max-height: 100%;
}

/* --------------------------------------------------------------------------
   5. Кнопки: состояния из п.4А/4Б.
   Неактивна — Gray 25% (#bdbcb7), активна — Gudron Black (#14141e),
   наведение — Metallic Green (#0a856a), клик — зелёная обводка без фона.

   ВАЖНО: `.zhila-proceed` здесь был по ошибке — это НЕ кнопка, а sticky-обёртка
   всего блока итогов (`<div class="custom-cart__totals zhila-proceed">`, внутри
   кнопка `.size-add-btn`). Из-за `:hover` на обёртке при наведении на кнопку
   чёрным заливалась вся область с «Товаров / Доставка / Итого к оплате».
   Состояния должны висеть на самой кнопке (`.size-add-btn`), а не на панели.
   -------------------------------------------------------------------------- */
:where(.wp-element-button, .wp-block-button__link, .zhila-size-submit, .size-add-btn, .custom-cart__checkout) {
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.wp-element-button:not(:disabled):not([aria-disabled="true"]):hover,
.wp-block-button__link:not(:disabled):not([aria-disabled="true"]):hover,
.zhila-size-submit:not(:disabled):hover,
.size-add-btn:not(:disabled):hover,
.custom-cart__checkout:not(:disabled):hover {
	background-color: var(--zhila-ink) !important;
	color: var(--zhila-white) !important;
}

.wp-element-button:not(:disabled):active,
.wp-block-button__link:not(:disabled):active,
.zhila-size-submit:not(:disabled):active,
.size-add-btn:not(:disabled):active,
.custom-cart__checkout:not(:disabled):active {
	background-color: transparent !important;
	color: var(--zhila-green) !important;
	font-weight: 700 !important;
	box-shadow: inset 0 0 0 1px var(--zhila-green) !important;
}

/* Состояние «условие не выполнено»: в макете кнопка Gray 25% и не реагирует. */
.wp-element-button:disabled,
.wp-block-button__link:disabled,
.zhila-size-submit:disabled,
.size-add-btn:disabled,
.custom-cart__checkout:disabled,
.wp-element-button[aria-disabled="true"] {
	background-color: var(--zhila-gray-25) !important;
	color: var(--zhila-white) !important;
	border-color: var(--zhila-gray-25) !important;
	cursor: not-allowed;
}

/* Убираем квадратную фокус-обводку, из-за которой клик выглядел как «рамка». */
.wp-element-button:focus:not(:focus-visible),
.zhila-size-submit:focus:not(:focus-visible),
.size-add-btn:focus:not(:focus-visible),
.custom-cart__checkout:focus:not(:focus-visible),
.wp-block-details summary:focus:not(:focus-visible) {
	outline: none !important;
}

/* --------------------------------------------------------------------------
   6. Цвета: только палитра из п.4Г. Сводим прежние «почти-цвета» к токенам.
   -------------------------------------------------------------------------- */
.zhila-product-price ins,
.zhila-single-product-price ins,
.wc-block-grid__product-price ins {
	color: var(--zhila-green) !important;
}

.zhila-product-price del,
.zhila-single-product-price del,
.wc-block-grid__product-price del {
	color: var(--zhila-gray-50) !important;
}

.zhila-footer-heading,
.zhila-recommendations__title,
.zhila-sale-badge,
.zhila-product-sale-badge {
	color: var(--zhila-gray-50);
}

.zhila-recommendations__title {
	color: var(--zhila-ink) !important;
}

/* Платёжные лого: в макете это один ряд из четырёх иконок (visa 80×24,
   mir 85×24, mastercard 39×24, sbp 43×24). Раньше в шаблоне были только
   mir и sbp, а размер задавался атрибутами 64×64 — на мобилке четыре лого
   не влезали в строку. */
.zhila-payment-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 0;
}

.zhila-payment-logos img {
	width: auto;
	height: 16px;
}

/* --------------------------------------------------------------------------
   7. Футер: платёжные лого по колонке 3, отступы, цвет логотипа.
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
	.zhila-site-footer {
		padding-top: 72px;
		padding-bottom: 56px;
	}

	.zhila-payment-logos {
		display: flex;
		align-items: center;
		gap: 32px;
		margin: 40px 0 0 var(--zhila-span-2);
	}

	.zhila-payment-logos img {
		/* SVG уже нарисованы в размерах макета: visa 80×24, mir 85×24,
		   mastercard 39×24, sbp 43×24 — ширину не навязываем. */
		width: auto;
		height: 24px;
	}
}

/* Логотип в футере — Chroma White (#f6f4eb), а не чистый белый:
   `filter: brightness(0) invert(1)` давал var(--zhila-white). Красим маской по тому же
   логотипу, который лежит в теме (assets/images/Union.png). */
.zhila-footer-logo .custom-logo-link {
	position: relative;
	display: block;
	width: clamp(120px, 8.28vw, 159px);
}

.zhila-footer-logo img {
	width: 100% !important;
	height: auto;
	visibility: hidden;
}

.zhila-footer-logo .custom-logo-link::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: var(--zhila-white);
	-webkit-mask: url('assets/images/Union.png') left center / contain no-repeat;
	mask: url('assets/images/Union.png') left center / contain no-repeat;
}

/* --------------------------------------------------------------------------
   10. Текстовый блок карточки: строки выровнены между карточками.
   В макете у всех карточек подпись «футболка-оверсайз» стоит на одной линии, и
   цена тоже: 698 (заголовок), 733 (подпись), 777 (цена). У товара без терма
   product_label блока подписи в разметке нет вообще, поэтому цена поднималась
   на её место (24.6px вверх). Резервируем строку подписи фиксированной высоты.
   -------------------------------------------------------------------------- */.zhila-products .wc-block-product,
.zhila-product-rail .wc-block-product,
.zhila-recommendations .wc-block-product {
	display: grid !important;
	grid-template-rows: auto auto minmax(27.5px, auto) auto;
	align-content: start;
}

.zhila-products .wc-block-product > .zhila-product-image-wrapper,
.zhila-products .wc-block-product > .wp-block-woocommerce-product-image,
.zhila-products .wc-block-product > .wc-block-components-product-image,
.zhila-product-rail .wc-block-product > .zhila-product-image-wrapper,
.zhila-product-rail .wc-block-product > .wp-block-woocommerce-product-image,
.zhila-product-rail .wc-block-product > .wc-block-components-product-image,
.zhila-recommendations .wc-block-product > .zhila-product-image-wrapper,
.zhila-recommendations .wc-block-product > .zhila-recommendation-image,
.zhila-recommendations .wc-block-product > .wp-block-woocommerce-product-image,
.zhila-recommendations .wc-block-product > .wc-block-components-product-image {
	grid-row: 1;
}

.zhila-products .wc-block-product > .wp-block-post-title,
.zhila-products .wc-block-product > .zhila-product-title,
.zhila-product-rail .wc-block-product > .wp-block-post-title,
.zhila-product-rail .wc-block-product > .zhila-product-title,
.zhila-recommendations .wc-block-product > .wp-block-post-title,
.zhila-recommendations .wc-block-product > .zhila-product-title {
	grid-row: 2;
}

.zhila-products .wc-block-product > .product-type-link,
.zhila-products .wc-block-product > .zhila-product-label,
.zhila-product-rail .wc-block-product > .product-type-link,
.zhila-product-rail .wc-block-product > .zhila-product-label,
.zhila-recommendations .wc-block-product > .product-type-link,
.zhila-recommendations .wc-block-product > .zhila-product-label {
	grid-row: 3;
	align-self: start;
}

.zhila-products .wc-block-product > .wp-block-woocommerce-product-price,
.zhila-products .wc-block-product > .zhila-product-price,
.zhila-product-rail .wc-block-product > .wp-block-woocommerce-product-price,
.zhila-product-rail .wc-block-product > .zhila-product-price,
.zhila-recommendations .wc-block-product > .wp-block-woocommerce-product-price,
.zhila-recommendations .wc-block-product > .zhila-product-price {
	grid-row: 4;
}

/* Единый ритм текста внутри карточки во всех трёх контекстах (каталог, рейлы
   главной, «РЕКОМЕНДУЕМ»). По макету: фото → заголовок 29px, заголовок →
   подпись 16px, подпись → цена 29px. В рейлах были свои отступы, из-за которых
   цена стояла на 8px ниже, чем в каталоге. */
.zhila-products .wc-block-product > .zhila-product-image-wrapper,
.zhila-product-rail .wc-block-product > .zhila-product-image-wrapper,
.zhila-recommendations .wc-block-product > .zhila-product-image-wrapper,
.zhila-recommendations .wc-block-product > .zhila-recommendation-image {
	margin: 0 0 28px !important;
}

.zhila-products .wc-block-product > .wp-block-post-title,
.zhila-product-rail .wc-block-product > .wp-block-post-title,
.zhila-recommendations .wc-block-product > .wp-block-post-title {
	margin: 0 !important;
}

.zhila-products .wc-block-product > .product-type-link,
.zhila-product-rail .wc-block-product > .product-type-link,
.zhila-recommendations .wc-block-product > .product-type-link {
	margin: 5px 0 0 !important;
}

.zhila-products .wc-block-product > .wp-block-woocommerce-product-price,
.zhila-product-rail .wc-block-product > .wp-block-woocommerce-product-price,
.zhila-recommendations .wc-block-product > .wp-block-woocommerce-product-price {
	margin: 0 !important;
	/* отступ до цены задаём на внутреннем блоке (.wc-block-components-product-price
	   уже имеет 24px в каталоге); на обёртке он складывался и цена уезжала на 24px */
	padding-top: 0 !important;
	line-height: 1.25 !important;
}

.zhila-products .wc-block-product .wc-block-components-product-price,
.zhila-product-rail .wc-block-product .wc-block-components-product-price,
.zhila-recommendations .wc-block-product .wc-block-components-product-price {
	padding-top: 24px !important;
}

/* В рейлах цена могла уезжать к низу карточки (margin-top: auto) — фиксируем. */
.zhila-product-rail .wc-block-product .zhila-product-price,
.zhila-recommendations .wc-block-product .zhila-product-price {
	margin-top: 0 !important;
	align-self: start;
}


/* --------------------------------------------------------------------------
   11. Фото в карточке: одинаковая рамка и safe-зона во всех местах.
   Раньше каталог рисовал рамку 416×432 с отступом 16px, рейлы главной — квадрат
   1:1, а «РЕКОМЕНДУЕМ» на карточке товара — вообще без отступа (фото впритык,
   кропилось по-другому). Заказчик в п.3Б просил safe-зону во всех карточках.

   Теперь «РЕКОМЕНДУЕМ» использует тот же блок `woocommerce/product-image` с
   `className":"zhila-product-image-wrapper"` (templates/single-product.html),
   поэтому рамку, границу и safe-зону ему рисуют общие правила выше — здесь
   остаются только страховки для контекстов, где обёртки нет.
   -------------------------------------------------------------------------- */
.zhila-product-rail .wc-block-product > .wp-block-woocommerce-product-image,
.zhila-product-rail .wc-block-product > .wc-block-components-product-image,
.zhila-recommendations .wc-block-product > .wp-block-woocommerce-product-image,
.zhila-recommendations .wc-block-product > .wc-block-components-product-image {
	aspect-ratio: 416 / 432 !important;
	box-sizing: border-box;
	border: 1px solid var(--zhila-ink);
	padding: 4%;
	overflow: hidden;
	display: flex !important;
	align-items: center;
	justify-content: center;
}

/* В «РЕКОМЕНДУЕМ» WooCommerce ставит картинке object-fit: cover и aspect-ratio 1:1
   прямо на <img>, поэтому фото кропилось по-другому, чем в каталоге. */
.zhila-recommendations .wc-block-product > .wc-block-components-product-image img,
.zhila-recommendations .wc-block-product > .wp-block-woocommerce-product-image img {
	width: 100% !important;
	height: 100% !important;
	max-height: 100%;
	aspect-ratio: auto !important;
	border: 0 !important;
	object-fit: contain !important;
}


/* --------------------------------------------------------------------------
   8. Карточка товара (п.3А): контент внутренних страниц — колонки 2..7
   (1280px), фото 3 колонки (632px), текстовая колонка 2 колонки (416px).
   Между ними — одна колонка + 2 межколонника (232px), это даёт
   justify-content: space-between в контейнере 1280px.
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
	/* специфичность выше, чем у `.woocommerce.product > main` выше в файле */
	.zhila-single-product.woocommerce.product > main {
		width: min(var(--zhila-span-6), 100%);
	}

	.zhila-single-product .zhila-product-layout {
		width: 100% !important;
		max-width: none !important;
		grid-template-columns: minmax(0, 632px) minmax(0, 416px);
		justify-content: space-between;
		column-gap: 0;
		/* фото начинается на 238px от верха страницы (156 шапка + 82),
		   у детей колонок свои 25px */
		padding-top: 37px;
	}
}

/* --------------------------------------------------------------------------
   9. Архивы каталога: категория, коллаборация, цвет.
   Раньше для таксономий товара в теме не было шаблона, и они рендерились через
   index.html — страница «по коллабам» выглядела как одна запись с эмодзи и датой.
   По refs/Page_1920x (Category.png, Collaborations.png): хлебные крошки и H1
   стоят в колонке карточек, фильтры — слева, верх фильтров совпадает с верхом
   карточек (377px от верха страницы при 1920).
   -------------------------------------------------------------------------- */
.zhila-archive-listing {
	/* у этого шаблона глобальные стили навешивают margin-top на сетку,
	   из-за которого весь блок уезжал вниз на 57px */
	margin-top: 0 !important;
	grid-template-rows: auto auto;
}

.zhila-archive-titles {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

.zhila-archive-listing > .wp-block-template-part {
	grid-column: 1;
	grid-row: 2;
}

.zhila-archive-listing > main {
	grid-column: 2;
	grid-row: 2;
}

.zhila-archive-listing .woocommerce-breadcrumb,
.zhila-archive-listing .wc-block-breadcrumbs {
	margin: 0 0 22px !important;
	padding: 0;
	font-size: 11px;
	line-height: 1.2;
}

.zhila-archive-title {
	margin: 0 0 18px !important;
	font-size: clamp(28px, 2.6vw, 48px) !important;
	font-weight: 700 !important;
	line-height: 1.05 !important;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	color: var(--zhila-ink);
}

/* Переключатель страниц в архивах (категория, коллаборация, цвет): в макете он
   стоит по левому краю карточек, как и в каталоге. Здесь стоял
   `justify-content: center`, из-за чего пагинация уезжала в центр страницы —
   а правило ниже по файлу перебивало `flex-start` из блока каталога. */
.zhila-archive-listing .wp-block-query-pagination,
.zhila-archive-listing .wc-block-pagination {
	justify-content: flex-start !important;
	margin-top: 40px !important;
	padding-bottom: var(--zhila-gap-footer);
}

/* ==========================================================================
   12. КАРТОЧКА ТОВАРА — единый компонент (каталог, рейлы главной, «РЕКОМЕНДУЕМ»,
   архивы таксономий). Блок идёт последним во всём файле намеренно: выше лежит
   несколько исторических слоёв, которые задавали карточке разные кегли, цвета и
   отступы, а специфичности у них хватает, чтобы перебить базовые правила.

   Геометрия рамки и safe-зона — в `.zhila-product-image-wrapper` (см. выше).
   Здесь — только текст под фото. Значения сняты с refs/Page_1920x/Catalogue:
   заголовок — Gudron Black #14141e, подпись — Gray 75% #4d4c51, цена — Gray 75%
   (акционная — Metallic Green #0a856a, старая — Gray 50% #858485);
   ритм по чернилам: фото → заголовок 28px, заголовок → подпись 5px,
   подпись → цена 24px.
   ========================================================================== */
.wc-block-product .wp-block-post-title,
.wc-block-product .wc-block-components-product-title,
.wc-block-product .zhila-product-title {
	margin: 0 !important;
	color: var(--zhila-ink) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: 0 !important;
	text-align: left !important;
	/* Длинное название переносится, а не вылезает за карточку. */
	overflow-wrap: anywhere;
	hyphens: auto;
}

.wc-block-product .wp-block-post-title a,
.wc-block-product .wc-block-components-product-title a {
	color: inherit !important;
	text-decoration: none;
}

.wc-block-product .product-type-link,
.wc-block-product .zhila-product-label,
.wc-block-product .taxonomy-product_label {
	margin: 5px 0 0 !important;
	color: var(--zhila-gray-75) !important;
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: 0 !important;
	overflow-wrap: anywhere;
}

/* Обёртка блока цены и его внутренний блок: WooCommerce вешает на внутренний
   `padding-top` (24px) — второй такой же на обёртке давал суммарные 48px. */
.wc-block-product .wp-block-woocommerce-product-price,
.wc-block-product .zhila-product-price {
	margin: 0 !important;
	padding-top: 0 !important;
	color: var(--zhila-gray-75) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
}

.wc-block-product .wc-block-components-product-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	padding-top: 24px !important;
	color: var(--zhila-gray-75) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
}

/* WooCommerce красит первый `.woocommerce-Price-amount` в зелёный всегда —
   из-за этого обычная цена выглядела акционной. Зелёный только у `ins`. */
.wc-block-product .wc-block-components-product-price .woocommerce-Price-amount {
	color: inherit !important;
	font-size: 1em !important;
}

.wc-block-product .wc-block-components-product-price ins,
.wc-block-product .wc-block-components-product-price ins .woocommerce-Price-amount {
	color: var(--zhila-green) !important;
	font-size: 1em !important;
	text-decoration: none !important;
}

.wc-block-product .wc-block-components-product-price del,
.wc-block-product .wc-block-components-product-price del .woocommerce-Price-amount {
	color: var(--zhila-gray-50) !important;
	font-size: .8em !important;
}

@media (max-width: 782px) {
	/* Мобильный ритм по refs/Page_360x: кегли 12 / 10 / 12, отступы 14 / 4 / 11. */
	.wc-block-product .zhila-product-image-wrapper,
	.wc-block-product > .wp-block-woocommerce-product-image,
	.wc-block-product > .wc-block-components-product-image {
		margin-bottom: 14px !important;
	}

	.wc-block-product .wp-block-post-title,
	.wc-block-product .wc-block-components-product-title,
	.wc-block-product .zhila-product-title {
		font-size: 12px !important;
		line-height: 1.25 !important;
	}

	.wc-block-product .product-type-link,
	.wc-block-product .zhila-product-label,
	.wc-block-product .taxonomy-product_label {
		margin-top: 4px !important;
		font-size: 10px !important;
		line-height: 1.4 !important;
	}

	.wc-block-product .wp-block-woocommerce-product-price,
	.wc-block-product .zhila-product-price,
	.wc-block-product .wc-block-components-product-price {
		font-size: 12px !important;
		line-height: 1.25 !important;
	}

	.wc-block-product .wc-block-components-product-price {
		padding-top: 11px !important;
		gap: 0 6px;
	}

	.wc-block-product .wc-block-components-product-price del,
	.wc-block-product .wc-block-components-product-price del .woocommerce-Price-amount {
		font-size: 9px !important;
	}
}

/* ==========================================================================
   13. ФУТЕР по макету (refs/Page_1920x/Catalogue/Main.png — «эталон футера»).

   Снятые с макета числа при 1920:
     * тёмная полоса 523px: 72 сверху, контент, 66 снизу;
     * логотип — ink с x=73, то есть левое поле футера 73px, а не 105px, как у
       остальной страницы. Отсюда своя сетка: 8 колонок по 207.75px с шагом 16
       (1774px контента);
     * ссылки стоят в колонках 3, 5 и 7 этой сетки (521 / 968 / 1415), а не
       прижаты вправо, как было (`margin: -42px 0 70px auto` + `max-width: 850px`
       сдвигали весь блок к правому краю);
     * платёжный ряд — под первой колонкой ссылок (x≈523), на 430px ниже верха
       футера.

   Меняются только позиции: типографика и цвета колонок остаются прежними.
   ========================================================================== */
@media (min-width: 1440px) {
	.zhila-site-footer {
		/* высоту задаёт контент: 72 + контент + 66 = 523 в макете */
		min-height: 0;
		padding: 72px 0 66px;
	}

	.zhila-site-footer .zhila-footer-inner {
		display: grid;
		grid-template-columns: repeat(8, minmax(0, 1fr));
		column-gap: 16px;
		row-gap: 0;
		align-items: start;
		/* поля футера по макету: 73px при 1920 (у страницы 105px) */
		width: min(calc(100% - 146px), 1774px);
		margin-inline: auto;
	}

	.zhila-footer-inner > .zhila-footer-logo {
		grid-column: 1 / span 2;
		grid-row: 1;
		margin: 0;
	}

	/* Ссылки: три равные колонки внутри полосы «колонки 3..8» сетки футера.
	   Ширина каждой 431.5px, шаг 447.5px — ровно как в макете (521/968/1415). */
	.zhila-footer-inner > .zhila-footer-columns {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 16px;
		grid-column: 3 / span 6;
		grid-row: 1;
		max-width: none;
		/* 41px — чтобы верх надписи «ПОКУПАТЕЛЯМ» встал на 116px от верха
		   футера (логотип занимает первые 38px) */
		margin: 41px 0 0;
	}

	.zhila-footer-columns > .wp-block-column {
		flex-basis: auto;
		max-width: none;
		min-width: 0;
		margin: 0;
	}

	.zhila-footer-inner > .zhila-payment-logos {
		grid-column: 3 / span 6;
		grid-row: 2;
		justify-content: flex-start;
		/* 100px — платёжный ряд встаёт на 430px от верха футера, как в макете */
		margin: 100px 0 0;
	}
}

/* Платёжные лого: теперь их две (Мир и СБП). Высота фиксирована (иначе у
   лениво загруженной картинки до загрузки ширина/высота нулевые и ряд
   «схлопывается»), ширина — по пропорции SVG, поэтому масштаб сохраняется на
   любой ширине экрана. */
.zhila-payment-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 0;
}

.zhila-payment-logos img {
	width: auto;
	max-width: 100%;
	height: clamp(16px, 1.25vw, 24px);
}

@media (min-width: 1440px) {
	.zhila-payment-logos {
		gap: 32px;
	}
}

/* 1100–1439px: колонки ссылок в этом диапазоне прижаты вправо
   (`margin: -42px 0 70px auto` + `max-width: 850px` из базового правила), а
   платёжный ряд стоял по левому краю футера. В макете он всегда под первой
   колонкой ссылок, поэтому выравниваем по ней. На планшете (783–1099) и
   мобилке обе части и так стоят по левому краю — там правило не нужно. */
@media (min-width: 1100px) and (max-width: 1439px) {
	.zhila-footer-inner > .zhila-payment-logos {
		max-width: 850px;
		margin-left: auto;
		margin-right: 0;
		justify-content: flex-start;
	}
}

/* ==========================================================================
   14. СТРАНИЦЫ 404 И «СПАСИБО ЗА ЗАКАЗ»

   Макеты: refs/404.png (страница не найдена) и
   refs/invoice_successful_payment.png (благодарность после оплаты).
   Шаблоны: templates/404.html и templates/order-confirmation.html
   (второй — страница WooCommerce «Заказ получен», на неё же ведёт
   success_url из Invoice).

   Снятые с макета числа при 1920:
     * зелёная полоса идёт от самого верха страницы (шапка лежит НА ней) и
       занимает 0..959 — ровно 960px, как зелёный блок главной; ниже сразу
       тёмный футер 960..1483 (523px);
     * шапка — та же, что на главной: пункты меню по левому полю 105px,
       логотип по центру, иконки справа, чернила на y=68..109;
     * 404: «СТРАНИЦА НЕ НАЙДЕНА» — капитель 56px (кегль ≈80px), центр
       страницы, чернила 456..511; ниже с отступом 41px (по чернилам) ряд
       «← ВЕРНУТЬСЯ ОБРАТНО»: тонкая линия 37×2px со стрелкой влево и текст
       капителью 13px (кегль ≈18px) с разрядкой;
     * благодарность: кремовая карточка 848×432 с рамкой 1px ink, центр по
       горизонтали, верх на 284px от верха страницы; поля 48px; заголовок
       «Спасибо / за заказ!» капителью 46..49px (кегль ≈65px, строки через
       67px); «Сумма заказа: 2 499 ₽» — 16px, Gray 75%; две кнопки 256×64 с
       зазором 16px прижаты к низу карточки (низ на 667, то есть 48px от низа
       карточки); крестик 14×14 в 29px от верхнего правого угла.

   Ниже 1440 зелёная полоса масштабируется через clamp, а шапка героя
   остаётся светлой (на главной в этом диапазоне она становится светлой —
   здесь правило отменяется, фон-то зелёный).
   ========================================================================== */

.zhila-page-hero {
	display: flex;
	flex-direction: column;
	min-height: clamp(430px, 50vw, 960px);
	background-color: var(--zhila-green);
	color: var(--zhila-white);
}

/* Шапка героя = разметка шапки главной (parts/header-hero.html). На главной
   ниже 1440px она светлая с тёмными иконками; здесь фон всегда зелёный,
   поэтому светлый цвет возвращаем на всех ширинах. */
.zhila-page-hero .zhila-home-header,
.zhila-page-hero .zhila-home-header a,
.zhila-page-hero .zhila-home-header button,
.zhila-page-hero .zhila-home-header .wp-block-navigation-item__label,
.zhila-page-hero .zhila-home-header .wc-block-mini-cart__button,
.zhila-page-hero .zhila-home-header .wp-block-search__button,
.zhila-page-hero .zhila-home-header .wp-block-woocommerce-customer-account a {
	color: var(--zhila-white) !important;
}

/* Логотип в шапке главной штатно светлый: тёмным его делают только для
   светлых шапок (783–1439 и мобилка) фильтром brightness(0). */
.zhila-page-hero .zhila-home-header .wp-block-site-logo img {
	filter: none !important;
}

/* Полоса шапки в constrained-группе: поля страницы задаёт alignwide, поэтому
   внутренние padding-ы группы убираем (как у главной). */
.zhila-page-hero > .wp-block-group:first-child {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Блок «часть шаблона» (wp:template-part) рендерится обёрткой
   <div class="wp-block-template-part">. Из-за неё alignwide внутри шапки
   считается не от constrained-группы, а от обычного блока: шапка сжималась до
   ширины содержимого (435px вместо 1710px) и уезжала в центр. `display:
   contents` убирает обёртку из раскладки — шапка снова прямой ребёнок
   constrained-группы, ровно как на главной. */
.zhila-page-hero .wp-block-template-part {
	display: contents;
}

.zhila-notfound-body,
.zhila-success-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	padding: 0 24px 48px;
}

/* --- типографика этих двух страниц ---

   Шрифт макета — узкий гротеск; в теме это IBM Plex Sans, у которого есть
   вариативные оси ширины и насыщенности
   (`IBMPlexSans-VariableFont_wdth,wght.ttf`). При `wdth 87` строка
   «СТРАНИЦА НЕ НАЙДЕНА» получается 710px против 708px в макете при
   совпадающей капители (47px) — без сжатия по оси она на 30% шире.
   Насыщенность задаём осью `wght` в font-variation-settings, а font-weight
   оставляем 500: по нему браузер выбирает вариативный файл (у статических
   SemiBold/Bold осей нет, и `wdth` на них не подействует). */
.zhila-notfound-title,
.zhila-notfound-back,
.zhila-success-title,
.zhila-success-sum,
.zhila-success-btn,
.zhila-success-note {
	font-family: 'IBM Plex Sans', sans-serif !important;
	font-variation-settings: 'wdth' 87;
}

/* --- 404 --- */

.zhila-notfound-title {
	margin: 0;
	font-size: clamp(32px, 3.3333vw, 64px);
	font-weight: 500 !important;
	font-variation-settings: 'wght' 550, 'wdth' 87;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--zhila-white);
}

.zhila-notfound-back {
	margin: 36px 0 0;
	font-size: clamp(12px, 0.8854vw, 17px);
	font-weight: 400;
	font-variation-settings: 'wght' 450, 'wdth' 87;
	line-height: 1;
	letter-spacing: normal;
	text-transform: uppercase;
	color: var(--zhila-white);
}

.zhila-notfound-back a {
	display: inline-flex;
	align-items: center;
	gap: 34px;
	color: inherit !important;
	text-decoration: none;
}

/* Стрелка влево: линия 37×2 со стрелкой на конце (макет). Рисуем маской,
   чтобы цвет всегда совпадал с цветом текста. */
.zhila-notfound-back a::before {
	content: "";
	flex: 0 0 auto;
	width: 37px;
	height: 8px;
	background-color: currentColor;
	transition: transform 0.15s ease;
	-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 37 8'%3E%3Cpath d='M36 4H4M4 1L1 4l3 3' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 37 8'%3E%3Cpath d='M36 4H4M4 1L1 4l3 3' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center / contain;
}

.zhila-notfound-back a:hover::before {
	transform: translateX(-4px);
}

.zhila-notfound-back a:hover {
	text-decoration: none;
}

/* --- «Спасибо за заказ» --- */

.zhila-success-card {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: min(848px, 100%);
	min-height: 432px;
	padding: 36px 48px 48px;
	background: var(--zhila-white);
	border: 1px solid var(--zhila-ink);
	color: var(--zhila-ink);
}

.zhila-success-close {
	position: absolute;
	top: 22px;
	right: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: var(--zhila-ink) !important;
	text-decoration: none;
}

.zhila-success-close:hover {
	opacity: 0.6;
}

.zhila-success-title {
	margin: 0;
	font-size: clamp(28px, 3.2813vw, 63px);
	font-weight: 500 !important;
	font-variation-settings: 'wght' 600, 'wdth' 87;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--zhila-ink);
}

.zhila-success-sum {
	margin: 22px 0 0;
	font-size: clamp(14px, 0.9375vw, 18px);
	font-weight: 400;
	line-height: 1.2;
	color: var(--zhila-gray-75);
}

.zhila-success-note {
	margin: 10px 0 0;
	font-size: 0.875rem;
	line-height: 1.3;
	color: var(--zhila-gray-50);
}

.zhila-success-note a {
	color: inherit !important;
	text-decoration: underline;
}

.zhila-success-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: auto;
	padding-top: 32px;
}

.zhila-success-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 256px;
	height: 64px;
	padding: 0 24px;
	border: 1px solid var(--zhila-ink);
	background: transparent;
	color: var(--zhila-ink) !important;
	font-size: clamp(14px, 0.9375vw, 18px);
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.zhila-success-btn:hover {
	background: var(--zhila-ink);
	border-color: var(--zhila-ink);
	color: var(--zhila-white) !important;
}

.zhila-success-btn--dark {
	background: var(--zhila-ink);
	border-color: var(--zhila-ink);
	color: var(--zhila-white) !important;
}

.zhila-success-btn--dark:hover {
	background: var(--zhila-green);
	border-color: var(--zhila-green);
	color: var(--zhila-white) !important;
}

.zhila-success-btn:active {
	background: transparent;
	border-color: var(--zhila-green);
	color: var(--zhila-green) !important;
}

/* Положение карточки по макету: верх на 284px от верха страницы при 1920.
   Высота шапки героя 156px, высота полосы 960px, карточка 432px: центрируем
   по остатку и сдвигаем вверх на половину нижнего padding-а. Для 404-страницы
   подобранное значение даёт чернила заголовка на 456..511, как в макете. */
@media (min-width: 1440px) {
	.zhila-notfound-body {
		padding-bottom: 106px;
	}

	.zhila-success-body {
		padding-bottom: 116px;
	}
}

@media (max-width: 782px) {
	.zhila-notfound-body,
	.zhila-success-body {
		padding: 0 20px 40px;
	}

	.zhila-notfound-back {
		margin-top: 24px;
	}

	.zhila-notfound-back a {
		gap: 16px;
	}

	.zhila-notfound-back a::before {
		width: 26px;
		height: 6px;
	}

	.zhila-success-card {
		min-height: 0;
		padding: 24px 20px;
	}

	.zhila-success-actions {
		flex-direction: column;
		padding-top: 24px;
	}

	.zhila-success-btn {
		width: 100%;
		min-width: 0;
	}
}


/* ==========================================================================
   15. ГАЛОЧКИ СОГЛАСИЙ (оформление заказа и регистрация)

   Это правовая часть, а не декор: по ст. 9 152-ФЗ согласие на обработку
   персональных данных — отдельная НЕпредзаполненная отметка, а с 01.09.2025
   (420-ФЗ) оно не может быть частью акцепта оферты, поэтому в оформлении заказа
   две обязательные галочки (оферта и ПД) и одна необязательная (рассылки).
   Разметка — inc/legal.php, валидация — custom-checkout.js и PHP.
   ========================================================================== */
.zhila-consent {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 24px 0 20px;
}

.zhila-consent__row {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	font-size: 12px;
	line-height: 1.45;
	color: var(--zhila-gray-75);
	cursor: pointer;
}

/* Коробку рисует сам input: у него appearance: none. Обёртка остаётся в
   разметке для читаемости, но места не занимает. */
.zhila-consent__box {
	display: none;
}

.zhila-consent__input {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	border: 1px solid var(--zhila-ink);
	background: transparent;
	cursor: pointer;
	position: relative;
}

.zhila-consent__input:checked {
	background: var(--zhila-green);
	border-color: var(--zhila-green);
}

.zhila-consent__input:checked::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 6px;
	height: 11px;
	border: solid var(--zhila-white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.zhila-consent__input:focus-visible {
	outline: 2px solid var(--zhila-green);
	outline-offset: 2px;
}

.zhila-consent__row.zhila-field-invalid .zhila-consent__input {
	border-color: var(--zhila-red);
}

.zhila-consent__row--marketing {
	color: var(--zhila-gray-50);
}

.zhila-consent__row--marketing em {
	font-style: normal;
	color: var(--zhila-gray-25);
}

.zhila-consent__text a {
	color: var(--zhila-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.zhila-consent__text a:hover {
	color: var(--zhila-green);
}

@media (max-width: 480px) {
	.zhila-consent {
		margin: 20px 0 16px;
	}
}

/* ==========================================================================
   16. БАННЕР СОГЛАСИЯ НА COOKIE (inc/consent.php + assets/js/consent.js)

   Баннер лежит в подвале документа и скрыт атрибутом hidden: без JS он не
   мешает покупке, с JS показывается сразу. Кнопки — «Принять все» / «Только
   необходимые» / «Настроить»; выбор хранится в cookie и переехать в аналитику
   может только через window.zhilaConsent.
   ========================================================================== */
.zhila-cookie {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	background: var(--zhila-ink);
	color: var(--zhila-white);
	padding: 18px var(--zhila-desktop-gutter);
}

.zhila-cookie[hidden] {
	display: none;
}

.zhila-cookie__inner {
	width: var(--zhila-page-width);
	max-width: var(--zhila-content);
	margin: 0 auto;
	display: flex;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}

.zhila-cookie__text {
	margin: 0;
	max-width: 760px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--zhila-white);
}

.zhila-cookie__text a {
	color: var(--zhila-white);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.zhila-cookie__settings {
	margin-top: 12px;
	display: grid;
	gap: 8px;
	font-size: 12px;
}

.zhila-cookie__settings[hidden] {
	display: none;
}

.zhila-cookie__option {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
	line-height: 1.45;
	color: var(--zhila-gray-25);
}

.zhila-cookie__option strong {
	color: var(--zhila-white);
	font-weight: 500;
}

.zhila-cookie__option input {
	margin: 2px 0 0;
	accent-color: var(--zhila-green);
}

.zhila-cookie__actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.zhila-cookie__btn {
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--zhila-gray-50);
	background: transparent;
	color: var(--zhila-white);
	font: inherit;
	font-size: 12px;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.zhila-cookie__btn[hidden] {
	display: none;
}

.zhila-cookie__btn:hover {
	border-color: var(--zhila-white);
}

.zhila-cookie__btn--primary {
	background: var(--zhila-green);
	border-color: var(--zhila-green);
}

.zhila-cookie__btn--primary:hover {
	background: var(--zhila-white);
	border-color: var(--zhila-white);
	color: var(--zhila-ink);
}

.zhila-cookie__btn--link {
	border-color: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
	padding: 0 8px;
}

@media (max-width: 782px) {
	.zhila-cookie {
		padding: 16px 20px;
	}

	.zhila-cookie__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.zhila-cookie__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.zhila-cookie__btn--link {
		grid-column: 1 / -1;
	}

	.zhila-cookie__btn {
		width: 100%;
	}
}

/* ==========================================================================
   17. ПАНЕЛЬ ВХОДА И РЕГИСТРАЦИИ (woocommerce/myaccount/form-login.php)

   Шаблон перекрыт темой: подписи русские, разметка своя. Две карточки рядом
   (вход и регистрация), на мобилке — колонка. Галочки согласий внутри
   регистрации печатает inc/legal.php по хуку woocommerce_register_form.
   ========================================================================== */
.zhila-auth {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--zhila-col-gap);
	margin: 0 auto;
	width: 100%;
	max-width: 1040px;
}

.zhila-auth:not(.zhila-auth--register) {
	grid-template-columns: minmax(0, 520px);
	justify-content: center;
}

.zhila-auth__card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--zhila-ink);
	padding: 40px;
}

.zhila-auth__title {
	margin: 0 0 8px;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 500;
	color: var(--zhila-ink);
}

.zhila-auth__hint {
	margin: 0 0 24px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--zhila-gray-50);
}

.zhila-auth__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.zhila-field {
	margin: 0;
}

.zhila-field__label {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--zhila-gray-75);
}

.zhila-field__req {
	color: var(--zhila-red);
	margin-left: 2px;
}

.zhila-field__input {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1px solid var(--zhila-gray-25);
	border-radius: 0;
	background: transparent;
	color: var(--zhila-ink);
	font: inherit;
	font-size: 15px;
	transition: border-color 0.2s ease;
}

.zhila-field__input:focus {
	outline: none;
	border-color: var(--zhila-ink);
}

.zhila-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 12px;
}

.zhila-auth__row--submit {
	display: block;
	margin: 0;
}

.zhila-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	color: var(--zhila-gray-75);
}

.zhila-check__input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--zhila-green);
}

.zhila-auth__lost {
	font-size: 12px;
	color: var(--zhila-gray-75);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.zhila-auth__lost:hover {
	color: var(--zhila-ink);
}

.zhila-auth__submit {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	border: none;
	background: var(--zhila-ink);
	color: var(--zhila-white);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.zhila-auth__submit:hover {
	background: var(--zhila-green);
}

.zhila-auth__submit:focus-visible {
	outline: 2px solid var(--zhila-green);
	outline-offset: 2px;
}

@media (max-width: 782px) {
	.zhila-auth {
		grid-template-columns: minmax(0, 1fr);
	}

	.zhila-auth__card {
		padding: 24px 20px;
	}

	.zhila-auth__title {
		font-size: 20px;
	}
}


/* ==========================================================================
   18. РЕКВИЗИТЫ ПРОДАВЦА И НАСТРОЙКИ COOKIE В ТЕКСТАХ ДОКУМЕНТОВ

   Реквизиты подставляет [zhila_legal_requisites] в текстах документов
   (inc/legal-content.php) и на странице «Контакты», кнопку повторного выбора
   cookie — [zhila_cookie_settings] в «Политике cookie».

   В ПОДВАЛ НИЧЕГО НЕ ДОБАВЛЯТЬ: у него своя 8-колоночная сетка (секция 13),
   любой лишний элемент встаёт отдельной «колонкой» и ломает макет.
   ========================================================================== */
.zhila-legal-requisites {
	display: inline-block;
	font-size: 13px;
	line-height: 1.7;
	color: var(--zhila-gray-75);
}

.zhila-legal-empty {
	font-size: 12px;
	color: var(--zhila-red);
}

.zhila-legal-cookie-btn {
	display: inline-block;
	padding: 10px 20px;
	border: 1px solid var(--zhila-ink);
	background: transparent;
	color: var(--zhila-ink);
	font: inherit;
	font-size: 13px;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.zhila-legal-cookie-btn:hover {
	background: var(--zhila-ink);
	color: var(--zhila-white);
}


/* ==========================================================================
   19. СТРАНИЦА «СКОРО ОТКРЫТИЕ» (WooCommerce → Coming soon)

   Шаблон — templates/coming-soon.html. WooCommerce подменяет им любую страницу,
   пока включён режим «Скоро откроется» (весь сайт или только страницы магазина);
   администратор и менеджер магазина видят сайт как обычно и эту страницу не
   получают.

   Визуально это тот же язык, что у 404 (секция 14): зелёная полоса #0a856a от
   края до края, кремовый текст, узкий IBM Plex капителью (ось wdth 87).
   Отличия: страница занимает весь экран (100svh), сверху только логотип, снизу
   подпись бренда и копирайт. Меню и иконок магазина нет намеренно: в режиме «весь сайт»
   они ведут на такую же заглушку, а в режиме «только магазин» — на закрытые
   страницы каталога и корзины.
   ========================================================================== */

.zhila-coming-soon {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100svh;
	padding: clamp(24px, 3.75vw, 72px) 0 clamp(20px, 2.1vw, 40px);
	background-color: var(--zhila-green);
	color: var(--zhila-white);
}

/* Логотип тот же, что в шапке и футере (uploads/.../Union.png, кремовый):
   на зелёном он читается без фильтров. Ширина — как у логотипа в футере. */
.zhila-coming-soon-top {
	display: flex;
	justify-content: center;
}

.zhila-coming-soon-logo img {
	width: clamp(120px, 8.28vw, 159px) !important;
	height: auto;
}

.zhila-coming-soon-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	padding: clamp(40px, 6vw, 96px) 24px;
	text-align: center;
}

.zhila-coming-soon-title {
	margin: 0;
	font-family: 'IBM Plex Sans', sans-serif !important;
	font-size: clamp(52px, 7.8vw, 150px);
	font-weight: 500 !important;
	font-variation-settings: 'wght' 550, 'wdth' 87;
	font-style: normal;
	line-height: 0.9;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--zhila-white);
}

.zhila-coming-soon-text {
	max-width: 46ch;
	margin: clamp(24px, 2.4vw, 40px) 0 0;
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: clamp(16px, 0.9375vw, 18px);
	font-variation-settings: 'wdth' 100;
	line-height: 1.5;
	color: var(--zhila-white);
}

.zhila-coming-soon-bottom {
	align-items: baseline;
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: clamp(11px, 0.6771vw, 13px);
	font-variation-settings: 'wdth' 100;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--zhila-white);
	opacity: 0.8;
}

.zhila-coming-soon-bottom p {
	margin: 0;
}

@media (max-width: 782px) {
	.zhila-coming-soon {
		padding-top: 24px;
		padding-bottom: 20px;
	}

	.zhila-coming-soon-body {
		padding: 40px 20px;
	}

	.zhila-coming-soon-bottom {
		justify-content: center;
		text-align: center;
	}
}
