/* ============================================================
   Витрина размеров The Idol: зона на карточке (переключалка шкал,
   ссылка «Таблица размеров») + шторка-таблица + страница /razmery/.
   Перенос дизайн-бандла tasks/size-tables/design-source (Razmernaya setka.html);
   токены — переменные темы clothes с фоллбэками макета.
   Кнопки размеров НЕ здесь — это существующие .custom-variation__options темы.
   ============================================================ */

.size-head,
.sheet,
.sheet-backdrop{
  --sz-ink:var(--color-black,#282828);
  --sz-ink-strong:#1a1a1a;
  --sz-muted:var(--color-gray,#6d6d6d);
  --sz-muted-soft:var(--color-text-alt,#a6a6a6);
  --sz-line:var(--color-gray-stroke,#c9c9c9);
  --sz-line-soft:#e6e6e6;
  --sz-surface:var(--color-smoke,#f5f5f5);
  --sz-accent:var(--color-brand,#7a48c0);
  --sz-accent-soft:#f4eefc;
  --sz-f-display:var(--font-alter,"Manrope",-apple-system,sans-serif);
  --sz-f-text:var(--font,"Inter",-apple-system,sans-serif);
  --sz-ease:cubic-bezier(.2,.6,.2,1);
}

/* ---------- Зона на карточке: шапка «Размер [W·RUS·IT·FR] … ТАБЛИЦА РАЗМЕРОВ» ---------- */
.size-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}
.size-head__label{display:inline-flex;align-items:center}
.size-sys{display:inline-flex;margin-left:10px;border:1px solid var(--sz-line)}
.size-sys__b{
  padding:3px 9px 2px;background-color:#fff;border:none;border-right:1px solid var(--sz-line);cursor:pointer;
  font-family:var(--sz-f-display);font-weight:600;font-size:11px;line-height:1.5;letter-spacing:.08em;text-transform:uppercase;
  color:var(--sz-muted);
}
.size-sys__b:last-child{border-right:0}
.size-sys__b:hover{color:var(--sz-ink)}
.size-sys__b.is-on{background-color:var(--sz-ink);color:#fff}

.size-link{
  display:inline-flex;align-items:center;gap:8px;background:none;border:none;cursor:pointer;
  font-family:var(--sz-f-display);font-weight:600;font-size:12.5px;letter-spacing:.07em;text-transform:uppercase;
  color:var(--sz-ink);position:relative;padding:0 0 4px;
}
.size-link::after{content:"";position:absolute;left:0;bottom:0;width:100%;height:1px;background:var(--sz-line)}
.size-link:hover{color:var(--sz-accent)}
.size-link:hover::after{background:var(--sz-accent)}
.size-link svg{flex:none;color:var(--sz-muted)}
.size-link:hover svg{color:var(--sz-accent)}

/* ---------- Sold-out: вариация не в наличии (класс ставит size-zone.js) ----------
   В макете состояния не было — ненавязчиво: серый + line-through, некликабельно.
   Радио не disabled (выпало бы из FormData) — клики глушит pointer-events. */
.custom-variation__options-elem.is-soldout{pointer-events:none}
.custom-variation__options-elem.is-soldout .js-variation-option-text{
  color:var(--color-text-alt,#a6a6a6);text-decoration:line-through;
  border-color:var(--color-gray-stroke,#e6e6e6);background:var(--color-smoke,#f5f5f5);
}
.szt tbody tr.is-soldout td{color:var(--sz-muted-soft);text-decoration:line-through;cursor:default}

/* ---------- Шторка «Таблица размеров» ---------- */
/* z-index: выше шапки темы (.header 9999) и мобильного .sidebar (99999) */
.sheet-backdrop{
  position:fixed;inset:0;background:rgba(26,26,26,.4);
  opacity:0;pointer-events:none;transition:opacity .3s var(--sz-ease);z-index:99990;
}
.sheet{
  position:fixed;top:0;right:0;bottom:0;width:560px;max-width:100vw;
  background:#fff;z-index:99991;display:flex;flex-direction:column;
  transform:translateX(102%);transition:transform .35s var(--sz-ease);
  box-shadow:-24px 0 60px rgba(26,26,26,.12);
  font-family:var(--sz-f-text);font-size:16px;line-height:1.5;color:var(--sz-ink);
}
body.sheet-open .sheet-backdrop{opacity:1;pointer-events:auto}
body.sheet-open .sheet{transform:translateX(0)}

.sheet button{font:inherit;color:inherit;cursor:pointer;background:none;border:none;padding:0}
.sheet a{color:inherit;text-decoration:none}

.sheet__head{display:flex;align-items:flex-start;justify-content:space-between;padding:32px 40px 0}
.sheet__title{font-family:var(--sz-f-display);font-weight:600;font-size:26px;color:var(--sz-ink-strong);margin:0;text-transform:none}
.sheet__brand{margin:6px 0 0;font-size:14px;color:var(--sz-muted)}
.sheet__close{width:36px;height:36px;display:grid;place-items:center;color:var(--sz-muted);margin:-4px -8px 0 0}
.sheet__close:hover{color:var(--sz-ink)}

.sheet__tabs{display:flex;gap:32px;padding:26px 40px 0;border-bottom:1px solid var(--sz-line-soft)}
.sheet__tab{
  padding:0 0 14px;position:relative;
  font-family:var(--sz-f-display);font-weight:600;font-size:12.5px;letter-spacing:.07em;text-transform:uppercase;
  color:var(--sz-muted);
}
.sheet__tab::after{content:"";position:absolute;left:0;bottom:-1px;width:100%;height:2px;background:transparent}
.sheet__tab.is-on{color:var(--sz-ink-strong)}
.sheet__tab.is-on::after{background:var(--sz-ink)}
.sheet__tab:hover{color:var(--sz-ink)}

.sheet__body{flex:1;overflow-y:auto;padding:0 40px 32px}
.sheet__pane{display:none;padding-top:26px}
.sheet__pane.is-on{display:block}

.chart-note{
  display:none;background:var(--sz-surface);padding:14px 18px;font-size:13.5px;color:var(--sz-muted);
  margin-bottom:20px;line-height:1.55;
}

.chart{margin-bottom:28px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.szt-scroll{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
.chart__cap{
  font-family:var(--sz-f-display);font-weight:600;font-size:13px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--sz-muted);margin:0 0 12px;
}
table.szt{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;font-variant-numeric:tabular-nums}
.szt th{
  font-family:var(--sz-f-display);font-weight:600;font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--sz-muted-soft);text-align:left;padding:10px 14px 10px 8px;border:none;border-bottom:1px solid var(--sz-ink);
  white-space:nowrap;position:sticky;top:0;background:#fff;z-index:1;
}
.szt td{padding:11px 14px 11px 8px;border:none;border-bottom:1px solid var(--sz-line-soft);color:var(--sz-ink);background:#fff;white-space:nowrap}
/* глушим глобальные правила темы: table td{min-width:120px} раздувает таблицы
   за край шторки, td:not(:last-child) рисует вертикальные линии */
.szt td,.szt th{min-width:0}
.szt td:not(:last-child),.szt th:not(:last-child){border-right:none}
.szt th:first-child,.szt td:first-child{padding-left:10px}
.szt td:first-child{font-weight:600}
.szt tr.is-cur td{background:var(--sz-accent-soft)}
.szt tr.is-cur td:first-child{color:var(--sz-accent);box-shadow:inset 2px 0 0 var(--sz-accent)}

.chart__foot{font-size:13px;color:var(--sz-muted-soft);line-height:1.6;margin-top:14px}
.chart__foot b{color:var(--sz-muted);font-weight:500}
.szt--pick tbody tr[data-key]{cursor:pointer}
.szt--pick tbody tr[data-key]:hover td{background:var(--sz-surface)}
.szt--pick tbody tr.is-cur:hover td,.szt--pick tbody tr.is-cur td{background:var(--sz-accent-soft)}
.pick-hint{font-size:12.5px;color:var(--sz-muted-soft);margin:10px 0 0}
.sheet__more{
  display:inline-block;margin-top:2px;font-size:13px;color:var(--sz-muted);
  border-bottom:1px solid var(--sz-line);padding-bottom:2px;transition:color .2s,border-color .2s;
}
.sheet__more:hover{color:var(--sz-accent);border-color:var(--sz-accent)}

/* ---------- Вкладка «Как снять мерки» ---------- */
.measure-wrap{display:flex;gap:28px;align-items:flex-start}
.measure-figs{flex:none;display:flex;flex-direction:column;gap:14px}
.measure-fig{flex:none;width:172px;background:var(--sz-surface);padding:18px 10px 12px}
.measure-fig svg{display:block;width:100%;height:auto}
.measure-fig__cap{
  font-family:var(--sz-f-display);font-weight:600;font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--sz-muted);text-align:center;margin:10px 0 2px;
}
.measure{display:flex;flex-direction:column;flex:1;min-width:0}
.measure__row{display:flex;gap:20px;padding:20px 0;border-bottom:1px solid var(--sz-line-soft)}
.measure__row:first-child{padding-top:4px}
.measure__num{
  flex:none;width:34px;height:34px;border:1px solid var(--sz-ink);border-radius:50%;
  display:grid;place-items:center;font-family:var(--sz-f-display);font-weight:600;font-size:14px;
}
.measure__t{font-weight:600;font-size:15px;margin:4px 0 4px}
.measure__d{font-size:14px;color:var(--sz-muted);line-height:1.6;margin:0}
.measure__tip{background:var(--sz-surface);padding:16px 20px;margin-top:24px;font-size:13.5px;color:var(--sz-muted);line-height:1.6}
.measure__tip b{color:var(--sz-ink);font-weight:600}

/* мерные линии на SVG-фигурах (общие для шторки и /razmery/) */
.m-garment{fill:#ffffff;stroke:var(--sz-ink,#282828);stroke-width:1.5;stroke-linejoin:round}
.m-line{stroke:var(--sz-accent,#7a48c0);stroke-width:1.5;stroke-dasharray:5 4}
.m-tick{stroke:var(--sz-accent,#7a48c0);stroke-width:1.5}
.m-num circle{fill:#fff;stroke:var(--sz-ink,#282828);stroke-width:1.2}
.m-num text{font-family:var(--sz-f-display,"Manrope",sans-serif);font-weight:600;font-size:11px;fill:var(--sz-ink,#282828)}
g.is-hot .m-line,g.is-hot .m-tick{stroke-width:2.5}
g.is-hot circle{fill:var(--sz-accent-soft,#f4eefc);stroke:var(--sz-accent,#7a48c0)}
g.is-hot text{fill:var(--sz-accent,#7a48c0)}

/* ---------- Вкладка «Все бренды» ---------- */
/* сегменты пол × категория (перенос .b-ctx/.seg из макета);
   скоуп .sheet — перебиваем .sheet button{padding:0} */
.b-ctx{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px}
.sheet .seg{display:inline-flex;border:1px solid var(--sz-line)}
.sheet .seg__b{
  height:38px;padding:0 16px;font-size:13.5px;color:var(--sz-muted);
  border-right:1px solid var(--sz-line);transition:color .2s,background .2s;
}
.sheet .seg__b:last-child{border-right:none}
.sheet .seg__b:hover{color:var(--sz-ink)}
.sheet .seg__b.is-on{background:var(--sz-ink-strong);color:#fff}
.sheet .seg__b[hidden]{display:none}

.b-label{
  display:block;font-family:var(--sz-f-display);font-weight:600;font-size:11px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--sz-muted);margin:0 0 10px;
}
.b-select-wrap{position:relative;margin-bottom:18px}
.b-select{
  -webkit-appearance:none;appearance:none;width:100%;height:48px;
  border:1px solid var(--sz-line);background:#fff;border-radius:0;
  font:inherit;font-size:15px;color:var(--sz-ink);padding:0 44px 0 16px;cursor:pointer;
}
.b-select:hover{border-color:var(--sz-ink)}
.b-select:focus-visible{outline:2px solid var(--sz-ink);outline-offset:2px}
.b-select-wrap::after{
  content:"";position:absolute;right:18px;top:50%;width:8px;height:8px;
  border-right:1.5px solid var(--sz-muted);border-bottom:1.5px solid var(--sz-muted);
  transform:translateY(-70%) rotate(45deg);pointer-events:none;
}
.b-sys{font-size:13.5px;color:var(--sz-muted);margin:0 0 16px;line-height:1.5}
.b-sys b{color:var(--sz-ink);font-weight:600}
.b-list{
  position:absolute;top:calc(100% - 1px);left:0;right:0;z-index:6;
  background:#fff;border:1px solid var(--sz-line);max-height:264px;overflow-y:auto;
  box-shadow:0 16px 32px rgba(26,26,26,.10);
}
.b-item{display:block;width:100%;text-align:left;padding:10px 16px;font-size:14px;color:var(--sz-ink)}
.b-item:hover{background:var(--sz-surface)}
.b-item b{font-weight:600;color:var(--sz-accent)}
.b-empty{padding:12px 16px;font-size:13.5px;color:var(--sz-muted-soft);margin:0}

.sheet__cta{border-top:1px solid var(--sz-line-soft);padding:20px 40px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.sheet__cta-t{font-size:14px;color:var(--sz-muted);line-height:1.45;margin:0;max-width:300px}
.sheet__msgr{display:flex;gap:10px}
.sheet__msgr a{width:38px;height:38px;border-radius:50%;background:var(--sz-ink);color:#fff;display:grid;place-items:center}

@media (max-width:750px){
  .sheet{width:100%}
  .sheet__head{padding:24px 20px 0}
  .sheet__tabs{padding:20px 20px 0;gap:20px}
  .sheet__body{padding:0 20px 24px}
  .sheet__cta{padding:16px 20px}
  .measure-wrap{flex-direction:column}
  .measure-figs{flex-direction:row}
  .measure-fig{width:148px}
  /* П.2 — зона размеров на карточке: стопкой, чтобы переключалка шкал и кнопка
     «Таблица размеров» не сминались на узком экране; подпись «Размер» читаемой */
  .size-head{flex-direction:column;align-items:flex-start;gap:10px}
  .size-head .size-head__label{flex-wrap:wrap;font-size:13px;color:var(--sz-ink)}
  .size-head .size-sys{margin-left:0;flex-wrap:wrap}
  /* П.3 — компактнее ячейки таблицы на мобиле (горизонтальный скролл — .chart/.szt-wrap) */
  .szt th,.szt td{padding:9px 10px;font-size:13px}
}

/* ============================================================
   Страница /razmery/ — page-local (в .info-scope инфо-страниц;
   перенос Tablica razmerov.html, строки 12–49)
   ============================================================ */

.razmery-page .size-tables{display:grid;grid-template-columns:1.35fr 1fr;gap:32px;align-items:start}
.razmery-page .size-tables--full{grid-template-columns:1fr}
.razmery-page .size-tables--even{grid-template-columns:1fr 1fr}
.razmery-page .size-block h3{font-family:var(--f-display);font-weight:700;font-size:18px;margin:0 0 16px}
.razmery-page .size-tables + .size-tables{margin-top:32px}
.razmery-page .sched--sz{min-width:0;font-size:15px}
.razmery-page .sched--sz tbody th{font-weight:600;white-space:nowrap}
.razmery-page .sched--sz td{font-variant-numeric:tabular-nums}
@media(max-width:900px){.razmery-page .size-tables{grid-template-columns:1fr}}

.razmery-page .msr-wrap{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line)}
.razmery-page .msr-col{padding:40px;display:flex;gap:32px;align-items:flex-start}
.razmery-page .msr-col + .msr-col{border-left:1px solid var(--line)}
.razmery-page .msr-col h3{font-family:var(--f-display);font-weight:700;font-size:18px;margin:0 0 6px}
.razmery-page .msr-fig{flex:none;width:160px;background:var(--surface-2);padding:16px 8px 10px;margin:0}
.razmery-page .msr-fig svg{display:block;width:100%;height:auto}
.razmery-page .msr-figs{flex:none;display:flex;flex-direction:column;gap:12px}
.razmery-page .msr-fig figcaption{
  font-family:var(--f-display);font-weight:600;font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted,#76737a);text-align:center;margin:8px 0 2px;
}
.razmery-page .m-garment{stroke:var(--ink)}
.razmery-page .m-line{stroke:var(--accent)}
.razmery-page .m-tick{stroke:var(--accent)}
.razmery-page .m-num circle{stroke:var(--ink)}
.razmery-page .m-num text{font-family:var(--f-display);fill:var(--ink)}
.razmery-page .ms-rows{flex:1;min-width:0}
.razmery-page .ms-row{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--line-soft)}
.razmery-page .ms-row:last-child{border-bottom:none}
.razmery-page .ms-row__num{
  flex:none;width:28px;height:28px;border:1px solid var(--ink);border-radius:50%;
  display:grid;place-items:center;font-family:var(--f-display);font-weight:600;font-size:13px;
}
.razmery-page .ms-row__t{font-weight:600;font-size:15px;margin:3px 0 3px}
.razmery-page .ms-row__d{font-size:14px;color:var(--muted);line-height:1.55;margin:0}
@media(max-width:1080px){.razmery-page .msr-wrap{grid-template-columns:1fr}.razmery-page .msr-col + .msr-col{border-left:none;border-top:1px solid var(--line)}}
@media(max-width:560px){.razmery-page .msr-col{flex-direction:column;padding:24px}}
