/* css/components/marketplace.css */
.mk-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  background: var(--bg);
  box-sizing: border-box;
}

.mk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.mk-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  overflow-y: auto;
  padding-bottom: 24px;
}

.mk-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mk-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.mk-media {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}

.mk-media img, .mk-media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.mk-media .mk-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.mk-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mk-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.mk-desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.5;
  flex: 1;
}

.mk-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mk-meta-item span {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-top: 2px;
}

.mk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mk-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.mk-actions {
  display: flex;
  gap: 8px;
}

.mk-actions button {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* ── File upload (compact) ── */
.mk-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mk-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.mk-file-btn:hover,
.mk-file-btn--drag {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.07);
}

.mk-thumb-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.mk-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mk-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}

.mk-thumb-remove:hover {
  background: rgba(220, 50, 50, 0.85);
}

.mk-url-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 11px;
  color: var(--text3);
}

.mk-url-divider div {
  flex: 1;
  height: 1px;
  background: var(--border);
}

