/* =====================================================================
   Маркет мастеров — основные стили
   Палитра и типографика: см. brand/brandbook.html
   ===================================================================== */

/* ---------- Шрифты (локально, без внешних CDN) ---------- */
@font-face {
  font-family: "MM Serif";
  src: url("../fonts/pt-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MM Serif";
  src: url("../fonts/pt-serif-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MM Sans";
  src: url("../fonts/pt-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --clay: #a8503c;
  --clay-dark: #7c3828;
  --clay-soft: #f0dfd6;
  --ink: #2e2622;
  --ink-70: #5b5049;
  --muted: #6e6157;
  --linen: #f7f2ea;
  --linen-2: #efe7da;
  --paper: #fffdf9;
  --sand: #d9c7ac;
  --line: #e4d9c9;
  --ochre: #c08a3e;
  --sage: #6f7a5e;
  --ok: #4d6b4a;

  --serif: "MM Serif", "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "MM Sans", "PT Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(46, 38, 34, .06), 0 2px 8px rgba(46, 38, 34, .04);
  --shadow-md: 0 6px 24px rgba(46, 38, 34, .08), 0 2px 6px rgba(46, 38, 34, .04);
  --shadow-lg: 0 18px 50px rgba(46, 38, 34, .12);
  --container: 1200px;
  --pad: clamp(18px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-dark); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: var(--clay-soft); color: var(--clay-dark); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Типографика ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2, .h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3, .h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--ink-70); }
.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: .9rem;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }
strong, b { font-weight: 700; }

/* ---------- Сетка ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.container--narrow { max-width: 820px; }
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--tight { padding: clamp(32px, 4vw, 56px) 0; }
.section--linen { background: var(--linen); }
.section--sand { background: var(--linen-2); }
.section--clay { background: var(--clay-dark); color: var(--linen); }
.section--clay h1, .section--clay h2, .section--clay h3 { color: var(--linen); }
.section--clay .kicker { color: var(--sand); }
.section-head { max-width: 720px; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split--top { align-items: start; }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Кнопки и бейджи ---------- */
.btn {
  --btn-bg: var(--clay);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .85em 1.5em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s, box-shadow .18s, color .18s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--clay-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--clay); border-color: var(--clay); box-shadow: none; }
.btn--ghost:hover { background: var(--clay); color: #fff; }
.btn--light { --btn-bg: var(--linen); --btn-fg: var(--clay-dark); }
.btn--light:hover { background: #fff; color: var(--clay-dark); }
.btn--line-light { --btn-bg: transparent; --btn-fg: var(--linen); border-color: rgba(247, 242, 234, .5); box-shadow: none; }
.btn--line-light:hover { background: var(--linen); color: var(--clay-dark); }
.btn--sm { padding: .6em 1.1em; font-size: .92rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

.badge {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .3em .75em;
  border-radius: 999px;
  background: var(--clay-soft);
  color: var(--clay-dark);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
}
.badge--ochre { background: #f7ecd7; color: #8a5c18; }
.badge--sage { background: #e7ebdf; color: #4b5638; }

/* ---------- Шапка ---------- */
.topbar {
  background: var(--clay-dark);
  color: rgba(247, 242, 234, .9);
  font-size: .86rem;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; align-items: center; padding: 7px 0; }
.topbar a { color: inherit; text-decoration: none; opacity: .92; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar__list { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  /* без backdrop-filter: он делает шапку containing block для position:fixed
     и ломает выезжающее мобильное меню */
  background: rgba(255, 253, 249, .97);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-md); }
.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 3vw, 36px);
  padding-block: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 46px; height: 46px; flex: 0 0 auto; }
.brand__text { display: grid; line-height: 1; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.28rem; letter-spacing: .01em; }
.brand__tag { font-size: .66rem; letter-spacing: .17em; text-transform: uppercase; color: var(--clay); margin-top: 4px; }
.custom-logo { max-height: 52px; width: auto; }

.main-nav { display: flex; justify-content: center; }
.main-nav ul { display: flex; flex-wrap: nowrap; gap: clamp(8px, 1.5vw, 22px); align-items: center; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  display: inline-block; padding: 8px 0; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-size: .95rem;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--clay); border-color: var(--clay); }
.main-nav .sub-menu {
  position: absolute; display: none; flex-direction: column; gap: 2px;
  min-width: 220px; padding: 10px; margin-top: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { display: block; padding: 8px 10px; border: 0; border-radius: var(--r-sm); }
.main-nav .sub-menu a:hover { background: var(--linen); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink); text-decoration: none;
  font-size: .95rem; font-family: var(--sans); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.icon-btn:hover { border-color: var(--clay); color: var(--clay); background: var(--linen); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn__count {
  position: absolute; transform: translate(14px, -14px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--clay); color: #fff; font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-link { position: relative; }
.header-cta { display: inline-flex; }
.nav-toggle { display: none; }
.nav-close { display: none; }
@media (max-width: 1080px) {
  .nav-close { display: inline-flex; position: absolute; top: 14px; right: 14px; }
}

@media (max-width: 1080px) {
  .header-cta { display: none; }
  .site-header__inner { grid-template-columns: auto 1fr; }
  .nav-toggle { display: inline-flex; }
  .header-actions { justify-self: end; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px);
    background: var(--paper); padding: 84px 24px 32px;
    border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateX(105%); transition: transform .3s var(--ease);
    overflow-y: auto; z-index: 80;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .main-nav a { font-size: 1.1rem; padding: 12px 0; display: block; width: 100%; }
  .main-nav .sub-menu { position: static; display: flex; padding: 0 0 0 12px; border: 0; box-shadow: none; background: transparent; }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(46, 38, 34, .35);
    opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 50;
  }
  .nav-scrim.is-open { opacity: 1; visibility: visible; }
}
@media (min-width: 1081px) { .nav-scrim { display: none; } }

/* ---------- Хлебные крошки ---------- */
.crumbs { background: var(--linen); border-bottom: 1px solid var(--line); font-size: .88rem; }
.crumbs__inner { padding: 12px 0; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--clay); }
.crumbs span[aria-current] { color: var(--ink); }
.crumbs__sep { margin: 0 .5em; opacity: .5; }

/* ---------- Герой ---------- */
.hero { position: relative; background: var(--linen); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(24px, 4vw, 56px);
  align-items: center; padding: clamp(36px, 6vw, 84px) 0;
}
.hero__title { font-size: clamp(2.2rem, 5vw, 3.9rem); margin-bottom: .35em; }
.hero__title em { font-style: normal; color: var(--clay); position: relative; white-space: nowrap; }
.hero__title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .18em;
  background: var(--sand); opacity: .55; border-radius: 999px; z-index: -1;
}
.hero__lead { max-width: 34ch; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover;
  border-radius: 190px 190px var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.hero__stamp {
  position: absolute; right: -10px; bottom: -22px;
  width: 118px; height: 118px; border-radius: 50%;
  background: var(--linen); color: var(--clay-dark);
  display: grid; place-items: center; text-align: center;
  font-size: .78rem; line-height: 1.25; letter-spacing: .06em; text-transform: uppercase;
  border: 1px dashed var(--clay); box-shadow: var(--shadow-sm); padding: 10px;
}
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 2rem; padding: 0; list-style: none; }
.hero__facts li { display: flex; align-items: baseline; gap: .45em; font-size: .92rem; color: var(--ink-70); }
.hero__facts b { font-family: var(--serif); font-size: 1.35rem; color: var(--clay-dark); }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 28px; }
  .hero__media { order: -1; }
  .hero__media img { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
  .hero__stamp { display: none; }
}

/* ---------- Полоса преимуществ ---------- */
.usp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.usp__item { background: var(--paper); padding: 22px clamp(14px, 2vw, 26px); display: flex; gap: 12px; align-items: flex-start; }
.usp__item svg { width: 26px; height: 26px; color: var(--clay); flex: 0 0 auto; margin-top: 2px; }
.usp__item b { display: block; font-family: var(--serif); font-size: 1.02rem; margin-bottom: 2px; }
.usp__item span { font-size: .88rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .usp { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .usp { grid-template-columns: 1fr; } }

/* ---------- Категории ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.cat-tile {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg); background: var(--linen-2); color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.cat-tile:first-child { grid-column: span 2; grid-row: span 2; }
.cat-tile img { width: 100%; height: 100%; min-height: 150px; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .6s var(--ease); }
.cat-tile:first-child img { aspect-ratio: auto; height: 100%; }
.cat-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(46, 38, 34, .62) 0%, rgba(46, 38, 34, .12) 45%, transparent 75%);
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-tile:hover img { transform: scale(1.04); }
.cat-tile__label {
  position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; color: #fff;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.cat-tile__label b { font-family: var(--serif); font-size: 1.2rem; }
.cat-tile:first-child .cat-tile__label b { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.cat-tile__label span { font-size: .8rem; opacity: .8; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Карточки мастеров ---------- */
.master-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.master-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sand); }
.master-card__media { position: relative; }
.master-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.master-card__city {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(255, 253, 249, .92); backdrop-filter: blur(4px);
  padding: .3em .75em; border-radius: 999px; font-size: .8rem; color: var(--ink-70);
}
.master-card__body { padding: 18px 20px 22px; display: grid; gap: 6px; }
.master-card__name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.master-card__craft { font-size: .88rem; color: var(--clay); text-transform: uppercase; letter-spacing: .1em; }
.master-card__text { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Карточки-ценности, шаги, цитаты ---------- */
.value { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.value__num {
  font-family: var(--serif); font-size: 1.9rem; color: var(--sand); line-height: 1;
  display: block; margin-bottom: 12px;
}
.value h3 { margin-bottom: .4em; font-size: 1.15rem; }
.value p { color: var(--muted); font-size: .94rem; margin: 0; }

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { position: relative; padding-left: 68px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--clay-soft); color: var(--clay-dark);
  font-family: var(--serif); font-size: 1.2rem; font-weight: 700;
}
.step h3 { font-size: 1.15rem; margin-bottom: .3em; }
.step p { color: var(--muted); margin: 0; }

.quote {
  position: relative; padding: clamp(24px, 4vw, 44px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.5;
}
.quote::before { content: "«"; position: absolute; top: -6px; left: 22px; font-size: 4rem; color: var(--sand); font-family: var(--serif); }
.quote footer { margin-top: 18px; font-family: var(--sans); font-size: .92rem; color: var(--muted); }

/* ---------- CTA-полоса ---------- */
.cta-band { background: var(--clay-dark); color: var(--linen); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  border: 1px dashed rgba(217, 199, 172, .4);
}
.cta-band h2 { color: var(--linen); margin-bottom: .35em; }
.cta-band p { color: rgba(247, 242, 234, .85); max-width: 56ch; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 22px; transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: var(--sand); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; font-family: var(--serif); font-size: 1.08rem; font-weight: 700;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-weight: 400; font-size: 1.4rem; color: var(--clay); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > *:not(summary) { margin-top: 12px; color: var(--ink-70); }

/* ---------- Контент страниц ---------- */
.page-head { background: var(--linen); border-bottom: 1px solid var(--line); padding: clamp(32px, 5vw, 64px) 0; }
.page-head__title { margin-bottom: .3em; }
.page-head p { max-width: 62ch; color: var(--ink-70); margin: 0; }
.entry-content { max-width: 780px; }
.entry-content.wide { max-width: none; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 2em; }
.entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content li { margin-bottom: .5em; }
.entry-content img, .entry-content figure img { border-radius: var(--r-md); }
.entry-content blockquote {
  margin: 1.8em 0; padding: 18px 24px; border-left: 3px solid var(--clay);
  background: var(--linen); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--serif); font-size: 1.1rem;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--linen); font-family: var(--serif); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content code { background: var(--linen-2); padding: .12em .4em; border-radius: 5px; font-size: .9em; }

/* информационные блоки в контенте */
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--ochre);
  background: #fdf7ec; border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 18px 22px; font-size: .96rem;
}
.note--clay { border-left-color: var(--clay); background: var(--clay-soft); }

/* ---------- Формы ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], input[type="number"], textarea, select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--clay); box-shadow: 0 0 0 3px rgba(168, 80, 60, .12); outline: none;
}
label { font-size: .9rem; color: var(--ink-70); display: inline-block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; }
.search-form .btn { flex: 0 0 auto; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: rgba(247, 242, 234, .78); margin-top: clamp(48px, 7vw, 96px); font-size: .95rem; }
.site-footer a { color: rgba(247, 242, 234, .78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2, .site-footer h3 { color: var(--linen); font-family: var(--sans); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; font-weight: 400; opacity: .7; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); padding: clamp(36px, 5vw, 64px) 0 36px; }
.footer-brand .brand { color: var(--linen); }
.footer-brand .brand__name { color: var(--linen); }
.footer-brand .brand__tag { color: var(--sand); }
.footer-brand p { margin-top: 16px; max-width: 34ch; font-size: .92rem; opacity: .8; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-bottom {
  border-top: 1px solid rgba(247, 242, 234, .16);
  padding: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between; font-size: .86rem; opacity: .72;
}
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- WooCommerce ---------- */
.woocommerce .woocommerce-breadcrumb { display: none; }
ul.products { list-style: none; padding: 0; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); margin: 0 !important; }
ul.products::before, ul.products::after { display: none; }
ul.products li.product {
  width: 100% !important; margin: 0 !important; padding: 0 !important; float: none !important;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
ul.products li.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sand); }
ul.products li.product > a.woocommerce-LoopProduct-link { display: block; }
ul.products li.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 !important; border-radius: 0; }
ul.products li.product .mm-badges:empty { display: none; }
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--serif); font-size: 1.02rem !important; font-weight: 700; line-height: 1.3;
  padding: 14px 18px 0 !important; margin: 0 !important; color: var(--ink);
}
ul.products li.product .price {
  padding: 4px 18px 0 !important; margin: 0 !important;
  font-family: var(--serif); font-size: 1.08rem !important; color: var(--clay-dark) !important; font-weight: 700;
}
ul.products li.product .price del { color: var(--muted); font-weight: 400; font-size: .82em; opacity: .8; }
ul.products li.product .button {
  margin: 14px 18px 18px !important;
  padding: .7em 1.2em; border-radius: 999px; background: var(--clay); color: #fff !important;
  font-size: .92rem; font-weight: 700; text-align: center; border: 0;
  transition: background .15s, transform .15s;
}
ul.products li.product .button:hover { background: var(--clay-dark); transform: translateY(-1px); }
.mm-vendor { padding: 8px 18px 0; font-size: .82rem; color: var(--muted); }
.mm-vendor a { text-decoration: none; }
.mm-badges { position: absolute; top: 12px; left: 12px; display: grid; gap: 6px; z-index: 2; }
ul.products li.product { position: relative; }

.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { margin-bottom: 18px; color: var(--muted); font-size: .92rem; }
.woocommerce .woocommerce-ordering select { width: auto; padding: 8px 34px 8px 12px; border-radius: 999px; }

.woocommerce div.product .product_title { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--clay-dark); font-family: var(--serif); font-size: 1.7rem; font-weight: 700; }
.woocommerce div.product .summary { margin-bottom: 2rem; }
.woocommerce div.product .woocommerce-product-gallery img { border-radius: var(--r-lg); }
.woocommerce div.product form.cart .button,
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button.alt, .woocommerce button.button.alt {
  background: var(--clay); color: #fff; border-radius: 999px; font-weight: 700; padding: .8em 1.6em; border: 0;
  font-family: var(--sans); transition: background .15s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce #respond input#submit:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--clay-dark); color: #fff; }
.woocommerce div.product form.cart div.quantity .qty { border-radius: 999px; padding: 10px; width: 4.5em; }
.woocommerce .product_meta { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0 !important; margin: 0 0 -1px !important; border-bottom: 1px solid var(--line); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent !important; border: 0 !important; border-radius: 0 !important; margin: 0 22px 0 0 !important; padding: 0 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 12px 0 !important; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--clay); border-bottom-color: var(--clay); }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs .panel { padding-top: 24px; }

.woocommerce table.shop_table { border: 1px solid var(--line); border-radius: var(--r-md); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.woocommerce table.shop_table th { background: var(--linen); font-family: var(--serif); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-top: 1px solid var(--line); padding: 12px 14px; }
.woocommerce .cart-collaterals .cart_totals { width: 100%; }
.woocommerce .cart-collaterals .cart_totals h2 { font-size: 1.3rem; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error {
  border-radius: var(--r-md); border-top: 0; padding: 16px 20px; background: var(--linen); color: var(--ink);
  border-left: 3px solid var(--sage); list-style: none;
}
.woocommerce .woocommerce-error { border-left-color: var(--clay); }
.woocommerce form.checkout h3 { font-size: 1.2rem; }
.woocommerce form .form-row label { font-weight: 400; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.woocommerce #payment { background: var(--linen); border-radius: var(--r-md); }
.woocommerce #payment ul.payment_methods { border: 0; }
.woocommerce #payment div.payment_box { background: var(--paper); color: var(--ink-70); }
.woocommerce #payment div.payment_box::before { display: none; }
.woocommerce .woocommerce-order-overview { display: flex; flex-wrap: wrap; gap: 16px; padding: 18px; background: var(--linen); border-radius: var(--r-md); list-style: none; }
.woocommerce .woocommerce-order-overview li { border-right: 1px solid var(--line); padding-right: 16px; }
.woocommerce .woocommerce-order-overview li:last-child { border: 0; }
.woocommerce .star-rating span::before, .woocommerce .star-rating::before { color: var(--ochre); }

@media (max-width: 1080px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { ul.products { grid-template-columns: 1fr; } }

/* WCFM: витрина продавца и кабинеты */
.wcfm-store-banner, .wcfm_store_banner { border-radius: var(--r-lg); overflow: hidden; }
#wcfmmp-store .wcfm_store_wrapper { border-radius: var(--r-lg); }
.wcfm-store-name, .wcfm_store_name { font-family: var(--serif) !important; }
#wcfm-main-contentainer input[type="submit"], #wcfm-main-contentainer .wcfm_submit_button,
#wcfm-main-contentainer button.button, div.wcfm-dashboard-page a.button {
  background: var(--clay) !important; border-radius: 999px !important; border: 0 !important; color: #fff !important; font-weight: 700 !important;
}
#wcfm-main-contentainer .wcfm_dashboard_item_wrapper, #wcfm-main-contentainer .wcfm-container, .wcfm-dashboard-page .wcfm-container {
  border-radius: var(--r-md) !important;
}
#wcfm-main-contentainer .wcfm_dashboard_item_wrapper { background: var(--paper); }
.wcfmmp-store-list .wcfmmp-store-list-wrap { display: grid; gap: 20px; }
.wcfmmp-store-list-wrap .wcfmmp-store-list-item { border-radius: var(--r-lg); border-color: var(--line); }

/* =====================================================================
   Страница товара — «галерейная» подача
   ===================================================================== */
.mm-product { padding: clamp(20px, 3vw, 40px) 0 clamp(32px, 5vw, 64px); }
.mm-product__grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(24px, 4vw, 64px); align-items: start;
}
.mm-product__media { position: relative; }
.mm-product__stamp {
  position: absolute; right: -6px; top: -14px; z-index: 3;
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--linen); color: var(--clay-dark);
  border: 1px dashed var(--clay); font-size: .7rem; line-height: 1.2;
  letter-spacing: .08em; text-transform: uppercase; box-shadow: var(--shadow-sm);
  transform: rotate(-8deg);
}
.woocommerce div.product .woocommerce-product-gallery { margin: 0 !important; width: 100% !important; float: none !important; }
.woocommerce div.product .woocommerce-product-gallery__wrapper { margin: 0 !important; }
.woocommerce div.product .woocommerce-product-gallery__image img,
.woocommerce div.product .woocommerce-product-gallery__image a img {
  border-radius: var(--r-xl); aspect-ratio: 4 / 4.2; object-fit: cover; width: 100%;
}
.woocommerce div.product .flex-control-thumbs {
  display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px; margin: 12px 0 0 !important; padding: 0 !important; list-style: none !important;
}
.woocommerce div.product .flex-control-thumbs li { width: 100% !important; margin: 0 !important; float: none !important; }
.woocommerce div.product .flex-control-thumbs img {
  width: 100% !important; height: auto; border-radius: var(--r-sm);
  border: 1px solid var(--line); opacity: .72; transition: opacity .2s, border-color .2s;
}
.woocommerce div.product .flex-control-thumbs img:hover,
.woocommerce div.product .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--clay); }
.woocommerce div.product .woocommerce-product-gallery__trigger {
  border-radius: 999px; background: rgba(255, 253, 249, .92); width: 42px; height: 42px; line-height: 42px;
}

.mm-product__info { position: sticky; top: 96px; }
.mm-product__head { margin-bottom: 6px; }
.mm-product__cat { text-decoration: none; }
.mm-product__vendor { margin-top: 12px; }
.mm-product__vendor a {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-weight: 700;
}
.mm-product__vendor a:hover { color: var(--clay); }
.mm-product__vendor-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--clay-soft); color: var(--clay-dark);
  font-family: var(--serif); font-weight: 700;
}
.mm-product__rating { margin-left: 12px; color: var(--ochre); font-size: .9rem; }
.mm-product .product_title { margin: 14px 0 .35em !important; font-size: clamp(1.6rem, 2.6vw, 2.1rem) !important; }
.mm-product .woocommerce-product-details__short-description { color: var(--ink-70); font-size: 1rem; }
.mm-product .woocommerce-product-details__short-description p { margin-bottom: .8em; }
.mm-product form.cart { margin-top: 22px !important; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mm-product form.cart .quantity .qty { width: 4.6em; padding: 12px 10px; text-align: center; }
.mm-product form.cart .single_add_to_cart_button { padding: .95em 2.2em; border-radius: 999px; }
.mm-product .product_meta { margin-top: 20px; }
.mm-handmade-note {
  margin: 18px 0 0; padding: 14px 18px;
  background: var(--clay-soft); border-left: 3px solid var(--clay); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: .92rem; line-height: 1.55; color: var(--clay-dark);
}

.mm-product__trust {
  list-style: none; padding: 22px 0 0; margin: 26px 0 0;
  border-top: 1px solid var(--line); display: grid; gap: 14px;
}
.mm-product__trust li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.mm-product__trust svg { color: var(--clay); margin-top: 3px; }
.mm-product__trust b { display: block; font-family: var(--serif); color: var(--ink); font-size: .98rem; }
.mm-product__trust span { font-size: .9rem; color: var(--muted); line-height: 1.45; }

.mm-product__share {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: baseline;
  font-size: .9rem;
}
.mm-product__share a { color: var(--clay); text-decoration: none; border-bottom: 1px dashed var(--sand); }

/* блок мастера */
.mm-maker {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px;
  margin-top: clamp(32px, 5vw, 60px); padding: clamp(22px, 3vw, 36px);
  background: var(--linen); border-radius: var(--r-xl); align-items: start;
}
.mm-maker__avatar {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--clay); color: #fff;
  font-family: var(--serif); font-size: 2rem; font-weight: 700;
}
.mm-maker__name { font-size: 1.45rem; margin: .12em 0 .35em; }
.mm-maker__text { color: var(--ink-70); max-width: 70ch; }

/* аккордеон условий */
.mm-product__accordion { margin-top: 26px; display: grid; gap: 10px; max-width: 900px; }
.mm-product__accordion details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px;
}
.mm-product__accordion details[open] { border-color: var(--sand); }
.mm-product__accordion summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
}
.mm-product__accordion summary::-webkit-details-marker { display: none; }
.mm-product__accordion summary::after { content: "+"; font-family: var(--sans); color: var(--clay); font-size: 1.3rem; line-height: 1; }
.mm-product__accordion details[open] summary::after { content: "–"; }
.mm-product__accordion details > div { margin-top: 10px; color: var(--ink-70); font-size: .96rem; }
.mm-product__accordion details > div p { margin: 0; }

/* вкладки под карточкой */
.mm-product .woocommerce-tabs { margin-top: clamp(32px, 5vw, 56px); }
@media (max-width: 640px) {
  .mm-product .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .mm-product .woocommerce-tabs ul.tabs li { margin: 0 !important; }
  .mm-product .woocommerce-tabs ul.tabs li a { font-size: .9rem !important; padding: 10px 0 !important; }
  .mm-product__trust { margin-top: 20px; }
}

@media (max-width: 980px) {
  .mm-product__grid { grid-template-columns: 1fr; }
  .mm-product__info { position: static; }
  .mm-product__stamp { display: none; }
  .mm-maker { grid-template-columns: 1fr; }
}

/* =====================================================================
   Витрина мастера (шаблон WCFM store.php)
   ===================================================================== */
.mm-store { padding-bottom: clamp(32px, 5vw, 64px); }

.mm-store__hero {
  position: relative;
  background: linear-gradient(120deg, var(--clay-dark), #5f2c20);
  background-size: cover; background-position: center;
  color: var(--linen);
  padding: clamp(30px, 4.5vw, 58px) 0;
}
.mm-store__hero-inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 34px); align-items: center;
}
.mm-store__avatar {
  width: 132px; height: 132px; border-radius: 50%;
  overflow: hidden; flex: 0 0 auto;
  background: var(--linen); color: var(--clay-dark);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 3.4rem; font-weight: 700;
  border: 4px solid rgba(247, 242, 234, .85);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}
.mm-store__avatar img { width: 100%; height: 100%; object-fit: cover; }
.mm-store__hero .kicker { color: var(--sand); }
.mm-store__name {
  color: var(--linen); font-size: clamp(1.7rem, 3.4vw, 2.7rem); margin: 0 0 .3em;
  text-shadow: 0 2px 18px rgba(20, 14, 12, .45);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.mm-store__verified {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .26em .7em; border-radius: 999px;
  background: rgba(247, 242, 234, .16); border: 1px solid rgba(247, 242, 234, .38);
  font-family: var(--sans); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--linen);
}
.mm-store__verified svg { color: var(--sand); }
.mm-store__meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  margin: 0; font-size: .95rem; color: rgba(247, 242, 234, .86);
}
.mm-store__meta span { display: inline-flex; align-items: center; gap: 6px; }
.mm-store__rating { color: var(--sand); font-weight: 700; }
.mm-store__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.mm-store__facts { background: var(--linen); border-bottom: 1px solid var(--line); }
.mm-store__facts-inner {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
}
.mm-store__facts-inner > div {
  background: var(--linen); padding: 18px clamp(12px, 2vw, 24px); text-align: left;
}
.mm-store__facts-inner b {
  display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--clay-dark);
}
.mm-store__facts-inner span { font-size: .82rem; color: var(--muted); }

.mm-store__about {
  max-width: 780px; margin: clamp(30px, 5vw, 56px) auto 0;
  padding: 0 clamp(0px, 2vw, 8px);
}
.mm-store__about-text { font-size: 1.05rem; line-height: 1.7; color: var(--ink-70); }
.mm-store__about-text p:first-child { font-size: 1.2rem; color: var(--ink); font-family: var(--serif); line-height: 1.55; }

.mm-store__products { margin-top: clamp(32px, 5vw, 60px); }
.mm-store__products-head h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 22px;
  display: flex; align-items: baseline; gap: 14px;
}
.mm-store__products-head h2::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.mm-store__pagination { margin-top: 28px; }

.mm-store__trust {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px); margin-top: clamp(32px, 5vw, 60px);
}
.mm-store__trust-col {
  background: var(--linen); border-radius: var(--r-lg); padding: 24px 26px;
}
.mm-store__trust-col svg { color: var(--clay); margin-bottom: 10px; }
.mm-store__trust-col h3 { font-size: 1.05rem; margin-bottom: .4em; }
.mm-store__trust-col p { font-size: .92rem; color: var(--muted); margin: 0; }
.mm-store__trust-col a { text-decoration: none; border-bottom: 1px dashed var(--sand); }

/* WCFM-обёртки внутри витрины: убираем чужую рамку */
.mm-store #wcfmmp-store { background: transparent; }
.mm-store .wcfm-store-banner { display: none; }

@media (max-width: 900px) {
  .mm-store__hero-inner { grid-template-columns: 1fr; text-align: left; }
  .mm-store__avatar { width: 96px; height: 96px; font-size: 2.4rem; }
  .mm-store__actions { justify-content: flex-start; }
  .mm-store__facts-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-store__trust { grid-template-columns: 1fr; }
}

/* =====================================================================
   Журнал: список и запись
   ===================================================================== */
.mm-journal-intro { max-width: 62ch; color: var(--ink-70); }
.mm-journal-intro p { margin: 0; }

.mm-journal-featured { padding-top: clamp(20px, 3vw, 32px); }
.mm-feature {
  display: block; position: relative; text-decoration: none; color: var(--linen);
  border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(120deg, var(--clay-dark), #5f2c20);
  background-size: cover; background-position: center;
  padding: clamp(28px, 4vw, 56px);
  min-height: clamp(320px, 38vw, 460px);
  display: flex; align-items: flex-end;
  box-shadow: var(--shadow-md);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.mm-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--linen); }
.mm-feature__body { max-width: 720px; }
.mm-feature .kicker { color: var(--sand); }
.mm-feature__title {
  color: var(--linen); font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  margin: .1em 0 .35em; text-shadow: 0 2px 20px rgba(20, 14, 12, .35);
}
.mm-feature__lead { color: rgba(247, 242, 234, .88); font-size: clamp(.98rem, 1.4vw, 1.1rem); margin: 0 0 .8em; max-width: 56ch; }
.mm-feature__meta { margin: 0; font-size: .88rem; color: var(--sand); letter-spacing: .04em; }

.mm-journal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.mm-post-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.mm-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sand); }
.mm-post-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.mm-post-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mm-post-card__body { padding: 18px 20px 22px; display: grid; gap: 6px; align-content: start; }
.mm-post-card__date { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--clay); }
.mm-post-card__title { font-family: var(--serif); font-size: 1.16rem; margin: 0; line-height: 1.25; }
.mm-post-card__excerpt { font-size: .92rem; color: var(--muted); margin: 0; }
.mm-post-card__more { font-size: .82rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 900px) { .mm-journal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mm-journal-grid { grid-template-columns: 1fr; } }

/* запись */
.mm-post__cover {
  background: linear-gradient(120deg, var(--clay-dark), #5f2c20);
  background-size: cover; background-position: center;
  color: var(--linen);
  padding: clamp(48px, 8vw, 110px) 0 clamp(36px, 5vw, 64px);
}
.mm-post__cover-inner { max-width: 880px; }
.mm-post__cover .kicker { color: var(--sand); }
.mm-post__title {
  color: var(--linen); font-size: clamp(1.9rem, 4.4vw, 3.2rem); margin: .1em 0 .4em;
  text-shadow: 0 2px 24px rgba(20, 14, 12, .35);
}
.mm-post__lead { color: rgba(247, 242, 234, .9); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 60ch; margin: 0 0 1em; }
.mm-post__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-size: .86rem; color: var(--sand); letter-spacing: .05em; }

.mm-post__body { padding: clamp(32px, 5vw, 64px) 0 clamp(16px, 3vw, 32px); }
.mm-post__content { font-size: 1.06rem; line-height: 1.75; }
.mm-post__content > p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-size: 3.4em; line-height: .82;
  padding: .06em .12em 0 0; color: var(--clay);
}
.mm-post__content h2 { margin-top: 2.1em; }
.mm-post__content img { border-radius: var(--r-md); }
.mm-post__tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.mm-post__tags a {
  display: inline-block; padding: .3em .8em; border-radius: 999px;
  background: var(--linen); border: 1px solid var(--line);
  font-size: .82rem; text-decoration: none; color: var(--ink-70);
}
.mm-post__tags a:hover { border-color: var(--clay); color: var(--clay); }
.mm-post__share { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: baseline; }
.mm-post__share a { color: var(--clay); text-decoration: none; border-bottom: 1px dashed var(--sand); font-size: .92rem; }

.mm-post__author {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px;
  margin-top: clamp(30px, 4vw, 48px); padding: clamp(20px, 3vw, 30px);
  background: var(--linen); border-radius: var(--r-lg); align-items: start;
}
.mm-post__author-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; background: var(--clay); color: #fff;
  font-family: var(--serif); font-size: 1.6rem; font-weight: 700;
}
.mm-post__author-name { font-size: 1.2rem; margin: .1em 0 .3em; }

.mm-post__more { background: var(--linen); padding: clamp(32px, 5vw, 64px) 0; margin-top: clamp(28px, 4vw, 48px); }
.mm-post__more-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.mm-post__more-head h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }

/* Интервью в журнале */
.mm-qa { margin: 2.2em 0; }
.mm-qa__q {
  font-family: var(--serif); font-size: 1.22rem; font-weight: 700; color: var(--clay-dark);
  margin: 0 0 .5em; line-height: 1.4;
}
.mm-qa__a { padding-left: 22px; border-left: 2px solid var(--clay-soft); color: var(--ink-70); }
.mm-qa__a p { margin-bottom: .9em; }
.mm-qa__a p:last-child { margin-bottom: 0; }

.mm-master-note {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px;
  margin: 2.6em 0 0; padding: 22px 24px;
  background: var(--linen); border-radius: var(--r-lg); align-items: start;
}
.mm-master-note__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--clay); color: #fff;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
}
.mm-master-note__name { font-size: 1.15rem; margin: .05em 0 .25em; }
.mm-master-note__text { font-size: .92rem; color: var(--muted); margin: 0 0 .8em; }

/* Таблицы в статьях журнала */
.mm-care {
  width: 100%; border-collapse: collapse; margin: 1.4em 0 2.2em; font-size: .95rem;
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.mm-care caption {
  caption-side: top; text-align: left; font-size: .82rem; color: var(--muted); padding-bottom: .5em;
}
.mm-care th {
  background: var(--linen); text-align: left; font-weight: 700;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.mm-care td {
  padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top;
  color: var(--ink-70); line-height: 1.55;
}
.mm-care tr:last-child td { border-bottom: 0; }
.mm-care tbody tr:nth-child(even) { background: rgba(247, 242, 234, .55); }
.mm-care td:first-child { color: var(--ink); font-weight: 500; width: 34%; }
@media (max-width: 640px) {
  .mm-care, .mm-care tbody, .mm-care tr, .mm-care td, .mm-care th { display: block; width: 100%; }
  .mm-care thead { display: none; }
  .mm-care tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .mm-care td { border: 0; padding: 4px 16px; }
  .mm-care td:first-child { font-weight: 700; padding-top: 10px; }
}

/* ---------- Служебные страницы ---------- */
.site-main { min-height: 40vh; }
.post-list { display: grid; gap: 28px; max-width: 820px; }
.post-card { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.post-card img { border-radius: var(--r-md); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.post-card h2 { font-size: 1.3rem; margin-bottom: .35em; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--clay); }
@media (max-width: 640px) { .post-card { grid-template-columns: 1fr; } }
.post-meta { font-size: .86rem; color: var(--muted); margin-bottom: .6em; }
.pagination { display: flex; gap: 8px; margin-top: 32px; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink);
}
.pagination .page-numbers.current { background: var(--clay); border-color: var(--clay); color: #fff; }

.error-404 { text-align: center; padding: clamp(60px, 12vw, 140px) 0; }
.error-404 h1 { font-size: clamp(4rem, 14vw, 9rem); color: var(--clay); margin: 0; line-height: 1; }
.error-404 .lead { margin: 0 auto 1.6rem; max-width: 46ch; }

/* Utils */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--clay); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }
.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--clay);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, transform .25s; z-index: 50;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-2px); }

@media print {
  .site-header, .site-footer, .to-top, .topbar, .nav-scrim { display: none; }
}
