/**
 * Natella — база (MWL-подобные токены). home.css — только главная.
 */

:root {
	--natella-color-bg: #fefefe;
	--natella-color-surface: #fff;
	--natella-color-text: #2f2e2e;
	--natella-color-text-rgb: 47 46 46;
	--natella-color-muted: rgb(var(--natella-color-text-rgb) / 60%);
	--natella-color-border: #cfc9c8;
	--natella-color-primary-hover: #cfc9c8;
	--natella-color-button-text: #fff;
	--natella-font-body: "Montserrat", "Alef", system-ui, sans-serif;
	--natella-font-heading: "Montserrat", "Alef", system-ui, sans-serif;
	--natella-font-weight: 500;
	--natella-page-margin: 0.625rem;
	--natella-gap-sm: 0.5rem;
	--natella-gap-md: 0.9rem;
	--natella-gap-lg: 1rem;
	--natella-gap-xl: 1.5rem;
	--natella-gap-2xl: 2rem;
	--natella-radius: 2px;
	--natella-shadow-card: 0 4px 20px rgb(var(--natella-color-text-rgb) / 15%);
	--natella-shadow-button: 0 2px 3px rgb(0 0 0 / 20%);
	--natella-tracking: 0.03em;
	--natella-text-sm: 0.8125rem;
	--natella-text-body: 0.875rem;
	--natella-text-xs: 0.75rem;
}

@media (min-width: 36em) {
	:root {
		--natella-page-margin: 1rem;
	}
}

@media (min-width: 46.875em) {
	:root {
		--natella-page-margin: 1.5rem;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	font-family: var(--natella-font-body);
	font-weight: var(--natella-font-weight);
	font-size: var(--natella-text-body);
	line-height: 1.6;
	color: var(--natella-color-text);
	background: var(--natella-color-bg);
}

:is(h1, h2, h3, .site-title, .entry-title, .widget-title) {
	font-family: var(--natella-font-heading);
	font-weight: var(--natella-font-weight);
	letter-spacing: var(--natella-tracking);
	text-transform: uppercase;
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

a {
	color: var(--natella-color-text);
	text-decoration-thickness: 0.05em;
	text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
	color: var(--natella-color-primary-hover);
	text-decoration: none;
}

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

/* Header — три зоны как mwlbride: слева primary, по центру логотип, справа secondary + CTA + иконки */
.site-header.site-container {
	background: var(--natella-color-surface);
	border-block-end: 1px solid var(--natella-color-border);
	position: sticky;
	inset-block-start: 0;
	z-index: 100;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: clamp(0.35rem, 1.5vw, 1rem);
	padding-block: 0.85rem;
	min-height: 3.25rem;
}

.site-header__drawer {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.site-branding {
	position: absolute;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	z-index: 2;
	text-align: center;
	pointer-events: auto;
}

.site-branding--logo .custom-logo-link {
	display: block;
	line-height: 0;
}

.site-branding--logo .custom-logo {
	max-height: 2.25rem;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.2;
}

.site-title a {
	color: var(--natella-color-text);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--natella-color-text);
}

.site-header__rail {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	gap: clamp(0.35rem, 1.2vw, 1.35rem);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 0.28rem;
	padding: 0.35rem;
	margin: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.menu-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--natella-color-text);
}

.site-header .site-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-header .site-nav .menu > .menu-item > a {
	display: block;
	padding: 0.35rem clamp(0.4rem, 0.9vw, 0.85rem);
	font-size: 0.6875rem;
	line-height: 1.35;
	position: relative;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 500;
}

.site-header .site-nav .menu a {
	color: var(--natella-color-text);
	text-decoration: none;
}

.site-header .site-nav .menu > .menu-item > a::after {
	display: none;
}

.site-header .site-nav .menu > .menu-item > a:hover,
.site-header .site-nav .menu > .menu-item > a:focus-visible {
	color: var(--natella-color-text);
	opacity: 0.65;
}

.site-header .site-nav .menu > .menu-item.current-menu-item > a {
	opacity: 1;
}

/* CTA в шапке: контур, без скругления (как MWL) */
.site-header__cta.button {
	padding: 0.5rem 1.15rem;
	min-height: auto;
	min-width: 0;
	white-space: nowrap;
	background: transparent !important;
	color: var(--natella-color-text) !important;
	border: 1px solid var(--natella-color-text) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	filter: none;
}

.site-header__cta.button:hover,
.site-header__cta.button:focus-visible {
	filter: none;
	background: var(--natella-color-text) !important;
	color: var(--natella-color-surface) !important;
}

.site-header__cta--drawer {
	display: none;
}

.site-header__tools {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	flex-shrink: 0;
}

.site-header__tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	color: var(--natella-color-text);
	text-decoration: none;
	line-height: 0;
}

.site-header__tool:hover,
.site-header__tool:focus-visible {
	opacity: 0.65;
	color: var(--natella-color-text);
}

.site-header__icon {
	display: block;
}

.site-nav--secondary--mobile {
	display: none;
}

/* Submenu */
@media (min-width: 783px) {
	.site-nav .menu > .menu-item {
		position: relative;
	}

	.site-nav .sub-menu {
		display: none;
		position: absolute;
		inset-inline-start: 0;
		inset-block-start: 100%;
		min-width: 14rem;
		margin: 0;
		padding: var(--natella-gap-sm) 0;
		list-style: none;
		background: var(--natella-color-surface);
		border: 1px solid var(--natella-color-border);
		border-radius: var(--natella-radius);
		box-shadow: var(--natella-shadow-card);
		z-index: 200;
	}

	.site-nav .menu-item:hover > .sub-menu,
	.site-nav .menu-item:focus-within > .sub-menu {
		display: block;
	}

	.site-nav .sub-menu .menu-item > a {
		padding: 0.35rem var(--natella-gap-lg);
		font-size: var(--natella-text-sm);
		font-weight: 400;
	}

	.site-nav .sub-menu .menu-item > a::after {
		display: none;
	}
}

@media (max-width: 782px) {
	.site-header.site-container {
		flex-wrap: wrap;
		align-items: center;
	}

	.menu-toggle {
		display: flex;
		order: 1;
	}

	.site-branding {
		position: static;
		transform: none;
		order: 2;
		flex: 1 1 auto;
		min-width: 0;
	}

	.site-header__rail {
		order: 3;
		flex: 0 0 auto;
		min-width: 0;
		gap: 0.1rem;
	}

	.site-nav--secondary--desktop {
		display: none !important;
	}

	.site-nav--secondary--mobile {
		display: block;
		width: 100%;
	}

	.site-header__cta--rail {
		display: none !important;
	}

	.site-header__cta--drawer {
		display: inline-flex !important;
		align-self: flex-start;
		margin-block-start: var(--natella-gap-md);
	}

	.site-header__drawer {
		order: 4;
		flex: 1 0 100%;
		max-width: 100%;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s ease;
		flex-direction: column;
		align-items: stretch;
		align-content: flex-start;
	}

	.site-header.is-open .site-header__drawer {
		max-height: 85vh;
		overflow-y: auto;
		padding-block-end: var(--natella-gap-lg);
	}

	.site-header .site-nav .menu {
		flex-direction: column;
		padding-block: var(--natella-gap-sm) 0;
		align-items: stretch;
	}

	.site-header .site-nav .menu > .menu-item > a {
		padding: 0.5rem 0;
		font-size: var(--natella-text-xs);
	}

	.site-header .site-nav .sub-menu {
		position: static;
		display: block;
		box-shadow: none;
		border: none;
		padding-inline-start: var(--natella-gap-lg);
		background: transparent;
	}
}

/* Main */
.site-main {
	padding-block: var(--natella-gap-2xl) 3rem;
	min-height: 50vh;
}

.entry-header {
	margin-block-end: var(--natella-gap-lg);
}

.entry-title {
	margin: 0 0 var(--natella-gap-sm);
	font-size: clamp(1.5rem, 4.8vw, 3rem);
	line-height: 1;
}

.entry-content > *:first-child {
	margin-block-start: 0;
}

.entry-content > *:last-child {
	margin-block-end: 0;
}

.entry-content .alignwide {
	max-width: none;
	width: min(100%, 90vw);
	margin-inline: auto;
}

.entry-meta {
	font-size: var(--natella-text-sm);
	color: var(--natella-color-muted);
}

/* Все основные кнопки темы */
.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--natella-gap-lg) var(--natella-gap-xl);
	min-height: 44px;
	background: var(--natella-color-text);
	color: var(--natella-color-button-text) !important;
	border: 1px solid var(--natella-color-text);
	border-radius: var(--natella-radius);
	font: inherit;
	font-weight: var(--natella-font-weight);
	font-size: var(--natella-text-body);
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: var(--natella-tracking);
	text-decoration: none;
	cursor: pointer;
	box-shadow: var(--natella-shadow-button);
	transition: filter 0.2s ease;
}

.button:hover,
.button:focus-visible,
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
	filter: brightness(1.06);
	text-decoration: none;
}

/* Footer */
.site-footer.site-container {
	background: var(--natella-color-surface);
	border-block-start: 1px solid var(--natella-color-border);
	padding-block: var(--natella-gap-2xl);
	margin-block-start: auto;
}

.site-footer__widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: var(--natella-gap-xl) var(--natella-gap-2xl);
	margin-block-end: var(--natella-gap-2xl);
}

.site-footer__widgets .widget-title {
	margin: 0 0 0.75rem;
	font-size: var(--natella-text-xs);
	color: var(--natella-color-text);
	font-weight: 600;
}

.site-footer__widgets .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__widgets .widget a {
	color: var(--natella-color-text);
	text-decoration: none;
	font-size: var(--natella-text-body);
}

.site-footer__widgets .widget a:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.05em;
}

.menu--footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	list-style: none;
	margin: 0 0 var(--natella-gap-lg);
	padding: 0;
	justify-content: center;
}

.menu--footer a {
	color: var(--natella-color-muted);
	text-decoration: none;
	font-size: var(--natella-text-body);
}

.site-info {
	margin: 0;
	text-align: center;
	font-size: var(--natella-text-sm);
	color: var(--natella-color-muted);
}

.site-info a {
	color: inherit;
}

/* WooCommerce */
.site-main--woocommerce .woocommerce-breadcrumb {
	margin-block-end: var(--natella-gap-lg);
	font-size: var(--natella-text-sm);
	color: var(--natella-color-muted);
}

.site-main--woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
	gap: var(--natella-gap-lg);
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 62em) {
	.site-main--woocommerce ul.products {
		gap: var(--natella-gap-sm);
	}
}

.site-main--woocommerce ul.products li.product {
	background: var(--natella-color-surface);
	border: 1px solid var(--natella-color-border);
	border-radius: var(--natella-radius);
	padding: var(--natella-gap-lg);
	text-align: center;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.site-main--woocommerce ul.products li.product:hover {
	box-shadow: var(--natella-shadow-card);
	transform: translateY(-4px);
}

.site-main--woocommerce .woocommerce-loop-product__title {
	font-size: var(--natella-text-body);
	margin: 0.75rem 0 0.25rem;
}

.site-main--woocommerce .price {
	font-weight: 600;
}

/* Utilities */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	padding: 0.75rem var(--natella-gap-lg);
	background: var(--natella-color-text);
	color: var(--natella-color-button-text);
	z-index: 100000;
	inset-block-start: 0;
	inset-inline-start: 0;
	position: fixed;
}
