/* ============ 交易中心 ============ */
.marketplace-fullscreen {
    display: flex;
    flex-direction: column;
    max-width: 520px;
    margin: 0 auto;
    background: #f5f6f8;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.marketplace-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #fff;
}
.marketplace-tabs .m-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    position: relative;
}
.marketplace-tabs .m-tab.active {
    color: #07C160;
    font-weight: 600;
}
.marketplace-tabs .m-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 3px;
    background: #07C160; border-radius: 3px;
}
.marketplace-search {
    display: flex; align-items: center; gap: 8px;
    margin: 10px; padding: 8px 12px;
    background: #fff; border-radius: 20px;
}
.marketplace-search i { color: #bbb; }
.marketplace-search input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; }
.marketplace-cats {
    display: flex; gap: 8px; padding: 0 10px 10px;
    overflow-x: auto; white-space: nowrap;
}
.cat-chip {
    display: inline-block; padding: 5px 14px;
    background: #fff; border-radius: 16px;
    font-size: 13px; color: #555; cursor: pointer;
    border: 1px solid #eee; flex: 0 0 auto;
}
.cat-chip.active { background: #07C160; color: #fff; border-color: #07C160; }
.marketplace-scroll { flex: 1; overflow-y: auto; padding: 0 10px 20px; }

.marketplace-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.market-no-more { text-align: center; color: #bbb; font-size: 12px; padding: 16px 0; }

.product-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.product-cover {
    position: relative; width: 100%; padding-top: 100%;
    background: #f0f0f0;
}
.product-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-top {
    position: absolute; top: 6px; left: 6px;
    background: #ff9500; color: #fff; font-size: 11px;
    padding: 1px 6px; border-radius: 4px;
}
.product-soldout {
    position: absolute; top: 6px; right: 6px;
    background: rgba(0,0,0,0.5); color: #fff; font-size: 11px;
    padding: 1px 6px; border-radius: 4px;
}
.product-info { padding: 8px 10px; }
.product-title {
    font-size: 14px; color: #333; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.product-price { color: #fa5151; font-weight: 700; font-size: 15px; }
.product-stock { color: #999; font-size: 12px; }
.product-seller { color: #999; font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 我的发布 */
.mine-item {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 10px;
}
.mine-cover { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.mine-info { flex: 1; min-width: 0; }
.mine-title { font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-sub { font-size: 12px; color: #999; margin-top: 3px; }
.mine-status { font-size: 12px; margin-top: 4px; }
.mine-status.status-0 { color: #f5a623; }
.mine-status.status-1 { color: #07C160; }
.mine-status.status-2 { color: #e74c3c; }
.mine-status.status-3 { color: #999; }

/* 订单 */
.order-card {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 10px;
}
.order-cover { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.order-info { flex: 1; min-width: 0; }
.order-title { font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-sub { font-size: 12px; color: #999; margin-top: 3px; }
.order-status { display: inline-block; margin-top: 4px; font-size: 12px; padding: 1px 8px; border-radius: 4px; }
.order-status.shipping { background: #fff3e0; color: #e67e22; }
.order-status.done { background: #e8f8ee; color: #07C160; }
.order-status.cancelled { background: #f5f5f5; color: #999; }
.order-ship-img { margin-top: 6px; }
.order-ship-img img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; cursor: pointer; }

/* 商品详情 */
.pd-main { width: 100%; }
.pd-main img { width: 100%; border-radius: 10px; }
.pd-thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pd-thumbs img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; cursor: pointer; border: 2px solid transparent; }
.pd-title { font-size: 17px; font-weight: 600; color: #222; margin-top: 12px; }
.pd-price { color: #fa5151; font-size: 22px; font-weight: 700; margin: 6px 0; }
.pd-row { display: flex; justify-content: space-between; font-size: 14px; color: #333; padding: 6px 0; border-bottom: 1px solid #f5f5f5; }
.pd-row span { color: #999; }
.pd-content { font-size: 14px; color: #444; line-height: 1.6; margin: 10px 0; white-space: pre-wrap; word-break: break-all; }
.pd-status { font-size: 13px; color: #999; margin: 8px 0; }
.pd-actions { margin-top: 8px; display: flex; gap: 10px; }
.pd-actions .btn-primary, .pd-actions .btn-secondary { flex: 1; }

/* 发布图片预览 */
.product-images-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pub-img { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; }
.pub-img img { width: 100%; height: 100%; object-fit: cover; }
.pub-img-del {
    position: absolute; top: 0; right: 0;
    width: 18px; height: 18px; line-height: 18px; text-align: center;
    background: rgba(0,0,0,0.6); color: #fff; font-size: 14px; cursor: pointer;
}
