/* OPTIK61 этап 10 (B2): «Стартовый набор» — главная (гость) и «Оптовым покупателям». Владелец — design-marketer B.
   Тёмная панель с бюджетом слева, «лоток» на восемь ячеек справа: модели въезжают в ячейки, пары по диоптриям
   докручиваются. Место под все ячейки зарезервировано (нет скачков), анимация — transform/opacity. */

/* блок ниже сгиба: стили и раскладка лотка не считаются, пока он далеко от экрана; высота зарезервирована */
.o61s { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.o61s__card { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); border-radius: var(--r-28); border: 1px solid var(--line); background: var(--bg-soft); overflow: hidden; }

/* ---------- панель ---------- */
.o61s__panel { position: relative; display: flex; flex-direction: column; padding: 40px 36px 32px; background: var(--g-navy); color: #fff; isolation: isolate; }
.o61s__panel::after { content: ""; position: absolute; right: -1px; top: 32px; bottom: 32px; width: 10px; z-index: -1; opacity: .2; background: linear-gradient(#fff, #fff) right top / 1px 100% no-repeat, repeating-linear-gradient(180deg, #fff 0 1px, transparent 1px 12px) right top / 5px 100% no-repeat; }
.o61s__k { display: inline-flex; align-items: center; gap: 10px; font: 700 12.5px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); }
.o61s__k::before { content: ""; width: 36px; height: 10px; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat, repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 4.5px) left bottom / 100% 4px no-repeat, linear-gradient(currentColor, currentColor) right bottom / 1px 10px no-repeat, linear-gradient(currentColor, currentColor) left bottom / 1px 10px no-repeat; opacity: .85; }
.o61s__t { margin: 14px 0 0; font: 800 var(--t-31)/1.12 var(--f-head); letter-spacing: -.02em; color: #fff; }
.o61s__p { margin: 12px 0 0; font: 400 15px/1.5 var(--f-ui); color: #C8D2EA; }

.o61s__budget { margin-top: 26px; }
.o61s__lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.o61s__lbl label { margin: 0; font: 600 var(--t-14)/1 var(--f-ui); color: #C8D2EA; }
.o61s__big { font: 800 42px/1 var(--f-head); letter-spacing: -.03em; color: var(--gold-400); }

.o61s__range { --p: .11; position: relative; height: 40px; margin-top: 10px; }
.o61s__range::before { content: ""; position: absolute; left: 13px; right: 13px; top: 6px; height: 10px; opacity: .4; background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px calc(100% / 45)) left top / 100% 5px no-repeat, repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px calc(100% / 9)) left top / calc(100% + 1px) 10px no-repeat; }
.o61s__range::after { content: ""; position: absolute; left: 13px; right: 13px; top: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.o61s__fill { position: absolute; left: 13px; right: 13px; top: 22px; z-index: 1; height: 4px; border-radius: 4px; background: var(--g-gold); transform: scaleX(var(--p)); transform-origin: left center; transition: transform .18s var(--ease); pointer-events: none; }
.o61s__range input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.o61s__range input:disabled { cursor: default; }
.o61s__range input::-webkit-slider-runnable-track { height: 40px; background: none; }
.o61s__range input::-moz-range-track { height: 40px; background: none; }
.o61s__range input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: 11px; border-radius: 50%; border: 3px solid var(--navy-900); background: var(--g-gold); box-shadow: 0 0 0 2px var(--gold-400), 0 6px 14px rgba(0, 0, 0, .45); transition: transform .15s var(--ease); }
.o61s__range input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--navy-900); background: var(--gold-400); box-shadow: 0 0 0 2px var(--gold-400), 0 6px 14px rgba(0, 0, 0, .45); }
.o61s__range input:active::-webkit-slider-thumb { transform: scale(1.12); }
.o61s__range input:focus-visible { outline: none !important; }
.o61s__range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--gold-400), 0 0 0 6px rgba(44, 104, 240, .7); }
.o61s__range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--gold-400), 0 0 0 6px rgba(44, 104, 240, .7); }
.o61s__ends { display: flex; justify-content: space-between; margin-top: 2px; font: 500 var(--t-12)/1 var(--f-ui); color: #8FA0C4; }

.o61s__presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.o61s__chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font: 600 13px/1 var(--f-ui); cursor: pointer; transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), transform .16s var(--ease); }
.o61s__chip:hover { border-color: var(--gold-400); }
.o61s__chip:active { transform: scale(.97); }
.o61s__chip[aria-pressed="true"] { background: var(--gold-400); border-color: var(--gold-400); color: var(--navy-950); }
.o61s__chip:disabled { cursor: default; }

.o61s__sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.o61s__sum b { font: 800 var(--t-31)/1 var(--f-head); letter-spacing: -.02em; color: #fff; }
.o61s__sum span { font: 600 var(--t-14)/1.3 var(--f-ui); color: #C8D2EA; }
.o61s__sum small { flex-basis: 100%; font: 400 var(--t-12)/1.35 var(--f-ui); color: var(--gold-300); }
.o61s__add { width: 100%; margin-top: 18px; }
.o61s__add.is-busy { pointer-events: none; }
.o61s__add.is-busy .o61-ico { animation: o61-spin .9s linear infinite; }
.o61s__msg { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .08); font: 400 var(--t-14)/1.45 var(--f-ui); color: #fff; }
.o61s__msg.is-ok { background: rgba(61, 214, 140, .14); }
.o61s__msg.is-warn { background: rgba(242, 193, 78, .14); }
.o61s__msg a { color: var(--gold-300); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.o61s__msg ul { margin: 6px 0 0; padding-left: 18px; color: #C8D2EA; font-size: 13px; }
.o61s__note { margin: 14px 0 0; font: 400 var(--t-12)/1.45 var(--f-ui); color: #8FA0C4; }

/* ---------- лоток ---------- */
.o61s__tray { padding: 32px 32px 32px 36px; }
.o61s__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.o61s__h { font: 800 var(--t-20)/1.2 var(--f-head); color: var(--ink-900); }
.o61s__legend { display: inline-flex; align-items: baseline; gap: 8px; font: 400 13px/1.4 var(--f-ui); color: var(--ink-500); }
.o61s__legend::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: #FFF1C9; box-shadow: inset 0 0 0 1px var(--gold-400); transform: translateY(1px); }
.o61s__slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.o61s__slot { display: grid; min-width: 0; }
.o61s__box, .o61s__empty { grid-area: 1 / 1; min-width: 0; }
.o61s__box { display: flex; flex-direction: column; padding: 10px 10px 12px; border-radius: var(--r-16); border: 1px solid var(--line); background: #fff; box-shadow: var(--sh-1); opacity: 0; visibility: hidden; transform: none; transition: opacity .32s var(--ease) var(--d, 0s), visibility 0s linear .4s, box-shadow .2s var(--ease); }
.o61s__slot.is-in .o61s__box { opacity: 1; visibility: visible; transform: none; transition: opacity .32s var(--ease) var(--d, 0s), visibility 0s, box-shadow .2s var(--ease); }
.o61s__slot.is-in .o61s__box:hover { box-shadow: var(--sh-2); }
.o61s__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: var(--r-16); border: 1.5px dashed #C3CEE4; color: var(--ink-500); font: 500 13px/1.35 var(--f-ui); text-align: center; transition: opacity .25s var(--ease); background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(195, 206, 228, .18) 10px 11px); }
.o61s__empty .o61-ico { width: 34px; height: 34px; color: #A9B6CF; stroke-width: 1.3; }
.o61s__slot.is-in .o61s__empty { opacity: 0; pointer-events: none; }
/* в лотке модели набора и одна следующая; остальные модели пула ждут скрытыми (wow-starter.js снимает is-off) */
.o61s__slot.is-off { display: none; }

.o61s__ph { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #F3F5F9; }
.o61s__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.o61s__ph img[data-fit="contain"] { object-fit: contain; mix-blend-mode: multiply; }
.o61s__box:hover .o61s__ph img { transform: scale(1.05); }
.o61s__nm { margin-top: 10px; min-height: 40px; }
.o61s__nm a { display: block; overflow: hidden; color: var(--ink-900); font: 700 var(--t-14)/1.25 var(--f-ui); white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.o61s__nm a:hover { color: var(--blue-600); }
.o61s__nm small { display: block; margin-top: 3px; overflow: hidden; color: var(--ink-500); font: 400 var(--t-12)/1.3 var(--f-ui); white-space: nowrap; text-overflow: ellipsis; }
.o61s__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.o61s__c { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.o61s__c i { font: 600 9.5px/1 var(--f-ui); font-style: normal; color: var(--ink-400); letter-spacing: -.02em; white-space: nowrap; }
.o61s__c b { display: block; width: 100%; margin-top: 3px; padding: 5px 0; border-radius: 6px; background: #FFF1C9; box-shadow: inset 0 0 0 1px rgba(226, 165, 44, .45); color: var(--navy-950); font: 800 13px/1 var(--f-ui); text-align: center; }
.o61s__c.is-none b { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-400); font-weight: 600; }
.o61s__c.is-bump b { animation: o61s-bump .42s var(--ease); }
@keyframes o61s-bump { 0% { transform: scale(1); } 35% { transform: scale(1.22); background: var(--gold-400); } 100% { transform: scale(1); } }
.o61s__tot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line-2); font: 500 var(--t-12)/1 var(--f-ui); color: var(--ink-500); }
.o61s__tot b { font: 800 var(--t-14)/1 var(--f-ui); color: var(--ink-900); }

/* ---------- адаптив ---------- */
@media (max-width: 1279px) {
  .o61s__card { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
  .o61s__slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .o61s__panel { padding: 32px 28px 28px; }
  .o61s__tray { padding: 28px; }
}
@media (max-width: 991px) {
  .o61s { contain-intrinsic-size: auto 1800px; }
  .o61s__card { grid-template-columns: minmax(0, 1fr); border-radius: var(--r-20); }
  .o61s__panel::after { display: none; }
  .o61s__panel { padding: 28px 24px 24px; }
  .o61s__t { font-size: var(--t-25); }
  .o61s__big { font-size: 36px; }
  .o61s__tray { padding: 22px 16px 20px; }
  .o61s__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 560px) {
  .o61s__card { margin: 0 -8px; }
  .o61s__panel { padding: 24px 16px 22px; }
  .o61s__slots { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .o61s__box { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "ph nm tot" "row row row"; column-gap: 10px; padding: 8px 10px 10px; border-radius: 14px; }
  .o61s__ph { grid-area: ph; border-radius: 8px; }
  .o61s__nm { grid-area: nm; align-self: center; margin-top: 0; min-height: 0; }
  .o61s__nm a { font-size: 13.5px; }
  .o61s__nm small { font-size: 11.5px; }
  .o61s__row { grid-area: row; margin-top: 8px; }
  .o61s__tot { grid-area: tot; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; margin: 0; padding: 0; border: 0; }
  .o61s__c b { padding: 4px 0; font-size: 12.5px; }
  .o61s__presets { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .o61s__presets::-webkit-scrollbar { display: none; }
  .o61s__chip { flex: none; }
  .o61s__c i { font-size: 10px; }
  .o61s__empty { flex-direction: row; min-height: 64px; }
  .o61s__empty .o61-ico { width: 26px; height: 26px; }
  /* на телефоне из пустых ячеек видна только следующая: теперь это решает is-off (порядок в лотке задаёт css order) */
}

/* ==== этап 11: телефон (UX-аудит 09.11.2026, P2-8) ==== */
@media (max-width: 760px) {
  .o61s__k { font-size: 12px; }
  .o61s__nm small, .o61s__c b, .o61s__c i, .o61s__tot, .o61s__tot b { font-size: 13px; }
  .o61s__c i { letter-spacing: -.04em; }
}
