/* ============================================
   04-marketplace.css — CTAs, stats, search, gig cards
   ============================================ */

/* ---------- BIG CTAs ---------- */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.cta-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
  min-height: 92px;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.cta-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-3);
  box-shadow: var(--shadow-lg);
}

.cta-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.cta-green .cta-icon {
  background: var(--blue-soft);
  color: var(--blue-text);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.cta-purple .cta-icon {
  background: rgba(99, 102, 241, 0.10);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.cta-body {
  flex: 1;
  min-width: 0;
}

.cta-body h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: -0.2px;
  color: var(--text);
}

.cta-body p {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
}

.cta-arrow {
  font-size: 20px;
  color: var(--muted);
  transition: transform var(--t-base);
}

.cta-card:hover .cta-arrow {
  transform: translateX(4px);
  color: var(--text);
}

/* ---------- STATS BAR ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.stat {
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.stat-g { background: rgba(14, 165, 233, 0.10); color: #0369a1; }  /* sky blue */
.stat-b { background: var(--blue-soft);          color: var(--blue-text); }  /* blue */
.stat-p { background: rgba(99, 102, 241, 0.10); color: #4338ca; }  /* indigo */
.stat-a { background: rgba(30, 64, 175, 0.10);  color: #1e3a8a; }  /* navy */

.stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 2px;
}

.stat-value {
  font-size: var(--fs-xl);
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: -0.4px;
}

/* ---------- SEARCH + SORT ---------- */
.search-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 0 var(--space-5) 0 44px;
  height: 44px;
  color: var(--text);
  font-size: var(--fs-sm);
  outline: none;
  transition: all var(--t-fast);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-elevated);
}

.search-box i {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}

.sort-select {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 0 36px 0 var(--space-4);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
  outline: none;
  cursor: pointer;
  height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  min-width: 180px;
}

/* ---------- CATEGORIES ---------- */
.cats-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.cat-pill {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--muted-2);
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.cat-pill:hover {
  color: var(--text);
  border-color: var(--border-3);
}

.cat-pill.on {
  background: var(--accent-soft);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent);
}

.cat-pill i { font-size: 14px; }

/* ---------- GIG GRID ---------- */
.gigs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--space-5);
}

/* ---------- GIG CARD ---------- */
.gig-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
}

.gig-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-3);
  box-shadow: var(--shadow-lg);
}

.gig-card.premium {
  border-color: rgba(168, 85, 247, 0.25);
}

.gig-card.premium:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 12px 32px -8px rgba(168, 85, 247, 0.2);
}

.gig-thumb {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.gig-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  gap: 5px;
  z-index: 5;
  flex-wrap: wrap;
}

.gig-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-full);
  backdrop-filter: blur(10px);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bdg-verified {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.bdg-pro {
  background: rgba(168, 85, 247, 0.18);
  color: var(--purple-text);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.bdg-hot {
  background: rgba(239, 68, 68, 0.18);
  color: var(--red-text);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.bdg-fixed {
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber-text);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.gig-fav {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 5;
  transition: all var(--t-fast);
}

.gig-fav:hover {
  background: var(--accent);
  color: #fff;
}

.gig-fav.faved {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.gig-body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.seller-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.seller-pic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  position: relative;
  flex-shrink: 0;
  color: #fff;
  border: 1.5px solid var(--surface);
}

.seller-pic.g { background: linear-gradient(135deg, #10b981, #0891b2); }
.seller-pic.b { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.seller-pic.p { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.seller-pic.a { background: linear-gradient(135deg, #f59e0b, #dc2626); }
.seller-pic.k { background: linear-gradient(135deg, #ec4899, #a855f7); }
.seller-pic.c { background: linear-gradient(135deg, #06b6d4, #3b82f6); }

.seller-pic::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.seller-info {
  flex: 1;
  min-width: 0;
}

.seller-name {
  font-size: var(--fs-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
}

.seller-name i {
  color: var(--blue);
  font-size: 13px;
}

.seller-meta {
  font-size: 10px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  display: flex;
  gap: 5px;
  margin-top: 1px;
}

.seller-meta .lvl {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-weight: 600;
}

.gig-title {
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  letter-spacing: -0.1px;
  color: var(--text-2);
}

.gig-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.gig-tag {
  font-size: 10px;
  color: var(--muted-2);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 500;
  border: 1px solid var(--border);
}

.gig-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.gig-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.gig-rating .star {
  color: var(--amber);
  font-size: 13px;
}

.gig-rating .num {
  color: var(--muted);
  font-weight: 400;
  font-family: 'IBM Plex Mono', monospace;
}

.gig-price {
  text-align: right;
}

.gig-price .from {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
  font-weight: 600;
}

.gig-price .amt {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: -0.4px;
}
