/*
 * marketplace.css — marketplace feed page.
 */
.wg-feed h1 { font-size: 1.4rem; margin: 0 0 14px; }


.wg-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.wg-filters select {
  flex: 1 1 30%;
  min-width: 120px;
  padding: 9px 10px;
  font: inherit;
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius);
  background: #fff;
}

.wg-grid-toggle { display: flex; gap: 4px; justify-content: flex-end; margin-bottom: 12px; }
.wg-gridbtn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--wg-border); background: #fff; border-radius: 8px;
  color: var(--wg-muted); cursor: pointer;
}
.wg-gridbtn.is-active { border-color: var(--wg-color); color: var(--wg-color-dark); background: #eafaf0; }

.wg-feed-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 560px) {
  .wg-feed-list { grid-template-columns: repeat(3, 1fr); }
}
/* Explicit column choice (overrides the responsive default) */
.wg-feed-list.cols-2 { grid-template-columns: repeat(2, 1fr); }
.wg-feed-list.cols-3 { grid-template-columns: repeat(3, 1fr); }
.wg-feed-list.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Denser grids → smaller card text so it stays readable, not cramped */
.wg-feed-list.cols-3 .wg-card-title { font-size: 0.82rem; }
.wg-feed-list.cols-3 .wg-card-price { font-size: 0.85rem; }
.wg-feed-list.cols-3 .wg-card-meta,
.wg-feed-list.cols-3 .wg-card-seller,
.wg-feed-list.cols-3 .wg-card-stats { font-size: 0.68rem; }
.wg-feed-list.cols-4 .wg-card-title { font-size: 0.76rem; line-height: 1.25; }
.wg-feed-list.cols-4 .wg-card-price { font-size: 0.8rem; }
.wg-feed-list.cols-4 .wg-card-body { padding: 6px 7px; }
.wg-feed-list.cols-4 .wg-card-meta,
.wg-feed-list.cols-4 .wg-card-seller,
.wg-feed-list.cols-4 .wg-card-stats { font-size: 0.64rem; }
.wg-feed-list.cols-4 .wg-card-stats { gap: 6px; }

.wg-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius);
  overflow: hidden;
  background: #fff;
  color: var(--wg-text);
  text-decoration: none;
}
.wg-card { position: relative; }
.wg-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; }
.wg-card .wg-me-badge { position: absolute; top: 6px; left: 6px; z-index: 2; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

/* .wg-card-img is defined once, globally, in main.css (uniform square). */

.wg-card-body { padding: 8px 10px; }
.wg-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wg-card-price { color: var(--wg-color-dark); font-weight: 700; margin-top: 4px; }
.wg-card-meta { color: var(--wg-muted); font-size: 0.78rem; margin-top: 3px; }
.wg-card-seller { color: var(--wg-muted); font-size: 0.72rem; margin-top: 2px; }
.wg-card-stats { display: flex; flex-wrap: wrap; gap: 10px; color: var(--wg-muted); font-size: 0.72rem; margin-top: 4px; }

.wg-feed-empty { text-align: center; color: var(--wg-muted); padding: 32px 0; }
#wg-load-more { margin: 16px auto 0; max-width: 220px; }
