/* ---------- Calculator v2: layout ---------- */
.calc-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.calc-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

.calc-location { margin-bottom: 14px; }
.calc-location label { display: block; font-weight: 700; font-family: var(--font-head); margin-bottom: 6px; }
.calc-location select, .calc-search input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-body); font-size: .95rem;
}
.calc-location select:focus, .calc-search input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.calc-search { margin-bottom: 14px; }

/* Item catalog */
.calc-catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.calc-item {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center;
  cursor: pointer; background: #fff; transition: border-color .12s, background .12s, transform .12s; position: relative;
}
.calc-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.calc-item.active { border-color: var(--brand); background: #fdf3f3; }
.calc-item img, .calc-item svg { width: 34px; height: 34px; margin: 0 auto 6px; }
.calc-item .item-name { font-size: .8rem; font-weight: 600; line-height: 1.2; display: block; min-height: 2.4em; }
.calc-item .item-vol { font-size: .72rem; color: var(--grey); display: block; }
.calc-item .item-count {
  position: absolute; top: -7px; right: -7px; background: var(--brand); color: #fff; font-family: var(--font-head);
  font-weight: 800; font-size: .72rem; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.calc-item .item-count[hidden] { display: none; }

/* Unit visualizer */
.unit-visual { position: relative; margin-bottom: 18px; }
.unit-visual svg { width: 100%; height: auto; display: block; }
.unit-label {
  position: absolute; top: 10px; left: 12px; font-family: var(--font-head); font-weight: 800; color: var(--ink);
  background: rgba(255,255,255,.85); padding: 4px 10px; border-radius: 6px; font-size: .85rem;
}

/* Fill result */
.calc-result { text-align: center; border-top: 1px solid var(--line); padding-top: 16px; }
.calc-reco { color: var(--grey); font-size: .95rem; }
.calc-reco strong { color: var(--ink); }
.calc-box { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; color: var(--ink); margin: 6px 0 2px; }
.calc-price { color: var(--brand); font-weight: 700; margin-bottom: 14px; }

/* Video inventory */
.calc-video { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 16px; }
.calc-video h3 { font-size: 1.05rem; margin-bottom: 4px; }
.video-hint { font-size: .85rem; color: var(--grey); margin-bottom: 10px; }
.video-stage { position: relative; background: #111; border-radius: 10px; overflow: hidden; min-height: 140px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.video-stage video { width: 100%; max-height: 220px; display: none; }
.video-stage video.live { display: block; }
.video-msg { color: #aaa; font-size: .85rem; text-align: center; padding: 12px; }
.video-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.video-index { list-style: none; }
.video-index li { font-size: .85rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fafafa; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.video-index li .vtime { color: var(--grey); font-size: .78rem; white-space: nowrap; }
.video-index .video-index-empty { border: 0; background: none; color: var(--grey); justify-content: center; }
.video-index .vbadge { font-family: var(--font-head); font-weight: 800; font-size: .72rem; color: var(--brand); white-space: nowrap; }
.video-index .vplay { color: var(--brand); font-weight: 700; cursor: pointer; }

/* Responsive */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .calc-catalog { grid-template-columns: repeat(2, 1fr); }
}
