/* ==========================================================
   Садовый центр «Грова» — стили прототипа
   Палитра взята с логотипа. Mobile-first.
   ========================================================== */

:root {
  --green-dark: #3A6B35;
  --green-deep: #2C5228;
  --green-leaf: #7FB548;
  --green-soft: #EEF5E6;
  --lavender: #8A5BC7;
  --lavender-dark: #6B3FA8;
  --lavender-soft: #F2ECFA;
  --orange: #F07A1E;
  --orange-soft: #FDEBDC;
  --yellow: #F5C518;
  --yellow-soft: #FFF7D6;
  --soil: #8B5A2B;
  --soil-soft: #F5ECE2;
  --text: #1F2A1C;
  --text-muted: #4D5A49;
  --bg: #FFFFFF;
  --bg-alt: #F8FAF5;
  --border: #DDE6D4;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(31, 42, 28, .08);
  --font-text: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
  --font-script: "Marck Script", "Bad Script", "Segoe Script", cursive;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--green-deep); }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--green-dark); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Плейсхолдеры, которые надо заполнить */
.todo {
  background: var(--yellow-soft);
  border-bottom: 2px dashed var(--yellow);
  padding: 0 3px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ---------------- Логотип / словесный знак ---------------- */
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--green-dark); }
/* Картинка логотипа видна сразу; текстовая заглушка — только если картинка не загрузилась (класс no-img ставит main.js) */
.logo img { display: block; }
.logo-fallback { display: none; }
.logo.no-img .logo-fallback { display: inline-flex; align-items: center; gap: 10px; }
.logo-emblem { width: 44px; height: 53px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-caps { font-size: .62rem; font-weight: 800; letter-spacing: .18em; color: var(--green-dark); }
.logo-script { font-family: var(--font-script); font-size: 2rem; line-height: 1; color: var(--green-dark); margin-top: 2px; }
.logo-ribbon {
  display: inline-block; align-self: flex-start; margin-top: 3px;
  font-size: .6rem; font-weight: 700; color: #fff; background: var(--green-dark);
  padding: 1px 8px; border-radius: 2px; letter-spacing: .02em;
}
.site-header .logo img { height: 64px; width: auto; }

/* ---------------- Шапка ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.2) blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }

.burger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--green-dark); font: inherit; font-weight: 700; cursor: pointer;
}
.burger .icon-close { display: none; }
.burger[aria-expanded="true"] .icon-open { display: none; }
.burger[aria-expanded="true"] .icon-close { display: block; }

.main-nav { display: none; }
.main-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.main-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.main-nav a {
  display: block; padding: 12px 8px; text-decoration: none; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.main-nav li:last-child a { border-bottom: 0; }
.main-nav a:hover { color: var(--green-dark); }
.main-nav a[aria-current="page"] { color: var(--green-dark); box-shadow: inset 4px 0 0 var(--green-leaf); padding-left: 14px; }

@media (min-width: 900px) {
  .burger { display: none; }
  .main-nav, .main-nav.is-open { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .main-nav ul { display: flex; gap: 4px; padding: 0; }
  .main-nav a { border: 0; padding: 8px 12px; border-radius: 999px; }
  .main-nav a[aria-current="page"] { box-shadow: none; padding-left: 12px; background: var(--green-soft); }
}

/* ---------------- Кнопки ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--green-deep); color: #fff; }
.btn-accent { background: var(--orange); color: var(--text); }
.btn-accent:hover { background: #E06A10; color: var(--text); }
.btn-ghost { background: #fff; color: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost:hover { background: var(--green-soft); }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- Секции ---------------- */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--text-muted); }
.lead { font-size: 1.1rem; color: var(--text-muted); }

.page-hero {
  background: linear-gradient(180deg, var(--yellow-soft) 0%, #fff 100%);
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--border);
}
.page-hero p { max-width: 720px; }
.breadcrumbs { font-size: .9rem; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumbs a { color: var(--text-muted); }

.grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}

/* ---------------- Главный экран ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 75% 35%, rgba(245, 197, 24, .35) 0, rgba(245, 197, 24, 0) 45%),
    linear-gradient(180deg, #FFFBEA 0%, #F3F9EC 100%);
  padding: 32px 0 0;
}
.hero-inner { display: grid; gap: 24px; align-items: center; padding-bottom: 32px; }
.hero-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-brand .logo { flex-direction: column; }
.hero-brand .logo img { max-width: 300px; }
.hero-emblem { width: 190px; height: auto; }
.hero-script { font-family: var(--font-script); font-size: 4.4rem; line-height: .9; color: var(--green-dark); margin-top: -6px; }
.hero-ribbon {
  position: relative; display: inline-block; margin-top: 8px;
  background: var(--green-dark); color: #fff; font-weight: 700; font-size: .9rem;
  padding: 4px 22px;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%);
}
.hero-text h1 { margin-bottom: .4em; }
.hero-text .lead { margin-bottom: 1.4em; }
.hero-hills { display: block; width: 100%; height: 60px; }

@media (min-width: 900px) {
  .hero { padding-top: 56px; }
  .hero-inner { grid-template-columns: 1fr 1.2fr; gap: 48px; }
  .hero-brand { order: 2; }
  .hero-emblem { width: 240px; }
}

/* ---------------- Акции ---------------- */
.offer { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.offer-art { height: 120px; display: flex; align-items: center; justify-content: center; color: var(--green-dark); }
.offer-art .icon { width: 56px; height: 56px; stroke-width: 1.4; }
.offer-body { padding: 16px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.offer-body p { color: var(--text-muted); flex: 1; }
.offer-tag {
  position: absolute; top: 12px; left: 12px;
  background: #fff; color: var(--green-deep); font-size: .78rem; font-weight: 800;
  padding: 2px 10px; border-radius: 999px; box-shadow: var(--shadow);
}

.bg-green { background: linear-gradient(135deg, #E3F0D3, #C9E2AE); }
.bg-lavender { background: linear-gradient(135deg, #EFE6FA, #D9C6F2); color: var(--lavender-dark) !important; }
.bg-orange { background: linear-gradient(135deg, #FFF0E0, #FBD2AE); color: #8A3F06 !important; }
.bg-yellow { background: linear-gradient(135deg, #FFF8DC, #FBE69A); color: #6E5600 !important; }
.bg-soil { background: linear-gradient(135deg, #F6EDE3, #E5CFB6); color: var(--soil) !important; }
.bg-sky { background: linear-gradient(135deg, #EAF4F2, #CDE6E0); color: #2C5E57 !important; }

/* ---------------- Плитки категорий ---------------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: 10px; min-height: 130px;
  padding: 16px; border-radius: var(--radius); text-decoration: none;
  color: var(--text); border: 1px solid var(--border); background: #fff;
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(31, 42, 28, .12); color: var(--text); }
.tile-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tile-title { font-weight: 800; font-size: .95rem; line-height: 1.3; }
.tile-sub { font-size: .82rem; color: var(--text-muted); line-height: 1.35; }

/* ---------------- Преимущества ---------------- */
.adv { display: flex; gap: 14px; align-items: flex-start; }
.adv-icon {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green-dark);
}
.adv h3 { margin-bottom: .25em; }
.adv p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---------------- Советы ---------------- */
.article-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.article-card .offer-art { height: 100px; }
.article-card .offer-body h3 a { text-decoration: none; color: var(--green-deep); }
.article-card .offer-body h3 a:hover { text-decoration: underline; }
.season { font-size: .8rem; font-weight: 800; color: var(--lavender-dark); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

.article { max-width: 760px; margin: 0 auto 40px; padding-top: 8px; }
.article + .article { border-top: 1px solid var(--border); padding-top: 40px; }
.article h2 { scroll-margin-top: 90px; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .4em; }
.tip {
  background: var(--green-soft); border-left: 4px solid var(--green-leaf);
  padding: 12px 16px; border-radius: var(--radius-sm); margin: 1em 0;
}
.toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); text-decoration: none; font-weight: 700;
}

/* ---------------- Контакты ---------------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .icon { color: var(--green-dark); margin-top: 2px; }
.contact-list strong { display: block; font-size: .85rem; color: var(--text-muted); font-weight: 700; }

.map-placeholder {
  position: relative; min-height: 280px; border-radius: var(--radius); overflow: hidden;
  border: 2px dashed var(--green-leaf);
  background:
    linear-gradient(90deg, rgba(58, 107, 53, .08) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(0deg, rgba(58, 107, 53, .08) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--green-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--green-deep);
}
.map-placeholder .icon { width: 48px; height: 48px; color: var(--orange); }

/* ---------------- Каталог ---------------- */
.catalog-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 8px; }
.search {
  position: relative; flex: 1 1 260px;
}
.search input {
  width: 100%; min-height: 48px; padding: 10px 14px 10px 44px;
  font: inherit; border: 2px solid var(--border); border-radius: 999px; background: #fff; color: var(--text);
}
.search input:focus { border-color: var(--green-leaf); outline: none; box-shadow: 0 0 0 3px rgba(127, 181, 72, .3); }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-empty { display: none; padding: 16px; background: var(--orange-soft); border-radius: var(--radius-sm); }
.search-empty.is-visible { display: block; }

.cat-quicknav { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: thin; }
.cat-quicknav a {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 700;
  background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--text);
}
.cat-quicknav a:hover { border-color: var(--green-leaf); }

.cat-section { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; scroll-margin-top: 90px; }
.cat-section > summary {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none;
  font-weight: 800; font-size: 1.05rem; color: var(--green-deep);
}
.cat-section > summary::-webkit-details-marker, .cat-group > summary::-webkit-details-marker { display: none; }
.cat-section > summary .tile-icon { width: 44px; height: 44px; }
.sum-text { flex: 1; display: flex; flex-direction: column; }
.sum-count { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.chev { width: 22px; height: 22px; transition: transform .2s; color: var(--green-dark); }
details[open] > summary .chev { transform: rotate(180deg); }
.cat-body { padding: 0 12px 12px; }
@media (min-width: 700px) { .cat-body { padding: 0 20px 20px; } }

.cat-group { border-top: 1px solid var(--border); }
.cat-group > summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 4px; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--text);
}
.cat-group > summary::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green-leaf); flex: none;
}
.cat-group > summary .sum-text { font-size: 1rem; }
.cat-group-body { padding: 4px 0 16px; }
.leaf-title { font-size: 1rem; margin: 18px 0 10px; color: var(--green-dark); }
.leaf-title:first-child { margin-top: 4px; }

/* Сетка карточек: 2 колонки на телефоне, 3–4 на планшете, 5 на широком экране (контейнер ~1150 px) */
.products { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.product { height: 100%; min-width: 0; }
@media (min-width: 560px) { .products { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (min-width: 1000px) { .products { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.product { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.product-img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.product-img .icon { width: 40px; height: 40px; stroke-width: 1.4; opacity: .85; }
.product-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-name { overflow-wrap: anywhere; hyphens: auto; font-weight: 700; font-size: .92rem; line-height: 1.3; flex: 1; }
.product-meta { font-size: .8rem; color: var(--text-muted); }
.product-price { font-weight: 800; color: var(--green-deep); }

.is-hidden { display: none !important; }

/* ---------------- О нас ---------------- */
.partner-band {
  display: grid; gap: 20px; align-items: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green-deep)); color: #fff;
  border-radius: var(--radius); padding: 28px 24px;
}
.partner-band h2, .partner-band h3 { color: #fff; }
.partner-band a { color: #fff; }
.partner-band .todo { color: var(--text); }
@media (min-width: 800px) { .partner-band { grid-template-columns: 1fr 2fr; padding: 36px; } }
.partner-badge {
  justify-self: center; text-align: center; background: #fff; color: var(--green-dark);
  border-radius: 50%; width: 170px; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25);
}
.partner-badge span { font-size: 1.6rem; line-height: 1.1; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px;
  border-left: 3px solid var(--green-leaf); border-bottom: 3px solid var(--green-leaf); transform: rotate(-45deg);
}

/* ---------------- Подвал ---------------- */
.site-footer { background: var(--green-deep); color: #E8F1E2; padding: 40px 0 0; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1.3fr; } }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 6px; }
.site-footer .logo { color: #fff; }
.site-footer .logo-caps, .site-footer .logo-script { color: #fff; }
.site-footer .logo-ribbon { background: #fff; color: var(--green-deep); }
.site-footer .todo { color: var(--text); }
.site-footer .contact-list .icon { color: var(--yellow); }
.site-footer .contact-list strong { color: #C6D9BC; }
.footer-bottom {
  margin-top: 32px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: .85rem; color: #C6D9BC; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.soil-strip { height: 10px; background: repeating-linear-gradient(90deg, var(--soil) 0 18px, #7A4E24 18px 30px); }

/* Плашка «прототип» */
.proto-note {
  background: var(--lavender-soft); color: var(--lavender-dark); text-align: center;
  font-size: .85rem; font-weight: 700; padding: 6px 16px;
}

/* ==========================================================
   ДЕМО-МАГАЗИН: активные карточки, окно товара, корзина
   ========================================================== */
.header-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) {
  .main-nav { margin-left: auto; }
  .header-actions { order: 3; }
}
.cart-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--green-dark); cursor: pointer;
}
.cart-btn:hover { background: var(--green-soft); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--orange); color: var(--text);
  font-size: .75rem; font-weight: 800; line-height: 20px; text-align: center;
}
.cart-count.is-empty { background: var(--border); color: var(--text-muted); }

.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
  color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* Активная карточка */
.product-live { position: relative; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.product-live:hover, .product-live:focus-within {
  transform: translateY(-3px); border-color: var(--green-leaf);
  box-shadow: 0 8px 22px rgba(31, 42, 28, .14);
}
.product-live:focus-within { outline: 3px solid var(--lavender); outline-offset: 2px; }
.product-live .product-img svg { width: 100%; height: 100%; }
.product-open {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.product-open::after { content: ""; position: absolute; inset: 0; } /* вся карточка кликабельна */
.product-open:focus-visible { outline: none; }
.product-more { margin-top: 4px; font-size: .82rem; font-weight: 800; color: var(--green-dark); }
.product-live:hover .product-more { text-decoration: underline; }
.product-live .badge { position: absolute; top: 8px; left: 8px; }
.products-hits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .products-hits { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (min-width: 900px) { .products-hits { grid-template-columns: repeat(4, 1fr); } }
.products-hits .product-name { font-size: 1rem; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 800; line-height: 1.6;
}
.badge-in { background: #E1F0D2; color: #2C5228; }
.badge-order { background: var(--orange-soft); color: #7A3606; }

/* Подложка и диалоги */
body.no-scroll { overflow: hidden; }
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(20, 30, 18, .55); }
.overlay[hidden], .modal[hidden], .drawer[hidden] { display: none; }
.dialog-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer; flex: none;
}
.dialog-close:hover { background: var(--green-soft); }

.modal {
  position: fixed; z-index: 100; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 24px); max-width: 860px; max-height: calc(100% - 24px); overflow-y: auto;
  background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .modal, .drawer { animation: none; } }
.modal > .dialog-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.modal-grid { display: grid; }
@media (min-width: 760px) { .modal-grid { grid-template-columns: 1fr 1.1fr; } }
.pm-art { min-height: 200px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pm-art svg { width: 100%; max-width: 360px; height: auto; }
.pm-info { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 760px) { .pm-info { padding: 28px 28px 24px; } }
.pm-info h2 { margin: 0; padding-right: 40px; font-size: 1.4rem; }
.pm-info .badge { align-self: flex-start; }
.pm-desc { margin: 0; color: var(--text-muted); font-size: .95rem; }
.pm-sizes { border: 0; padding: 0; margin: 0; }
.pm-sizes legend { font-weight: 800; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.size-list { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn {
  min-height: 44px; min-width: 64px; padding: 6px 14px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: #fff; font: inherit; font-weight: 700; color: var(--text); cursor: pointer;
}
.size-btn:hover { border-color: var(--green-leaf); }
.size-btn[aria-pressed="true"] { border-color: var(--green-dark); background: var(--green-soft); color: var(--green-deep); }
.pm-price { font-size: 1.5rem; font-weight: 800; color: var(--green-deep); }
.pm-buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pm-buy .btn { flex: 1 1 160px; }
.pm-call { align-self: flex-start; }
.pm-call[hidden] { display: none; }
.pm-status { margin: 0; min-height: 1.4em; font-size: .92rem; color: var(--green-deep); }

.qty { display: inline-flex; align-items: center; border: 2px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty-btn {
  width: 44px; height: 44px; border: 0; background: #fff; font: inherit; font-size: 1.3rem; font-weight: 800;
  color: var(--green-dark); cursor: pointer;
}
.qty-btn:hover:not([disabled]) { background: var(--green-soft); }
.qty-btn[disabled] { color: #A8B3A3; cursor: not-allowed; }
.qty input {
  width: 48px; height: 44px; border: 0; text-align: center; font: inherit; font-weight: 800; color: var(--text);
  -moz-appearance: textfield; appearance: textfield; background: #fff;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm .qty-btn { width: 36px; height: 36px; font-size: 1.1rem; }
.qty-val { min-width: 28px; text-align: center; font-weight: 800; }

/* Корзина */
.drawer {
  position: fixed; z-index: 100; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px; background: #fff; display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .25); animation: slide .2s ease-out;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 1.3rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { color: var(--text-muted); }
.cart-list { list-style: none; margin: 0 0 16px; padding: 0; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ci-art { width: 64px; height: 64px; border-radius: var(--radius-sm); flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ci-art svg { width: 100%; height: 100%; }
.ci-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-name { font-weight: 800; line-height: 1.3; }
.ci-meta { font-size: .82rem; color: var(--text-muted); }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ci-sum { color: var(--green-deep); }
.ci-remove { align-self: flex-start; font-size: .85rem; color: #8A3F06; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 1.1rem; margin: 0 0 16px; }
.cart-total strong { font-size: 1.35rem; color: var(--green-deep); }
#cart-view[hidden], .cart-total[hidden], .cart-list[hidden], .cart-empty[hidden], #cart-checkout[hidden], .order-form[hidden] { display: none; }

.order-form { display: flex; flex-direction: column; gap: 12px; }
.order-form h3 { margin: 0; }
.order-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .92rem; }
.order-form input[type="text"], .order-form input[type="tel"], .order-form textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; min-height: 44px;
  border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: #fff;
}
.order-form input:focus, .order-form textarea:focus { border-color: var(--green-leaf); outline: none; box-shadow: 0 0 0 3px rgba(127, 181, 72, .3); }
.order-form fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0; }
.order-form legend { font-weight: 800; font-size: .9rem; padding: 0 4px; }
.order-form .radio { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.order-form .radio input { margin-top: 5px; }
.demo-note { margin: 0; font-size: .85rem; background: var(--lavender-soft); color: var(--lavender-dark); padding: 6px 10px; border-radius: var(--radius-sm); font-weight: 700; }
.order-result { margin: 0; font-weight: 800; }
.order-result:empty { display: none; }
.order-result.is-ok { background: var(--yellow-soft); border-left: 4px solid var(--yellow); padding: 10px 12px; border-radius: var(--radius-sm); }
.order-result.is-error { color: #A12A0E; }

@media (max-width: 420px) { .burger > span { display: none; } .header-inner { gap: 6px; } }

/* Логотип в тёмном подвале — на светлой плашке, чтобы зелёный текст читался */
.site-footer .logo img { height: 96px; width: auto; background: #FAF7EE; border-radius: 16px; padding: 8px 12px; }

/* Карта Яндекса */
.map-embed { position: relative; width: 100%; min-height: 320px; border-radius: var(--radius, 16px); overflow: hidden; border: 1px solid rgba(0,0,0,.08); background: #EEF3E9; }
.map-embed--tall { min-height: 420px; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* Компактный подвал: контакты в две колонки, шире колонка контактов */
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: .9fr .7fr 2.4fr; }
  .site-footer .contact-list { grid-template-columns: repeat(2, auto); justify-content: start; gap: 14px 40px; }
}
.site-footer { padding-top: 32px; }
.site-footer .logo img { height: 80px; }
.footer-bottom { margin-top: 24px; }

/* Каталог из СБИС: заглушка вместо фото */
.product-live .product-img svg.ph-icon { width: 40px; height: 40px; }
.ph-wrap { position: relative; overflow: hidden; }
.ph-wrap .ph-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* ---------- Документы (политики, согласия) ---------- */
.legal-doc { max-width: 820px; }
.legal-doc h2 { font-size: 1.15rem; margin: 26px 0 8px; color: var(--green-dark); }
.legal-doc p, .legal-doc li { line-height: 1.6; }
.legal-doc ul { padding-left: 1.3em; }
.legal-doc .doc-date { color: var(--text-muted); font-size: .9rem; }
.footer-legal { display: block; width: 100%; font-size: .85rem; }
.footer-legal a { color: inherit; }

/* ---------- Согласие в форме заказа ---------- */
.consent-check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; line-height: 1.4; margin: 6px 0; }
.consent-check input { margin-top: 3px; flex: none; width: 18px; height: 18px; }

/* ---------- Окно cookie ---------- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { pointer-events: auto; max-width: 720px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 14px 16px; font-size: .9rem; }
.cookie-inner p { margin: 0 0 8px; }
.cookie-title { font-weight: 800; color: var(--green-deep); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- SEO-страницы товаров и разделов (/tovar/, /razdel/) ---------- */
.seo-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.seo-photo { background: var(--green-soft); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.seo-photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.seo-noimg { display: block; width: 40%; aspect-ratio: 1; border-radius: 50%; background: var(--green-leaf); opacity: .25; }
.seo-bigprice { font-size: 2rem; font-weight: 900; color: var(--green-deep); margin: 0 0 8px; }
.seo-bigprice small { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.seo-stock { color: var(--text-muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seo-buy { margin: 16px 0; }
.seo-buy { position: relative; display: inline-block; }
.seo-buy .product-open { min-width: 200px; min-height: 48px; padding: 10px 28px; border-radius: 999px; font-weight: 800; text-align: center;
  background: var(--green-dark); color: #fff; border: 2px solid transparent; }
.seo-buy .product-open:hover { background: var(--green-deep); }
.seo-buy .product-open:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.seo-pickup { font-size: .95rem; color: var(--text-muted); }
.seo-info h2 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.seo-notice { font-size: .9rem; background: var(--yellow-soft); border-radius: var(--radius-sm); padding: 10px 14px; }
.seo-subs { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.seo-subs a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--green-soft); color: var(--green-deep); font-weight: 700; text-decoration: none; }
.seo-subs a span { color: var(--text-muted); font-weight: 600; }
.seo-folder h2 { font-size: 1.25rem; margin: 28px 0 12px; }
.seo-folder h2 a { color: inherit; text-decoration: none; }
.seo-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.seo-grid a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; background: #fff; }
.seo-grid a:hover { box-shadow: var(--shadow); }
.seo-grid img, .seo-grid .seo-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0; opacity: 1; background: var(--green-soft); }
.seo-name { padding: 10px 12px 4px; font-size: .92rem; line-height: 1.3; flex: 1; }
.seo-price { padding: 0 12px 12px; font-weight: 800; color: var(--green-deep); }
.leaf-title a { color: inherit; text-decoration: none; }
.leaf-title a:hover { text-decoration: underline; }
.pm-page { display: inline-block; margin: 4px 0 10px; font-weight: 700; }
.pm-page[hidden] { display: none; }
@media (max-width: 760px) { .seo-product { grid-template-columns: 1fr; gap: 18px; } .seo-bigprice { font-size: 1.6rem; } }

/* «Хиты сезона» до первой выгрузки каталога */
.hits-wait { grid-column: 1 / -1; color: var(--muted, #6b7a6b); margin: 0; }

/* ==========================================================
   Новый дизайн: страницы каталога, статьи и документы приводятся
   к виду главной (палитра и шрифты site_v2). Разметка не меняется.
   ========================================================== */
:root {
  --green-dark: #2E7D32;
  --green-deep: #1F331C;
  --green-leaf: #2E7D32;
  --green-soft: #E3F1D3;
  --lavender: #2E7D32;
  --lavender-dark: #256628;
  --lavender-soft: #EEF6E4;
  --orange: #C62828;
  --orange-soft: #FDECEA;
  --yellow-soft: #EEF6E4;
  --text: #1F331C;
  --text-muted: #4F5E4B;
  --bg: #F4F8EE;
  --bg-alt: #EEF6E4;
  --border: #DCE6D0;
  --radius: 20px;
  --radius-sm: 12px;
  --font-text: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-head: 'Nunito', ui-rounded, 'Segoe UI', system-ui, sans-serif;
}
body { font-size: 15px; line-height: 1.5; }
body::before {
  content: "Самовывоз: г. Плавск, ул. Коммунаров, 41";
  display: block; padding: 8px 16px; background: #1F331C; color: #DCE8D2;
  font-size: 13px; font-weight: 600; text-align: center;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; color: var(--text); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.site-header { background: #fff; backdrop-filter: none; }
.site-header .logo img { height: 62px; }
.header-inner { min-height: 84px; }
.main-nav a { font-weight: 700; color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--green-dark); background: var(--green-soft); border-radius: 12px; box-shadow: none; padding-left: 14px; }
.cart-btn { background: var(--green-soft); border-color: transparent; border-radius: 12px; }
.cart-btn:hover { background: #D6E9C2; }
.cart-count { background: var(--orange); color: #fff; }
.cart-count.is-empty { background: #fff; color: var(--text-muted); }
.btn { border-radius: 12px; font-weight: 700; }
.btn:hover { transform: none; }
.btn-primary:hover { background: #256628; }
.btn-accent, .btn-accent:hover { color: #fff; }
.btn-accent:hover { background: #A82020; }
.btn-ghost { background: transparent; }
.page-hero { background: transparent; border-bottom: 0; padding: 28px 0 8px; }
.breadcrumbs { font-size: 14px; }
.section { padding: 32px 0; }
.toc a, .cat-quicknav a { background: #fff; color: var(--text); }
.toc a:hover, .cat-quicknav a:hover { background: var(--green-soft); border-color: var(--green-dark); color: var(--green-dark); }
.article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.article + .article { border-top: 1px solid var(--border); padding-top: 24px; }
.tip { border-left: 0; }
.legal-doc { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.product, .seo-grid a, .tile { background: #fff; border-color: var(--border); border-radius: var(--radius); }
.product-live:hover, .product-live:focus-within, .seo-grid a:hover { border-color: var(--green-dark); box-shadow: none; transform: translateY(-2px); }
.seo-buy .product-open { border-radius: 12px; }
.seo-buy.product-live:hover, .seo-buy.product-live:focus-within { border-color: transparent; transform: none; }
.seo-photo { background: #fff; border: 1px solid var(--border); }
.seo-photo img { padding: 16px; }
.seo-grid img { object-fit: contain; padding: 10px; background: #fff; }
.seo-grid .seo-noimg { background: var(--green-soft); padding: 0; }
.seo-bigprice { font-family: var(--font-head); color: var(--text); }
.seo-subs a { background: #fff; border: 1px solid var(--border); color: var(--text); }
.seo-subs a:hover { background: var(--green-soft); border-color: var(--green-dark); }
.seo-notice { background: var(--bg-alt); }
.drawer, .modal { font-size: 15px; }
.site-footer { background: #1F331C; color: #DCE8D2; }
.site-footer .contact-list .icon { color: #DCE8D2; }
.soil-strip { display: none; }
