/* Marketplace pages (web/member/market.js), used by the member app and the
   manager console. */

.chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row button { flex: none; min-height: 30px; padding: 3px 12px; font-size: 13.5px; border-radius: 999px; }
.chip-row button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .market-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.market-grid .empty { grid-column: 1 / -1; }
.market-card { display: block; background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.05); overflow: hidden; color: inherit; text-decoration: none; }
.market-card:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.market-thumb, .gallery-frame { position: relative; aspect-ratio: 1 / 1; background: var(--line); overflow: hidden; }
.market-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-photo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.market-info { padding: 8px 10px 10px; }
.market-price { font-weight: 700; color: var(--brand); }
@media (prefers-color-scheme: dark) { .market-price { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.market-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Red diagonal SOLD banner, as on the sales site */
.market-card.sold .market-thumb::after, .gallery.sold .gallery-frame::after {
  content: "SOLD"; position: absolute; top: 50%; left: 50%; width: 160%;
  transform: translate(-50%, -50%) rotate(-30deg); background: #d0201a; color: #fff;
  text-align: center; font-weight: 800; letter-spacing: .2em; font-size: 20px; padding: 5px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); pointer-events: none;
}
.market-card.sold img, .gallery.sold img { filter: grayscale(.5); }
.item-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .item-layout { grid-template-columns: 1fr; } }
.gallery { margin-bottom: 16px; }
.gallery-frame { border-radius: var(--radius); aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.gallery-main { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.no-photo.big { font-size: 16px; }
.gallery-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.gallery-thumbs button { padding: 0; width: 60px; height: 60px; min-height: 0; border-radius: var(--radius); overflow: hidden; flex: none; border: 2px solid transparent; }
.gallery-thumbs button.on { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.photo-grid figure { margin: 0; position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.photo-grid figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.photo-grid figure.pending { opacity: .8; border-style: dashed; }
.photo-grid .cover-tag { position: absolute; top: 6px; left: 6px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.photo-actions { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; }
.photo-actions .small { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.add-photo { aspect-ratio: 1 / 1; border-style: dashed; color: var(--muted); }
.form-end { margin-top: 8px; }

/* Marketplace: an own item close to being removed */
.market-card .expiring { color: var(--warning); font-weight: 600; }

/* Report an item: a red button set apart on the right, and the reasons as a list of choices. */
.reasons { border: 0; padding: 0; margin: 0 0 8px; }
.reasons legend { font-weight: 600; margin-bottom: 8px; }
.reasons .check { margin-bottom: 8px; align-items: center; }
.reasons .check input { margin-top: 0; }
button.report { margin-left: auto; }
