/* sheet.css — интерактивный разбор аукционного листа (секция #lot).
   Только transform/opacity в анимациях, камера двигает viewBox. Всё без JS остаётся читаемым. */

.lot { position: relative; overflow: clip; content-visibility: auto; contain-intrinsic-size: auto 1300px; }
@media (max-width: 980px) { .lot { contain-intrinsic-size: auto 2000px; } }
.lot::before {
  content: ""; position: absolute; width: 760px; height: 760px; right: -240px; top: -220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(197,67,44,.16), rgba(197,67,44,0) 70%);
}
.lot .wrap { position: relative; }
.lot .section-head { margin-bottom: 40px; }

.lot-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(28px, 4.2vw, 68px); align-items: start; }
.lot-stage-col { position: sticky; top: 92px; }

/* ---------- сцена с листом ---------- */
.lot-stage {
  position: relative; width: min(100%, calc(100svh - 190px)); min-width: min(100%, 420px); aspect-ratio: 1 / 1; margin-inline: auto;
  border-radius: 16px; overflow: hidden; background: #f5f2ea;
  box-shadow: 0 40px 90px -36px rgba(0,0,0,.9), 0 0 0 1px rgba(244,242,238,.1);
}
.lot-svg { width: 100%; height: 100%; display: block; max-width: none; }

/* бумага и линии */
.lot-svg .paper { fill: #f5f2ea; }
.lot-svg .box { fill: none; stroke: #202026; stroke-width: 1.15; transition: fill .45s ease; }
.lot-svg .cell.on .box { fill: rgba(197,67,44,.07); }
.lot-svg text { font-family: var(--font-body); }
.lot-svg .l { font-size: 8.4px; fill: #5a5a62; letter-spacing: .01em; }
.lot-svg .v { fill: #15151a; font-weight: 500; }
.lot-svg .v.mono { font-family: var(--font-mono); font-weight: 600; }
.lot-svg .v.hot { fill: var(--ember); }
.lot-svg .ja { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", var(--font-body), sans-serif; }
.lot-svg .v.ja.mono, .lot-svg .v.ja { font-weight: 600; }
.lot-svg .lg { fill: #3a3a42; }

/* смена языка: русский проявляется у активного блока или у всех */
.lot-svg .cell .ru { opacity: 0; transform: translateY(3px); }
.lot-svg .cell .ja { opacity: 1; }
.lot-svg .cell text { transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.lot-svg .cell.on .ja, .lot-stage[data-lang="ru"] .cell .ja { opacity: 0; transform: translateY(-3px); }
.lot-svg .cell.on .ru, .lot-stage[data-lang="ru"] .cell .ru { opacity: 1; transform: none; }
.lot-svg .cell.on .v.ru { fill: #0e0e12; }

/* схема кузова */
.lot-svg .car-body { fill: rgba(11,11,13,.035); stroke: #202026; stroke-width: 1.6; }
.lot-svg .car-glass { fill: rgba(63,122,160,.14); stroke: #202026; stroke-width: 1.1; }
.lot-svg .car-line { fill: none; stroke: #202026; stroke-width: 1; opacity: .7; }
.lot-svg .car-wheel { fill: #202026; stroke: none; }
.lot-svg circle.car-wheel { fill: none; stroke: #202026; stroke-width: 1.3; }
.lot-svg .mk { font-family: var(--font-mono); font-weight: 700; fill: var(--ember); }
.lot-svg .wn { font-family: var(--font-mono); font-weight: 600; fill: #3a3a42; }
.lot-svg .lead { fill: none; stroke: rgba(197,67,44,.55); stroke-width: .9; }
.lot-svg .lead.dash { stroke: rgba(32,32,38,.28); stroke-dasharray: 2 3; }

/* затемнение, рамка и «камера» */
.lot-dim { fill: rgba(10,10,14,.66); opacity: 0; pointer-events: none; }
.lot-hole { fill: #000; }
.lot-hl {
  fill: none; stroke: var(--ember); stroke-width: 2.4px; vector-effect: non-scaling-stroke; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 0 7px rgba(197,67,44,.8));
}
.lot-scan { pointer-events: none; opacity: 0; }

/* пины */
.pin { cursor: pointer; }
.pin-in { transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.pin:hover .pin-in { transform: scale(1.18); }
.pin-dot { fill: #15151a; stroke: #f5f2ea; stroke-width: 1.6; transition: fill .3s ease; }
.pin-n { font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; fill: #fff; pointer-events: none; }
.pin-ring { fill: none; stroke: var(--ember); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pin.on .pin-dot { fill: var(--ember); }
.pin.on .pin-ring { animation: lotRing 2.2s ease-out infinite; }
@keyframes lotRing { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(2.7); opacity: 0; } }
.lot-pre .pin, .lot-pre .cell { opacity: 0; }

/* ---------- управление ---------- */
.lot-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; width: min(100%, calc(100svh - 190px)); min-width: min(100%, 420px); margin-inline: auto; }
.lot-nav { display: flex; align-items: center; gap: 8px; }
.lot-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: rgba(244,242,238,.05); color: var(--text-dark); border: 1px solid var(--line-dark); transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.lot-btn:hover { background: rgba(244,242,238,.1); border-color: rgba(244,242,238,.3); }
.lot-btn:active { transform: scale(.94); }
.lot-btn svg { width: 18px; height: 18px; }
.lot-play { background: var(--ember); border-color: var(--ember); color: #fff; }
.lot-play:hover { background: var(--ember-strong); border-color: var(--ember-strong); }
.lot-play .i-pause, .lot-grid.is-playing .lot-play .i-play { display: none; }
.lot-grid.is-playing .lot-play .i-pause { display: block; }
.lot-count { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; color: var(--text-dark-dim); margin-left: 6px; }
.lot-count b { color: var(--text-dark); font-weight: 600; }
.lot-tr {
  font: 500 14px/1 var(--font-body); color: var(--text-dark); background: transparent; border: 1px solid var(--line-dark); border-radius: 999px;
  padding: 13px 18px; cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.lot-tr:hover { background: rgba(244,242,238,.06); border-color: rgba(244,242,238,.3); }
.lot-tr .t-on { display: none; }
.lot-tr[aria-pressed="true"] { border-color: rgba(197,67,44,.7); background: rgba(197,67,44,.12); }
.lot-tr[aria-pressed="true"] .t-on { display: inline; }
.lot-tr[aria-pressed="true"] .t-off { display: none; }
.lot-btn:focus-visible, .lot-tr:focus-visible, .lot-item:focus-visible { outline: 2px solid #ff9d78; outline-offset: 3px; }

/* ---------- панель разбора и список блоков ---------- */
.lot-side { display: grid; gap: 14px; }
/* все тексты лежат стопкой в одной ячейке: высота панели = самый длинный текст, страница не «прыгает» */
.lot-panels {
  display: grid; border: 1px solid rgba(197,67,44,.45); border-radius: 18px; padding: 24px 26px;
  background: linear-gradient(160deg, rgba(197,67,44,.10), rgba(197,67,44,.025) 55%);
}
.lot-panel {
  grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; visibility: hidden; opacity: 0; transform: translateY(10px);
  transition: opacity .32s ease, transform .5s cubic-bezier(.2,.8,.2,1), visibility 0s linear .32s;
}
.lot-panel.is-active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.lot-kicker { font: 500 11.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #ff9d78; }
.lot-panel h3 { font-size: clamp(21px, 2.1vw, 26px); font-weight: 550; letter-spacing: -.01em; line-height: 1.2; color: var(--text-dark); }
.lot-panel p { font-size: 15.5px; line-height: 1.6; color: rgba(244,242,238,.84); }
.lot-look { padding: 12px 14px; border-left: 2px solid var(--ember); background: rgba(244,242,238,.05); border-radius: 0 10px 10px 0; font-size: 14.5px !important; }
.lot-look span { display: block; font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #ff9d78; margin-bottom: 7px; }
.lot-mini { font-size: 13.5px !important; color: var(--text-dark-dim) !important; }
.lot-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.lot-chips li { font-size: 13px; line-height: 1; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-dark); color: var(--text-dark-dim); display: inline-flex; gap: 7px; align-items: baseline; }
.lot-chips b { font: 600 13px/1 var(--font-mono); color: var(--text-dark); }
.lot-chips li.on { border-color: var(--ember); background: rgba(197,67,44,.16); color: var(--text-dark); }
.lot-chips li.on b { color: #ff9d78; }

.lot-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lot-item {
  all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 13px; cursor: pointer; position: relative; overflow: hidden;
  border: 1px solid var(--line-dark); border-radius: 12px; background: rgba(244,242,238,.025); transition: border-color .3s ease, background .3s ease, transform .15s ease;
}
.lot-item:hover { border-color: rgba(244,242,238,.28); background: rgba(244,242,238,.05); }
.lot-item:active { transform: scale(.985); }
.lot-item.is-active { border-color: rgba(197,67,44,.65); background: rgba(197,67,44,.1); }
.lot-n {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--font-mono);
  border: 1px solid var(--line-dark); color: var(--text-dark-dim); transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.is-active > .lot-n { background: var(--ember); border-color: var(--ember); color: #fff; }
.lot-t { font: 500 14.5px/1.25 var(--font-body); color: var(--text-dark); min-width: 0; }
.lot-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ember); transform: scaleX(0); transform-origin: left; }
.lot-grid.is-playing .lot-item.is-active::after { animation: lotProg var(--dwell, 9s) linear forwards; }
@keyframes lotProg { to { transform: scaleX(1); } }

/* ---------- призыв ---------- */
.lot-cta {
  margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 26px 30px; border-radius: 18px; border: 1px solid var(--line-dark);
  background: linear-gradient(120deg, rgba(197,67,44,.14), rgba(197,67,44,.03) 60%);
}
.lot-cta h3 { font-size: clamp(20px, 2.3vw, 26px); font-weight: 550; letter-spacing: -.01em; }
.lot-cta p { margin-top: 8px; color: var(--text-dark-dim); font-size: 15.5px; max-width: 54ch; line-height: 1.55; }
.lot-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 980px) {
  .lot-grid { grid-template-columns: 1fr; gap: 18px; }
  .lot-stage-col { top: 62px; z-index: 5; margin-inline: -16px; padding: 10px 16px 10px; background: var(--ink-soft); box-shadow: 0 14px 18px -12px rgba(0,0,0,.85); }
  .lot-stage { width: 100%; min-width: 0; aspect-ratio: 1.22 / 1; border-radius: 12px; }
  .lot-ctrl { width: 100%; min-width: 0; margin-top: 10px; }
  .lot-btn { width: 40px; height: 40px; }
  .lot-tr { padding: 12px 14px; font-size: 13px; }
  .lot-panels { padding: 20px 18px; }
  .lot .section-head { margin-bottom: 26px; }
}
@media (max-width: 460px) {
  .lot-count { display: none; }
  .lot-t { font-size: 13.5px; }
  .lot-item { padding: 10px 10px; gap: 9px; }
  .lot-cta { padding: 22px 20px; }
  .lot-cta-btns { width: 100%; }
  .lot-cta-btns .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .lot-svg .cell text, .lot-panel, .lot-item, .pin-in { transition: none; }
  .pin.on .pin-ring, .lot-grid.is-playing .lot-item.is-active::after { animation: none; }
  .lot-pre .pin, .lot-pre .cell { opacity: 1; }
}

/* ссылка из карточки «Почему Carbazar54» на разбор листа */
.lot-more { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; font: 600 14.5px/1 var(--font-body); color: #ff9d78; text-decoration: none; border-bottom: 1px solid rgba(255,157,120,.35); padding-bottom: 4px; transition: color .2s ease, border-color .2s ease; }
.lot-more span { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.lot-more:hover { color: #fff; border-color: #fff; }
.lot-more:hover span { transform: translateX(4px); }

/* фото карточки: показываем верх листа (оценка, пробег, особенности) */
.card.accent.wide .accent-photo img { object-position: 50% 0%; }

/* фото в карточке — ссылка на разбор листа */
a.accent-photo { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.accent-cta {
  position: absolute; left: 14px; bottom: 14px; z-index: 3; display: inline-flex; gap: 8px; align-items: center; padding: 11px 17px; border-radius: 999px;
  background: rgba(11,11,13,.86); color: #fff; font: 600 14px/1 var(--font-body); border: 1px solid rgba(244,242,238,.22);
  box-shadow: 0 8px 22px -8px rgba(0,0,0,.7); transition: background .25s ease, border-color .25s ease;
}
.accent-cta i { font-style: normal; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
a.accent-photo:hover .accent-cta, a.accent-photo:focus-visible .accent-cta { background: var(--ember-strong); border-color: #ff9d78; }
a.accent-photo:hover .accent-cta i { transform: translateX(4px); }
a.accent-photo:focus-visible { outline: 2px solid #ff9d78; outline-offset: -4px; }

/* на красной карточке ссылка белая: розовая на красном не читается */
.card.accent .lot-more { color: #fff; border-bottom-color: rgba(255,255,255,.55); }
.card.accent .lot-more:hover { border-bottom-color: #fff; }
