/* ============ 交易中心 ============ */
.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; overflow: hidden; }
.mine-title { font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mine-sub { font-size: 12px; color: #999; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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; }
.mine-item .action-btn.delete { flex: 0 0 auto; margin-left: 6px; }

/* 订单 */
.order-card {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px;
}
.order-info { flex: 1; min-width: 0; }
.order-title { font-size: 15px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.order-sub { font-size: 12px; color: #999; margin-top: 4px; }
.order-status-row { margin-top: 6px; }
.order-status { display: inline-block; font-size: 12px; padding: 2px 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-btn {
    flex: 0 0 auto; padding: 6px 14px; border: none; border-radius: 16px;
    background: #07C160; color: #fff; font-size: 13px; cursor: pointer;
}
.order-ship-img { margin-top: 6px; }
.order-ship-img img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; cursor: pointer; }

/* 发货弹窗 */
#shipModal .modal-card { max-width: 340px; }
#shipModal .modal-body { padding: 18px; max-height: 78vh; overflow-y: auto; }
#shipImagePreview { display: flex; justify-content: center; margin: 10px 0; min-height: 80px; }
#shipImagePreview img { max-width: 140px; max-height: 140px; border-radius: 10px; object-fit: cover; }
.ship-image-section { margin-bottom: 16px; }
.ship-section-label,
.ship-desc-label {
    font-size: 13px; font-weight: 500; color: #333; margin-bottom: 8px;
}
.ship-upload-btn {
    width: 100%; height: 40px; border-radius: 10px; font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ship-desc-box { margin-top: 16px; }
.ship-desc-input {
    width: 100%; box-sizing: border-box; min-height: 80px; padding: 12px 14px;
    border: 1px solid #e3e3e3; border-radius: 10px; font-size: 14px; color: #333;
    background: #fff; outline: none; resize: vertical; line-height: 1.5;
    font-family: inherit;
}
.ship-desc-input:focus { border-color: var(--primary, #07C160); box-shadow: 0 0 0 3px var(--primary, #07C160)22; }
.ship-confirm-btn {
    width: 100%; height: 44px; border-radius: 10px; font-size: 15px; font-weight: 500;
}

/* 商品详情 */
.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;
}

/* 订单详情 */
.order-detail-section { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.order-detail-section:last-child { border-bottom: none; }
.order-detail-label { font-size: 12px; color: #999; margin-bottom: 4px; }
.order-detail-value { font-size: 15px; color: #333; word-break: break-all; }
.order-detail-ship-img { width: 100%; max-width: 240px; max-height: 240px; border-radius: 10px; object-fit: cover; margin-top: 6px; cursor: pointer; }
