/* PM Commerce · site-v2. Один шрифт (Manrope), палитра: кремовый, графитовый, глубокий зелёный. */
:root {
  --cream: #f7f2e9;
  --cream-2: #efe7d8;
  --paper: #fffdf8;
  --ink: #23272a;
  --ink-2: #565d63;
  --green: #1e4636;
  --green-2: #2a5d48;
  --green-ink: #e9efe9;
  --line: #e1d7c5;
  --focus: #2a5d48;
  --r: 14px;
  --wrap: 1200px;
  --pad: 20px;
  --sec: 72px;
}
@media (min-width: 900px) { :root { --pad: 32px; --sec: 112px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 780px; }
.muted { color: var(--ink-2); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34em; }
.sec-lead { font-size: 18px; color: var(--ink-2); max-width: 40em; margin-top: 14px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 12px; border: 1.5px solid transparent; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: #bfb4a1; }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }

/* Шапка */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(247, 242, 233, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo img { height: 44px; width: auto; }
.nav { display: none; gap: 26px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.hdr-phone { display: none; margin-left: auto; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hdr-cta { display: none; }
.menu-btn { margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
.menu-btn span::before { position: absolute; top: -6px; } .menu-btn span::after { position: absolute; top: 6px; }
.menu-open .nav { display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: 72px; background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 16px; }
.menu-open .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink); }
@media (min-width: 1100px) {
  .nav, .menu-open .nav { display: flex; flex-direction: row; position: static; padding: 0; border: 0; background: none; }
  .menu-open .nav a { padding: 0; border: 0; font-size: 15px; color: var(--ink-2); }
  .hdr-phone { display: inline; }
  .hdr-cta { display: inline-flex; }
  .menu-btn { display: none; }
}
@media (min-width: 600px) and (max-width: 1099px) { .hdr-cta { display: inline-flex; margin-left: auto; } .menu-btn { margin-left: 0; } }

/* Первый экран */
.hero { padding: 40px 0 16px; }
.hero-in { display: grid; gap: 36px; align-items: center; }
.hero-text { display: grid; gap: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-actions .btn { flex: 1 1 200px; }
.facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 { font-size: clamp(36px, 4.4vw, 58px); text-wrap: balance; }
.hero-pic img { width: 100%; max-width: 300px; margin: 0 auto; border-radius: 22px; aspect-ratio: 1; object-fit: contain; }
@media (min-width: 900px) {
  .hero { padding: 48px 0 8px; }
  .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 64px; }
  .hero h1 .h1-line { display: block; }
  .hero-actions .btn { flex: 0 0 auto; }
  .hero-pic img { max-width: 460px; }
}

/* Секции */
.section { padding: var(--sec) 0; }
.section-cream { background: var(--cream-2); }
.section-green { background: var(--green); color: var(--green-ink); }
.section-green h2, .section-green h3 { color: #fff; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 32px; }
.link-more { font-weight: 700; color: var(--green); white-space: nowrap; }
.note { margin-top: 28px; font-size: 15px; color: var(--ink-2); }

/* Каталог */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--pad)) 24px; padding: 2px var(--pad) 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 15px; font-weight: 700; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

.card[hidden] { display: none; }
/* на главной по умолчанию по 2 товара из категории; фильтр категории показывает все её позиции */
.grid[data-mode="featured"] .card.extra { display: none; }
.more-row { margin-top: 24px; text-align: center; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--cream-2); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 16px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.card-title { font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.card-pack { font-size: 14px; color: var(--ink-2); }
.card-price { font-size: 14px; font-weight: 700; margin-top: auto; padding-top: 8px; }
.card-btn { margin-top: 10px; width: 100%; }
@media (min-width: 720px) { .card-body { padding: 18px 18px 20px; } .card-title { font-size: 17px; } }
@supports (grid-template-rows: subgrid) {
  /* строки карточки: фото, категория, название, фасовка, цена, кнопка — общие для всего ряда */
  .grid { row-gap: 0; }
  .card { display: grid; grid-template-rows: subgrid; grid-row: span 6; margin-bottom: 14px; }
  .card-body { display: contents; }
  .card-body > * { margin-left: 14px; margin-right: 14px; }
  .card-cat { margin-top: 14px; }
  .card-title { margin-top: 4px; }
  .card-pack { margin-top: 4px; }
  .card-price { margin-top: 0; padding-top: 10px; align-self: end; }
  .card-btn { margin-top: 10px; margin-bottom: 16px; width: auto; }
  @media (min-width: 720px) { .card { margin-bottom: 20px; } .card-body > * { margin-left: 18px; margin-right: 18px; } .card-cat { margin-top: 18px; } .card-btn { margin-bottom: 20px; } }
  @media (min-width: 1100px) { .card { margin-bottom: 24px; } }
}
.cat-block + .cat-block { margin-top: 64px; }
.cat-block .grid { margin-top: 24px; }

/* Как работаем */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 28px; counter-reset: s; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 48px; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: s; border-top: 1px solid rgba(233, 239, 233, .3); padding-top: 20px; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-size: 15px; font-weight: 800; color: #b9d3c3; margin-bottom: 14px; }
.steps p { margin-top: 8px; color: var(--green-ink); opacity: .9; }

/* О компании */
.about { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.about-list { margin: 32px 0 0; display: grid; gap: 0; }
.about-list div { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
@media (min-width: 600px) { .about-list div { grid-template-columns: 150px 1fr; gap: 24px; } }
.about-list dt { font-weight: 800; }
.about-list dd { margin: 0; color: var(--ink-2); }
.about-pic img { border-radius: 22px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Новости */
.posts { display: grid; gap: 20px; }
@media (min-width: 900px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 10px; align-content: start; }
.post time { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.post h3 a { text-decoration: none; }
.post h3 a:hover { text-decoration: underline; }
.post p { color: var(--ink-2); font-size: 16px; }

/* Контакты и форма */
.contacts { display: grid; gap: 36px; }
@media (min-width: 900px) { .contacts { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; } }
.big-phone { display: inline-block; margin: 28px 0 10px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; color: var(--green); }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
@media (min-width: 900px) { .form-card { padding: 36px; } }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.opt { font-weight: 500; color: var(--ink-2); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid #d3c8b5; border-radius: 10px; padding: 12px 14px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42, 93, 72, .18); }
.field.invalid input { border-color: #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #b3261e; font-weight: 600; font-size: 15px; }
.form-note { font-size: 13px; color: var(--ink-2); }
.form-done { display: grid; gap: 12px; justify-items: start; }
.form-done[hidden] { display: none; }

/* Внутренние страницы */
.page-head { padding: 40px 0 8px; }
.page-head h1 { margin: 10px 0 14px; }
.page-head .chips { margin-top: 24px; margin-bottom: 0; }
.crumbs { font-size: 14px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.cta { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; background: var(--green); color: var(--green-ink); border-radius: 20px; padding: 32px; }
.cta h2 { color: #fff; font-size: clamp(24px, 2.6vw, 32px); }
.cta p { margin-top: 6px; }
.cta .btn-primary { background: var(--cream); color: var(--green); }
.cta .btn-primary:hover { background: #fff; }
.article { padding: 40px 0 var(--sec); }
.article h1 { font-size: clamp(32px, 4.2vw, 52px); margin: 14px 0 12px; }
.prose { margin-top: 28px; font-size: 18px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 28px; margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }

/* Подвал */
.ftr { background: #16352a; color: #c9d6cd; padding: 56px 0 28px; font-size: 15px; }
.ftr-in { display: grid; gap: 32px; }
@media (min-width: 900px) { .ftr-in { grid-template-columns: 1.2fr 2fr 1fr; align-items: start; } }
.ftr-brand img { height: 52px; width: auto; margin-bottom: 14px; }
.ftr-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.ftr-nav a { color: #e9efe9; text-decoration: none; }
.ftr-nav a:hover { text-decoration: underline; }
.ftr-contact { display: grid; gap: 4px; }
.ftr-contact .muted { color: #a9bcb0; }
.ftr-phone { font-size: 20px; font-weight: 800; color: #fff; text-decoration: none; }
.ftr-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(233, 239, 233, .15); color: #a9bcb0; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
/* ---------- карточка без фото: нейтральная заглушка, без снимка другого товара ---------- */
.card-noimg { aspect-ratio: 1; display: grid; place-content: center; gap: 4px; text-align: center; background: repeating-linear-gradient(135deg, var(--cream-2) 0 14px, #f3ece0 14px 28px); color: var(--ink-2); }
.card-noimg span { font-weight: 800; font-size: 16px; color: var(--green); }
.card-noimg small { font-size: 13px; }

/* ---------- ссылки на категории на главной ---------- */
.cat-links { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .cat-links { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cat-links { grid-template-columns: repeat(4, 1fr); } }
.cat-links a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); text-decoration: none; }
.cat-links a:hover { border-color: var(--green); }
.cat-links b { color: var(--green); font-size: 17px; }
.cat-links span { font-size: 14px; color: var(--ink-2); }

/* ---------- страницы категорий ---------- */
.cat-head .hero-actions { margin: 22px 0 18px; }
.cat-head .lead { margin-top: 0; }
.section-tight { padding-top: 40px; }
.info-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .info-grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.info-grid h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 18px; }
.info-grid h2.mt { margin-top: 36px; }
.uses, .packs, .conds, .steps-plain { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; }
.uses li, .conds li, .steps-plain li { color: var(--ink-2); }
.uses b, .conds b { color: var(--ink); }
.packs li { font-weight: 700; }
.steps-plain { margin-bottom: 24px; }
.related { margin-top: 24px; padding: 14px 16px; border-left: 3px solid var(--green); background: var(--paper); }
.faq { display: grid; gap: 10px; margin-top: 24px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; color: var(--green); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }
.h3 { font-size: 20px; margin-bottom: 14px; }
.wrapchips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }

/* ---------- подвал: две колонки ссылок ---------- */
.ftr-navs { display: grid; gap: 14px; }

/* ---------- телефон: закреплённая панель «Позвонить / Запросить прайс» ---------- */
.mbar { display: none; }
@media (max-width: 899px) {
  .mbar { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
          padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(247, 242, 233, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(35, 39, 42, .08); }
  .mbar a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; font-weight: 800; font-size: 16px; text-decoration: none; }
  .mbar-call { background: var(--paper); color: var(--green); border: 1.5px solid var(--green); }
  .mbar-req { background: var(--green); color: #fff; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
/* Новости рынка продуктов — спокойный список перед подвалом */
.mnews { padding: 48px 0 56px; border-top: 1px solid var(--line); }
.mnews h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.015em; margin-bottom: 20px; }
.mnews-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.mnews-list li { display: grid; gap: 6px; align-content: start; padding: 18px 0; border-top: 1px solid var(--line); }
.mnews-list li:first-child { border-top: 0; padding-top: 0; }
.mnews-list time, .mnews-src { font-size: 14px; color: var(--ink-2); }
.mnews-list h3 { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.mnews-list h3 a { text-decoration: none; }
.mnews-list h3 a:hover, .mnews-list h3 a:focus-visible { text-decoration: underline; }
.mnews-list p { margin: 0; font-size: 15px; color: var(--ink-2); }
.mnews-note { margin: 18px 0 0; font-size: 13px; color: var(--ink-2); }
@media (min-width: 900px) {
  .mnews-list { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .mnews-list li { border-top: 0; padding: 0 0 0 20px; border-left: 1px solid var(--line); }
  .mnews-list li:first-child { padding-left: 0; border-left: 0; }
}
