/* Item card in the grid. */
.card {
  display: flex; flex-direction: column; padding: 0; text-align: left;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.12s, border-color 0.12s;
}
.card:hover { transform: translateY(-2px); border-color: var(--gold); }
.card.is-missing { opacity: 0.45; }

.card-top {
  display: flex; justify-content: space-between; align-items: center;
  height: 26px; padding: 6px 10px 0; font-size: 12px;
}
.refine { font-weight: 700; }
.badge-option { padding: 1px 7px; border-radius: 999px; background: var(--option-bg); color: var(--option); font-size: 11px; }

.card-icon { display: flex; align-items: center; justify-content: center; height: 104px; }
.item-icon { image-rendering: pixelated; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }

.slots { display: flex; gap: 4px; height: 20px; padding: 0 10px; }
.slot { width: 14px; height: 18px; border-radius: 3px; border: 1px solid #555b66; }
.slot.is-filled { background: var(--card-slot); border-color: var(--card-slot); }

.card-cat { padding: 8px 10px 0; color: var(--muted); font-size: 12px; }
.card-name { padding: 0 10px; font-weight: 600; line-height: 1.35; min-height: 38px; overflow-wrap: anywhere; }

.card-price { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 6px 10px 0; }
.card-price svg { flex: none; }
.card-price strong { font-size: 16px; overflow-wrap: anywhere; }
.amount { color: var(--muted); font-size: 12px; }

.card-foot {
  display: flex; justify-content: space-between; gap: 6px;
  margin-top: auto; padding: 8px 10px; border-top: 1px solid var(--card-line);
  color: var(--muted); font-size: 12px;
}
.card-price + .card-foot { margin-top: 10px; }
.seen { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.seen.is-missing { color: var(--warn); }

@media (max-width: 480px) {
  .card-icon { height: 84px; }
  .card-price strong { font-size: 14px; }
  .card-foot { flex-direction: column; gap: 2px; }
}
