/* storefront3.html «Витрина» — свои куски страницы. Общее — css/i3.css (как на index3) + css/i3-pages.css (внутренние страницы,
   там же карта девяти групп возможностей .i3p-tiles и строка «Ваша привычная среда» .i3p-integ).
   - вступление в две колонки: слева надзаголовок и h1 пером, справа — подзаголовок, кнопка и «9 сценариев · компьютер и телефон»;
   - девять дел и витрина каждого: список слева (миниатюра пером на светлой подложке тона, номер, название, подпись; выбранное —
     светлая подложка с тонкой линией, рисует js/storefront.js в цвете), справа окно «Живая витрина» — подложка пером (data-panel),
     переключатель «Компьютер | Телефон» — цвет слова и тонкая линия под ним, сама витрина пером на белом экране (#shopCv data-color).
     Имена классов (.scn, .on, .pv-view.desk / .phone, .pv-scroll.desk, .mode-switch) — те, что переключает js/storefront.js;
   - «Всё, что за витриной» — заголовок слева, девять групп справа (ссылки на vozmozhnosti3.html). */

/* ---------- вступление: h1 в строку, ниже — подзаголовок слева, кнопка и «9 сценариев» справа (как строка под h1 на storefront.html) ---------- */
.i3p-sf-top { padding: 48px 0 34px; }
.i3p-sf-top > .i3-wrap { display: block; }
.i3p-sf-top h1 { margin-bottom: 18px; }
.i3p-sf-top h1 .r { display: inline; }
.i3p-sf-row { display: flex; justify-content: space-between; align-items: end; gap: 20px 48px; }
.i3p-sf-row .i3-lead { margin: 0 !important; max-width: 640px; }
.i3p-sf-act { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.i3p-sf-quiet { color: var(--i3-muted); font-size: 16px; }

/* ---------- девять дел + витрина ---------- */
.i3p-sf-demos { padding: 6px 0 76px; }
.sf-stage { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.scn-list { display: grid; gap: 4px; }
.scn { position: relative; display: grid; grid-template-columns: 64px 24px minmax(0, 1fr); align-items: center; gap: 0 10px; min-height: 62px;
  padding: 8px 12px 8px 10px; text-align: left; font: inherit; color: var(--i3-navy); background: none; border: 0; border-radius: 14px; cursor: pointer;
  isolation: isolate; -webkit-tap-highlight-color: transparent; }
.scn canvas.scn-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.scn .scn-th { width: 64px; height: 44px; }
.scn-num { color: var(--i3-muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.scn-nm { display: flex; flex-direction: column; min-width: 0; }
.scn-nm strong { font: 600 16.5px/1.2 var(--i3-f); color: var(--i3-navy); }
.scn-nm small { font-size: 14px; line-height: 1.3; color: var(--i3-muted); }
.scn:hover strong, .scn.on strong, .scn.on .scn-num { color: var(--i3-acc-d); }
.scn:focus-visible { outline: 3px solid rgba(59, 123, 246, .45); outline-offset: 2px; }

.pv { padding: 12px 20px 20px; min-width: 0; scroll-margin-top: 96px; }       /* рамка и светлая заливка окна — подложка пером */
.pv-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; min-height: 46px; }
.pv-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; color: var(--i3-navy); }
.pv-dots { width: 46px; height: 14px; }
.mode-switch { display: flex; gap: 6px; }
.mode-switch button { position: relative; font: 600 16px/1.2 var(--i3-f); color: var(--i3-text); background: none; border: 0; padding: 8px 12px 11px; cursor: pointer;
  isolation: isolate; -webkit-tap-highlight-color: transparent; }
.mode-switch button canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.mode-switch button:hover { color: var(--i3-navy); }
.mode-switch button.on { color: var(--i3-acc-d); }
.mode-switch button:focus-visible, .pv-addr a:focus-visible { outline: 3px solid rgba(59, 123, 246, .45); outline-offset: 2px; border-radius: 8px; }
.pv-addr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 2px 12px; font-size: 15px; }
#previewAddress { color: var(--i3-muted); overflow-wrap: anywhere; }
.pv-addr .i3p-link { font-size: 16px; white-space: nowrap; }
.pv-view { position: relative; width: 100%; aspect-ratio: 900 / 590; }
.pv-view.phone { aspect-ratio: 900 / 700; }
.pv-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-hint { display: none; }

/* ---------- всё, что за витриной ---------- */
.i3p-capx-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; align-items: center; }
.i3p-capx-grid .i3-head { margin-bottom: 0; }
.i3p-capx-grid h2 .r { display: block; }
.i3p-capx-more { margin-top: 20px; font-size: 17px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .sf-stage { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* девять дел над окном — лентой вбок: карточка «рисунок сверху, номер, название, подпись» (в трети ширины планшета
     и телефона одно слово «Стройматериалы» не помещалось), край следующей карточки виден — понятно, что лента листается */
  .scn-list { grid-auto-flow: column; grid-auto-columns: 152px; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
    margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 6px; scroll-padding: 0 var(--gut); scrollbar-width: none; overscroll-behavior-x: contain; }
  .scn-list::-webkit-scrollbar { display: none; }
  .scn { scroll-snap-align: start; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; padding: 8px 8px 10px; min-height: 0; }
  .scn .scn-th { width: 100%; height: auto; aspect-ratio: 64 / 44; margin-bottom: 4px; }
  .scn-num { font-size: 12px; }
  .scn-nm strong { font-size: 15px; }
  .scn-nm small { font-size: 13px; }
  .pv { scroll-margin-top: 136px; }
  .i3p-capx-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .i3p-sf-row { flex-direction: column; align-items: stretch; }
  .i3p-sf-act { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
}
@media (max-width: 640px) {
  .i3p-sf-demos { padding-bottom: 56px; }
  .i3p-sf-act .i3-btn { flex: 1 1 100%; }
  .scn-list { grid-auto-columns: 140px; }
  .scn-nm strong { font-size: 14px; }
  .scn-nm small { font-size: 12.5px; }
  .pv { padding: 8px 12px 14px; }
  .pv-title { font-size: 16px; }
  .pv-dots { display: none; }
  .mode-switch button { font-size: 15px; padding: 7px 8px 10px; }
  .pv-view.phone { aspect-ratio: 1 / 1.98; }
  .pv-scroll.desk { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 4px; }
  .pv-scroll.desk::-webkit-scrollbar { display: none; }
  .pv-scroll.desk .pv-view { width: 720px; }
  .pv-scroll.desk + .pv-hint { display: block; margin-top: 8px !important; text-align: right; font-size: 15px; font-weight: 600; color: var(--i3-acc-d); }
}
@media (max-width: 380px) {
  .scn-list { grid-auto-columns: 128px; }          /* третья карточка ленты видна краем и на 320 */
  .scn-nm strong { font-size: 13px; }
  .pv-addr { font-size: 13.5px; }
  #previewAddress { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
  .pv-title { white-space: nowrap; }
}
