/* ========================================
   Marktplatz-spezifische Styles
   ======================================== */

/* Tabs */
.mp-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mp-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--t-fast);
}
.mp-tab:hover { color: var(--text); }
.mp-tab.active { color: var(--primary-light); border-bottom-color: var(--primary); }
.mp-tab-content { display: none; }
.mp-tab-content.active { display: block; }

/* Filter Pills */
.mp-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.mp-filter {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-size: .88rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.mp-filter:hover { border-color: var(--primary); color: var(--text); }
.mp-filter.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}

/* Marketplace Grid */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.mp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all var(--t);
}
.mp-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.mp-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.mp-card-desc {
  color: var(--text-dim);
  font-size: .88rem;
  margin-bottom: 12px;
  flex: 1;
}
.mp-card-fields {
  font-size: .78rem;
  color: var(--text-faint);
  background: var(--bg-elevated);
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.mp-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.mp-pill {
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: 100px;
  font-size: .78rem;
  color: var(--text-dim);
}
.mp-pill.price { color: var(--success); font-weight: 700; }
.mp-card-buy {
  width: 100%;
  padding: 12px;
  background: var(--grad-success);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.mp-card-buy:hover { transform: translateY(-1px); }

.mp-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
  overflow-y: auto;
}
.modal.open { display: flex; }
.modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}
.modal-close:hover { background: var(--border); }

/* Purchase Cards */
.purchase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.purchase-info { flex: 1; min-width: 200px; }
.purchase-title { font-weight: 700; margin-bottom: 4px; }
.purchase-meta { color: var(--text-dim); font-size: .85rem; }

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--grad-primary);
  border-radius: 50%;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Star Picker */
#star-picker span { transition: color var(--t-fast); }
#star-picker span:hover { color: var(--gold); }

/* Reviews */
.review-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: .9rem;
}
.review-stars { color: var(--gold); font-size: 1rem; }
.review-text { color: var(--text); font-size: .92rem; line-height: 1.5; }

@media (max-width: 600px) {
  .mp-grid { grid-template-columns: 1fr; }
}
