/* ══════════════════════════════
   ITEM SEARCH
   ══════════════════════════════ */

/* ── Trending section ── */
.trending-section { margin-bottom: 32px; }
.trending-heading {
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  color: var(--text); margin-bottom: 16px; text-align: center;
}

/* ── Items grid ── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.item-card { cursor: pointer; overflow: hidden; }
.item-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.item-card .item-body { padding: 12px 14px; }
.item-card .item-name {
  font-weight: 600; font-size: 0.9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.item-card .item-price {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.82rem; font-weight: 600; color: var(--success);
}
.item-card .item-price img { width: 14px; height: 14px; }
.item-card .item-type {
  font-size: 0.75rem; color: var(--text-dim);
  margin-top: 4px;
}

/* ── Detail overlay ── */
.detail-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,18,0.85);
  backdrop-filter: blur(8px);
  justify-content: center; align-items: center;
  padding: 20px; overflow-y: auto;
}
.detail-overlay.open { display: flex; }
.detail-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px; width: 100%;
  padding: 28px;
  position: relative;
  animation: fadeUp 0.3s ease;
}
.detail-panel .close-btn {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--text-dim);
  font-size: 1.3rem; cursor: pointer;
}
.detail-panel .close-btn:hover { color: var(--text); }
.detail-panel img { width: 100%; border-radius: 10px; margin-bottom: 16px; }
.detail-panel h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 8px; }
.detail-panel .detail-meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 10px; }
.detail-panel .detail-desc { color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; }

@media (max-width: 600px) {
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
