/* plati.dev — товарная страница v4 (/goods/<slug>/, /goods/p<id>/): надстройка над стеком Orvexa.
   Палитра и компоненты — из шаблона (var(--…)); здесь только раскладка карточки товара. */

/* хлебные крошки */
.plati-crumbs { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.plati-crumbs a { color: var(--muted); text-decoration: none; }
.plati-crumbs a:hover { color: var(--primary-text); }
.plati-crumbs b { color: var(--text); font-weight: 700; }

/* шапка-карточка товара: галерея + заголовок + чипы вариантов (по эталонам plati.market/denuvo) */
.plati-itemhead { padding: 18px; }
.plati-itemhead-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.plati-gallery { flex: 0 0 auto; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface, transparent); }
.plati-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plati-gallery, .plati-gallery img { width: 220px; height: 220px; }
.plati-gallery-lg, .plati-gallery-lg img { width: 260px; height: 260px; }
.plati-itemhead-copy { flex: 1 1 380px; min-width: 0; }
.plati-itemhead-copy h1 { font-size: 24px; line-height: 1.25; margin: 2px 0 8px; }
.plati-itemhead-copy > p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.plati-goods-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.plati-goods-head .p2-head-copy { flex: 1 1 340px; min-width: 0; }

/* чипы вариантов под шапкой (plati.market: Select a purchase option) */
.plati-optrow { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.plati-optchips { display: flex; flex-wrap: wrap; gap: 8px; }
.plati-optchip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; cursor: pointer; text-align: left; font: inherit; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.plati-optchip b { font-size: 14px; font-weight: 750; }
.plati-optchip small { font-size: 12px; color: var(--primary-text); font-weight: 700; }
.plati-optchip:hover { border-color: color-mix(in srgb, var(--primary-text) 45%, var(--line)); }
.plati-optchip.is-selected { border-color: var(--primary-text); background: color-mix(in srgb, var(--primary-text) 8%, transparent); }

/* сетка: слева табы, справа sticky-панель покупки */
.plati-goods-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 1024px) {
  .plati-goods-grid { grid-template-columns: minmax(0, 1fr) 400px; }
  .plati-goods-side { position: sticky; top: 92px; }
}
.plati-goods-main .p2-panel + .p2-panel { margin-top: 18px; }
.plati-goods-side .p2-panel + .p2-panel { margin-top: 18px; }

/* табы (plati.market: Description | Reviews) */
.plati-tabbar { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.plati-tab {
  appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit;
  padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.plati-tab:hover { color: var(--text); }
.plati-tab.is-active { color: var(--primary-text); border-bottom-color: var(--primary-text); }
.plati-tabpane { display: none; }
.plati-tabpane.is-active { display: block; }
.plati-tabpane .p2-panel + .p2-panel { margin-top: 18px; }

/* список в секциях описания */
.plati-list { list-style: none; padding: 0; margin: 8px 0 0; }
.plati-list li { position: relative; padding-left: 16px; }
.plati-list li::before { content: "·"; position: absolute; left: 2px; color: var(--primary-text); font-weight: 800; }

/* панель покупки */
.plati-buy-label { margin: 2px 0 8px; font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.plati-variants { display: flex; flex-direction: column; gap: 8px; }
.plati-variant {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: transparent;
  transition: border-color .15s ease, background .15s ease;
}
.plati-variant:hover { border-color: color-mix(in srgb, var(--primary-text) 45%, var(--line)); }
.plati-variant.is-selected { border-color: var(--primary-text); background: color-mix(in srgb, var(--primary-text) 8%, transparent); }
.plati-variant input { position: absolute; opacity: 0; pointer-events: none; }
.plati-variant-name { font-weight: 750; font-size: 14px; color: var(--text); }
.plati-variant-price { margin-left: auto; font-weight: 800; font-size: 15px; color: var(--primary-text); }
.plati-delta { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }

.plati-buy-price { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 10px; }
.plati-buy-price small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.plati-buy-price b { font-size: 26px; font-weight: 800; color: var(--primary-text); }

.plati-buy-btn { width: 100%; justify-content: center; font-size: 15px; padding: 12px 18px; }
.plati-buy-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* прямая ссылка на оплату */
.plati-direct {
  width: 100%; margin-top: 8px; padding: 8px 10px; font-size: 11.5px; font-family: ui-monospace, monospace;
  color: var(--text); background: var(--surface, transparent); border: 1px solid var(--line); border-radius: 8px;
}

/* карточка продавца (рейтинг из API отзывов Digiseller) */
.plati-seller-row { display: flex; gap: 12px; align-items: center; }
.plati-seller-avatar {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; font-weight: 800; font-size: 18px; color: var(--primary-text);
  background: color-mix(in srgb, var(--primary-text) 12%, transparent); border: 1px solid var(--line);
}
.plati-seller-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* отзывы */
.plati-review-sum { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 13.5px; }
.plati-review-sum b { font-size: 20px; color: var(--text); }
.plati-review-star { color: #d99a00; }
.plati-review-cap { margin: 16px 0 2px; font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.plati-review { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.plati-review header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.plati-review header b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.plati-review header time { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.plati-review-mark { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.plati-review-mark.ok { color: var(--mint-text); background: color-mix(in srgb, var(--mint) 15%, transparent); }
.plati-review-mark.bad { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 15%, transparent); }
.plati-review p { margin: 8px 0 0; color: var(--text); font-size: 13.5px; line-height: 1.55; }
.plati-review-reply { color: var(--muted) !important; font-size: 12.5px !important; border-top: 1px dashed var(--line); padding-top: 8px; }

/* каталог-главная */
.plati-cat-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.plati-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.plati-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  text-decoration: none; background: color-mix(in srgb, var(--surface-solid, transparent) 92%, transparent);
  transition: border-color .15s ease, transform .15s ease;
}
.plati-card:hover { border-color: color-mix(in srgb, var(--primary-text) 55%, var(--line)); transform: translateY(-2px); }
.plati-card-img { display: block; aspect-ratio: 11 / 7; overflow: hidden; background: var(--surface, transparent); }
.plati-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plati-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 8px; }
.plati-card-body b { color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 750; }
.plati-card-meta { color: var(--muted); font-size: 12px; }
.plati-card-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 14px; margin-top: auto; }
.plati-card-price { color: var(--primary-text); font-weight: 800; font-size: 16px; }
.plati-card-more { color: var(--muted); font-size: 12px; font-weight: 700; }
