/* Общая раскладка блоков; цвета и шрифты — в theme-*.css */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 800px; }
h1, h2 { line-height: 1.2; margin: 0 0 20px; }
h2 { font-size: 30px; }
p { margin: 0 0 12px; }
.preview-bar { background: #ffcf33; color: #222; text-align: center; padding: 6px; font-size: 14px; }

.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); color: var(--header-text); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { font-weight: 800; font-size: 21px; text-decoration: none; letter-spacing: var(--logo-spacing, 0); }
.menu { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.menu a { text-decoration: none; opacity: .85; }
.menu a:hover { opacity: 1; color: var(--accent); }
.phone { font-weight: 600; white-space: nowrap; text-decoration: none; }

.block { padding: 64px 0; }
.block.alt { background: var(--soft); }
.block-hero { padding: 0; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: var(--radius); padding: 12px 24px; font: 600 15px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: wait; }

.hero { position: relative; background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.with-image::after { content: ""; position: absolute; inset: 0; background: var(--hero-shade); }
.hero-inner { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 96px; }
.hero h1 { font-size: 44px; max-width: 700px; }
.hero p { max-width: 580px; opacity: .9; margin-bottom: 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 16px 18px 18px; }
.card-body b { display: block; margin-bottom: 4px; }
.card-body p { color: var(--muted); font-size: 15px; margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split.no-image { grid-template-columns: 1fr; max-width: 800px; }
.split.image-left .split-img { order: -1; }
.split-img img { width: 100%; border-radius: var(--radius-lg); }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.feature { border-left: 4px solid var(--accent); padding: 4px 16px; }
.feature b { display: block; }
.feature p { color: var(--muted); margin: 0; }

table.price { width: 100%; border-collapse: collapse; }
.price td { padding: 12px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price small { display: block; color: var(--muted); }
.price .num { text-align: right; white-space: nowrap; font-weight: 600; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 10px; }
.panel input, .panel textarea { font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); width: 100%; }
.panel label { display: grid; gap: 6px; font-weight: 600; }
.panel .consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted); }
.panel .consent input { width: auto; margin-top: 3px; }
.hp { position: absolute; left: -9999px; }
.form-result, .status-result { padding: 12px; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok-text); }
.form-result.error, .status-result.error { background: var(--err-bg); color: var(--err-text); }
.lead-form { margin-top: 20px; max-width: 460px; }

dl.contacts { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 0 0 16px; }
.contacts dt { color: var(--muted); }
.contacts dd { margin: 0; }
.map { min-height: 340px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; align-self: stretch; }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

.site-footer { background: var(--header-bg); color: var(--footer-text); font-size: 13px; padding: 24px 0; }
.site-footer .wrap { display: grid; gap: 4px; }

@media (max-width: 860px) {
  .menu { display: none; }
  .bar { justify-content: space-between; }
  .hero h1 { font-size: 30px; }
  .hero-inner { padding-top: 56px; padding-bottom: 56px; }
  h2 { font-size: 25px; }
  .block:not(.block-hero) { padding: 44px 0; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split.image-left .split-img { order: 0; }
}

/* Страницы из подвала */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; font-size: 14px; }
.site-footer a { color: inherit; }
.text-page h2 { font-size: 22px; margin: 28px 0 10px; }
.text-page ul { padding-left: 22px; }
.text-page li { margin: 4px 0; }

/* Каталог */
.catalog-m { display: none; }
.menu a[href="/catalog"] { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chips a { text-decoration: none; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; background: var(--card); }
.chips a.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product { display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .15s; }
.product:hover { box-shadow: 0 6px 24px #0002; }
.product.unavailable .product-img { opacity: .55; }
.product-img { aspect-ratio: 1; background: var(--soft); display: grid; place-items: center; }
.product-img img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: 12px 14px 14px; display: grid; gap: 4px; align-content: start; flex: 1; }
.product-body small, .product-info .brand { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.product-body b { font-weight: 600; line-height: 1.35; }
.product-price { font-weight: 700; font-size: 18px; }
.product-price.big { font-size: 28px; margin: 4px 0 8px; }
.product-price s { color: var(--muted); font-weight: 400; font-size: .7em; margin-left: 6px; }
.stock { justify-self: start; font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.stock.in { background: var(--ok-bg); color: var(--ok-text); }
.stock.out { background: var(--err-bg); color: var(--err-text); }
.stock.order { background: var(--soft); color: var(--muted); }
.more { margin-top: 24px; text-align: center; }
.muted-text { color: var(--muted); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.product-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.product-info h1 { font-size: 32px; margin-bottom: 8px; }
.product-info h2, .product-text h2 { font-size: 22px; margin: 28px 0 12px; }
.gallery-main { aspect-ratio: 1; background: var(--soft); border-radius: var(--radius-lg); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gallery-thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: var(--soft); cursor: pointer; overflow: hidden; }
.gallery-thumbs button.on { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
table.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 400; width: 45%; }
.product-text { margin-top: 16px; }
.test-note { background: #ffcf33; color: #222; padding: 6px 10px; border-radius: var(--radius); font-size: 13px; }
.contact-alt { margin-top: 20px; max-width: 460px; }
.contact-alt .product-actions { margin: 0; }
@media (max-width: 860px) {
  .catalog-m { display: inline-block; margin-left: auto; font-weight: 600; text-decoration: none; }
  .bar { gap: 14px; }
  .product-page { grid-template-columns: 1fr; gap: 20px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-info h1 { font-size: 25px; }
}
.filters { display: grid; gap: 4px; margin: -12px 0 24px; }
.chips.small { margin: 0; align-items: center; gap: 6px; }
.chips.small span { color: var(--muted); font-size: 14px; margin-right: 4px; }
.chips.small a { font-size: 14px; padding: 4px 12px; }

/* Печать фото: витрина изделий */
.photo-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.photo-kind { display: grid; gap: 4px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px 16px; transition: box-shadow .15s, transform .15s; }
.photo-kind:hover { box-shadow: 0 8px 26px rgba(0,0,0,.14); transform: translateY(-2px); }
.photo-kind-img { height: 210px; display: grid; place-items: center; background: var(--soft); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.photo-kind-img canvas { filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); transform: rotate(-2deg); }
.photo-kind:nth-child(even) .photo-kind-img canvas { transform: rotate(2deg); }
.photo-kind b { font-size: 17px; }
.photo-kind span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.photo-kind em { font-style: normal; font-weight: 700; color: var(--accent); margin-top: 4px; }
.block-text { max-width: 700px; margin-bottom: 20px; color: var(--muted); }
.catalog-m { white-space: nowrap; }
@media (max-width: 440px) { .logo { font-size: 17px; } .catalog-m, .phone { font-size: 13px; } .bar { gap: 10px; } }
