.page-head { padding-top: 20px; padding-bottom: 40px; max-width: 620px; }
.page-head h1 { font-size: 32px; font-weight: 600; margin-bottom: 10px; }
.page-head p { color: var(--muted); font-size: 15px; }

.section { padding-bottom: 72px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.section-head p { color: var(--muted); font-size: 14px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.part-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: left; transition: transform .1s ease, border-color .2s ease; will-change: transform; }
.part-card:active { transform: scale(.97); }
.part-card.in-focus { transform: scale(1.02); border-color: var(--orange); }
.part-thumb { aspect-ratio: 4/3; background: var(--card); border: 1px solid var(--card-line); border-radius: 12px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.part-card h3 { font-size: 15px; font-weight: 600; }
.part-card .p-desc { font-size: 12.5px; color: var(--muted); flex: 1; }
.part-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.p-price { font-family: 'Unbounded', sans-serif; font-size: 15px; }
.add-btn { background: var(--ink); color: var(--paper); border: none; border-radius: 100px; padding: 8px 16px; font-size: 12.5px; font-weight: 600; transition: transform .15s cubic-bezier(.3,1.4,.4,1); }
.add-btn:hover { transform: translateY(-1px); }
.add-btn:active { transform: scale(.94); }

.tab-explainer { grid-column: span 3; background: var(--ink); color: var(--paper); border-radius: 16px; padding: 22px 26px; display: flex; align-items: center; gap: 24px; }
.tab-explainer .te-row { display: flex; align-items: center; gap: 10px; }
.tab-explainer .te-plus { color: #8b8a85; font-size: 18px; }
/* flex:1 без потолка max-width — баннер span:3 на десктопе широкий (~1100px),
   а прежний max-width:360 (потом 520) оставлял текст узкой колонкой слева с
   пустой полосой справа — плашка смотрелась перекошенной. Растягиваем текст
   на всю доступную длину баннера. */
.tab-explainer p { flex: 1 1 240px; font-size: 13px; color: #b8b6b0; }
.tab-explainer .te-icon { width: 44px; height: 44px; background: #202126; border-radius: 10px; display: flex; align-items: center; justify-content: center; }

/* Схема «До/После» на светлой панели — баннер тёмный, а формы схемы серые
   (var(--ink)), на тёмном фоне они были бы не видны. */
.te-diagram { background: var(--paper); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
/* width:100px явно (не только на svg) — без него figcaption (column-flex item,
   align-items:center не даёт сжаться) считал свою ширину по НЕперенесённому
   тексту подписи и раздувал шаг шире заданного размера SVG, из-за чего вся
   .te-diagram вылезала за край баннера на мобильном. */
.te-step { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 0; width: 100px; }
.te-step svg { width: 100px; height: 64px; display: block; }
.te-step figcaption { text-align: center; line-height: 1.25; }
.te-step figcaption b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.te-step figcaption span { font-size: 10.5px; color: var(--muted); }
.te-arrow { width: 24px; height: 12px; flex-shrink: 0; }

.schem-card { padding: 14px; gap: 6px; }
.schem-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0/10px 10px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/10px 10px, var(--paper);
  border: 1px dashed var(--card-line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.schem-card h3 { font-size: 13.5px; }
.schem-card .p-desc { font-size: 11.5px; }
.schem-card .p-price { font-size: 13px; }
.schem-card .add-btn { padding: 6px 12px; font-size: 11.5px; }

.video-tile { background: var(--ink); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 3/4; cursor: pointer; position: relative; overflow: hidden; }
.video-tile .play-circle { width: 46px; height: 46px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; }
.video-tile .play-circle::after { content: ''; border-left: 14px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.video-tile span { color: #b8b6b0; font-size: 12px; text-align: center; max-width: calc(100% - 32px); }

.schem-thumb.snap-bounce svg { animation: snapBounce .4s cubic-bezier(.3,1.7,.4,1); }
@keyframes snapBounce { 0%{transform:scale(.75);} 55%{transform:scale(1.4);} 100%{transform:scale(1);} }

/* ---------- плавающая панель "Ваша база" ---------- */
.kit-panel { position: fixed; right: 24px; bottom: 24px; z-index: 80; }
.kit-pill { background: var(--ink); color: var(--paper); border: none; border-radius: 100px; padding: 12px 20px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 20px rgba(23,24,28,.18); display: flex; align-items: center; gap: 8px; }
.kit-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.kit-body { display: none; position: absolute; right: 0; bottom: calc(100% + 10px); width: 240px; background: var(--paper); border: 1px solid var(--card-line); border-radius: 16px; padding: 16px; box-shadow: 0 12px 30px rgba(23,24,28,.12); }
.kit-panel.expanded .kit-pill { display: none; }
.kit-panel.expanded .kit-body { display: block; }
.kit-close { background: var(--card); border: none; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; color: var(--muted); float: right; }
.kit-head { font-family: 'Unbounded', sans-serif; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.btn-buy { display: block; width: 100%; text-align: center; background: var(--orange); color: #fff; border: none; border-radius: 100px; padding: 11px; font-size: 13px; font-weight: 600; margin-top: 10px; }
.btn-buy-secondary { display: block; width: 100%; text-align: center; background: none; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 100px; padding: 9px; font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.kit-next-label { font-size: 11px; color: var(--muted); margin-top: 4px; }
.btn-upsell { display: block; width: 100%; text-align: center; background: none; border: none; color: var(--ink); font-size: 11.5px; text-decoration: underline; padding: 8px 0 0; }
.kit-plan { position: relative; aspect-ratio: 1/1; width: 100%; background: var(--card); border: 1px solid var(--card-line); border-radius: 10px; margin-bottom: 12px; }
.kit-floor { position: absolute; inset: 30%; background: #cfccc4; border: 2px dashed var(--muted); border-radius: 3px; opacity: 0; transition: opacity .3s ease; }
.kit-floor.show { opacity: 1; }
.kit-wall { position: absolute; background: var(--ink); border-radius: 2px; opacity: 0; transition: opacity .3s ease; }
.kit-wall.show { opacity: 1; }
.kit-wall-top { top: 30%; left: 30%; right: 30%; height: 4px; transform: translateY(-50%); }
.kit-wall-left { left: 30%; top: 30%; bottom: 30%; width: 4px; transform: translateX(-50%); }
.kit-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); opacity: 0; transition: opacity .3s ease; }
.kit-dot.show { opacity: 1; }
.kit-dot-1 { left: 30%; top: 30%; transform: translate(-50%,-50%); }
.kit-dot-2 { right: 30%; top: 30%; transform: translate(50%,-50%); }
.kit-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 5px 0; }
.kit-row b { color: var(--ink); font-weight: 600; }
.kit-row.done { color: var(--orange-dark); }
.kit-row.done b { color: var(--orange-dark); }
.kit-total { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--card-line); font-size: 12.5px; }
.kit-empty { color: var(--muted); font-size: 11.5px; }
.kit-total-row { display: flex; justify-content: space-between; align-items: baseline; }
.kit-total-row s { color: var(--muted); margin-right: 6px; }
.kit-discount-note { color: var(--orange-dark); font-weight: 600; font-size: 11.5px; margin-bottom: 4px; }
@media (max-width: 860px) {
  .kit-panel { left: 0; right: 0; bottom: 0; }
  .kit-pill { width: 100%; border-radius: 0; justify-content: center; padding: 14px; }
  .kit-body { left: 0; right: 0; bottom: 100%; width: auto; border-radius: 16px 16px 0 0; max-height: 68vh; overflow-y: auto; }
}

@media (max-width: 860px) {
  .card-grid, .card-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tab-explainer { grid-column: span 2; flex-wrap: wrap; }
}

/* mobile-instructions: карточки деталей (h3+описание+цена+кнопка) слишком
   узкие в 2 колонки на телефоне — контент рвётся, карточка вылезает за
   край экрана. Схлопываем в одну, как .details-grid. */
@media (max-width: 640px) {
  .card-grid, .card-grid.grid-4 { grid-template-columns: 1fr; }
  .tab-explainer { grid-column: span 1; }
  /* На узком экране .te-diagram (flex-shrink:0 у себя) не сжимается вместе с
     остальным баннером и вылезал за правый край на ~16px. Компактная версия
     под мобильный: меньше шагов/зазоров/паддингов — та же композиция. */
  .te-diagram { padding: 10px 10px; gap: 8px; }
  .te-step { width: 78px; }
  .te-step svg { width: 78px; height: 50px; }
  .te-arrow { width: 18px; }
  .te-step figcaption b { font-size: 11px; }
  .te-step figcaption span { font-size: 9.5px; }
}
