/* ============================================================
   TokenProp — Marketplace Styles
   ============================================================ */

.marketplace-page { padding-top: calc(var(--nav-height) + 32px); }

/* ---------- Header ---------- */
.marketplace-header {
  padding: 48px 0 32px;
  background: radial-gradient(ellipse at top center, rgba(79,142,247,0.06) 0%, transparent 60%);
}
.marketplace-header h1 { font-size: 2.4rem; margin-bottom: 8px; }
.marketplace-header p  { color: var(--text-secondary); font-size: 1.05rem; }

/* ---------- Toolbar ---------- */
.marketplace-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 20px 0; margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.toolbar-search {
  position: relative; flex: 1; max-width: 360px;
}
.toolbar-search input {
  width: 100%; padding: 10px 16px 10px 42px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary); font-size: 0.9rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.toolbar-search input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-blue-glow); }
.toolbar-search .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.95rem; pointer-events: none;
}

.toolbar-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-chip {
  padding: 8px 16px; border-radius: 100px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary); font-size: 0.82rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.filter-chip:hover, .filter-chip.active {
  background: rgba(79,142,247,0.12); border-color: rgba(79,142,247,0.3); color: var(--accent-blue);
}

.toolbar-sort select {
  padding: 8px 32px 8px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary); font-size: 0.85rem; outline: none;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ---------- Property Grid ---------- */
.marketplace-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding: 28px 0 80px;
}

.mp-card {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06); transition: all var(--duration) var(--ease);
  cursor: pointer;
}
.mp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(79,142,247,0.12);
  border-color: rgba(79,142,247,0.15);
}

.mp-card-img {
  position: relative; width: 100%; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, #1a1a3e, #2a2a5e);
}
.mp-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.mp-card:hover .mp-card-img img { transform: scale(1.06); }
.mp-card-img .card-status-badge {
  position: absolute; top: 12px; left: 12px;
}
.mp-card-img .card-yield {
  position: absolute; top: 12px; right: 12px; padding: 4px 10px;
  border-radius: 6px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  font-size: 0.78rem; font-weight: 600; color: var(--accent-green);
}

.mp-card-body { padding: 18px 20px; }
.mp-card-body .card-type { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.mp-card-body h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.mp-card-body .card-loc { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }

.mp-card-body .funding-row {
  display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 6px;
}
.mp-card-body .funding-row .funded-pct { color: var(--accent-blue); font-weight: 600; }

.mp-card-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.05);
}
.mp-card-metrics .m-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mp-card-metrics .m-value { font-size: 0.88rem; font-weight: 600; margin-top: 2px; }

.mp-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.04);
}
.mp-card-footer .token-price { font-size: 0.82rem; color: var(--text-muted); }
.mp-card-footer .token-price span { color: var(--text-primary); font-weight: 600; }

/* ---------- No Results ---------- */
.no-results {
  grid-column: 1 / -1; text-align: center; padding: 80px 20px;
  color: var(--text-muted); font-size: 1rem;
}
.no-results .no-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }

/* ---------- Invest Modal ---------- */
.invest-summary { margin: 20px 0; }
.invest-summary .summary-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.9rem;
}
.invest-summary .summary-row:last-child { border: none; }
.invest-summary .summary-label { color: var(--text-muted); }
.invest-summary .summary-value { font-weight: 600; }
.invest-total {
  display: flex; justify-content: space-between; padding: 14px 0;
  font-size: 1.1rem; font-weight: 700; border-top: 2px solid rgba(79,142,247,0.3);
  margin-top: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .marketplace-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .marketplace-grid { grid-template-columns: 1fr; }
  .marketplace-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-search { max-width: 100%; }
}

/* ============================================================
   AI Liquidity Score — Marketplace Card Styles
   ============================================================ */

/* --- Card Top Row --- */
.card-top-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 4px;
}

/* --- Score Ring (SVG Circular Indicator) --- */
.card-ai-score {
  position: relative; width: 38px; height: 38px; flex-shrink: 0;
}
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-bg {
  fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 3;
}
.score-ring-fill {
  fill: none; stroke-width: 3; stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}
.score-number {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
}

/* --- Liquidity Badge Row --- */
.card-liquidity-badge {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.ai-grade {
  font-size: 0.78rem; font-weight: 700;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.04em;
}

/* --- Badge Variants for Liquidity Tags --- */
.badge--liquidity {
  background: rgba(0,212,161,0.12); border: 1px solid rgba(0,212,161,0.3);
  color: #00D4A1; font-size: 0.72rem; padding: 4px 10px; border-radius: 100px;
  font-weight: 600; letter-spacing: 0.02em;
  animation: liquidityPulse 3s ease-in-out infinite;
}
.badge--standard {
  background: rgba(245,166,35,0.10); border: 1px solid rgba(245,166,35,0.25);
  color: #F5A623; font-size: 0.72rem; padding: 4px 10px; border-radius: 100px;
  font-weight: 600;
}
.badge--risk {
  background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.25);
  color: #EF4444; font-size: 0.72rem; padding: 4px 10px; border-radius: 100px;
  font-weight: 600;
}
.badge--muted {
  background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.15);
  color: #94a3b8; font-size: 0.72rem; padding: 4px 10px; border-radius: 100px;
  font-weight: 500;
}

/* --- Liquidity Glow (on card image for enabled properties) --- */
.card-liquidity-glow {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, transparent, #00D4A1, transparent);
  opacity: 0.7;
  animation: glowSlide 3s ease-in-out infinite;
}

/* --- Liquidity Filter Chip Highlight --- */
.filter-chip--liquidity {
  background: rgba(0,212,161,0.08) !important;
  border-color: rgba(0,212,161,0.2) !important;
  color: #00D4A1 !important;
}
.filter-chip--liquidity:hover, .filter-chip--liquidity.active {
  background: rgba(0,212,161,0.18) !important;
  border-color: rgba(0,212,161,0.4) !important;
}

/* --- Animations --- */
@keyframes liquidityPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,161,0); }
  50%      { box-shadow: 0 0 12px 2px rgba(0,212,161,0.15); }
}
@keyframes glowSlide {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.9; }
}
