/* ==========================================================================
   Prosto-Eda — компонентные стили дочерней темы Twenty Twenty-Five.

   Разделение:
     • theme.json  — палитра, типографика, отступы, размеры, тени;
     • этот файл   — раскладка компонентов, состояния, доступность, печать.

   Все цвета берутся из токенов theme.json, чтобы Site Editor показывал
   те же значения, что и фронтенд.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. База
   -------------------------------------------------------------------------- */

:root {
	--pe-forest: var(--wp--preset--color--forest);
	--pe-forest-dark: var(--wp--preset--color--forest-dark);
	--pe-orange: var(--wp--preset--color--orange);
	--pe-text: var(--wp--preset--color--text);
	--pe-muted: var(--wp--preset--color--muted);
	--pe-bg: var(--wp--preset--color--bg);
	--pe-surface: var(--wp--preset--color--surface);
	--pe-soft-green: var(--wp--preset--color--soft-green);
	--pe-soft-orange: var(--wp--preset--color--soft-orange);
	--pe-border: var(--wp--preset--color--border);

	--pe-shell: 1280px;
	--pe-gutter: clamp(16px, 4vw, 32px);
	--pe-radius: 14px;
	--pe-radius-sm: 10px;
	--pe-radius-lg: 18px;
	--pe-tap: 44px;

	--pe-shadow-card: 0 1px 2px rgba(32, 40, 32, 0.04), 0 8px 24px rgba(32, 40, 32, 0.06);
	--pe-shadow-raised: 0 2px 6px rgba(32, 40, 32, 0.08), 0 16px 40px rgba(32, 40, 32, 0.12);

	--pe-header-h: 72px;
}

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

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

body {
	background-color: var(--pe-bg);
	color: var(--pe-text);
	font-family: var(--wp--preset--font-family--pe-sans);
	font-size: var(--wp--preset--font-size--md);
	line-height: var(--wp--preset--line-height--body);
	overflow-x: clip;
}

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

a {
	color: var(--pe-forest-dark);
}

a:hover {
	color: var(--pe-forest);
}

/* Видимая рамка фокуса — доступность WCAG 2.4.7. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--pe-orange);
	outline-offset: 2px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   2. Каркас страницы
   -------------------------------------------------------------------------- */

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

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

.pe-main {
	padding-bottom: clamp(40px, 6vw, 72px);
}

.pe-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(24px, 3vw, 40px);
	align-items: start;
}

.pe-layout__main {
	display: grid;
	gap: clamp(36px, 5vw, 64px);
	min-width: 0;
}

.pe-layout__side {
	display: grid;
	gap: 24px;
	min-width: 0;
	position: sticky;
	top: 24px;
}

/* Полноширинные блоки (баннер) — растягиваются на весь экран. */
.alignfull {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	width: auto;
}

/* --------------------------------------------------------------------------
   3. Шапка
   -------------------------------------------------------------------------- */

.pe-header {
	background: var(--pe-surface);
	border-bottom: 1px solid var(--pe-border);
	position: relative;
	z-index: 20;
}

.pe-header__bar {
	display: flex;
	align-items: center;
	gap: 20px;
	max-width: var(--pe-shell);
	margin-inline: auto;
	padding: 12px var(--pe-gutter);
	min-height: var(--pe-header-h);
}

.pe-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.pe-brand__logo {
	display: inline-flex;
	text-decoration: none;
}

.pe-brand__mark {
	display: block;
	width: 40px;
	height: 40px;
}

.pe-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.pe-brand__title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--pe-forest);
	text-decoration: none;
	white-space: nowrap;
}

.pe-brand__title:hover {
	color: var(--pe-forest-dark);
}

.pe-brand__slogan {
	font-size: 12px;
	color: var(--pe-muted);
	white-space: nowrap;
}

/* Поиск в шапке */
.pe-header .wp-block-search {
	flex: 1 1 auto;
	max-width: 520px;
	margin-left: auto;
	min-width: 0;
}

.pe-header .wp-block-search__inside-wrapper {
	display: flex;
	align-items: stretch;
	background: #f3f3f0;
	border: 1px solid transparent;
	border-radius: 12px;
	padding: 0;
	gap: 0;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pe-header .wp-block-search__inside-wrapper:focus-within {
	background: var(--pe-surface);
	border-color: var(--pe-forest);
}

.pe-header .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 8px 0 14px;
	border: 0;
	background: transparent;
	font-size: 15px;
	color: var(--pe-text);
	border-radius: 12px 0 0 12px;
}

.pe-header .wp-block-search__input::placeholder {
	color: #8d938a;
}

.pe-header .wp-block-search__input:focus {
	outline: none;
}

.pe-header .wp-block-search__button {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0 12px 12px 0;
	background: var(--pe-forest);
	color: var(--pe-surface);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.pe-header .wp-block-search__button:hover {
	background: var(--pe-forest-dark);
}

.pe-header .wp-block-search__button:focus {
	outline: none;
}

.pe-header .wp-block-search__button:focus-visible {
	outline: 2px solid var(--pe-orange);
	outline-offset: 2px;
}

.pe-header .wp-block-search__button svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.pe-header .wp-block-search__label {
	display: none;
}

/* Навигация */
.pe-header__nav {
	background: #f2f2ef;
	border-top: 1px solid var(--pe-border);
}

.pe-nav {
	position: static;
}

.pe-nav__summary,
.pe-nav__burger {
	display: none;
}

.pe-nav__panel {
	background: transparent;
}

.pe-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 28px;
	max-width: var(--pe-shell);
	margin-inline: auto;
	padding: 0 var(--pe-gutter);
	list-style: none;
}

.pe-nav__item {
	display: flex;
}

.pe-nav__link {
	display: inline-flex;
	align-items: center;
	min-height: 52px;
	padding: 4px 0;
	font-size: 15px;
	font-weight: 500;
	color: var(--pe-text);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.pe-nav__link:hover {
	color: var(--pe-forest);
	border-bottom-color: var(--pe-forest);
}

/* Выпадающие подменю разделов */

.pe-nav__item {
	position: relative;
}

.pe-nav__item--has-children {
	gap: 2px;
}

.pe-nav__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--pe-muted);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pe-nav__toggle:hover {
	background: var(--pe-soft-green);
	color: var(--pe-forest);
}

.pe-nav__toggle-icon {
	transition: transform 0.18s ease;
}

.pe-nav__item.is-open > .pe-nav__toggle .pe-nav__toggle-icon {
	transform: rotate(180deg);
}

.pe-nav__submenu {
	position: absolute;
	top: 100%;
	left: -8px;
	z-index: 40;
	min-width: 240px;
	max-width: 320px;
	padding: 8px;
	background: var(--pe-surface);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-radius);
	box-shadow: var(--pe-shadow-raised);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.pe-nav__item:hover > .pe-nav__submenu,
.pe-nav__item:focus-within > .pe-nav__submenu,
.pe-nav__item.is-open > .pe-nav__submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.pe-nav__sublist {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-nav__subitem {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	border-radius: 9px;
}

.pe-nav__subitem:hover {
	background: var(--pe-soft-green);
}

.pe-nav__sublink {
	flex: 1 1 auto;
	display: block;
	padding: 8px 10px;
	border-radius: 9px;
	font-size: 14px;
	line-height: 1.35;
	color: var(--pe-text);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pe-nav__sublink:hover {
	color: var(--pe-forest-dark);
}

.pe-nav__nested {
	margin: 2px 0 2px 10px;
	padding-left: 8px;
	border-left: 1px solid var(--pe-border);
}

.pe-nav__sublist--nested .pe-nav__sublink {
	font-size: 13px;
	color: var(--pe-muted);
}

.pe-nav__sublist--nested .pe-nav__subitem:hover {
	background: transparent;
}

.pe-nav__sublist--nested .pe-nav__sublink:hover {
	color: var(--pe-forest-dark);
	text-decoration: underline;
}

/* Активный раздел */

.pe-nav__item.is-current > .pe-nav__link,
.pe-nav__item.is-in-section > .pe-nav__link {
	color: var(--pe-forest);
	border-bottom-color: var(--pe-forest);
}

.pe-nav__subitem.is-current > .pe-nav__sublink {
	font-weight: 600;
	color: var(--pe-forest-dark);
}

/* Хлебные крошки */

.pe-breadcrumbs {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--pe-muted);
}

.pe-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-breadcrumbs__item {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pe-breadcrumbs__item + .pe-breadcrumbs__item::before {
	content: "/";
	color: var(--pe-border);
}

.pe-breadcrumbs__link {
	color: var(--pe-muted);
	text-decoration: none;
}

.pe-breadcrumbs__link:hover {
	color: var(--pe-forest);
	text-decoration: underline;
}

.pe-breadcrumbs__item--current {
	color: var(--pe-text);
	font-weight: 500;
}

/* Обзорные страницы разделов */

.pe-hub {
	display: grid;
	gap: clamp(32px, 4vw, 56px);
}

.pe-hub__intro {
	max-width: 68ch;
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--pe-muted);
}

.pe-section--hub {
	display: grid;
	gap: 20px;
}

.pe-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.pe-section__title {
	margin: 0;
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.2;
}

.pe-section__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pe-forest);
	text-decoration: none;
}

.pe-section__link:hover {
	color: var(--pe-forest-dark);
	text-decoration: underline;
}

.pe-section__link-icon {
	transition: transform 0.15s ease;
}

.pe-section__link:hover .pe-section__link-icon {
	transform: translateX(3px);
}

.pe-products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-products__link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	background: var(--pe-surface);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-radius-sm);
	color: var(--pe-text);
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pe-products__link:hover {
	background: var(--pe-soft-green);
	border-color: var(--pe-forest);
	color: var(--pe-forest-dark);
}

.pe-products__label {
	font-weight: 600;
}

.pe-products__count {
	font-size: 13px;
	color: var(--pe-muted);
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   4. Баннер (секция A)
   -------------------------------------------------------------------------- */

.pe-hero {
	position: relative;
	isolation: isolate;
	min-height: clamp(340px, 40vw, 500px);
	display: flex;
	align-items: center;
	overflow: hidden;
	background: #2c332a;
}

.pe-hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.pe-hero__image,
.pe-hero .pe-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: auto !important;
	display: block;
}

.pe-hero__scrim {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(20, 26, 20, 0.82) 0%, rgba(20, 26, 20, 0.55) 38%, rgba(20, 26, 20, 0.12) 68%, rgba(20, 26, 20, 0) 100%),
		linear-gradient(180deg, rgba(20, 26, 20, 0.25) 0%, rgba(20, 26, 20, 0) 40%);
}

.pe-hero__content {
	width: 100%;
	max-width: var(--pe-shell);
	margin-inline: auto;
	padding: clamp(40px, 6vw, 72px) var(--pe-gutter);
	color: #fff;
}

.pe-hero__title {
	margin: 0 0 16px;
	max-width: 12ch;
	font-size: clamp(30px, 4.4vw, 46px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #fff;
	text-wrap: balance;
}

.pe-hero__text {
	margin: 0 0 26px;
	max-width: 46ch;
	font-size: clamp(15px, 1.3vw, 17px);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.92);
}

.pe-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Кнопки */
.pe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--pe-tap);
	padding: 10px 22px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pe-btn--primary {
	background: var(--pe-orange);
	color: #fff;
}

.pe-btn--primary:hover {
	background: #cf5615;
	color: #fff;
}

.pe-btn--ghost {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.65);
	color: #fff;
	backdrop-filter: blur(2px);
}

.pe-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.22);
	border-color: #fff;
	color: #fff;
}

.pe-btn__icon {
	flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   5. Быстрые переходы (секция B)
   -------------------------------------------------------------------------- */

.pe-quick {
	margin-top: -34px;
	position: relative;
	z-index: 5;
}

.pe-quick__list {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 14px;
	list-style: none;
	background: var(--pe-surface);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-radius-lg);
	box-shadow: var(--pe-shadow-raised);
}

.pe-quick__item {
	min-width: 0;
}

.pe-quick__link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 62px;
	padding: 8px 10px;
	border-radius: var(--pe-radius-sm);
	text-decoration: none;
	color: var(--pe-text);
	transition: background-color 0.15s ease;
}

.pe-quick__link:hover {
	background: var(--pe-soft-green);
	color: var(--pe-text);
}

.pe-quick__link + .pe-quick__item .pe-quick__link,
.pe-quick__item:not(:last-child) .pe-quick__link {
	position: relative;
}

.pe-quick__item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 12px;
	right: 0;
	bottom: 12px;
	width: 1px;
	background: var(--pe-border);
}

.pe-quick__item {
	position: relative;
}

.pe-quick__icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--pe-soft-orange);
	color: var(--pe-orange);
}

.pe-quick__item:nth-child(2) .pe-quick__icon,
.pe-quick__item:nth-child(4) .pe-quick__icon {
	background: var(--pe-soft-green);
	color: var(--pe-forest);
}

.pe-quick__item:nth-child(3) .pe-quick__icon {
	background: var(--pe-soft-green);
	color: var(--pe-forest);
}

.pe-quick__item:nth-child(5) .pe-quick__icon {
	background: #fdeaea;
	color: #c0392b;
}

.pe-quick__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pe-quick__label {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--pe-text);
}

.pe-quick__subtitle {
	font-size: 13px;
	line-height: 1.3;
	color: var(--pe-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pe-quick__arrow {
	flex: 0 0 auto;
	margin-left: auto;
	color: var(--pe-muted);
	transition: transform 0.15s ease, color 0.15s ease;
}

.pe-quick__link:hover .pe-quick__arrow {
	transform: translateX(2px);
	color: var(--pe-forest);
}

/* --------------------------------------------------------------------------
   6. Секции
   -------------------------------------------------------------------------- */

.pe-section {
	display: grid;
	gap: 20px;
	min-width: 0;
}

.pe-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.pe-section__title {
	margin: 0;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.15;
	color: var(--pe-text);
}

.pe-section__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 600;
	color: var(--pe-orange);
	text-decoration: none;
	white-space: nowrap;
}

.pe-section__link:hover {
	color: #cf5615;
	text-decoration: underline;
}

/* Сетки */
.pe-grid {
	display: grid;
	gap: 18px;
	min-width: 0;
}

.pe-grid--recipes,
.pe-grid--news,
.pe-grid--materials {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pe-grid--editorial {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

/* --------------------------------------------------------------------------
   7. Карточки
   -------------------------------------------------------------------------- */

.pe-card {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.pe-card__media {
	position: relative;
	display: block;
	border-radius: var(--pe-radius);
	overflow: hidden;
	background: #eceee8;
	margin: 0;
}

.pe-card__media img {
	display: block;
	width: 100%;
	height: auto;
}

/* Рубрики в карточке (core/post-terms) */
.pe-card__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
	font-size: 12px;
}

.pe-card__terms a {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--pe-soft-green);
	color: var(--pe-forest-dark);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
}

.pe-card__terms a:hover {
	background: var(--pe-forest);
	color: #fff;
}

.pe-card__image,
.pe-card .pe-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: var(--pe-ratio, 4 / 3);
	object-fit: cover;
}

.pe-card--recipe {
	background: var(--pe-surface);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-radius);
	box-shadow: var(--pe-shadow-card);
	padding: 9px;
}

.pe-card--recipe .pe-card__media {
	border-radius: var(--pe-radius-sm);
}

.pe-card--recipe .pe-card__body {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 12px 6px 8px;
	flex: 1 1 auto;
}

.pe-chip {
	display: inline-block;
	align-self: flex-start;
	max-width: 100%;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--pe-soft-green);
	color: var(--pe-forest-dark);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pe-chip--topic {
	background: var(--pe-soft-orange);
	color: #9c3f0d;
}

.pe-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pe-text);
}

.pe-card__title a {
	color: inherit;
	text-decoration: none;
}

.pe-card__title a:hover {
	color: var(--pe-forest);
	text-decoration: underline;
}

.pe-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 2px;
}

.pe-card__date {
	font-size: 13px;
	color: var(--pe-muted);
}

.pe-card__views {
	font-size: 13px;
	color: var(--pe-muted);
}

.pe-card__excerpt {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--pe-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pe-card--news .pe-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 12px;
}

.pe-card--news .pe-card__meta {
	margin-top: 0;
	padding-top: 0;
	gap: 10px;
}

/* Рейтинг */
.pe-rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	line-height: 1;
}

.pe-rating__star {
	color: var(--pe-orange);
	fill: var(--pe-orange);
	stroke-width: 1.2;
}

.pe-rating__value {
	font-weight: 700;
	color: var(--pe-orange);
}

.pe-rating__count {
	color: var(--pe-muted);
	font-size: 13px;
}

/* Карточка «Выбор редакции» */
.pe-card--editorial .pe-card__media {
	border-radius: var(--pe-radius);
}

.pe-card--editorial .pe-card__image,
.pe-card--editorial .pe-placeholder {
	aspect-ratio: 16 / 9;
}

.pe-card__overlay {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	padding: 40px 12px 12px;
	background: linear-gradient(180deg, rgba(18, 22, 18, 0) 0%, rgba(18, 22, 18, 0.62) 40%, rgba(18, 22, 18, 0.9) 100%);
	color: #fff;
}

.pe-card__overlay-title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.pe-card__arrow,
.pe-feature__arrow {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--pe-orange);
	color: #fff;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.pe-card__arrow svg,
.pe-feature__arrow svg {
	stroke-width: 2.2;
}

.pe-card--editorial .pe-card__media:hover .pe-card__arrow {
	transform: translateX(3px);
	background: #cf5615;
}

/* --------------------------------------------------------------------------
   8. Боковые карточки (секции D, E)
   -------------------------------------------------------------------------- */

.pe-feature {
	border-radius: var(--pe-radius-lg);
	padding: 16px;
	box-shadow: var(--pe-shadow-card);
}

.pe-feature--seasonal {
	background: var(--pe-soft-green);
}

.pe-feature--menu {
	background: var(--pe-soft-orange);
}

.pe-feature__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--pe-text);
}

.pe-feature__media {
	position: relative;
	display: block;
	border-radius: var(--pe-radius);
	overflow: hidden;
	background: rgba(32, 40, 32, 0.08);
}

.pe-feature__image,
.pe-feature .pe-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: var(--pe-ratio, 16 / 9);
	object-fit: cover;
}

.pe-feature--menu .pe-feature__media {
	display: flex;
	align-items: center;
	gap: 12px;
	background: transparent;
	overflow: visible;
}

.pe-feature--menu .pe-feature__image,
.pe-feature--menu .pe-placeholder {
	width: 84px;
	height: 84px;
	border-radius: var(--pe-radius-sm);
	aspect-ratio: 1 / 1;
	flex: 0 0 auto;
}

.pe-feature--menu .pe-feature__overlay {
	position: static;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0;
	background: none;
	color: var(--pe-text);
}

.pe-feature__overlay {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding: 36px 14px 14px;
	background: linear-gradient(180deg, rgba(18, 22, 18, 0) 0%, rgba(18, 22, 18, 0.62) 42%, rgba(18, 22, 18, 0.9) 100%);
	color: #fff;
}

.pe-feature__caption {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.pe-feature--menu .pe-feature__caption {
	color: var(--pe-text);
	text-shadow: none;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   9. Плейсхолдер изображения
   -------------------------------------------------------------------------- */

.pe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: var(--pe-ratio, 4 / 3);
	background: linear-gradient(135deg, #eef0ea 0%, #e2e6dd 100%);
	color: #9aa396;
}

.pe-placeholder__mark {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background:
		linear-gradient(135deg, rgba(54, 94, 39, 0.18) 0%, rgba(233, 103, 32, 0.16) 100%);
}

.pe-placeholder__label {
	position: absolute;
	margin-top: 60px;
	font-size: 12px;
	color: #8d938a;
}

/* --------------------------------------------------------------------------
   10. Подвал
   -------------------------------------------------------------------------- */

.pe-footer {
	background: var(--pe-surface);
	border-top: 1px solid var(--pe-border);
	margin-top: clamp(40px, 6vw, 80px);
}

.pe-footer__inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
	max-width: var(--pe-shell);
	margin-inline: auto;
	padding: 32px var(--pe-gutter) 24px;
}

.pe-footer__brand {
	max-width: 260px;
}

.pe-footer__navs {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 6px 32px;
	min-width: 0;
}

.pe-footer__nav {
	min-width: 0;
}

.pe-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-footer__links a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	font-size: 14px;
	color: var(--pe-muted);
	text-decoration: none;
}

.pe-footer__links a:hover {
	color: var(--pe-forest);
	text-decoration: underline;
}

.pe-social__list {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #eef1ea;
	color: var(--pe-forest);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pe-social__link:hover {
	background: var(--pe-forest);
	color: #fff;
}

.pe-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	max-width: var(--pe-shell);
	margin-inline: auto;
	padding: 14px var(--pe-gutter);
	background: #f4f4f1;
	border-top: 1px solid var(--pe-border);
	font-size: 13px;
	color: var(--pe-muted);
}

/* --------------------------------------------------------------------------
   11. Служебные и внутренние страницы
   -------------------------------------------------------------------------- */

.pe-page {
	padding-block: clamp(28px, 4vw, 56px);
}

.pe-page__title {
	margin: 0 0 20px;
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.pe-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.pe-pagination {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 32px;
}

.pe-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--pe-border);
	border-radius: 10px;
	background: var(--pe-surface);
	color: var(--pe-text);
	text-decoration: none;
}

.pe-pagination .page-numbers.current {
	background: var(--pe-forest);
	border-color: var(--pe-forest);
	color: #fff;
}

/* --------------------------------------------------------------------------
   12. Адаптив
   -------------------------------------------------------------------------- */

/* На широких экранах меню всегда раскрыто: бургер не нужен, а панель не должна
   зависеть от состояния <details>.
   Chrome 131+ скрывает содержимое закрытого <details> через
   content-visibility у ::details-content, более старые движки — через
   display:none у дочерних элементов. Поэтому правила два. */
@media (min-width: 768px) {
	details.pe-nav::details-content {
		content-visibility: visible;
	}

	details.pe-nav:not([open]) > .pe-nav__panel {
		display: block;
	}
}

@media (max-width: 1279px) {
	.pe-grid--recipes,
	.pe-grid--news,
	.pe-grid--materials {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.pe-grid--editorial {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1023px) {
	/* Промежуточная ширина: меню умещается в одну строку */
	.pe-nav__list {
		gap: 2px 16px;
	}

	.pe-nav__link {
		font-size: 14px;
	}

	.pe-nav__toggle {
		width: 22px;
		height: 22px;
	}

	.pe-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.pe-layout__side {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pe-quick__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.pe-grid--recipes,
	.pe-grid--news,
	.pe-grid--materials {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pe-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	:root {
		--pe-header-h: 60px;
	}

	.pe-header__bar {
		flex-wrap: wrap;
		gap: 10px;
		padding: 10px var(--pe-gutter);
	}

	.pe-brand__mark {
		width: 34px;
		height: 34px;
	}

	.pe-brand__title {
		font-size: 19px;
	}

	.pe-header .wp-block-search {
		order: 3;
		flex: 1 0 100%;
		max-width: none;
		margin-left: 0;
	}

	/* Бургер мобильного меню */
	.pe-header__nav {
		background: transparent;
		border-top: 0;
	}

	.pe-nav {
		position: absolute;
		top: 10px;
		right: var(--pe-gutter);
		z-index: 30;
	}

	.pe-nav__summary,
	.pe-nav__burger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--pe-tap);
		height: var(--pe-tap);
		border-radius: 12px;
		background: #f2f2ef;
		color: var(--pe-text);
		cursor: pointer;
		list-style: none;
	}

	.pe-nav__summary::-webkit-details-marker,
	.pe-nav__burger::-webkit-details-marker {
		display: none;
	}

	.pe-nav__panel {
		position: absolute;
		top: calc(var(--pe-tap) + 8px);
		right: 0;
		width: min(300px, calc(100vw - 2 * var(--pe-gutter)));
		padding: 10px;
		background: var(--pe-surface);
		border: 1px solid var(--pe-border);
		border-radius: var(--pe-radius);
		box-shadow: var(--pe-shadow-raised);
	}

	.pe-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0;
	}

	.pe-nav__link {
		min-height: var(--pe-tap);
		padding: 10px 12px;
		border-bottom: 1px solid var(--pe-border);
		border-radius: 8px;
	}

	.pe-nav__item:last-child .pe-nav__link {
		border-bottom: 0;
	}

	/* Подменю в мобильной шторке: раскрываются по нажатию */
	.pe-nav__panel {
		max-height: calc(100vh - 96px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.pe-nav__item {
		flex-wrap: wrap;
	}

	.pe-nav__link {
		flex: 1 1 auto;
	}

	.pe-nav__toggle {
		flex: 0 0 auto;
		width: var(--pe-tap);
		height: var(--pe-tap);
		margin: 0 -6px 0 0;
	}

	.pe-nav__submenu,
	.pe-nav__nested {
		position: static;
		display: none;
		min-width: 0;
		max-width: none;
		margin: 0;
		padding: 0 0 0 10px;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.pe-nav__item.is-open > .pe-nav__submenu,
	.pe-nav__subitem.is-open > .pe-nav__nested {
		display: block;
	}

	.pe-nav__sublink {
		padding: 10px 8px;
		font-size: 14px;
		white-space: normal;
		border-bottom: 1px solid var(--pe-border);
	}

	.pe-nav__nested {
		padding-left: 18px;
		border-left: 0;
	}

	.pe-nav__sublist--nested .pe-nav__sublink {
		font-size: 13px;
		color: var(--pe-muted);
	}

	/* Баннер: текст поверх изображения */
	.pe-hero {
		min-height: clamp(380px, 78vw, 520px);
	}

	.pe-hero__scrim {
		background:
			linear-gradient(180deg, rgba(20, 26, 20, 0.55) 0%, rgba(20, 26, 20, 0.72) 45%, rgba(20, 26, 20, 0.86) 100%);
	}

	.pe-hero__title {
		max-width: 16ch;
	}

	.pe-hero__text {
		max-width: 34ch;
	}

	.pe-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.pe-btn {
		width: 100%;
	}

	/* Быстрые переходы — горизонтальная лента */
	.pe-quick {
		margin-top: -24px;
	}

	.pe-quick__list {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
		padding: 12px;
	}

	.pe-quick__item {
		flex: 0 0 auto;
		width: 148px;
		scroll-snap-align: start;
	}

	.pe-quick__item::after {
		display: none;
	}

	.pe-quick__link {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		min-height: 0;
		padding: 10px;
	}

	.pe-quick__subtitle {
		white-space: normal;
	}

	.pe-quick__arrow {
		display: none;
	}

	/* Ленты карточек */
	.pe-grid--recipes,
	.pe-grid--news,
	.pe-grid--materials,
	.pe-grid--editorial {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
		margin-inline: calc(-1 * var(--pe-gutter));
		padding-inline: var(--pe-gutter);
	}

	.pe-grid--recipes .pe-card {
		flex: 0 0 74%;
		scroll-snap-align: start;
	}

	.pe-grid--news .pe-card,
	.pe-grid--materials .pe-card {
		flex: 0 0 72%;
		scroll-snap-align: start;
	}

	.pe-grid--editorial .pe-card {
		flex: 0 0 78%;
		scroll-snap-align: start;
	}

	.pe-layout__side {
		grid-template-columns: minmax(0, 1fr);
	}

	.pe-section__head {
		align-items: center;
	}

	.pe-archive-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.pe-footer__inner {
		flex-direction: column;
		gap: 20px;
	}
}

@media (max-width: 479px) {
	.pe-grid--recipes .pe-card {
		flex: 0 0 82%;
	}

	.pe-grid--news .pe-card,
	.pe-grid--materials .pe-card {
		flex: 0 0 80%;
	}

	.pe-quick__item {
		width: 136px;
	}
}

/* --------------------------------------------------------------------------
   13. Доступность и печать
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.pe-header,
	.pe-footer,
	.pe-quick,
	.pe-hero__actions,
	.pe-layout__side {
		display: none !important;
	}

	body {
		background: #fff;
	}
}
