:root {
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9dee8;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --accent: #0f766e;
}

body {
  background: var(--soft);
  color: var(--ink);
}

.market-hero {
  background: linear-gradient(135deg, #e7f5f2 0%, #f8fafc 50%, #fff7ed 100%);
  border-bottom: 1px solid var(--line);
}

.narrow {
  max-width: 620px;
}

.panel,
.filter-panel,
.seller-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-height: 290px;
}

.product-image {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #eef2f6;
  color: var(--muted);
  display: flex;
  justify-content: center;
  text-decoration: none;
}

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

.product-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.product-gallery img,
.product-gallery .empty-state {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.category-strip,
.quick-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.category-pill,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: .9rem;
  text-decoration: none;
}

.metric strong {
  display: block;
  font-size: 1.75rem;
}

.metric span {
  color: var(--muted);
  text-transform: capitalize;
}

.empty-state {
  align-items: center;
  background: #eef2f6;
  border: 1px dashed #c7cfdb;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  min-height: 120px;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.list-row,
.cart-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .75rem 0;
  text-decoration: none;
}

.list-row:last-child,
.cart-row:last-child {
  border-bottom: 0;
}

.qty {
  max-width: 96px;
}

.status-select {
  max-width: 180px;
}

.reason-input {
  max-width: 220px;
}

.policy-acceptance {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

@media (max-width: 576px) {
  .list-row,
  .cart-row {
    align-items: stretch;
    flex-direction: column;
  }
}
