/* Страница товара /item/<пост>-<номер> и иконка-ссылка на неё в окне фото. Цвета — из css/site.css. */

/* Ссылка «Открыть страницу полностью» под видео/фото в окне просмотра — отдельной строкой под размерами */
.viewer-dock { flex-wrap: wrap; }
.viewer-dock .item-open {
  flex: 1 1 100%; display: flex; align-items: center; justify-content: center;
  height: 40px; border: 1px solid #d5dde3; border-radius: 999px;
  background: #fff; color: #0f1419; text-decoration: none; font-size: 14px; font-weight: 700;
}
.viewer-dock .item-open:hover { background: #f4f6f8; }

/* Режим страницы товара: лента, топ, образы и форма поста скрыты */
#itemPage { display: none; }
body.item-mode #itemPage { display: block; }
body.item-mode #feed, body.item-mode #top5, body.item-mode #looks,
body.item-mode .tabs, body.item-mode #composer { display: none !important; }
body.item-mode.fav-mode #itemPage { display: none; }

.item-back { display: inline-block; margin: 14px 0 0; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.item-back:hover { color: var(--text); }
.item-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  margin-top: 10px; padding: 12px; display: grid; gap: 14px;
}
@media (min-width: 600px) {
  .item-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; padding: 16px; }
}
.item-media { min-width: 0; }
.item-frame { border-radius: 12px; overflow: hidden; background: #f4f6f8; }
.item-frame img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.item-frame video { display: block; width: 100%; height: auto; max-height: 80vh; background: #000; object-fit: contain; }
.item-toggle {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 999px; height: 32px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.item-toggle svg { display: block; }

.item-info { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.item-title { margin: 0; font-size: 22px; line-height: 1.25; word-break: break-word; }
.item-price { font-size: 20px; font-weight: 800; }
.item-info .rate .star { color: rgba(15,20,25,.3); }
.item-info .rate .star.on { color: #e0a106; }
.item-info .field-label { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.item-sizes { margin: 0; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-buy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 160px; height: 44px; }
.item-buy svg { display: block; }
.item-buy[disabled] { opacity: .5; cursor: default; }
.item-share { height: 44px; }
.item-desc { font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.item-desc.empty { color: #8b98a5; }
.item-admin { display: flex; gap: 8px; flex-wrap: wrap; }

/* Отзывы на странице товара — как в окне фото */
.item-reviews .viewer-reviews {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  margin-top: 12px; padding: 12px 16px 16px;
}
.item-reviews h3 { margin: 0 0 4px; font-size: 15px; }
.item-reviews .rv-bar { display: flex; align-items: center; gap: 8px; }
.item-reviews .rv-bar .send { margin-left: auto; }
.item-reviews .rv-photo { width: 38px; height: 38px; flex: none; border: 1px solid #d5dde3; border-radius: 50%; background: #fff; color: #0f1419; display: grid; place-items: center; cursor: pointer; padding: 0; }
.item-reviews .rv-hint { color: #8b98a5; font-size: 12px; }
.item-reviews .rv-prev { display: flex; gap: 8px; flex-wrap: wrap; }
.item-reviews .rv-prev:empty { display: none; }
.item-reviews .rv-thumb { position: relative; display: inline-block; }
.item-reviews .rv-thumb img { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.item-reviews .rv-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: #0f1419; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; padding: 0; }
.item-reviews .rv-imgs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.item-reviews .rv-imgs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }

/* Ещё товары */
.item-more { margin: 18px 0 8px; }
.item-more h2 { font-size: 17px; margin: 0 0 8px; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.item-tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; }
.item-tile img, .item-tile video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #f4f6f8; }
.item-tile-cap { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px; font-size: 13px; min-width: 0; }
.item-tile-cap b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-tile-cap span { color: var(--muted); }
