/* ═══════════════════════════════
   MARKETPLACE STYLES
═══════════════════════════════ */

/* ── HERO ── */
.mp-hero {
  position: relative;
  background: #fff;
  padding: 100px 0 60px;
  overflow: hidden;
  border-bottom: 1px solid #E5E7EB;
}
.mp-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(229,57,53,0.06), transparent),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(229,57,53,0.04), transparent);
  pointer-events: none;
}
.mp-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.mp-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(229,57,53,0.08);
  color: #E53935;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(229,57,53,0.15);
}
.mp-hero-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: #121212;
  line-height: 1.08;
  margin-bottom: 14px;
}
.mp-hero-title .red { color: #E53935; }
.mp-hero-sub {
  font-size: 1rem;
  color: #6B7280;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 580px;
}

/* SEARCH BAR */
.mp-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  overflow: hidden;
  max-width: 780px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: border-color .2s, box-shadow .2s;
}
.mp-search-bar:focus-within {
  border-color: #E53935;
  box-shadow: 0 4px 24px rgba(229,57,53,0.12);
}
.mp-search-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 14px;
  gap: 10px;
}
.mp-search-input-wrap i { color: #aaa; font-size: 0.9rem; }
.mp-search-input-wrap input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: #121212;
  background: transparent;
  width: 100%;
  padding: 14px 0;
  font-family: 'Inter', sans-serif;
}
.mp-search-input-wrap input::placeholder { color: #bbb; }
.mp-search-select-wrap {
  position: relative;
  border-left: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.mp-search-select-wrap select {
  border: none;
  outline: none;
  padding: 14px 32px 14px 14px;
  font-size: 0.85rem;
  color: #121212;
  background: #f9fafb;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  appearance: none;
  min-width: 140px;
}
.mp-search-select-wrap i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: #aaa;
  pointer-events: none;
}
.mp-search-btn {
  background: #E53935;
  color: #fff;
  border: none;
  padding: 14px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background .2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.mp-search-btn:hover { background: #C62828; }

/* HERO STATS */
.mp-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.mp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mp-stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: #121212;
  letter-spacing: -0.5px;
  line-height: 1;
}
.mp-stat-num-suffix {
  font-size: 1.2rem;
  font-weight: 900;
  color: #E53935;
}
.mp-stat-label {
  font-size: 0.75rem;
  color: #6B7280;
  font-weight: 500;
}
.mp-stat-div {
  width: 1px;
  height: 36px;
  background: #E5E7EB;
}

/* ── QUICK FILTERS ── */
.mp-quick-filters {
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 64px;
  z-index: 100;
}
.qf-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.qf-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.qf-scroll::-webkit-scrollbar { display: none; }
.qf-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid #E5E7EB;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.qf-btn:hover { border-color: #E53935; color: #E53935; background: rgba(229,57,53,0.04); }
.qf-btn.active { background: #E53935; border-color: #E53935; color: #fff; }
.qf-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.results-count {
  font-size: 0.82rem;
  color: #6B7280;
  white-space: nowrap;
}
.results-count strong { color: #121212; }
.view-toggle { display: flex; gap: 4px; }
.vt-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #6B7280;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: all .2s;
}
.vt-btn.active, .vt-btn:hover { background: #E53935; border-color: #E53935; color: #fff; }

/* ── MAIN LAYOUT ── */
.mp-main { padding: 32px 0 64px; background: #F8F9FB; }
.mp-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── SIDEBAR ── */
.mp-sidebar {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 118px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E5E7EB transparent;
}
.mp-sidebar::-webkit-scrollbar { width: 4px; }
.mp-sidebar::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 2px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #E5E7EB;
}
.sidebar-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #121212;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sidebar-header h3 i { color: #E53935; }
.clear-filters-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: #E53935;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color .2s;
}
.clear-filters-btn:hover { color: #C62828; }

.sf-block {
  border-bottom: 1px solid #f0f0f0;
}
.sf-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #121212;
  user-select: none;
  transition: color .2s;
}
.sf-title:hover { color: #E53935; }
.sf-arrow { font-size: 0.65rem; color: #aaa; transition: transform .25s; }
.sf-title.open .sf-arrow { transform: rotate(180deg); }
.sf-body {
  padding: 8px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sf-body.collapsed { display: none; }

.sf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #374151;
  cursor: pointer;
  transition: color .15s;
}
.sf-check:hover { color: #E53935; }
.sf-check input[type="checkbox"],
.sf-check input[type="radio"] {
  accent-color: #E53935;
  width: 14px; height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}
.sf-check span { flex: 1; }
.sf-check em {
  font-style: normal;
  font-size: 0.72rem;
  color: #aaa;
  background: #f4f4f4;
  padding: 1px 6px;
  border-radius: 8px;
}
.sf-rating .stars-display { color: #f59e0b; font-size: 0.72rem; }

/* PRICE RANGE */
.price-range-wrap { width: 100%; }
.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.price-input-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.price-input-group label { font-size: 0.68rem; color: #aaa; font-weight: 600; }
.price-input-group input {
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: #121212;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s;
  width: 100%;
}
.price-input-group input:focus { border-color: #E53935; }
.price-sep { color: #aaa; font-size: 0.8rem; flex-shrink: 0; }
.range-slider {
  width: 100%;
  accent-color: #E53935;
  margin-bottom: 10px;
}
.price-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.price-preset {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #6B7280;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
}
.price-preset:hover, .price-preset.active {
  background: #E53935;
  border-color: #E53935;
  color: #fff;
}

.apply-filters-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: calc(100% - 36px);
  margin: 16px 18px;
  padding: 11px;
  background: #E53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .2s;
}
.apply-filters-btn:hover { background: #C62828; }

.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: calc(100% - 36px);
  margin: 0 18px 16px;
  padding: 11px;
  background: #f4f4f4;
  color: #121212;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* ── SORT BAR ── */
.mp-sortbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.sortbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #121212;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
}
.mobile-filter-btn:hover { border-color: #E53935; color: #E53935; }
.sort-label { font-size: 0.85rem; color: #6B7280; }
.sort-select {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #121212;
  background: #fff;
  outline: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .2s;
}
.sort-select:focus { border-color: #E53935; }
.sort-count { font-size: 0.82rem; color: #6B7280; }

/* ── BOT CARDS GRID ── */
.bots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.bots-grid.list-view {
  grid-template-columns: 1fr;
}

/* ── BOT CARD ── */
.bot-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  overflow: hidden;
  transition: all .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: relative;
}
.bot-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-3px);
  border-color: rgba(229,57,53,0.2);
}

/* Card badges */
.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.cb {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.cb-trending { background: #E53935; color: #fff; }
.cb-bestseller { background: #f59e0b; color: #fff; }
.cb-featured { background: #8b5cf6; color: #fff; }
.cb-new { background: #10B981; color: #fff; }
.cb-verified { background: rgba(255,255,255,0.9); color: #10B981; border: 1px solid #10B981; }

/* Bot image */
.bc-img {
  position: relative;
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bc-img-inner {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bc-wishlist {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all .2s;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.bc-wishlist:hover, .bc-wishlist.active { background: #E53935; }
.bc-title-overlay {
  position: absolute;
  bottom: 12px; left: 12px;
  z-index: 2;
}
.bc-bot-name-img {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  letter-spacing: 0.3px;
  line-height: 1.1;
}
.bc-bot-name-img span { display: block; }

/* Bot body */
.bc-body { padding: 14px; }
.bc-type {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 7px;
  letter-spacing: 0.5px;
}
.type-forex { background: rgba(45,108,223,0.1); color: #2d6cdf; }
.type-crypto { background: rgba(229,57,53,0.1); color: #E53935; }
.type-ai { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.type-scalping { background: rgba(16,185,129,0.1); color: #10B981; }

.bc-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #121212;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-seller {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}
.bc-seller-name { font-size: 0.78rem; color: #6B7280; }
.bc-verified-icon { color: #E53935; font-size: 0.68rem; }
.bc-rating { font-size: 0.78rem; color: #f59e0b; font-weight: 600; margin-left: auto; }
.bc-rating-count { font-size: 0.72rem; color: #aaa; }

.bc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 12px;
}
.bc-stat-item {}
.bc-stat-lbl { font-size: 0.62rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }
.bc-stat-val { font-size: 0.85rem; font-weight: 700; }
.bc-stat-val.pos { color: #10B981; }
.bc-stat-val.neg { color: #E53935; }

.bc-downloads { font-size: 0.72rem; color: #aaa; display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.bc-downloads i { font-size: 0.68rem; }

.bc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bc-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: #121212;
}
.bc-price.free { color: #10B981; }
.bc-actions { display: flex; gap: 6px; }
.bc-btn-view {
  padding: 7px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #121212;
  background: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.bc-btn-view:hover { border-color: #E53935; color: #E53935; }
.bc-btn-cart {
  padding: 7px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: #E53935;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bc-btn-cart:hover { background: #C62828; }

/* LIST VIEW card */
.bots-grid.list-view .bot-card {
  display: grid;
  grid-template-columns: 200px 1fr;
}
.bots-grid.list-view .bc-img { height: 100%; min-height: 160px; }
.bots-grid.list-view .bc-body { display: flex; flex-direction: column; justify-content: space-between; }
.bots-grid.list-view .bc-stats { grid-template-columns: repeat(4,1fr); }

/* ── SKELETON CARDS ── */
.skeleton-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  overflow: hidden;
}
.sk-img {
  height: 155px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sk-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.w40 { width: 40%; }
.w60 { width: 60%; }
.w80 { width: 80%; }
.w50 { width: 50%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── EMPTY STATE ── */
.mp-empty {
  text-align: center;
  padding: 80px 24px;
  background: #fff;
  border: 2px dashed #E5E7EB;
  border-radius: 16px;
}
.empty-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(229,57,53,0.07);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: #E53935;
}
.mp-empty h3 { font-size: 1.3rem; font-weight: 700; color: #121212; margin-bottom: 10px; }
.mp-empty p { font-size: 0.9rem; color: #6B7280; margin-bottom: 24px; }

/* ── PAGINATION ── */
.mp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.pg-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
}
.pg-btn:hover:not(:disabled) { border-color: #E53935; color: #E53935; }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-nums { display: flex; gap: 4px; }
.pg-num {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.pg-num:hover { border-color: #E53935; color: #E53935; }
.pg-num.active { background: #E53935; border-color: #E53935; color: #fff; }

/* ── HIDDEN UTILITY ── */
.hidden { display: none !important; }

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
}
.sidebar-overlay.show { display: block; }

/* ── BOT CARD GRADIENT THEMES ── */
.bg-nexus    { background: linear-gradient(135deg, #0d1f0d, #082008); }
.bg-alpha    { background: linear-gradient(135deg, #0d0a1a, #10082a); }
.bg-bitcoin  { background: linear-gradient(135deg, #1a0d00, #1f1000); }
.bg-quantum  { background: linear-gradient(135deg, #001020, #001530); }
.bg-scalp    { background: linear-gradient(135deg, #0a1a0a, #0d200d); }
.bg-grid     { background: linear-gradient(135deg, #1a1000, #201500); }
.bg-arb      { background: linear-gradient(135deg, #001a1a, #001f1f); }
.bg-trend    { background: linear-gradient(135deg, #0a001a, #100020); }

/* ── RESPONSIVE ── */
@media(max-width:1100px) {
  .mp-layout { grid-template-columns: 230px 1fr; }
  .bots-grid { grid-template-columns: repeat(2,1fr); }
}

@media(max-width:900px) {
  .mp-layout { grid-template-columns: 1fr; }
  .mp-hero-title { font-size: 2.2rem; }
  .mp-search-bar { flex-wrap: wrap; }
  .mp-search-select-wrap select { min-width: 120px; }
  .mobile-filter-btn { display: flex; }
  .bots-grid { grid-template-columns: repeat(2,1fr); }

  .mp-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 500;
    border-radius: 0;
    transition: left .3s;
    max-height: 100vh;
    overflow-y: auto;
  }
  .mp-sidebar.open { left: 0; }
  .sidebar-close-btn { display: flex; }
}

@media(max-width:600px) {
  .mp-hero { padding: 90px 0 40px; }
  .mp-hero-title { font-size: 1.8rem; }
  .mp-search-bar { border-radius: 8px; }
  .mp-search-input-wrap input { padding: 11px 0; }
  .bots-grid { grid-template-columns: 1fr; }
  .bots-grid.list-view .bot-card { grid-template-columns: 1fr; }
  .bots-grid.list-view .bc-img { height: 160px; }
  .mp-hero-stats { gap: 14px; }
  .qf-right { display: none; }
}