/* 商品管理 */

.product-list-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-products-table {
  min-width: 1180px;
  table-layout: fixed;
}

.admin-products-table th,
.admin-products-table td {
  overflow: visible;
  overflow-wrap: break-word;
}

.admin-products-table__product-col {
  width: 31%;
}

.admin-products-table__category-col {
  width: 13%;
}

.admin-products-table__price-col {
  width: 23%;
}

.admin-products-table__stock-col {
  width: 7%;
}

.admin-products-table__status-col {
  width: 18%;
}

.admin-products-table__actions-col {
  width: 8%;
}

.admin-products-table__product {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.admin-products-table__thumbnail-link {
  flex: 0 0 auto;
}

.admin-products-table__thumbnail,
.admin-products-table__thumbnail-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 6px;
}

.admin-products-table__thumbnail {
  object-fit: contain;
}

.admin-products-table__thumbnail-placeholder {
  display: inline-block;
  background: #f1f3f5;
  border: 1px solid #e5e7eb;
}

.admin-products-table__details {
  min-width: 0;
}

.admin-products-table__title {
  display: inline-block;
  max-width: 100%;
}

.admin-products-table__number {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.admin-products-table__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-top: 0.375rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.admin-products-table__meta span {
  display: inline-flex;
  max-width: 100%;
}

.admin-products-table__category {
  font-size: 0.8125rem;
}

.admin-products-table__badge-list,
.admin-products-table__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.admin-products-table__badge {
  display: inline-flex;
  max-width: 100%;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  line-height: 1.4;
}

.admin-products-table__tags {
  margin-top: 0.375rem;
  color: var(--text-muted);
}

.admin-products-table__muted {
  color: var(--text-muted);
}

.admin-products-table__actions {
  white-space: nowrap;
}

.admin-products-table__price-list {
  margin: 0;
  padding-left: 1rem;
}

.admin-products-table__price-list li + li {
  margin-top: 0.375rem;
}

.admin-products-table__stock,
.admin-products-table__status-row {
  white-space: nowrap;
}

.admin-products-table__stock-tooltip {
  display: inline-block;
  outline: none;
  position: relative;
}

.admin-products-table__stock-total {
  cursor: help;
  border-bottom: 1px dotted currentColor;
  font-weight: 600;
}

.admin-products-table__stock-detail {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 40;
  min-width: 12rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d7dde5;
  border-radius: 6px;
  background-color: #fff;
  background-image: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  color: var(--text-primary);
  opacity: 1;
  white-space: normal;
}

.admin-products-table__stock-tooltip:hover .admin-products-table__stock-detail,
.admin-products-table__stock-tooltip:focus-within .admin-products-table__stock-detail,
.admin-products-table__stock-tooltip:focus .admin-products-table__stock-detail {
  display: block;
}

.admin-products-table__stock-detail-title {
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-products-table__stock-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  line-height: 1.6;
}

.admin-products-table__stock-detail-row strong {
  font-weight: 600;
}

.admin-products-table__stock-detail-empty {
  color: var(--text-muted);
}

.admin-products-table__status-text {
  font-weight: 600;
  color: var(--text-primary);
}

.admin-products-table__status-row {
  margin-top: 0.25rem;
}

.admin-products-table__status-row span {
  color: var(--text-muted);
}

@media (max-width: 767.98px) {
  .admin-products-table {
    min-width: 980px;
  }

  .admin-products-table__product {
    gap: 0.625rem;
  }

  .admin-products-table__thumbnail,
  .admin-products-table__thumbnail-placeholder {
    width: 64px;
    height: 64px;
  }
}
