/* 文件职责：商品卡片/列表展示区与分页样式。 */
.page-product-list {
  .product-list-section {
    min-height: 240px;
  }

  .product-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .product-card-item {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgb(15 23 42 / 5%);
    transition: all 0.2s ease;
  }

  .product-card-item:hover {
    box-shadow: 0 10px 24px rgb(15 23 42 / 10%);
    transform: translateY(-2px);
  }

  .product-card-item.is-soldout {
    opacity: 0.75;
  }

  .product-card-item.is-offshelf {
    opacity: 0.9;
  }

  .product-card-status-ribbon {
    position: absolute;
    top: 12px;
    right: 0;
    z-index: 2;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 6px 0 0 6px;
  }

  .product-card-check {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
  }

  .product-card-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 156px;
    overflow: hidden;
    font-size: 36px;
    font-weight: 700;
    color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  }

  .product-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .product-card-body {
    padding: 12px 14px 10px;
  }

  .product-card-name {
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
  }

  .product-card-subtitle {
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
  }

  .product-card-spu {
    margin-bottom: 8px;
    font-family:
      ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
      'Liberation Mono', monospace;
    font-size: 11px;
    color: #c0c4cc;
  }

  .product-card-price-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 8px;
  }

  .price-now {
    font-size: 16px;
    font-weight: 700;
    color: #ef4444;
  }

  .price-old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
  }

  .product-card-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #6b7280;
  }

  .product-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
  }

  .product-card-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    background: #fafbfc;
    border-top: 1px solid #f3f4f6;
  }

  .product-card-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    color: #ef4444;
    letter-spacing: 6px;
    pointer-events: none;
    background: rgb(255 255 255 / 45%);
  }

  .product-list-table {
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
  }

  .product-list-header,
  .product-list-row {
    display: grid;
    grid-template-columns:
      44px 66px minmax(130px, 1.2fr) 80px 110px 88px 84px minmax(90px, 1.1fr)
      74px 180px;
    gap: 0;
    align-items: center;
  }

  .product-list-header {
    min-height: 44px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f8fafc;
    border-bottom: 1px solid #f0f0f0;
  }

  .product-list-row {
    min-height: 72px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s ease;
  }

  .product-list-row:last-child {
    border-bottom: none;
  }

  .product-list-row:hover {
    background: #fafcff;
  }

  .cell {
    padding: 8px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .check-cell {
    display: flex;
    justify-content: center;
  }

  .image-cell {
    display: flex;
    justify-content: center;
  }

  .list-cover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    font-size: 18px;
    font-weight: 700;
    color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border-radius: 8px;
  }

  .list-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .info-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
  }

  .info-cell .name {
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
  }

  .info-cell .subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
  }

  .info-cell .spu {
    overflow: hidden;
    text-overflow: ellipsis;
    font-family:
      ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
      'Liberation Mono', monospace;
    font-size: 11px;
    color: #c0c4cc;
    white-space: nowrap;
  }

  .price-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tags-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    white-space: normal;
  }

  .actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .product-pagination {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
  }
}

.product-link-btn {
  padding: 0;
  font-size: 12px;
  color: #1677ff;
  cursor: pointer;
  background: transparent;
  border: none;
}

.product-link-btn:hover {
  text-decoration: underline;
}

.product-link-btn.danger {
  color: #ef4444;
}

.stock-ok {
  color: #22c55e;
}

.stock-low {
  color: #f59e0b;
}

.stock-out {
  color: #ef4444;
}

.product-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
  border-radius: 999px;
}

.product-status-pill.status-on-sale {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.product-status-pill.status-off-shelf {
  color: #6b7280;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.product-status-pill.status-sold-out {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fecaca;
}
