/* Карточка товара: раскладка Kaiju в стиле гайдбука 30lll */
.pdx-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; padding-inline: var(--gutter); }

/* Фото: столбик во всю высоту экрана + лента миниатюр справа */
.pdx-media { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; align-items: start; padding: 8px 24px 0 0; }
.pdx-gallery { display: flex; flex-direction: column; gap: 8px; }
.pdx-slide { position: relative; margin: 0; height: calc(100dvh - var(--hdr) - 16px); min-height: 480px; overflow: hidden; background: var(--tile); cursor: zoom-in; }
.pdx-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pdx-slide img[src*="-cut-"], .pdx-lb-slide img[src*="-cut-"] { padding: 8%; mix-blend-mode: normal; }
.pdx-slide.is-skel { animation: skel 1.2s ease-in-out infinite alternate; }
.pdx-thumbs { position: sticky; top: calc(var(--hdr) + 8px); display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - var(--hdr) - 16px); overflow-y: auto; scrollbar-width: none; }
.pdx-thumbs::-webkit-scrollbar { display: none; }
.pdx-thumb { flex: none; width: 72px; height: 90px; background: var(--tile); border: 1px solid transparent; transition: border-color .2s; }
.pdx-thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.pdx-thumb img[src*="-cut-"] { object-fit: contain; padding: 8%; }
.pdx-thumb { border-color: var(--line); }
.pdx-thumb:hover { border-color: var(--grey); }
.pdx-thumb.is-active { border-color: var(--ink); }
.pdx-count { display: none; }

/* Колонка покупки стоит на месте, пока листаются фото */
.pdx-info { align-self: stretch; min-width: 0; padding-left: 24px; }
.pdx-sticky { position: sticky; top: var(--hdr); max-height: calc(100dvh - var(--hdr)); overflow-y: auto; scrollbar-width: none; padding: 20px 0 48px; display: grid; gap: 18px; align-content: start; }
.pdx-sticky::-webkit-scrollbar { display: none; }
.pdx-sticky .crumbs { display: flex; gap: 8px; padding: 0; color: var(--muted); }
.pdx-sticky .crumbs a:hover { color: var(--ink); }
.pdx-title { font-size: clamp(24px, 2vw, 34px); overflow-wrap: anywhere; }
.pdx-price { font-size: 18px; }
.pdx-price s { color: var(--muted); font-size: 16px; }
.pdx-price b { margin-left: 8px; padding: 3px 6px; background: var(--ink); color: var(--white); font-size: 12px; font-weight: 500; vertical-align: middle; text-transform: uppercase; }

.pdx-swatches { display: flex; align-items: center; gap: 0; }
/* квадрат 28×28 как был, зона касания 44×44 за счёт полей */
.pdx-swatch { position: relative; box-sizing: content-box; width: 28px; height: 28px; padding: 8px; margin: -8px; display: grid; place-items: center; }
.pdx-swatch + .pdx-swatch { margin-left: -8px; }
.pdx-swatch::after { content: ""; position: absolute; inset: 8px; border: 1px solid transparent; transition: border-color .2s; pointer-events: none; }
.pdx-swatch:focus-visible { outline: none; }
.pdx-swatch:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.pdx-swatch i { width: 20px; height: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.pdx-swatch:hover::after { border-color: var(--grey); }
.pdx-swatch.is-on::after { border-color: var(--ink); }
.pdx-swatch.is-out i { opacity: .35; }
.pdx-colorname { margin-left: 12px; font: 500 13px/1 var(--f-display); color: var(--muted); }

.pdx-stock { display: flex; align-items: center; gap: 8px; }
.pdx-stock i { width: 6px; height: 6px; background: var(--ink); }
.pdx-stock.is-out i { background: var(--grey); }
.pdx-stock.is-out { color: var(--muted); }

.pdx-sizes { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.pdx-sizes legend { padding: 0; margin-bottom: 10px; color: var(--muted); }
.pdx-sizegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.pdx-size { position: relative; height: 48px; border: 1px solid var(--line); font: 600 14px/1 var(--f-display); transition: border-color .2s, background .2s, color .2s; }
.pdx-size:hover { border-color: var(--ink); }
.pdx-size[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pdx-size.is-soldout { color: var(--muted); cursor: not-allowed; }
.pdx-size.is-soldout::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: currentColor; transform: rotate(-17deg); }
.pdx-sizes.is-need .pdx-sizegrid { animation: need .4s var(--ease); }
@keyframes need { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pdx-guide { justify-self: start; }

.pdx-add { min-height: 48px; }
.pdx-add i { font-size: 16px; }
.pdx-add.is-loading { opacity: .6; pointer-events: none; }
.pdx-add:disabled { background: var(--grey); color: var(--ink); cursor: not-allowed; }
.pdx-msg { min-height: 20px; margin-top: -10px; font: 500 13px/1.3 var(--f-display); color: var(--ink); }

.pdx-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.pdx-tab { padding: 14px 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); transition: color .2s, border-color .2s; }
.pdx-tab:hover { color: var(--ink); }
.pdx-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
/* Характеристики — одной строкой текста через « · », а не второй сеткой «кнопок».
   Пункт не рвётся, точка переносится вместе со следующим пунктом */
.pdx-sticky .specs { display: block; font: 500 11px/1.6 var(--f-display); color: var(--muted); }
.pdx-sticky .specs li { display: inline-block; padding: 0; border: 0; font: inherit; white-space: nowrap; }
.pdx-sticky .specs li + li::before { content: "·"; margin: 0 .55em 0 .45em; }

/* Описание, доставка, возврат. Ритм: между разделами 24 px, заголовок раздела → текст 12 px */
.pdx-panel { display: grid; gap: 24px; font-size: 15px; line-height: 1.55; }
.pdx-panel[hidden] { display: none; }
.pdx-tabs + .pdx-panel, .pdx-panel[role="tabpanel"] { padding-top: 20px; }
.pdx-panel p { max-width: 62ch; }
.pdx-panel a { text-decoration: underline; text-underline-offset: 3px; }
.pdx-text { display: grid; gap: 12px; }
.pdx-sec { display: grid; gap: 12px; }
.pdx-h { color: var(--muted); }
.pdx-sku { font-size: 11px; color: var(--muted); }
/* Детали — две колонки с квадратным маркером, длинный пункт на обе */
.pdx-dets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 13px; line-height: 1.45; }
.pdx-dets li { position: relative; padding-left: 14px; }
.pdx-dets li::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; background: var(--ink); }
.pdx-dets li.is-wide { grid-column: 1 / -1; }
/* Состав — парами: подпись мелко серым, значение, плотность серым */
.pdx-comp { display: grid; gap: 12px; margin: 0; }
.pdx-comp dt { margin-bottom: 2px; font-size: 11px; color: var(--muted); }
.pdx-comp dd { margin: 0; font-size: 13px; line-height: 1.45; }
/* Замеры выбранного размера */
.pdx-mhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pdx-mhead .label { color: var(--muted); }
.pdx-mall { padding-block: 15px; margin-block: -15px; font-size: 12px; }
.pdx-mall::after { bottom: 15px; }
.pdx-mlist { display: grid; margin: 0; border-top: 1px solid var(--ink); }
.pdx-mlist div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.35; }
.pdx-mlist dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Замеры — таблица прокручивается внутри блока, первая колонка закреплена */
.pdx-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.pdx-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pdx-sizetable { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 13px/1.3 var(--f-display); font-variant-numeric: tabular-nums; }
.pdx-sizetable th, .pdx-sizetable td { padding: 9px 8px; text-align: right; white-space: nowrap; }
.pdx-sizetable th:first-child { position: sticky; left: 0; z-index: 1; width: 44%; min-width: 132px; padding-left: 0; text-align: left; font-size: 12px; line-height: 1.3; font-weight: 400; white-space: normal; background: var(--white); }
.pdx-sizetable .is-sel { background: var(--light); }
.pdx-sizetable thead th { border-bottom: 1px solid var(--ink); font-weight: 700; }
.pdx-sizetable tbody tr + tr > * { border-top: 1px solid var(--line); }
/* Доставка — способ слева, цена справа */
.pdx-rows { display: grid; border-top: 1px solid var(--line); }
.pdx-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.pdx-rows li span:last-child { flex: none; color: var(--muted); text-align: right; max-width: 45%; }

/* Аккордеон (телефон и планшет): строки 52 px, «+ / −» справа */
.pdx-acc { border-top: 1px solid var(--line); }
.pdx-ac { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--hdr) + 8px); }
.pdx-ac summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.pdx-ac summary::-webkit-details-marker { display: none; }
.pdx-ac summary i { position: relative; width: 12px; height: 12px; flex: none; }
.pdx-ac summary i::before, .pdx-ac summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; transition: transform .3s var(--ease); }
.pdx-ac summary i::after { transform: rotate(90deg); }
.pdx-ac[open] summary i::after { transform: rotate(0deg); }
.pdx-ac summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.pdx-ac__b { padding: 4px 0 24px; }

/* Просмотр фото на весь экран */
.pdx-lb { position: fixed; inset: 0; z-index: var(--z-drawer); background: var(--white); }
.pdx-lb[hidden] { display: none; }
.pdx-lb-slide { position: absolute; inset: 0; display: none; }
.pdx-lb-slide.is-active { display: block; }
.pdx-lb-slide img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-out; }
.pdx-lb-close, .pdx-lb-arrow { position: absolute; z-index: 1; width: 48px; height: 48px; display: grid; place-items: center; background: var(--ink); color: var(--white); font-size: 20px; }
.pdx-lb-close { top: 16px; right: 16px; }
.pdx-lb-arrow { top: 50%; left: 16px; margin-top: -24px; }
.pdx-lb-arrow--next { left: auto; right: 16px; }
.pdx-lb-count { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); }
.pdx-lock, .pdx-lock body { overflow: hidden; }

/* Ниже карточки */
.pdx .outfit, .pdx .more { padding-block: clamp(64px, 8vw, 120px) 0; }
.pdx .more { padding-bottom: clamp(64px, 8vw, 120px); }
.more__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 12px; }

@media (max-width: 1199px) and (min-width: 990px) {
  .pdx-main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

/* Телефон и планшет: фото листаются свайпом со счётчиком */
@media (max-width: 989px) {
  .pdx-main { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .pdx-media { position: relative; display: block; padding: 0; }
  .pdx-gallery { flex-direction: row; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .pdx-gallery::-webkit-scrollbar { display: none; }
  .pdx-slide { flex: 0 0 100%; height: auto; min-height: 0; aspect-ratio: 4 / 5; scroll-snap-align: start; cursor: default; }
  .pdx-thumbs { display: none; }
  .pdx-count { display: block; position: absolute; right: var(--gutter); bottom: 12px; padding: 5px 8px; background: var(--white); font-size: 12px; }
  .pdx-info { padding: 0 var(--gutter); }
  .pdx-sticky { position: static; max-height: none; overflow: visible; padding: 16px 0 32px; }
  .pdx-title { font-size: clamp(24px, 7vw, 30px); }
  .more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 8px; }
}
/* Телефон: ритм тремя группами (шапка 8 / выбор 24, внутри 14 / кнопка 20 / аккордеон 40),
   текст мельче и с воздухом, все цели касания от 44 px */
@media (max-width: 767px) {
  .pdp-page .ftr { padding-bottom: 72px; }
  .pdx-sticky { gap: 0; padding: 14px 0 32px; }
  .pdx-sticky > * + * { margin-top: 14px; }
  .pdx-sticky > .pdx-title, .pdx-sticky > .pdx-price { margin-top: 8px; }
  .pdx-sticky > .specs { margin-top: 24px; }
  .pdx-sticky > .pdx-add { margin-top: 20px; }
  .pdx-sticky > .pdx-msg { margin-top: 8px; }
  .pdx-sticky > .pdx-msg:empty { display: none; }
  .pdx-sticky > .pdx-blocks { margin-top: 40px; }
  .pdx-sticky .crumbs a { padding-block: 15px; margin-block: -15px; }
  .pdx-title { font-size: clamp(20px, 6vw, 24px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
  .pdx-price { font-size: 17px; }
  .pdx-guide { padding-block: 14px; margin-block: -14px; }
  .pdx-guide::after { bottom: 14px; }
  .pdx-panel { gap: 24px; font-size: 13px; line-height: 1.65; letter-spacing: -.01em; }
  .pdx-panel p { max-width: 46ch; text-wrap: pretty; hyphens: auto; }
  .pdx-panel a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  .pdx-text { display: block; }
  .pdx-text p + p { margin-top: 12px; }
  .pdx-sizetable { font-size: 12.5px; }
  .pdx-rows li { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .pdx-sizes.is-need .pdx-sizegrid { animation: none; }
}
