/* Карточка товара muse в раскладке KAIJU (по образцу racerworldwide.net), в цветах и шрифтах бренда.
   Компьютер: сетка 2 : 1. Слева фото столбиком, каждое во всю высоту экрана без обрезки, и липкая лента
   миниатюр 72×96; справа липкая колонка: название, цена, наличие, размеры, кнопка, вкладки.
   Телефон: фото листаются пальцем со счётчиком «1 / N». */

.pdx-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; padding: 0 var(--pad); }
.pdx-skel { height: calc(100vh - var(--header-h) - 16px); margin-top: 8px; }

/* фото */
.pdx-media { display: grid; grid-template-columns: minmax(0, calc((100vh - var(--header-h) - 16px) * 0.75)) 72px; justify-content: end; gap: 12px; align-items: start; padding: 8px 28px 0 0; }
.pdx-gallery { display: flex; flex-direction: column; gap: 8px; }
.pdx-slide { position: relative; margin: 0; height: calc(100vh - var(--header-h) - 16px); min-height: 480px; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.pdx-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pdx-slide:first-child img { animation: pdxIn 0.9s var(--ease) both; }
@keyframes pdxIn { from { opacity: 0; } }
.pdx-thumbs { position: sticky; top: calc(var(--header-h) + 8px); display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - var(--header-h) - 16px); overflow-y: auto; scrollbar-width: none; }
.pdx-thumbs::-webkit-scrollbar { display: none; }
.pdx-thumb { flex: none; width: 72px; height: 96px; padding: 0; border: 1px solid transparent; background: var(--paper-2); transition: border-color 0.2s; }
.pdx-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) { .pdx-thumb:hover { border-color: var(--line-2); } }
.pdx-thumb.is-active { border-color: var(--ink); }
.pdx-count { display: none; }

/* описание: колонка стоит на месте, пока листаются фото */
.pdx-info { align-self: stretch; min-width: 0; padding-left: 8px; }
.pdx-sticky { position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow-y: auto; scrollbar-width: none; padding: 28px 0 48px; }
.pdx-sticky::-webkit-scrollbar { display: none; }
.pdx-flag { margin: 0 0 10px; font: 500 11.5px/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--wine); }
.pdx-flag[data-flag='archive'], .pdx-flag[data-flag='soldout'] { color: var(--muted); }
.pdx-title { font: 800 clamp(28px, 2.3vw, 36px)/1.02 var(--f-display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pdx-price { margin: 14px 0 0; font-size: 18px; display: flex; align-items: baseline; gap: 10px; }
.pdx-price s { font-size: 15px; }
.pdx-stock { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 14px; }
.pdx-stock i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pdx-stock.is-out i { background: var(--line-2); }

.pdx-form { display: grid; gap: 18px; margin-top: 22px; }
.pdx-form .form-error { display: block; min-height: 1.4em; margin: -8px 0 -8px; font-size: 13px; }
.pdx-field { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.pdx-field legend { padding: 0; margin-bottom: 10px; font: 500 11.5px/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.pdx-field legend span { color: var(--ink); margin-left: 4px; }
.pdx-swatches { gap: 12px; padding: 4px; }
.pdx-sizegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.pdx-size {
  position: relative; height: 42px; padding: 0 8px; border: 1px solid var(--line-2); background: var(--paper-3);
  font: 500 13px/1 var(--f-sans); letter-spacing: 0.04em; overflow: hidden;
  transition: border-color 0.2s, background 0.2s, color 0.2s; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
@media (hover: hover) { .pdx-size:hover { border-color: var(--ink); } }
.pdx-size[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pdx-size.is-soldout { color: var(--muted); cursor: not-allowed; }
.pdx-size.is-soldout::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line-2) 50%, transparent calc(50% + 0.5px)); }
.pdx-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pdx-guide { padding: 4px 0; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
@media (hover: hover) { .pdx-guide:hover { color: var(--wine); text-decoration-color: currentColor; } }
.pd-left { margin: 0; font-size: 13px; color: var(--wine); }
.pd-left:empty { display: none; }

.pdx-add {
  width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--wine); background: var(--wine); color: var(--on-wine);
  font: 600 13px/1 var(--f-sans); letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform var(--t-fast) var(--ease);
}
.pdx-add::before { content: '+'; font-size: 16px; font-weight: 400; }
@media (hover: hover) { .pdx-add:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); } }
.pdx-add:active { transform: scale(0.99); }
.pdx-add:disabled { background: transparent; border-color: var(--line-2); color: var(--muted); }
.pdx-add:disabled::before { content: none; }
.pd-added { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 14px; background: var(--paper-3); border: 1px solid var(--line); font-size: 14px; animation: addedIn 0.4s var(--ease); }
.pd-added b { font-weight: 500; margin-right: auto; }
.pd-added a, .pd-added button { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
@keyframes addedIn { from { opacity: 0; transform: translateY(-6px); } }
[data-added]:empty { display: none; }
.pdx-quick { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border: 1px solid var(--line-2); font-size: 14px; }
.pdx-quick i { font-size: 18px; }
@media (hover: hover) { .pdx-quick:hover { border-color: var(--ink); } }

.pdx-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 14px; }
.pd-fav, .pd-share { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--ink-2); -webkit-tap-highlight-color: transparent; }
.pd-share i { font-size: 18px; }
@media (hover: hover) { .pd-fav:hover, .pd-share:hover { color: var(--wine); } }
.pdx-note { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; }

/* вкладки */
.pdx-tabs { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; margin-top: 28px; border-bottom: 1px solid var(--line); }
.pdx-tab { margin-bottom: -1px; padding: 14px 8px; border-bottom: 1px solid transparent; font: 500 12px/1.2 var(--f-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); transition: border-color 0.2s, color 0.2s; }
@media (hover: hover) { .pdx-tab:hover { color: var(--ink); } }
.pdx-tab[aria-selected='true'] { border-bottom-color: var(--ink); color: var(--ink); }
.pdx-panel { padding-top: 20px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.pdx-panel p { margin: 0 0 14px; }

/* просмотр фото во весь экран */
.pdx-lb { position: fixed; inset: 0; z-index: 1200; background: var(--paper); color: var(--ink); }
.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 { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; }
.pdx-lb-arrow { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; display: grid; place-items: center; font-size: 22px; }
.pdx-lb-prev { left: 12px; }
.pdx-lb-next { right: 12px; }
.pdx-lb-count { position: absolute; left: 50%; bottom: 24px; z-index: 2; transform: translateX(-50%); font: 500 12px/1 var(--f-mono); letter-spacing: 0.08em; }

/* ещё вещи */
.related { margin-top: clamp(72px, 8vw, 120px); }
.related-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 16px; }

@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-skel { height: auto; aspect-ratio: 3 / 4; margin: 0; }
  .pdx-media { position: relative; display: block; padding: 0; }
  .pdx-gallery { flex-direction: row; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .pdx-gallery::-webkit-scrollbar { display: none; }
  .pdx-slide { flex: 0 0 100%; height: auto; min-height: 0; aspect-ratio: 3 / 4; scroll-snap-align: start; cursor: default; }
  .pdx-slide img { object-fit: cover; }
  .pdx-thumbs { display: none; }
  .pdx-count { position: absolute; left: 50%; bottom: 12px; display: block; transform: translateX(-50%); padding: 5px 12px; border-radius: 14px; background: rgba(43, 26, 20, 0.6); color: var(--paper); font: 500 12px/1 var(--f-mono); pointer-events: none; }
  .pdx-info { padding: 0 var(--pad); }
  .pdx-sticky { position: static; max-height: none; overflow: visible; padding: 22px 0 32px; }
  .pdx-tab { padding: 12px 4px; font-size: 11px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
}
