/* Live-room interaction states. Loaded after the legacy visual layers so the
   existing reference layout stays intact while dynamic states remain legible. */
.comment-status {
  position: absolute;
  z-index: 7;
  left: 12px;
  right: 12px;
  bottom: calc(var(--live-hot-bottom, 70px) + var(--live-hot-height, 60px) + 5px);
  min-height: 24px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  background: rgba(18,18,22,.78);
  color: rgba(255,255,255,.86);
  font-size: 12px;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.comment-status[data-state="loading"] { color: #ffe8a1; }
.comment-status[data-state="error"] { color: #ffd0d0; border-color: rgba(255,112,112,.42); }
.comment-status[data-state="pending"] { color: #ffe7aa; border-color: rgba(255,201,40,.38); }
.comment.is-pending {
  border: 1px dashed rgba(255,201,40,.48);
  color: rgba(255,255,255,.82);
}
.comment .comment-state {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255,201,40,.18);
  color: #ffe082;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}
.comment.is-failed .comment-state { background: rgba(255,80,80,.18); color: #ffc2c2; }

.product {
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: stretch;
}
.product-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.product-copy { min-width: 0; }
.product-copy h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-copy p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-price-row .price { white-space: nowrap; }
.product-live-price { color: #e9434d; font-size: 11px; font-weight: 700; }
.product-stock { margin-top: 4px; color: #7e8996; font-size: 11px; }
.product-stock.is-low { color: #e27b25; }
.product-stock.is-empty { color: #a2a8b0; }
.product-action { display: flex; align-items: flex-end; }
.product .buy {
  min-width: 58px;
  white-space: nowrap;
  transition: opacity .16s ease, transform .16s ease;
}
.product .buy:not(:disabled):active { transform: scale(.96); }
.product .buy:disabled { background: #c8cdd3; color: #fff; cursor: not-allowed; }
.product .buy[data-state="loading"] { opacity: .72; }
.bag-count[data-empty="true"] { opacity: .72; }

#lecturePrice { white-space: normal; }
#hotSaleCount { display: inline-block; min-width: 42px; }
.hot-sale-card[data-metric-state="loading"] #hotSaleCount,
.hot-sale-card[data-metric-state="error"] #hotSaleCount { font-size: 13px; min-width: 50px; }
.hot-sale-card[data-metric-state="error"] { filter: saturate(.86); }

@media (max-width: 390px) {
  .product { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; }
  .product-img { width: 70px; height: 70px; }
  .product .buy { min-width: 52px; padding-left: 9px; padding-right: 9px; }
  .comment-status { left: 8px; right: 8px; }
}
