:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --soft: #efe8df;
  --ink: #2b2420;
  --ink-2: #5d534c;
  --muted: #8b8079;
  --line: #e2d9ce;
  --accent: #b8913a;
  --accent-ink: #80621c;
  --accent-soft: #f2ead8;
  --dark: #1c1813;
  --dark-2: #2a241c;
  --on-dark: #f3ece4;
  --on-dark-muted: #b8aca2;
  --ok: #2f7a4f;
  --err: #b0392f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(43, 36, 32, .06), 0 8px 24px rgba(43, 36, 32, .06);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; }
h1, h2 { font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-weight: 400; }
.center { text-align: center; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 800px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.eyebrow { margin: 0 0 .75rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 1.6rem; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--small { min-height: 42px; padding: 0 1.1rem; font-size: .92rem; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 50; background: rgba(247, 243, 238, .92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.logo__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--accent); font-family: var(--font-display); font-size: 1.2rem; }
.logo--light { color: var(--on-dark); }
.logo--light .logo__mark { background: var(--accent); color: var(--dark); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a:hover { color: var(--ink); }
.header__actions { display: flex; align-items: center; gap: 16px; }
.header__phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1240px) {
  .header__phone { display: none; }
}
@media (max-width: 1100px) {
  .burger { display: block; }
  .header__actions { margin-left: auto; gap: 8px; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
}
@media (max-width: 420px) {
  .header .btn--small { padding: 0 .9rem; font-size: .85rem; }
  .logo__text { display: none; }
}

/* Первый экран */
.hero { padding: 48px 0 72px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__subtitle { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.facts strong { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.facts span { color: var(--ink-2); font-size: .92rem; }
.hero__visual { position: relative; aspect-ratio: 10 / 11; border-radius: 24px; background: linear-gradient(160deg, #e9dccb, #d9c3a6); display: grid; place-items: center; overflow: hidden; }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__art { width: 78%; height: auto; }
.art-body { fill: #f6efe6; stroke: var(--ink); stroke-width: 3; }
.art-line { stroke: var(--ink); stroke-width: 3; }
.art-line--thin { stroke-width: 2; stroke-linecap: round; fill: none; }
.art-mirror { fill: #cfdde0; stroke: var(--ink); stroke-width: 2; opacity: .85; }
.art-handle { stroke: var(--accent-ink); stroke-width: 5; stroke-linecap: round; }

@media (max-width: 900px) {
  .hero { padding: 24px 0 56px; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { order: -1; aspect-ratio: 16 / 10; }
  .hero__art { width: auto; height: 86%; }
}
@media (max-width: 480px) {
  .hero__cta .btn { width: 100%; }
  .facts { gap: 10px; }
  .facts strong { font-size: 1.3rem; }
  .facts span { font-size: .8rem; }
}

/* Секции */
.section { padding: 88px 0; }
.section__head { max-width: 720px; margin-bottom: 40px; }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark .eyebrow { color: var(--accent); }
.section--accent { background: var(--accent-soft); }
.section--soft { background: var(--soft); }
@media (max-width: 768px) { .section { padding: 60px 0; } .section__head { margin-bottom: 28px; } }

/* Карточки услуг */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__media { aspect-ratio: 16 / 10; background: var(--soft); display: grid; place-items: center; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__icon { width: 72px; height: 72px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__body { padding: 22px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--ink-2); flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.card__price { font-weight: 700; }
.link-arrow { font-weight: 600; color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* Преимущества */
.advantages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.advantage { padding-top: 20px; border-top: 1px solid rgba(243, 236, 228, .18); }
.advantage__num { display: block; font-family: var(--font-display); color: var(--accent); font-size: 1.4rem; margin-bottom: 12px; }
.advantage p { color: var(--on-dark-muted); margin: 0; }
.materials { margin-top: 48px; padding: 24px; border-radius: var(--radius); background: var(--dark-2); }
.materials ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.materials li { padding: 8px 14px; border-radius: 999px; background: rgba(243, 236, 228, .08); color: var(--on-dark); font-size: .92rem; }
@media (max-width: 1000px) { .advantages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .advantages { grid-template-columns: 1fr; } }

/* Портфолио */
.portfolio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.portfolio__item { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.portfolio__item img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.portfolio__item figcaption { padding: 14px 16px; display: grid; gap: 2px; }
.portfolio__item span { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 900px) { .portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .portfolio { grid-template-columns: 1fr; } }

/* Этапы */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.step p { color: var(--ink-2); margin: 0; font-size: .95rem; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Форма заявки */
.order { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.order__intro p { color: var(--ink-2); font-size: 1.05rem; }
.order__perks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.order__perks li { position: relative; padding-left: 30px; font-weight: 600; }
.order__perks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.form { background: var(--surface); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.form__row { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label, .form legend { font-weight: 600; font-size: .92rem; }
.form input[type="text"], .form input[type="tel"], .form select, .form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: 400 1rem/1.4 var(--font); transition: border-color .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 90px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form .is-invalid { border-color: var(--err) !important; }
.form__contact { display: flex; flex-wrap: wrap; gap: 8px; }
.form__contact legend { width: 100%; margin-bottom: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; transition: background .2s, border-color .2s; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .88rem !important; color: var(--ink-2); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { margin: 0; min-height: 1.4em; font-weight: 600; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--err); }
@media (max-width: 900px) { .order { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 520px) { .form { padding: 20px; } .form__grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 600; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__item p { padding: 0 22px 20px; margin: 0; color: var(--ink-2); }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: stretch; }
.contacts__list { margin: 24px 0; display: grid; gap: 16px; }
.contacts__list div { display: grid; gap: 2px; }
.contacts__list dt { font-size: .85rem; color: var(--muted); }
.contacts__list dd { margin: 0; font-weight: 600; font-size: 1.05rem; }
.contacts__list a { text-decoration: none; }
.contacts__list a:hover { color: var(--accent-ink); }
.messengers { display: flex; flex-wrap: wrap; gap: 10px; }
.map { min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.map__placeholder { height: 100%; min-height: 320px; display: grid; place-content: center; text-align: center; color: var(--ink-2); font-weight: 600; padding: 16px; }
@media (max-width: 900px) { .contacts { grid-template-columns: 1fr; gap: 32px; } }

/* Подвал */
.footer { background: var(--dark); color: var(--on-dark); padding: 48px 0 24px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer__muted { color: var(--on-dark-muted); margin: 12px 0 0; }
.footer__links { display: grid; gap: 8px; }
.footer__links a { color: var(--on-dark); text-decoration: none; }
.footer__links a:hover { color: var(--accent); }
.footer__copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(243, 236, 228, .12); color: var(--on-dark-muted); font-size: .88rem; }

/* Текстовые страницы */
.prose h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; font-family: var(--font); }
.prose p { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* --- Мягкая мебель: дополнения --- */
.section__lead { color: var(--ink-2); font-size: 1.05rem; margin: 0; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.section__head--row h2 { margin: 0; }

.hero__visual { aspect-ratio: 5 / 5.4; background: var(--soft); }
.hero__visual img { object-position: 50% 60%; }
@media (max-width: 900px) { .hero__visual { aspect-ratio: 4 / 3; } }

.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards--4 .card__media { aspect-ratio: 4 / 3.4; }
@media (max-width: 1100px) { .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards--4 { grid-template-columns: 1fr; } }

.portfolio { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portfolio__item img { aspect-ratio: 4 / 5; }
@media (max-width: 1000px) { .portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .portfolio { grid-template-columns: 1fr; } }

.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.review { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.review__stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; }
.review p { flex: 1; color: var(--ink-2); }
.review footer { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.review footer span { font-weight: 400; color: var(--muted); font-size: .88rem; }
.card__media { position: relative; overflow: hidden; }
.card__media img { position: absolute; inset: 0; }

/* --- Каталог --- */
.section--top { padding-top: 32px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -16px 32px; padding-left: 16px; padding-right: 16px; scrollbar-width: thin; }
.tabs__item { flex: none; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tabs__item span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.tabs__item:hover { border-color: var(--ink); }
.tabs__item.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs__item.is-active span { color: rgba(255,255,255,.65); }
@media (min-width: 768px) { .tabs { flex-wrap: wrap; overflow: visible; margin: 0 0 36px; padding: 0; } }

.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard__media { position: relative; aspect-ratio: 1; background: #fff; }
.pcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pcard__tag { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: var(--soft); font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.pcard__body { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.pcard__title { font-size: 1rem; margin: 0; font-family: var(--font); font-weight: 600; }
.pcard__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pcard__price { font-weight: 700; font-size: 1.05rem; }
.pcard__colors { color: var(--muted); font-size: .82rem; }
@media (max-width: 480px) { .pcard__body { padding: 10px 12px 12px; } .pcard__title { font-size: .92rem; } .pcard__price { font-size: .95rem; } }

.catblock { margin-top: 48px; }
.catblock__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.catblock__head h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

.cta-strip { margin-top: 64px; padding: 32px; border-radius: 20px; background: var(--dark); color: var(--on-dark); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-strip h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.cta-strip p { margin: 0; color: var(--on-dark-muted); }
.cta-strip .btn { background: var(--accent); border-color: var(--accent); color: var(--dark); }
.cta-strip .btn:hover { background: #fff; border-color: #fff; }

/* Категории на главной */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.catcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.catcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.catcard__media { position: relative; aspect-ratio: 4 / 3; background: #fff; }
.catcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.catcard__body { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.catcard__body h3 { margin: 0 0 2px; font-family: var(--font); font-size: 1rem; }
.catcard__body span { color: var(--ink-2); font-size: .88rem; }

/* Страница товара */
.product { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; gap: 28px; } }
.gallery { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 900px) { .gallery { position: static; } }
.gallery__main { aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumb { flex: none; width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; overflow: hidden; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gallery__thumb.is-active { border-color: var(--ink); }
.gallery__note { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }

.product__info h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.product__price { display: grid; gap: 2px; margin-bottom: 24px; }
.product__price span { font-size: 1.9rem; font-weight: 700; }
.product__price small { color: var(--ink-2); }
.opt { margin-bottom: 22px; }
.opt__label { font-weight: 600; margin-bottom: 10px; }
.opt__label strong { font-weight: 500; color: var(--ink-2); }
.opt__list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt__hint { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--sw); cursor: pointer; padding: 0; transition: box-shadow .15s; }
.swatch:hover { box-shadow: 0 0 0 2px var(--ink-2); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--ink); }
.swatch--custom { background: conic-gradient(#e2574c, #f2c94c, #6fcf97, #56ccf2, #9b51e0, #e2574c); }
.product__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 20px; }
.product__actions .btn { flex: 1 1 200px; }
.product__perks { list-style: none; margin: 0 0 28px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; color: var(--ink-2); }
.product__perks li::before { content: "✓"; color: var(--accent-ink); font-weight: 700; margin-right: 10px; }
.product__descr h2 { font-family: var(--font); font-size: 1.15rem; }
.product__descr p { color: var(--ink-2); }
.product__descr strong { color: var(--ink); }
.specs { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.specs li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.form__product { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: .92rem; }
.product > * { min-width: 0; }

/* --- Чат с ботом --- */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat__toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 1rem/1 var(--font); cursor: pointer; box-shadow: 0 8px 24px rgba(43,36,32,.25); transition: background .2s, transform .2s; }
.chat__toggle:hover { background: var(--accent-ink); transform: translateY(-1px); }
.chat.is-open .chat__toggle { display: none; }
.chat__panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: 0 16px 48px rgba(43,36,32,.22); overflow: hidden; border: 1px solid var(--line); }
.chat__panel[hidden] { display: none; }
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--ink); color: #fff; }
.chat__head strong { display: block; }
.chat__head span { font-size: .82rem; color: rgba(255,255,255,.7); }
.chat__close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.chat__close:hover { background: rgba(255,255,255,.22); }
.chat__messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); overscroll-behavior: contain; }
.chat__msg { max-width: 85%; padding: 10px 13px; border-radius: 16px; font-size: .94rem; line-height: 1.45; overflow-wrap: anywhere; }
.chat__msg a { color: var(--accent-ink); font-weight: 600; }
.chat__msg--bot, .chat__msg--manager { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat__msg--client { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.chat__msg--client a { color: #fff; }
.chat__msg--manager { border-color: var(--accent); }
.chat__who { display: block; font-size: .75rem; font-weight: 700; color: var(--accent-ink); margin-bottom: 2px; }
.chat__msg--system { align-self: center; max-width: 100%; background: none; color: var(--muted); font-size: .82rem; text-align: center; padding: 4px 8px; }
.chat__typing { display: inline-flex; gap: 4px; padding: 14px; }
.chat__typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chatDot 1.2s infinite ease-in-out; }
.chat__typing span:nth-child(2) { animation-delay: .15s; }
.chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat__form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 11px 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); font: 400 .95rem/1.4 var(--font); color: var(--ink); }
.chat__form textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.chat__form button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat__form button:disabled { opacity: .5; cursor: progress; }
.chat__note { margin: 0; padding: 0 12px 10px; font-size: .72rem; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
  .chat { right: 12px; bottom: 12px; }
  .chat__toggle span { display: none; }
  .chat__toggle { width: 56px; padding: 0; justify-content: center; }
  .chat.is-open { inset: 0; right: 0; bottom: 0; }
  .chat.is-open .chat__panel { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .chat__typing span { animation: none; } }

/* --- Галерея работ --- */
button.tabs__item { font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--ink); }
.wgrid { columns: 4 240px; column-gap: 12px; }
.wgrid__item { display: block; margin-bottom: 12px; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.wgrid__item[hidden] { display: none; }
.wgrid__item img { width: 100%; height: auto; transition: transform .3s; }
.wgrid__item:hover img { transform: scale(1.03); }
@media (max-width: 560px) { .wgrid { columns: 2; column-gap: 8px; } .wgrid__item { margin-bottom: 8px; } }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20,16,14,.94); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #e8e0d8; font-size: .9rem; }
.lightbox__close, .lightbox__nav { position: absolute; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; display: grid; place-items: center; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lightbox { padding: 56px 8px; } .lightbox__nav { top: auto; bottom: 14px; transform: none; } }

/* Чат: быстрые ответы и заявка */
.chat__quick { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.chat__quick button { padding: 8px 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent-ink); font: 600 .85rem/1.2 var(--font); cursor: pointer; }
.chat__quick button:hover { background: var(--accent-soft); }
.chat__quick button.is-accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.chat__bar { padding: 8px 10px 0; border-top: 1px solid var(--line); }
.chat__lead-btn { width: 100%; padding: 9px 12px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font: 600 .88rem/1.2 var(--font); cursor: pointer; }
.chat__lead-btn:hover { background: #ebdfc3; }
.chat__bar + .chat__form { border-top: 0; }
.chat__leadform { align-self: stretch; display: grid; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--accent); border-radius: 16px; }
.chat__leadform strong { font-size: .9rem; line-height: 1.35; }
.chat__leadform input[type="text"], .chat__leadform input[type="tel"], .chat__leadform select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: 400 .95rem/1.3 var(--font); color: var(--ink); }
.chat__leadform input:focus, .chat__leadform select:focus { outline: none; border-color: var(--accent); background: #fff; }
.chat__consent { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--ink-2); }
.chat__consent input { accent-color: var(--ink); }
.chat__leadform-actions { display: flex; gap: 8px; }
.chat__leadform-actions button { flex: 1; min-height: 42px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font: 600 .9rem/1 var(--font); cursor: pointer; }
.chat__leadform-actions button.is-ghost { flex: 0 0 auto; padding: 0 16px; background: transparent; color: var(--ink); }
.chat__leadform-actions button:disabled { opacity: .5; }
.chat__leadform-error { margin: 0; color: var(--err); font-size: .82rem; min-height: 1em; }

/* --- Логотип --- */
.logo { gap: .7rem; }
img.logo__mark { width: 44px; height: 44px; border-radius: 11px; display: block; flex: none; }
.logo__text { display: grid; line-height: 1.05; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: .12em; }
.logo__text small { font-family: var(--font); font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.footer__logo { width: 140px; height: 140px; border-radius: 16px; display: block; }
.chat__head { justify-content: flex-start; }
.chat__avatar { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.chat__title { flex: 1; min-width: 0; }
@media (max-width: 420px) { .logo__text small { display: none; } .logo__text { font-size: 1.05rem; } }

/* Чат: карточка товара */
.chat__product { align-self: flex-start; width: min(270px, 85%); display: flex; gap: 10px; align-items: center; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.chat__product:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.chat__product img { width: 76px; height: 76px; object-fit: contain; background: #fff; border-radius: 10px; flex: none; }
.chat__product span { display: grid; gap: 2px; min-width: 0; }
.chat__product strong { font-size: .92rem; line-height: 1.25; }
.chat__product em { font-style: normal; font-weight: 700; }
.chat__product small { color: var(--accent-ink); font-weight: 600; font-size: .8rem; }
