/* Главная ХоумЛаб 3D (с 2026-11) — привычная схема интернет-магазина: шапка с
   каталогом и поиском, баннеры, категории, карточки товаров. Плюс свои фишки:
   выбор цвета пластика прямо в карточке, «сегодня в шоуруме», стартовый набор, Панда.
   Общие стили — ds.css (подключается раньше), здесь только блоки главной.
   Разметка — public/index.html, логика — public/home.js. Картинки — images/site/home/. */

/* ===== Баннеры ===== */
.hero { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; margin-top: 20px; height: clamp(320px, 34vw, 460px); }
.hero__main { grid-row: 1 / 3; position: relative; border-radius: var(--r); overflow: hidden; background: var(--deep); text-decoration: none; }
.hero__main img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease); }
@media (hover: hover) { .hero__main:hover img { transform: scale(1.02); } }
.hero__copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: #fff; background: linear-gradient(transparent, rgba(8, 20, 12, 0.72)); }
.hero__copy b { font: 700 clamp(26px, 3vw, 40px)/1.05 var(--display); letter-spacing: -0.02em; }
.hero__copy > span { font-size: 18px; margin-bottom: 10px; }
.hero__main.is-promo .hero__copy { display: none; }
.hero__main picture { display: contents; }
.hero__slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity 700ms var(--ease), visibility 0s linear 700ms; }
.hero__slide.is-on { opacity: 1; visibility: visible; z-index: 1; transition: opacity 700ms var(--ease); }
.hero__dots { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(18, 26, 20, 0.28); backdrop-filter: blur(6px); }
.hero__dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.6); cursor: pointer; transition: width 300ms var(--ease), background 300ms; }
.hero__dots button.is-on { width: 26px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .hero__slide, .hero__slide.is-on { transition: none; } }
.hero__kvlink { position: absolute; inset: 0; display: block; }
.hero__kvlink img { object-position: 30% 50%; }
.hero__kv { position: absolute; z-index: 1; left: 6%; top: 50%; transform: translateY(-50%); max-width: 50%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: #fff; pointer-events: none; }
.hero__kv > * { pointer-events: auto; }
.hero__kvtag { padding: 6px 12px; border-radius: 999px; background: var(--accent, #00b22d); color: #fff; font: 700 13px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.hero__kvname { margin: 6px 0 0; font: 600 clamp(18px, 1.8vw, 26px)/1.1 var(--display); }
.hero__kvtitle { margin: 0; font: 700 clamp(26px, 2.6vw, 38px)/1.08 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.hero__kvsub { margin: 0; color: rgba(255, 255, 255, .78); font-size: clamp(14px, 1.15vw, 17px); }
.hero__kvbtns { display: flex; gap: 10px; margin-top: 10px; }
.hero__kvbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px; white-space: nowrap; background: #f3f4f3; color: #121a14; font: 600 15px/1 var(--display); text-decoration: none; border: 1px solid #f3f4f3; cursor: pointer; transition: background 200ms, color 200ms; }
.hero__kvbtn:hover { background: #fff; }
.hero__kvbtn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero__kvbtn--ghost:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 599px) {
  .hero__kv { left: 7%; right: 7%; top: 6%; transform: none; max-width: none; gap: 6px; }
  .hero__kvlink img { object-position: 50% 100%; }
  .hero__kvname { font-size: 17px; margin-top: 2px; }
  .hero__kvtitle { font-size: 27px; }
  .hero__kvsub { display: none; }
  .hero__kvbtns { margin-top: 6px; flex-wrap: wrap; gap: 8px; }
  .hero__kvbtn { height: 40px; padding: 0 14px; font-size: 13.5px; }
}
.hero__slide--kv.is-light .hero__kv { color: #121a14; }
.hero__slide--kv.is-light .hero__kvsub { color: #4a554d; }
.hero__slide--kv.is-light .hero__kvbtn { background: var(--accent, #00b22d); border-color: var(--accent, #00b22d); color: #fff; }
.hero__slide--kv.is-light .hero__kvbtn:hover { filter: brightness(1.06); }
.hero__slide--kv.is-light .hero__kvbtn--ghost { background: rgba(255, 255, 255, .7); color: #121a14; border-color: rgba(18, 26, 20, .25); }
.hero__slide--kv.is-light .hero__kvlink img { object-position: 100% 50%; }
@media (max-width: 599px) { .hero__slide--kv.is-light .hero__kvlink img { object-position: 50% 100%; } }
/* Баннер «Открытка к принтеру»: веер из 5 дизайнов, карточки по очереди «выходят» вперёд (scripts/build_home_ssr.js → kind: 'gift') */
.hero__slide--gift .hero__gift-bg { background: radial-gradient(120% 90% at 85% 40%, #fff4d6 0%, #f6ecd2 40%, #e7f0dc 100%); overflow: hidden; }
.hero__slide--gift .hero__gift-bg::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 70% 30%, rgba(255, 210, 120, .45), transparent 40%), radial-gradient(circle at 92% 85%, rgba(0, 178, 45, .14), transparent 35%); }
.hero__gift-fan { position: absolute; right: 3%; top: 53%; width: 40%; height: 76%; transform: translateY(-50%); }
.hero__main .hero__gift-fan img { position: absolute; left: 50%; top: 50%; width: auto; height: 74%; aspect-ratio: 148 / 210; object-fit: cover; border-radius: 10px;
  box-shadow: 0 14px 34px rgba(60, 40, 10, .22), 0 2px 6px rgba(60, 40, 10, .12);
  --x: calc((var(--k) - 2) * 32%); --r: calc((var(--k) - 2) * 6deg);
  transform: translate(-50%, -50%) translateX(var(--x)) rotate(var(--r)); transform-origin: 50% 100%;
  animation: hgFloat 6s ease-in-out infinite, hgPop 10s ease-in-out infinite; animation-delay: calc(var(--k) * -1.2s), calc(var(--k) * 2s); z-index: calc(10 - (var(--k) - 2) * (var(--k) - 2)); }
@keyframes hgFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
/* по очереди одна открытка поднимается, выпрямляется и становится первой */
@keyframes hgPop { 0%, 14%, 100% { scale: 1; filter: none; } 5%, 9% { scale: 1.12; z-index: 20; filter: drop-shadow(0 10px 22px rgba(60, 40, 10, .25)); rotate: calc(var(--r) * -1); } }
.hero__slide--gift .hero__kv { color: #1c2a1f; }
.hero__slide--gift .hero__kvsub { color: #4a554d; }
.hero__slide--gift .hero__kvtag { background: #c62828; }
.hero__slide--gift .hero__kvbtn { background: var(--accent, #00b22d); border-color: var(--accent, #00b22d); color: #fff; }
.hero__slide--gift .hero__kvbtn:hover { filter: brightness(1.06); }
.hero__slide--gift .hero__kvbtn--ghost { background: rgba(255, 255, 255, .75); color: #121a14; border-color: rgba(18, 26, 20, .25); }
.hero__slider:has(.hero__slide--gift.is-on) .hero__dots { background: rgba(18, 26, 20, .35); }
@media (max-width: 599px) {
  .hero__gift-fan { left: 4%; right: 4%; width: auto; top: auto; bottom: 7%; height: 46%; transform: none; }
  .hero__main .hero__gift-fan img { height: 80%; --x: calc((var(--k) - 2) * 28%); }
}
@media (prefers-reduced-motion: reduce) { .hero__main .hero__gift-fan img { animation: none; } }
.hero__dots:has(~ .hero__slide.is-on.is-light), .hero__slider:has(.hero__slide.is-on.is-light) .hero__dots { background: rgba(18, 26, 20, .35); }
.hvid { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(6, 10, 8, .86); }
.hvid[hidden] { display: none; }
.hvid video { width: min(1200px, 100%); max-height: 86vh; border-radius: 14px; background: #000; }
.hvid__x { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.hvid__x:hover { background: rgba(255, 255, 255, .26); }
/* Баннер акции на телефоне — вертикальный постер; та же граница, что у <source media> в разметке */
@media (max-width: 599px) { .hero__main.is-promo { aspect-ratio: 9 / 16; } }
.hero__side { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 0 22px 24px; border-radius: var(--r); overflow: hidden; text-decoration: none; transition: transform 200ms var(--ease); }
.hero__side > span { display: flex; flex-direction: column; gap: 6px; }
.hero__side b { font: 700 22px/1.15 var(--display); letter-spacing: -0.01em; }
.hero__side span span { color: var(--muted); font-size: 15px; }
.hero__side img { width: 46%; height: 100%; object-fit: contain; flex: none; }
.hero__side--fil { background: var(--accent-soft); }
.hero__side--srv { background: var(--bg-2); padding-right: 0; }
.hero__side--srv img { object-fit: cover; border-radius: var(--r) 0 0 var(--r); }
@media (hover: hover) { .hero__side:hover { transform: translateY(-2px); } }

/* ===== Категории ===== */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 200px); gap: 16px; }
.cat { position: relative; border-radius: var(--r); background: var(--bg-2); overflow: hidden; text-decoration: none; padding: 20px; transition: background-color 200ms ease; }
.cat > span { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2px; max-width: 60%; }
.cat b { font: 700 20px/1.2 var(--display); letter-spacing: -0.01em; }
.cat i { font-style: normal; color: var(--muted); font-size: 14px; }
.cat img { position: absolute; right: -2%; bottom: -4%; width: 50%; height: 70%; object-fit: contain; object-position: right bottom; transition: transform 400ms var(--ease); }
.cat--wide { grid-column: span 2; grid-row: span 2; background: var(--accent-soft); }
.cat--wide > span { max-width: none; }
.cat--wide b { font-size: 28px; }
.cat--wide img { width: 50%; height: 82%; right: 2%; bottom: 0; }
.cat--wide .cat__2 { right: 46%; width: 38%; height: 62%; }
.cat img[src*="gal/"] { width: 54%; height: 100%; right: 0; bottom: 0; object-fit: cover; object-position: center; }
.cat:has(img[src*="gal/"]) > span { max-width: 44%; }
@media (hover: hover) { .cat:hover { background: var(--bg-3); } .cat--wide:hover { background: #d6efdc; } .cat:hover img { transform: scale(1.04); } }

/* ===== Подбор и сегодня ===== */
.duo { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; margin-top: clamp(48px, 6vw, 80px); }
.duo__help { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: end; padding: 24px 36px 0 20px; border-radius: var(--r); background: #0a2817; /* = фон картинки с пандой, чтобы не было шва */ color: #fff; overflow: hidden; min-height: 280px; }
.duo__panda { position: relative; width: 240px; height: auto; align-self: end; display: block; }
.duo__help > div { position: relative; align-self: center; padding-bottom: 32px; }
.duo__help h2 { color: #fff; }
.duo__help p { color: #c9d8cd; margin: 10px 0 22px; max-width: 54ch; }
.duo__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.duo__help .btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); }
@media (hover: hover) { .duo__help .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); } }
.duo__today { padding: 24px; border-radius: var(--r); background: var(--accent-soft); display: flex; flex-direction: column; gap: 16px; }
.today__head { display: flex; flex-direction: column; gap: 8px; }
.today__open { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 500; color: var(--muted); }
.today__open.is-open { color: var(--accent-strong); }
.today__open.is-open::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.today__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.today__stat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: var(--bg); }
.today__stat b { font: 700 34px/1 var(--display); color: var(--accent-strong); letter-spacing: -0.02em; }
.today__stat span { font-size: 14px; line-height: 1.35; color: var(--muted); }
.today__go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--bg); text-decoration: none; font-size: 14px; }
.today__go span { color: var(--muted); }
.today__go b { color: var(--accent-strong); font-weight: 600; }
@media (hover: hover) { .today__go:hover b { text-decoration: underline; } }

/* ===== Пластик по цвету: плитки одного размера + карточка выбранного ===== */
.picker { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.picker__wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
/* Смена вкладки «Пластик по цвету»: старое гаснет, новое проявляется волной (home.js → showMat) */
#colorWall, #colorCard { transition: opacity 160ms ease, transform 160ms ease; }
#colorWall { align-content: start; align-items: stretch; } /* пока держится высота, ряды не растягиваются */
#colorWall.is-leaving, #colorCard.is-leaving { opacity: 0; transform: translateY(6px); }
#colorWall.is-entering .tile { animation: tile-in 380ms var(--ease) both; animation-delay: calc(var(--k, 0) * 18ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
#colorTabs .tab { transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease; }
@media (prefers-reduced-motion: reduce) { #colorWall, #colorCard { transition: none; } #colorWall.is-entering .tile { animation: none; } }
.tile { display: flex; flex-direction: column; align-self: stretch; gap: 0; padding: 0 0 10px; border: 0; border-radius: 12px; background: #f2f2f2; cursor: pointer; overflow: hidden; text-align: center; transition: box-shadow 160ms ease, transform 160ms var(--ease); }
.tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; background: #f2f2f2; }
.tile span { font-size: 12.5px; line-height: 1.25; padding: 0 6px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: auto 0; padding-top: 6px; }
.tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent-strong); }
@media (hover: hover) { .tile:hover { transform: translateY(-2px); } }
.tile--dot::before { content: ''; display: block; aspect-ratio: 1; margin: 18%; border-radius: 50%; background: var(--c, #ccc); }
.tile { position: relative; }
.tile--out img { opacity: .45; filter: grayscale(.4); }
.tile--out span { color: var(--muted); }
.tile__out { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.9); font: 500 11px/1.3 var(--text); font-style: normal; color: var(--muted); }
/* «+N ещё цветов» — во всю высоту соседних плиток */
.tile--more { align-self: stretch; justify-content: center; align-items: center; padding: 8px; background: var(--bg-3); }
.tile--more b { font-size: 22px; color: var(--accent-strong); }
.picker__card { position: sticky; top: 140px; padding: 16px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; }
.picker__img { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #f3f4f3; }
.picker__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 320ms ease; }
.picker__img img.is-incoming { opacity: 0; }
.picker__name { color: var(--muted); font-size: 14px; }
.picker__color { font-weight: 600; font-size: 18px; margin-top: -6px; }
.picker__opt { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "kind btn" "price btn" "stock btn"; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); }
.picker__kind { grid-area: kind; font-size: 13px; color: var(--muted); }
.picker__price { grid-area: price; font-size: 18px; }
.picker__price s { font-size: 13px; color: var(--muted); font-weight: 400; }
.picker__opt .stock { grid-area: stock; }
.picker__opt .btn { grid-area: btn; height: 42px; padding: 0 16px; }

/* ===== Бонусы ===== */
.bonus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bonus__item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 26px 22px; border-radius: var(--r); text-decoration: none; overflow: hidden; min-height: 210px; transition: transform 200ms var(--ease); }
.bonus__item svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.bonus__item b { font: 700 30px/1.1 var(--display); letter-spacing: -0.02em; }
.bonus__item span { font-size: 15px; max-width: 28ch; }
.bonus__item i { margin-top: auto; padding-top: 12px; font-style: normal; font-weight: 600; }
.bonus__item::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: currentColor; opacity: 0.07; }
.bonus__item--deep { background: var(--deep); color: #fff; }
.bonus__item--deep svg, .bonus__item--deep i { color: #7fe39a; }
.bonus__item--deep span { color: #c9d8cd; }
.bonus__item--green { background: var(--accent); color: #fff; }
.bonus__item--green span { color: #eafbef; }
.bonus__item--light { background: var(--accent-soft); color: var(--ink); }
.bonus__item--light svg, .bonus__item--light i { color: var(--accent-strong); }
.bonus__item--light span { color: var(--muted); }
@media (hover: hover) { .bonus__item:hover { transform: translateY(-3px); } }

/* ===== Услуги ===== */
.srv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.srv__item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.srv__item img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); margin-bottom: 8px; transition: transform 400ms var(--ease); }
.srv__item b { font-weight: 600; font-size: 18px; }
.srv__item span { color: var(--muted); font-size: 15px; }
@media (hover: hover) { .srv__item:hover b { color: var(--accent-strong); } .srv__item:hover img { transform: scale(1.02); } }

/* ===== Шоурум ===== */
.showroom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.showroom__photos { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 214px 214px; gap: 12px; }
.showroom__photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.showroom__photos img:first-child { grid-row: 1 / 3; }
.showroom__map { width: 100%; height: 100%; border: 0; border-radius: var(--r); background: var(--bg-2); }
.showroom__info { display: flex; flex-direction: column; gap: 18px; }
.showroom__info > p { color: var(--muted); font-size: 17px; }
.showroom dl { display: grid; gap: 10px; }
.showroom dl div { display: grid; grid-template-columns: 90px 1fr; }
.showroom dt { color: var(--muted); }
.showroom dd { font-weight: 600; }
.showroom dd a { text-decoration: none; }

/* ===== Отзывы: рейтинг + лента настоящих отзывов ===== */
.rv__nav { margin-left: auto; display: flex; gap: 8px; }
.rv__arrow { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg-2); font-size: 26px; line-height: 1; cursor: pointer; transition: background-color 160ms ease, transform 120ms var(--ease); }
.rv__arrow:active { transform: scale(0.94); }
@media (hover: hover) { .rv__arrow:hover { background: var(--accent-soft); color: var(--accent-strong); } }
.rv { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; }
.rv__score { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 28px; border-radius: var(--r); background: var(--deep); color: #fff; }
.rv__score::after { content: '★'; position: absolute; right: -30px; bottom: -70px; font-size: 260px; line-height: 1; color: #fff; opacity: 0.05; }
.rv__src { color: #9fbfa8; font-size: 14px; }
.rv__num { font: 800 72px/1 var(--display); letter-spacing: -0.03em; }
.rv__stars { color: #ffc531; font-size: 26px; letter-spacing: 3px; }
.rv__count { color: #c9d8cd; margin-bottom: 18px; }
.rv__btns { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rv__all { color: #7fe39a; font-weight: 600; text-decoration: none; }
.rv__mp { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rv__mp span { flex: 1 0 100%; color: #9fbfa8; font-size: 13px; }
.rv__mp a { display: flex; align-items: center; height: 36px; padding: 0 10px; border-radius: 8px; background: #fff; }
.rv__mp img { height: 16px; width: auto; }
.rv__list { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rv__list::-webkit-scrollbar { display: none; }
.rv__card { flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r); background: var(--bg-2); min-height: 300px; }
.rv__cstars { color: #ffb800; font-size: 18px; letter-spacing: 2px; }
.rv__cstars span { color: #d6dcd8; }
.rv__text { flex: 1; font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.rv__text::before { content: '«'; } .rv__text::after { content: '»'; }
.rv__who { display: flex; align-items: center; gap: 12px; }
.rv__ava { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.rv__ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv__who b { display: block; font-weight: 600; }
.rv__who small { color: var(--muted); font-size: 13px; }
.rv__fallback { align-self: center; color: var(--accent-strong); font-weight: 600; }

/* ===== Стартовый набор: пластик + аксессуары слева, «Ваш набор» справа ===== */
.kitbox { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.kit__main { display: flex; flex-direction: column; gap: 16px; }
.kit__panel { padding: 22px; border-radius: var(--r); background: var(--bg-2); }
.kit__h { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; margin-bottom: 14px; }
.kit__h span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-strong); color: #fff; font-size: 14px; flex: none; }
.kit__mats { margin-bottom: 10px; }
.kit__mats .tab:not([aria-selected="true"]) { background: var(--bg); }
.kit__matinfo { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.kit__colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.kc { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; border: 0; border-radius: 12px; background: #f2f2f2; cursor: pointer; overflow: visible; text-align: center; box-shadow: inset 0 0 0 1.5px transparent; transition: transform 140ms var(--ease), box-shadow 160ms ease; }
.kc img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 12px 12px 0 0; display: block; }
.kc:not(:has(img))::before { content: ''; display: block; aspect-ratio: 1; margin: 18%; border-radius: 50%; background: var(--c, #ccc); }
.kc span { font-size: 11.5px; line-height: 1.2; padding: 0 4px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.kc.is-on::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--accent-strong); pointer-events: none; }
.kc b { position: absolute; right: -6px; top: -6px; z-index: 2; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent-strong); color: #fff; font: 700 12px/22px var(--text); box-shadow: 0 0 0 2px var(--bg-2); }
.kc:active { transform: scale(0.95); }
@media (hover: hover) { .kc:hover { transform: translateY(-2px); } }
.kit__acc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ka { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 12px; border-radius: 14px; background: var(--bg); cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 160ms ease, opacity 160ms ease; }
.ka.is-on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ka.is-off { opacity: 0.55; cursor: default; }
.ka input { position: absolute; opacity: 0; pointer-events: none; }
.ka__img { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f3f4f3; }
.ka__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ka__name { font-weight: 600; font-size: 13.5px; line-height: 1.25; padding: 0 2px; min-height: 2.5em; }
.ka__price { margin-top: auto; padding: 0 2px; font-weight: 700; font-size: 15px; }
.ka__price.is-out { font-weight: 500; font-size: 13px; color: var(--muted); }
.ka__box { position: absolute; right: 8px; top: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1.5px #c3ccc6; transition: background-color 160ms ease; }
.ka.is-on .ka__box { background: var(--accent-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: none; }
.ka:has(input:focus-visible) { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.ks { position: sticky; top: 140px; display: flex; flex-direction: column; padding: 22px; border-radius: var(--r); background: var(--deep); color: #fff; }
.ks__title { font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.ks__list { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; margin-bottom: 16px; }
.ks__list li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; }
.ks__empty { display: block !important; color: #9fbfa8; font-size: 14px; }
.ks__pic { width: 36px; height: 36px; border-radius: 9px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.ks__pic img { width: 100%; height: 100%; object-fit: contain; }
.ks__pic i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.ks__name { font-size: 14px; line-height: 1.25; }
.ks__name small { display: block; color: #9fbfa8; font-size: 12.5px; }
.ks__qty { display: flex; align-items: center; gap: 6px; }
.ks__qty button, .ks__del { width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.ks__qty button:disabled { opacity: 0.35; cursor: default; }
.ks__qty b { min-width: 16px; text-align: center; }
@media (hover: hover) { .ks__qty button:not(:disabled):hover, .ks__del:hover { background: rgba(255, 255, 255, 0.22); } }
.ks__foot { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 14px; }
.ks__sum { font: 800 32px/1.1 var(--display); letter-spacing: -0.02em; }
.ks__sum s { font: 400 15px var(--text); color: #9fbfa8; }
.ks__save { color: #7fe39a; font-weight: 600; margin-top: 2px; }
.ks .btn { margin-top: 14px; height: 50px; background: var(--accent); }
@media (hover: hover) { .ks .btn:not(:disabled):hover { background: #12c63f; } }
.ks .btn:disabled { background: rgba(255, 255, 255, 0.12); color: #9fbfa8; }
.ks__clear { display: block; margin: 10px auto 0; border: 0; background: none; color: #9fbfa8; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* ===== Появление ===== */
@media (prefers-reduced-motion: no-preference) {
  .js .hero > * { animation: rise 700ms var(--ease) backwards; }
  .js .hero > :nth-child(3) { animation-delay: 80ms; }
  .js .hero > :nth-child(4) { animation-delay: 160ms; }
}

/* ===== Планшет ===== */
@media (max-width: 1180px) {
  .cats { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 190px); }
  .kitbox { grid-template-columns: minmax(0, 1fr) 300px; }
  .kit__acc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rv__card { flex-basis: calc((100% - 16px) / 2); }
  .cat--wide { grid-column: span 1; grid-row: span 2; }
  .cat--wide .cat__2 { display: none; }
  .cat--wide img { width: 80%; }
  .srv { grid-template-columns: repeat(2, 1fr); }
}
/* ===== Телефон ===== */
@media (max-width: 900px) {
  .bonus { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; height: auto; }
  .hero__main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .hero__side { flex-direction: column; align-items: flex-start; padding: 16px; min-height: 180px; }
  .hero__side img { width: 100%; height: 90px; }
  .hero__side--srv img { border-radius: 10px; }
  .hero__side b { font-size: 18px; }
  .cats { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 160px; }
  .cat { padding: 14px; }
  .cat b { font-size: 18px; }
  .cat > span { max-width: none; }
  .cat:has(img[src*="gal/"]) > span { max-width: none; }
  .cat img, .cat img[src*="gal/"] { width: 56%; height: 46%; }
  .cat i { max-width: 70%; }
  /* «3D-принтеры» — на всю ширину и в два ряда: в одном ряду принтер выходил с ноготь */
  .cat--wide { grid-column: 1 / -1; grid-row: span 2; }
  .cat--wide img { width: 50%; height: 80%; right: 2%; bottom: 0; }
  .cat--wide .cat__2 { display: block; right: 46%; width: 44%; height: 64%; }
  .today__stats { grid-template-columns: 1fr 1fr; }
  .duo { grid-template-columns: 1fr; }
  .duo__help { grid-template-columns: 170px 1fr; padding: 24px 20px 0 12px; gap: 20px; }
  .duo__panda { width: 170px; }
  .picker { grid-template-columns: 1fr; }
  .picker__card { position: static; display: grid; grid-template-columns: 140px 1fr; column-gap: 14px; }
  .picker__card > :not(.picker__img) { grid-column: 2; }
  .picker__img { grid-row: 1 / span 3; }
  .picker__opt, .picker__card .more { grid-column: 1 / -1 !important; }
  .picker__wall { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .showroom { grid-template-columns: 1fr; }
  .showroom__photos { grid-template-rows: 150px 150px; }
  .rv { grid-template-columns: 1fr; }
  .rv__card { flex-basis: 78%; }
  .kitbox { grid-template-columns: 1fr; }
  .ks { position: static; }
}
@media (max-width: 560px) {
  /* Текст на всю ширину, ниже — кнопки слева и панда справа, стоит на нижнем крае */
  .duo__help { grid-template-columns: minmax(0, 1fr) 42%; grid-template-areas: "h h" "p p" "b panda"; gap: 0 8px; padding: 24px 0 0 20px; min-height: 0; }
  .duo__help > div { display: contents; }
  .duo__help h2 { grid-area: h; padding-right: 20px; }
  .duo__help p { grid-area: p; padding-right: 20px; margin-bottom: 18px; }
  .duo__help .duo__btns { grid-area: b; flex-direction: column; align-self: center; padding-bottom: 24px; }
  .duo__help .duo__btns .btn { width: 100%; height: auto; min-height: 44px; padding: 8px 12px; white-space: normal; line-height: 1.2; justify-content: center; text-align: center; }
  .duo__panda { grid-area: panda; width: 100%; max-width: 170px; justify-self: end; margin-right: 4px; }
  .srv { grid-template-columns: 1fr 1fr; gap: 12px; }
  .srv__item span { display: none; }
  .hero__copy { padding: 18px; }
  .hero__copy > span { font-size: 15px; }
  .kit__panel { padding: 16px; }
  .kit__colors { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .kit__acc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv__card { flex-basis: 86%; }
  .rv__num { font-size: 56px; }
}
.tile--more span { margin: 0; padding-top: 4px; }
