:root {
  --ink: #0B0B0B;
  --green: #51934C;
  --green-dark: #3F7739;
  --green-light: #F1F7F0;
  --green-mid: #7CB273;
  --green-pale: #C9E0C2;
  --line: #E4EBE2;
  --white: #FFFFFF;
  --radius: 16px;
  --maxw: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Тема магазина: ГранитПро (карминовые акценты) ---------- */
html[data-tenant="tiles"] {
  --green: #C62828;
  --green-dark: #8E1B1B;
  --green-light: #FCEEEE;
  --green-mid: #E53935;
  --green-pale: #F3C7C7;
}

/* ---------- Black stand bar (единая навигация демо-стенда) ---------- */
.stand-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0B0B0B;
  color: #F4F4F4;
  border-bottom: 1px solid #232323;
}
.stand-bar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.stand-bar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-width: 0;
}
.stand-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #FFFFFF;
  white-space: nowrap;
}
.stand-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.stand-tab {
  font-size: 13px;
  font-weight: 600;
  color: #C9C9C9;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.stand-tab:hover { color: #FFFFFF; border-color: #3a3a3a; }
.stand-tab.is-active {
  color: #0B0B0B;
  background: #FFFFFF;
  border-color: #FFFFFF;
}
.stand-bar-right { display: flex; align-items: center; gap: 10px; }
.stand-tenant-switch { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; }
.stand-tenant-switch .tenant-pill {
  border: 1px solid #3a3a3a;
  background: transparent;
  color: #D6D6D6;
}
.stand-tenant-switch .tenant-pill:hover {
  border-color: #FFFFFF;
  color: #FFFFFF;
}
.stand-tenant-switch .tenant-pill.is-active {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0B0B0B;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo { width: 40px; height: 40px; display: block; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: 8px;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a { color: #2b2b2b; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--green-dark); border-bottom-color: var(--green); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-phone { font-weight: 700; font-size: 16px; }
.header-phone:hover { color: var(--green-dark); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -.02em;
  max-width: 14ch;
}
.hero-sub {
  margin-top: 18px;
  font-size: 18px;
  color: #444;
  max-width: 46ch;
}
.badge-night {
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  max-width: 560px;
  box-shadow: 0 10px 26px rgba(81, 147, 76, .22);
}
.badge-night p { font-size: 15px; }
.badge-night strong { font-weight: 800; }
.badge-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #CDEAC6;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .18);
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 460px; height: auto; }

/* Витрина магазина плитки показывает свою иллюстрацию, без следов досок. */
.hero-art-tiles { display: none; }
html[data-tenant="tiles"] .hero-art-lumber { display: none; }
html[data-tenant="tiles"] .hero-art-tiles { display: block; }

/* ---------- Sections ---------- */
.section { padding: 68px 0; }
.section-tint { background: var(--green-light); }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.01em;
}
.section-head p { margin-top: 10px; color: #4a4a4a; font-size: 16px; }

/* ---------- Catalog ---------- */
.catalog-status { font-size: 15px; color: #5a5a5a; margin-bottom: 18px; min-height: 1px; }
.catalog-status.error { color: #a33; }
.catalog-note { color: #5a5a5a; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover {
  box-shadow: 0 14px 30px rgba(11, 11, 11, .07);
  border-color: var(--green-pale);
  transform: translateY(-2px);
}
.card-art {
  border-radius: 12px;
  background: var(--green-light);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-art svg { width: 100%; height: 96px; display: block; }
.card-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--green-light);
}
.card-title { font-size: 18px; font-weight: 700; }
.card-specs { font-size: 14px; color: #4a4a4a; }
.card-specs span { display: block; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 999px;
  padding: 3px 10px;
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}
.price { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.price small { font-size: 13px; font-weight: 600; color: #6a6a6a; }
.stock { font-size: 13px; color: #6a6a6a; }

/* Skeleton */
.skeleton-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sk {
  background: linear-gradient(90deg, #eef3ec 25%, #f6faf5 37%, #eef3ec 63%);
  background-size: 400% 100%;
  border-radius: 8px;
  animation: shimmer 1.4s ease-in-out infinite;
}
.sk-art { height: 116px; border-radius: 12px; }
.sk-line { height: 12px; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.section-tint .tile { background: var(--white); }
.tiles-about { grid-template-columns: repeat(4, 1fr); }
.tile-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.tiles-about .tile-icon { background: var(--green-light); }
.tile-icon svg { width: 34px; height: 34px; display: block; }
.tile h3 { font-size: 18px; }
.tile p { margin-top: 8px; font-size: 15px; color: #4a4a4a; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}
.step h3 { font-size: 19px; }
.step p { margin-top: 8px; color: #4a4a4a; font-size: 15px; }
.delivery-note {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--green-light);
  font-weight: 500;
  color: var(--green-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #ececec;
  padding: 40px 0;
  margin-top: 12px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.footer-brand .brand-name { font-size: 20px; color: var(--white); }
.footer-brand p { margin-top: 8px; font-size: 14px; color: #a9a9a9; max-width: 42ch; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; text-align: right; font-size: 15px; }
.footer-meta a { font-weight: 700; }
.footer-meta a:hover { color: var(--green-mid); }

/* ---------- Details ---------- */
.details-wrap { padding: 28px 24px 48px; }
.details-wrap details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  background: #fafcfa;
  font-size: 14px;
  color: #4a4a4a;
}
.details-wrap summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.details-wrap pre {
  margin: 12px 0 0;
  overflow-x: auto;
  background: var(--green-light);
  border-radius: 10px;
  padding: 12px 14px;
}
.details-wrap code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tenant switch ---------- */
.site-tenant-switch {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  max-width: 42%;
}
.tenant-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--white);
  color: #4a4a4a;
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tenant-pill:hover { border-color: var(--green); color: var(--green-dark); }
.tenant-pill.is-active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ---------- Scenario ---------- */
.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.demo-chip {
  border: 1px solid var(--green-pale);
  background: var(--white);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.demo-chip:hover { background: var(--green-light); border-color: var(--green); }
.demo-chip:active { transform: translateY(1px); }

.scenario-terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.term-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.term-card h3 { font-size: 18px; margin-bottom: 12px; }
.pay-modes { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-mode {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
}
.pay-note { margin-top: 12px; font-size: 14px; color: #4a4a4a; }
.zone-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.zone-item {
  font-size: 15px;
  color: #3a3a3a;
  padding-left: 22px;
  position: relative;
}
.zone-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-mid);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .site-tenant-switch { max-width: 50%; }
  .scenario-terms { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 360px; margin: 0 auto; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .tiles, .tiles-about { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-phone { display: none; }
  .site-tenant-switch { max-width: 100%; }
  .stand-bar-inner { padding: 8px 18px; }
  .stand-bar-left { gap: 10px; }
  .stand-brand { font-size: 11.5px; }
  .stand-tab { font-size: 12px; padding: 4px 8px; }
  .header-inner { flex-wrap: wrap; }
  .container { padding: 0 18px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .tiles, .tiles-about { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 48px 0; }
  .footer-meta { text-align: left; }
}