:root {
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --soft: #f6f7f9;
  --accent: #d97706;
  --accent-dark: #b45309;
  --dark: #111827;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 14px; letter-spacing: -0.01em; }
h3 { font-size: 19px; margin: 0 0 8px; }
h4 { font-size: 15px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: 0 0 12px; }
a { color: inherit; }

.section { padding: 56px 0; }
.section.soft { background: var(--soft); }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); font-size: 14px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: 6px; font-size: 15px; }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--dark); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.main-nav a { color: #d1d5db; text-decoration: none; font-size: 15px; }
.main-nav a:hover { color: #fff; }
.header-right { display: flex; align-items: center; gap: 16px; }
.phone { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.cart-link {
  color: var(--dark); background: var(--accent); padding: 7px 14px;
  border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600;
}
.cart-link:hover { background: var(--accent-dark); }

/* Герой */
.hero { background: var(--dark); color: #fff; padding: 72px 0 64px; }
.hero h1 { max-width: 20ch; }
.hero .lead { color: #9ca3af; font-size: 19px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }

/* Сетки */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  background: #fff; display: flex; flex-direction: column; gap: 8px;
}
.card h3 { margin: 0; }
.card .price { font-weight: 700; font-size: 18px; margin-top: auto; }
.card .meta { font-size: 13px; color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head a { color: var(--accent-dark); text-decoration: none; font-weight: 600; font-size: 15px; }

/* Фильтры */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 24px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
select, input[type="text"], input[type="number"], input[type="search"] {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 15px; background: #fff; font-family: inherit; min-width: 140px;
}
button.btn { cursor: pointer; font-family: inherit; }

/* Прайс */
.anchors { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 18px; }
.anchors a {
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-size: 14px; color: var(--ink); background: #fff;
}
.anchors a:hover { border-color: var(--accent); color: var(--accent-dark); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; cursor: pointer; }

table.price { width: 100%; border-collapse: collapse; font-size: 15px; }
table.price th, table.price td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.price thead th { background: var(--soft); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.price tr.group th { background: #fff; font-size: 16px; padding-top: 26px; border-bottom: 2px solid var(--ink); }
table.price .num { text-align: right; white-space: nowrap; }
table.price input.qty { width: 92px; text-align: right; }
table.price tfoot td { font-weight: 700; font-size: 17px; border-top: 2px solid var(--ink); }
.disclaimer { margin-top: 18px; font-size: 14px; color: var(--muted); }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--dark); color: #fff; text-decoration: none;
  display: none; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.to-top.visible { display: flex; }

/* Портфолио */
.portfolio-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.portfolio-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.portfolio-item .ph {
  aspect-ratio: 4 / 3; background: var(--soft); display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-size: 13px;
}
.portfolio-item .body { padding: 14px 16px; }
.portfolio-item .tag { font-size: 12px; color: var(--accent-dark); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* Статьи */
.article-card { border-bottom: 1px solid var(--line); padding: 22px 0; }
.article-card:first-child { padding-top: 0; }
.article-card .date { font-size: 13px; color: var(--muted); }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-body { max-width: 74ch; font-size: 17px; }
.article-body h2 { margin-top: 32px; }

/* Корзина */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.cart-total { font-size: 20px; font-weight: 700; margin-top: 18px; }
.notice { padding: 14px 16px; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 10px; font-size: 14px; }

/* Подвал */
.site-footer { background: var(--dark); color: #9ca3af; padding: 48px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { color: #6b7280; }
.site-footer a { color: #d1d5db; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.logo-footer { color: #fff; margin-bottom: 12px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; font-size: 13px;
}

@media (max-width: 720px) {
  .header-inner { gap: 12px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; gap: 12px; font-size: 14px; }
  .section { padding: 40px 0; }
  table.price { font-size: 14px; }
  table.price th, table.price td { padding: 9px 8px; }
  table.price input.qty { width: 68px; }
}
