/* ============================================================
   Мастерская Никифора — дизайн-система
   Светлый, воздушный, редакционно аккуратный стиль.
   Палитра: молочный фон, береста, тёмная зелень, небесно-голубой.
   ============================================================ */

:root {
  --bg: #FBFCF7;
  --cream: #F4F1E7;
  --birch: #E5CDA3;
  --birch-deep: #D9BC85;
  --green-950: #16281E;
  --green-900: #244B35;
  --green-700: #2E5C41;
  --green-600: #3F6F4F;
  --green-500: #55856A;
  --green-100: #E4EFE7;
  --sky: #D8EEF8;
  --sky-deep: #BFE0F0;
  --sky-ink: #2C4A5E;
  --ink: #203229;
  --ink-soft: #4E6156;
  --ink-faint: #7A8B80;
  --card: #FFFFFF;
  --line: rgba(32, 50, 41, .12);
  --line-strong: rgba(32, 50, 41, .22);
  --shadow-sm: 0 1px 2px rgba(22, 40, 30, .05), 0 6px 18px rgba(22, 40, 30, .07);
  --shadow-md: 0 10px 30px rgba(22, 40, 30, .12);
  --shadow-lg: 0 20px 50px rgba(22, 40, 30, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-900); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}

p { margin: 0 0 1em; }

button { font-family: inherit; }

.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

.band { background: var(--cream); }
.band-sky { background: var(--sky); }

.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 44px;
}

.section-head h2 { font-size: 38px; letter-spacing: -.01em; }
.section-head .lead { margin: 10px 0 0; max-width: 560px; color: var(--ink-soft); font-size: 16.5px; }
.section-head .head-link { flex: none; font-weight: 700; font-size: 15px; white-space: nowrap; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
              transform .16s ease, box-shadow .16s ease;
}

.btn:focus-visible, .btn-icon:focus-visible, .icon-btn:focus-visible, .chip:focus-visible,
.filter-chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.qty-btn:focus-visible, .thumb:focus-visible, .close-btn:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 2px;
}

.btn-primary { background: var(--green-900); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary:active { transform: translateY(0); }

.btn-outline { background: transparent; border-color: var(--green-900); color: var(--green-900); }
.btn-outline:hover { background: var(--green-900); color: #fff; }

.btn-ghost { background: transparent; color: var(--green-900); }
.btn-ghost:hover { background: var(--green-100); }

.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--green-100); color: var(--green-900); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Демо-плашка ---------- */

.demo-banner {
  background: var(--sky);
  color: var(--sky-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  line-height: 1.4;
}
.demo-banner .banner-link { color: var(--sky-ink); text-decoration: underline; text-underline-offset: 2px; font-weight: 800; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 247, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(22, 40, 30, .08); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand { display: flex; flex-direction: column; line-height: 1.15; margin-right: 8px; }
.brand .brand-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.brand:hover .brand-name { color: var(--green-900); }
.brand .brand-sub { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .02em; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  border-radius: 10px;
  transition: background-color .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--green-100); color: var(--green-900); }
.main-nav a.active { color: var(--green-900); background: var(--green-100); }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.cart-badge {
  position: relative;
}
.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--green-600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform .18s ease;
}
.cart-count.show { transform: scale(1); }

.burger { display: none; }

/* ---------- Мобильное меню ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 20px 24px 32px;
  transform: translateX(100%);
  transition: transform .28s ease;
  visibility: hidden;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu nav a:hover { color: var(--green-900); }
.mobile-menu-foot { margin-top: auto; display: flex; gap: 10px; }
.mobile-menu-foot .btn { flex: 1; }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 84px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: var(--sky);
  opacity: .75;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 60px;
  align-items: center;
}
.hero h1 { font-size: 52px; letter-spacing: -.015em; margin: 0 0 20px; }
.hero .hero-text { font-size: 17.5px; color: var(--ink-soft); max-width: 540px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.hero-facts { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 42px; }
.fact { border-top: 2px solid var(--birch-deep); padding-top: 12px; min-width: 140px; }
.fact b { display: block; font-size: 18.5px; font-family: var(--font-serif); font-weight: 700; }
.fact span { font-size: 13.5px; color: var(--ink-faint); }

.hero-media { position: relative; }
.hero-media .hero-img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 26px -22px -22px 26px;
  border-radius: 24px;
  background: var(--cream);
  z-index: -1;
}
.float-card {
  position: absolute;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 13px 17px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.float-card .fc-sub { font-weight: 600; color: var(--ink-faint); font-size: 12.5px; }
.float-loc { top: 18px; left: -18px; display: flex; align-items: center; gap: 10px; }
.float-loc .loc-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(63, 111, 79, .18);
  flex: none;
}
.float-quote {
  bottom: -26px;
  right: -14px;
  max-width: 320px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
  color: var(--green-900);
}
.float-quote::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--birch-deep);
  margin-bottom: 8px;
}

/* ---------- Товарные карточки ---------- */

.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-card .pc-media { position: relative; display: block; overflow: hidden; }
.product-card .pc-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover .pc-media img { transform: scale(1.04); }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color .15s ease, transform .15s ease;
  z-index: 2;
}
.fav-btn:hover { color: var(--green-900); transform: scale(1.06); }
.fav-btn svg { width: 18px; height: 18px; }
.fav-btn.active { color: var(--green-600); }
.fav-btn.active svg { fill: var(--green-600); }

.pc-body { display: flex; flex-direction: column; flex: 1; padding: 16px 16px 15px; gap: 7px; }
.pc-body h3 { font-size: 18.5px; }
.pc-body h3 a { color: inherit; }
.pc-body h3 a:hover { color: var(--green-700); }
.pc-desc { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 11px; }
.price { font-size: 17px; font-weight: 800; color: var(--ink); white-space: nowrap; }

.chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-ok { background: var(--green-100); color: var(--green-900); }
.chip-order { background: #F1E6CF; color: #6B5328; }

/* ---------- История ---------- */

.story-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 64px; align-items: center; }
.story-copy p { font-size: 16.5px; color: var(--ink-soft); }
.story-facts { list-style: none; margin: 26px 0 0; padding: 0; }
.story-facts li {
  position: relative;
  padding: 10px 0 10px 30px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.story-facts li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(63, 111, 79, .15);
}

.story-media { position: relative; }
.story-media img {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}
.story-media::after {
  content: "";
  position: absolute;
  inset: 20px -18px -18px 20px;
  background: var(--birch);
  border-radius: 20px;
  z-index: -1;
  opacity: .55;
}

blockquote.quote {
  margin: 30px 0;
  padding: 22px 26px;
  border-left: 4px solid var(--birch-deep);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}
blockquote.quote p {
  font-family: var(--font-serif);
  font-size: 18.5px;
  font-style: italic;
  color: var(--green-900);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Этапы работы ---------- */

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step-body { padding: 16px 18px 18px; }
.step-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--birch-deep);
  text-transform: uppercase;
}
.step-body h3 { font-size: 18px; margin: 7px 0 6px; }
.step-body p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* ---------- Записки ---------- */

.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.note-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  color: inherit;
}
.note-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }
.note-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.note-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; gap: 8px; }
.note-date { font-size: 12.5px; color: var(--ink-faint); font-weight: 650; }
.note-body h3 { font-size: 18.5px; line-height: 1.3; }
.note-body h3 a { color: inherit; }
.note-body h3 a:hover { color: var(--green-700); }
.note-excerpt { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.note-more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 750; color: var(--green-700); }

/* ---------- Доставка ---------- */

.delivery-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.cities { display: flex; flex-wrap: wrap; gap: 9px; margin: 26px 0; }
.city-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.city-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-600);
}

.shipment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  margin-top: 26px;
  max-width: 420px;
}
.shipment-card .sc-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-ink);
  flex: none;
}
.shipment-card b { display: block; font-size: 15.5px; }
.shipment-card span { font-size: 13px; color: var(--ink-faint); }

.delivery-media { position: relative; }
.delivery-media img {
  width: 100%;
  aspect-ratio: 4 / 4.2;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}
.delivery-media .route-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--green-900);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 12px;
  letter-spacing: .02em;
}

/* ---------- Финальный CTA ---------- */

.cta-final-card {
  position: relative;
  background: var(--sky);
  border-radius: 28px;
  padding: 64px 48px;
  text-align: center;
  overflow: hidden;
}
.cta-final-card::before, .cta-final-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cta-final-card::before {
  width: 300px; height: 300px;
  background: rgba(255, 255, 255, .5);
  top: -140px; left: -90px;
}
.cta-final-card::after {
  width: 220px; height: 220px;
  background: rgba(63, 111, 79, .12);
  bottom: -100px; right: -60px;
}
.cta-final-card h2 { font-size: 36px; margin: 0 auto 14px; max-width: 640px; }
.cta-final-card p { color: var(--sky-ink); font-size: 16px; max-width: 560px; margin: 0 auto 28px; }
.cta-final-card .btn { position: relative; z-index: 1; }

/* ---------- Формы ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13.5px; font-weight: 750; color: var(--ink); }
.form-field .hint { font-size: 12.5px; color: var(--ink-faint); font-weight: 500; }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(63, 111, 79, .12);
}
textarea { min-height: 110px; resize: vertical; }

.form-consent { font-size: 13px; color: var(--ink-faint); line-height: 1.5; margin: 14px 0 0; }

.demo-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--sky);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--sky-ink);
  line-height: 1.5;
  margin: 14px 0 0;
}
.demo-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

.form-success {
  display: none;
  background: var(--green-100);
  border: 1px solid rgba(63, 111, 79, .35);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 18px;
}
.form-success.show { display: block; }
.form-success b { font-family: var(--font-serif); font-size: 19px; color: var(--green-900); display: block; margin-bottom: 6px; }
.form-success p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Каталог ---------- */

.catalog-layout { display: grid; grid-template-columns: 258px 1fr; gap: 36px; align-items: start; }
.filters { position: sticky; top: 92px; }
.filter-group { margin-bottom: 26px; }
.filter-group .fg-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.filter-chip:hover { border-color: var(--green-600); color: var(--green-900); }
.filter-chip.active { background: var(--green-900); border-color: var(--green-900); color: #fff; }

.filter-radio { display: flex; flex-direction: column; gap: 9px; }
.filter-radio label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.filter-radio input { accent-color: var(--green-700); width: 16px; height: 16px; }

.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { padding: 9px 10px; font-size: 14px; }
.price-range span { color: var(--ink-faint); }

.filter-select { width: 100%; }

.catalog-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.catalog-top .found { font-size: 14.5px; color: var(--ink-soft); }
.catalog-top select { width: auto; min-width: 210px; }

.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.empty-catalog {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  background: var(--cream);
  border-radius: var(--radius);
}
.empty-catalog h3 { font-size: 24px; margin-bottom: 8px; }
.empty-catalog p { color: var(--ink-soft); margin: 0 0 20px; }

/* ---------- Карточка товара ---------- */

.breadcrumbs { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 26px; }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--green-900); }
.breadcrumbs .sep { margin: 0 8px; }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}
.gallery-main img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color .15s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--green-600); }

.product-info h1 { font-size: 36px; margin: 10px 0 8px; }
.product-info .price { font-size: 26px; margin: 14px 0 4px; display: block; }
.product-info .price-note { font-size: 13.5px; color: var(--ink-faint); }

.spec-list { margin: 20px 0; border-top: 1px solid var(--line); }
.spec-list .spec-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.spec-list .spec-row span:first-child { color: var(--ink-faint); font-weight: 600; }
.spec-list .spec-row span:last-child { font-weight: 700; text-align: right; }

.qty-row { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.qty-btn {
  width: 42px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: var(--green-900);
  cursor: pointer;
  transition: background-color .15s ease;
}
.qty-btn:hover { background: var(--green-100); }
.qty-value { width: 44px; text-align: center; font-size: 16px; font-weight: 800; }

.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; margin: 0 0 14px; cursor: pointer; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--green-700); }

.product-story { margin-top: 34px; }
.product-story h2 { font-size: 24px; margin-bottom: 12px; }
.product-story p { color: var(--ink-soft); font-size: 15.5px; max-width: 620px; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(22, 40, 30, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(920px, 100%);
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.lightbox .lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s ease;
}
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, .28); }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 18px; right: 18px; }
.lb-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.85); font-size: 13.5px; font-weight: 700; }

/* ---------- Корзина ---------- */

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; }

.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid;
  grid-template-columns: 92px 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.cart-item img { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; }
.cart-item .ci-name { font-weight: 750; font-size: 15.5px; }
.cart-item .ci-name a { color: inherit; }
.cart-item .ci-meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.cart-item .ci-line-total { font-weight: 800; font-size: 15.5px; min-width: 92px; text-align: right; }

.cart-summary {
  position: sticky;
  top: 92px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.cart-summary h2 { font-size: 22px; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14.5px; padding: 7px 0; color: var(--ink-soft); }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-size: 18px; font-weight: 800; color: var(--ink); }
.cart-summary .btn { margin-top: 18px; }
.cart-summary .summary-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 12px; line-height: 1.5; }

.empty-state { text-align: center; padding: 52px 24px; }
.empty-state .es-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-600);
}
.empty-state h2 { font-size: 28px; margin-bottom: 10px; }
.empty-state p { color: var(--ink-soft); max-width: 480px; margin: 0 auto 24px; }

/* ---------- Оформление заказа ---------- */

.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; }
.checkout-steps { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-faint); margin-bottom: 26px; font-weight: 650; }
.checkout-steps .step-on { color: var(--green-900); }
.checkout-steps .step-arrow { color: var(--ink-faint); }

.checkout-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.checkout-section h2 { font-size: 20px; margin-bottom: 18px; }
.checkout-section .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 13px;
  font-weight: 800;
  margin-right: 10px;
  vertical-align: 2px;
}

.test-card { background: var(--sky); border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px; color: var(--sky-ink); line-height: 1.55; margin: 0 0 16px; }

.delivery-option { display: flex; flex-direction: column; gap: 9px; }
.delivery-option label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.delivery-option label:hover { border-color: var(--green-500); }
.delivery-option label:has(input:checked) { border-color: var(--green-600); background: var(--green-100); }
.delivery-option input { margin-top: 3px; accent-color: var(--green-700); }
.delivery-option b { display: block; font-size: 14.5px; }
.delivery-option span { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- Страница «Заказ оформлен» ---------- */

.thanks-card {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 52px 44px;
}
.thanks-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-700);
}
.thanks-card h1 { font-size: 34px; margin-bottom: 10px; }
.thanks-card .order-no { font-size: 16px; font-weight: 800; color: var(--green-700); margin-bottom: 16px; }
.thanks-card p { color: var(--ink-soft); }

.platform-card {
  max-width: 620px;
  margin: 28px auto 0;
  background: var(--sky);
  border-radius: 20px;
  padding: 28px 32px;
  text-align: center;
}
.platform-card h2 { font-size: 22px; margin-bottom: 10px; }
.platform-card p { color: var(--sky-ink); font-size: 15px; margin-bottom: 20px; }

/* ---------- Кабинет ---------- */

.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.account-nav {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.account-nav button {
  text-align: left;
  border: none;
  background: transparent;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.account-nav button:hover { background: var(--green-100); color: var(--green-900); }
.account-nav button.active { background: var(--green-900); color: #fff; }

.account-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow-sm); }
.account-panel h2 { font-size: 24px; margin-bottom: 20px; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.auth-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; background: var(--bg); }
.auth-box h3 { font-size: 21px; margin-bottom: 16px; }
.auth-error { display: none; color: #A33B2E; font-size: 13.5px; font-weight: 700; margin-top: 10px; }
.auth-error.show { display: block; }

.mini-product { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mini-product:last-child { border-bottom: none; }
.mini-product img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.mini-product .mp-name { font-weight: 750; font-size: 14.5px; }
.mini-product .mp-name a { color: inherit; }
.mini-product .mp-price { font-size: 13.5px; color: var(--ink-soft); }

.order-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; background: var(--bg); }
.order-card .oc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.order-card .oc-no { font-weight: 800; font-size: 15px; }
.order-card .oc-date { font-size: 13px; color: var(--ink-faint); }
.order-card .oc-status { display: inline-block; font-size: 12.5px; font-weight: 750; background: var(--green-100); color: var(--green-900); border-radius: 999px; padding: 4px 12px; }
.order-card .oc-items { font-size: 13.5px; color: var(--ink-soft); }
.order-card .oc-track { font-size: 13.5px; margin-top: 8px; color: var(--ink); font-weight: 650; }

.address-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 10px; background: var(--bg); }
.address-row b { font-size: 14.5px; }
.address-row span { display: block; font-size: 13px; color: var(--ink-soft); }

/* ---------- Страницы: о мастерской, как я работаю ---------- */

.page-hero { padding: 64px 0 20px; }
.page-hero h1 { font-size: 44px; letter-spacing: -.015em; margin: 0 0 16px; max-width: 760px; }
.page-hero .lead { font-size: 17.5px; color: var(--ink-soft); max-width: 640px; line-height: 1.65; }

.prose { max-width: 720px; }
.prose p { font-size: 16.5px; color: var(--ink-soft); line-height: 1.7; }
.prose h2 { font-size: 27px; margin: 34px 0 14px; }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 22px 0; }

.about-hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; margin: 30px 0 60px; }
.about-hero-grid img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-md); }

.timeline { display: flex; flex-direction: column; gap: 34px; max-width: 860px; margin: 40px 0; }
.timeline-item { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: center; }
.timeline-item:nth-child(even) { direction: rtl; }
.timeline-item:nth-child(even) > * { direction: ltr; }
.timeline-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.timeline-item h3 { font-size: 21px; margin-bottom: 8px; }
.timeline-item p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.timeline-item .t-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--birch-deep);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

/* ---------- Статьи «Записки» ---------- */

.post-hero { padding: 48px 0 30px; }
.post-cover { width: 100%; max-height: 440px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-md); margin-bottom: 30px; }
.post-layout { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: start; }
.post-body { max-width: 700px; }
.post-body p { font-size: 17px; line-height: 1.75; color: var(--ink); margin-bottom: 22px; }
.post-body p.lead-para { font-size: 19px; font-family: var(--font-serif); color: var(--green-900); line-height: 1.55; }
.post-side { position: sticky; top: 92px; }
.post-side h3 { font-size: 15px; margin-bottom: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; font-family: var(--font-sans); }
.post-side .side-note { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); font-weight: 650; line-height: 1.4; }
.post-side .side-note:hover { color: var(--green-700); }
.post-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-nav a { font-size: 14.5px; font-weight: 750; }

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

.site-footer { background: var(--green-950); color: #C9D6CD; margin-top: 60px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.footer-brand .brand-name { color: #F3F7F2; font-family: var(--font-serif); font-size: 21px; font-weight: 700; }
.footer-brand p { font-size: 13.5px; margin: 10px 0 0; max-width: 280px; line-height: 1.6; color: #9FB3A5; }
.footer-col h4 { color: #E8F0E9; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; margin: 0 0 16px; font-family: var(--font-sans); }
.footer-col a { display: block; padding: 5px 0; font-size: 14px; color: #C9D6CD; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 18px 0;
  font-size: 13px;
  color: #9FB3A5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom a { color: #C9D6CD; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Cookie-баннер ---------- */

.consent-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 720px;
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.consent-bar.show { opacity: 1; visibility: visible; transform: translateY(0); }
.consent-bar p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.consent-bar .btn { flex: none; }

/* ---------- Toast ---------- */

.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--green-950);
  color: #fff;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
  max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast a { color: var(--sky); font-weight: 800; white-space: nowrap; }
.toast a:hover { color: #fff; }

/* ---------- Вспомогательное ---------- */

.page-section-head { margin: 44px 0 26px; }
.page-section-head h2 { font-size: 30px; }

.similar-title { margin: 60px 0 26px; font-size: 28px; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 500;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Адаптивность ---------- */

@media (max-width: 1080px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: inline-flex; }
  .hero-grid, .story-grid, .delivery-grid, .product-layout,
  .checkout-layout, .cart-layout, .about-hero-grid, .post-layout, .account-layout {
    grid-template-columns: 1fr;
  }
  .hero { padding: 44px 0 64px; }
  .hero h1 { font-size: 40px; }
  .hero-media { max-width: 520px; }
  .float-loc { left: 10px; }
  .float-quote { right: 10px; }
  .filters, .cart-summary, .account-nav, .post-side { position: static; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 26px; }
  .timeline-item, .timeline-item:nth-child(even) { grid-template-columns: 1fr; direction: ltr; gap: 16px; }
  .timeline-item img { max-height: 260px; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head h2 { font-size: 31px; }
  .cta-final-card { padding: 48px 24px; }
  .cta-final-card h2 { font-size: 29px; }
  .cart-item { grid-template-columns: 78px 1fr auto; }
  .cart-item img { width: 78px; height: 78px; }
  .cart-item .ci-line-total { grid-column: 3; }
}

@media (max-width: 620px) {
  .container { padding-inline: 18px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .steps-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 33px; }
  .hero .hero-text { font-size: 16px; }
  .hero-facts { gap: 20px; }
  .fact { min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .pc-body { padding: 13px 13px 13px; }
  .pc-body h3 { font-size: 16.5px; }
  .pc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pc-foot { flex-direction: column; align-items: flex-start; gap: 9px; }
  .pc-foot .btn { width: 100%; }
  .filters { grid-template-columns: 1fr; }
  .catalog-top { flex-direction: column; align-items: stretch; }
  .catalog-top select { width: 100%; }
  .cart-item { grid-template-columns: 64px 1fr; row-gap: 8px; padding: 12px; }
  .cart-item img { width: 64px; height: 64px; }
  .cart-item .ci-qty { grid-column: 2; }
  .cart-item .ci-line-total { grid-column: 2; text-align: left; }
  .checkout-section { padding: 20px 18px; }
  .thanks-card { padding: 38px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 44px 0 30px; }
  .consent-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
  }
  .consent-bar p { font-size: 12px; line-height: 1.45; }
  .consent-bar .btn { flex: none; width: auto; padding: 8px 12px; font-size: 13px; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .lightbox .lb-btn { width: 42px; height: 42px; }
  .page-hero h1 { font-size: 34px; }
  .demo-banner { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
