/* =========================================================
   集市精选（首页 feed 流）样式
   ========================================================= */

.mj-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#feed-main {
    width: 860px;
}

.mj-market {
    background: #fff;
    border-radius: 8px;
    overflow: visible;
}

/* 面包屑 */
.mj-crumb {
    padding: 14px 18px 10px;
    font-size: 13px;
    color: #999;
    line-height: 20px;
}
.mj-crumb a {
    color: #666;
}
.mj-crumb a:hover {
    color: #e62828;
}
.mj-crumb-sep {
    margin: 0 6px;
    color: #ccc;
}
.mj-crumb-cur {
    color: #333;
}

/* 吸顶筛选栏 */
.mj-topbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 60;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 8px 8px 0 0;
}
.mj-bar-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 0;
}
.mj-search {
    flex: 1;
    display: flex;
    align-items: stretch;
    height: 40px;
    border: 2px solid #e62828;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.mj-search input[type="search"] {
    flex: 1;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 0;
    outline: 0;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}
.mj-search input[type="search"]::placeholder {
    color: #aaa;
}
.mj-search button {
    width: 92px;
    height: 36px;
    border: 0;
    background: #e62828;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.mj-search button:hover {
    background: #d01f1f;
}
.mj-filter-toggle {
    display: none;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e62828;
    border-radius: 4px;
    background: #fff;
    color: #e62828;
    font-size: 13px;
    cursor: pointer;
}

/* 排序 */
.mj-sort {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 18px 8px;
    font-size: 13px;
    flex-wrap: wrap;
}
.mj-sort a {
    color: #555;
    line-height: 22px;
}
.mj-sort a:hover {
    color: #e62828;
}
.mj-sort a.is-active {
    color: #e62828;
    font-weight: 700;
}

/* 筛选 */
.mj-filters {
    padding: 0 18px 10px;
    font-size: 13px;
}
.mj-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}
.mj-filter-name {
    flex: 0 0 52px;
    width: 52px;
    color: #999;
}
.mj-filter-row a {
    padding: 2px 10px;
    color: #444;
    border-radius: 12px;
    line-height: 20px;
}
.mj-filter-row a:hover {
    color: #e62828;
}
.mj-filter-row a.is-active {
    color: #e62828;
    background: #fff1f0;
    font-weight: 700;
}

/* 板块 */
.mj-section-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    overflow-x: auto;
    white-space: nowrap;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    -webkit-overflow-scrolling: touch;
}
.mj-section-nav::-webkit-scrollbar {
    height: 0;
}
.mj-section-item {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #555;
    font-size: 14px;
    line-height: 20px;
}
.mj-section-item:hover {
    color: #e62828;
}
.mj-section-item.is-active {
    background: #e62828;
    color: #fff;
    font-weight: 700;
}

/* 结果统计 */
.mj-result-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 18px;
    background: #fafafa;
    color: #999;
    font-size: 12px;
}
.mj-result-meta b {
    color: #e62828;
    font-size: 14px;
}
.mj-fuzzy-tip {
    color: #c77c02;
}

/* 商品卡片 */
.mj-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mj-card {
    display: flex;
    position: relative;
    padding: 18px;
    border-bottom: 1px solid #f4f4f4;
    box-sizing: border-box;
    transition: background .2s ease;
}
.mj-card:hover {
    background: #fffafa;
}
.mj-thumb {
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    display: block;
    background: #f7f7f7;
    border-radius: 6px;
    overflow: hidden;
}
.mj-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .3s ease;
}
.mj-card:hover .mj-thumb img {
    transform: scale(1.03);
}
.mj-body {
    flex: 1;
    min-width: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
}

/* 徽章 */
.mj-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
    margin-bottom: 6px;
}
.mj-badge {
    display: inline-block;
    padding: 0 6px;
    height: 19px;
    line-height: 19px;
    border-radius: 3px;
    font-size: 12px;
    color: #e62828;
    background: #fff0ee;
    white-space: nowrap;
}
.mj-badge-subsidy {
    color: #fff;
    background: linear-gradient(90deg, #ff5f3a, #e62828);
}
.mj-badge-expiry {
    color: #a55800;
    background: #fff3e0;
}
.mj-badge-n99 {
    color: #fff;
    background: #ff4d4f;
}
.mj-badge-hot {
    color: #fff;
    background: #e62828;
}
.mj-badge-niche {
    color: #7a4dd8;
    background: #f2ecff;
}
.mj-badge-new {
    color: #0a8f4c;
    background: #e8f8ef;
}
.mj-badge-value {
    color: #9a6b00;
    background: #fff7dd;
}
.mj-badge-sold {
    color: #666;
    background: #f5f5f5;
}
.mj-badge-risk {
    color: #b35900;
    background: #fff3e0;
    border: 1px solid #ffd9a8;
    cursor: help;
}
/* 商品来源平台标识（依据真实购买链接域名，不伪造） */
.mj-plat {
    display: inline-block;
    padding: 0 6px;
    height: 19px;
    line-height: 19px;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
}
.mj-plat-taobao { background: #ff5000; }
.mj-plat-tmall  { background: #ff0036; }
.mj-plat-jd     { background: #e1251b; }
.mj-plat-pdd    { background: #e02e24; }
.mj-plat-other  { color: #666; background: #f2f2f2; }

/* 标题 */
.mj-card-title {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mj-card-title a {
    color: #333;
}
.mj-card-title a:hover {
    color: #e62828;
}

/* 店铺 */
.mj-shop {
    color: #999;
    font-size: 12px;
    line-height: 18px;
    margin-bottom: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 买手短评 */
.mj-review {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 18px;
    color: #6a4a1f;
    background: #fffaf0;
    border: 1px solid #f6e2b8;
    border-radius: 4px;
    padding: 5px 8px;
    margin-bottom: 8px;
}
.mj-review-tag {
    flex: none;
    color: #c8710a;
    font-weight: 600;
}
.mj-review-text {
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 首页专题合集条 */
.mj-topics {
    display: flex; align-items: center; gap: 12px;
    margin: 10px 0 4px;
}
.mj-topics-label { font-size: 14px; font-weight: 600; color: #333; flex: none; }
.mj-topics-scroll { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 2px; }
.mj-topics-scroll::-webkit-scrollbar { height: 4px; }
.mj-topics-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.mj-topic-chip {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 14px;
    background: #fff3f3; border: 1px solid #ffd0d0; color: #e62828;
    font-size: 13px; text-decoration: none; white-space: nowrap;
}
.mj-topic-chip:hover { background: #ffe0e0; }
.mj-topic-chip-count { color: #999; font-size: 11px; }

/* 价格 */
.mj-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.mj-final {
    color: #e62828;
    font-size: 28px;
    line-height: 30px;
    font-weight: 700;
    font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.mj-final .mj-yen {
    font-size: 15px;
    font-weight: 700;
    margin-right: 1px;
}
.mj-price-label {
    display: inline-block;
    padding: 0 4px;
    height: 18px;
    line-height: 18px;
    border-radius: 3px;
    color: #e62828;
    background: #fff0ee;
    font-size: 12px;
}
.mj-origin {
    color: #aaa;
    font-size: 13px;
}
.mj-save {
    display: inline-block;
    padding: 0 6px;
    height: 20px;
    line-height: 20px;
    border-radius: 3px;
    background: #fff7dd;
    color: #b26a00;
    font-size: 12px;
}

/* 底部信息 */
.mj-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
    line-height: 30px;
}
.mj-proof b {
    color: #e62828;
    font-weight: 700;
}
.mj-date {
    color: #bbb;
}
.mj-buy {
    margin-left: auto;
    width: 84px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 15px;
    background: #e62828;
    color: #fff;
    font-size: 13px;
}
.mj-buy:hover {
    background: #d01f1f;
    color: #fff;
}

/* 加载更多 */
.mj-more {
    display: block;
    width: 320px;
    max-width: calc(100% - 36px);
    height: 42px;
    line-height: 42px;
    margin: 18px auto 24px;
    text-align: center;
    border-radius: 21px;
    background: #fcecec;
    color: #e62828;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.mj-more:hover {
    background: #f9dede;
    color: #e62828;
}
.mj-more.is-loading {
    opacity: .6;
    cursor: default;
}
.mj-end {
    padding: 18px 0 26px;
    text-align: center;
    color: #bbb;
    font-size: 12px;
}

/* 空状态 */
.mj-empty {
    padding: 70px 20px;
    text-align: center;
    color: #666;
}
.mj-empty p {
    margin: 0 0 8px;
}
.mj-empty-tip {
    color: #999;
    font-size: 13px;
}
.mj-empty-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 0 22px;
    height: 36px;
    line-height: 36px;
    border-radius: 18px;
    background: #e62828;
    color: #fff;
    font-size: 13px;
}
.mj-empty-btn:hover {
    color: #fff;
    background: #d01f1f;
}

/* =========================================================
   移动端适配
   ========================================================= */
@media (max-width: 900px) {
    .w1200 {
        width: auto !important;
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    /* 首页轮播 / 排行榜在窄屏隐藏，聚焦集市列表 */
    .full_big_eye,
    .ranking-list {
        display: none !important;
    }
    #feed-wrap {
        margin-top: 10px;
        margin-bottom: 16px;
    }
    #feed-main {
        float: none;
        width: 100%;
    }
    #feed-side {
        display: none;
    }

    /* 头部与导航 */
    .header_conter {
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }
    .search_key {
        display: none;
    }
    .full_nav {
        overflow-x: auto;
    }
    .full_nav .nav {
        width: max-content;
        white-space: nowrap;
    }
    .full_nav .nav > li {
        float: none !important;
        display: inline-block !important;
        margin-left: 0 !important;
        padding: 0 10px;
    }

    /* 集市 */
    .mj-crumb {
        padding: 10px 12px 6px;
    }
    .mj-topbar {
        top: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    }
    .mj-bar-top {
        padding: 10px 12px 0;
    }
    .mj-search {
        height: 38px;
    }
    .mj-search input[type="search"] {
        height: 34px;
        font-size: 13px;
    }
    .mj-search button {
        width: 72px;
        height: 34px;
        font-size: 13px;
    }
    .mj-filter-toggle {
        display: inline-block;
        height: 38px;
        padding: 0 10px;
    }
    .mj-sort {
        padding: 8px 12px 6px;
        gap: 14px;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    .mj-sort::-webkit-scrollbar {
        height: 0;
    }
    .mj-filters {
        display: none;
        padding: 0 12px 8px;
        max-height: 40vh;
        overflow-y: auto;
    }
    .mj-market.mj-filters-open .mj-filters {
        display: block;
    }
    .mj-filter-row {
        gap: 8px;
    }
    .mj-filter-name {
        flex: 0 0 46px;
        width: 46px;
    }
    .mj-filter-row-origin {
        display: none;
    }

    .mj-section-nav {
        padding: 8px 12px;
    }
    .mj-section-item {
        font-size: 13px;
        padding: 5px 12px;
    }
    .mj-result-meta {
        padding: 8px 12px;
    }

    .mj-card {
        padding: 12px;
    }
    .mj-thumb {
        flex: 0 0 110px;
        width: 110px;
        height: 110px;
    }
    .mj-body {
        padding-left: 10px;
    }
    .mj-card-title {
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 4px;
    }
    .mj-shop {
        margin-bottom: 6px;
    }
    .mj-final {
        font-size: 22px;
        line-height: 24px;
    }
    .mj-final .mj-yen {
        font-size: 13px;
    }
    .mj-price {
        gap: 6px;
        margin-bottom: 6px;
    }
    .mj-card-foot {
        flex-wrap: wrap;
        gap: 4px 10px;
        line-height: 24px;
    }
    .mj-date {
        order: 3;
        width: 100%;
        font-size: 11px;
    }
    .mj-buy {
        width: 72px;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
    }
    .mj-more {
        margin: 14px auto 20px;
        height: 40px;
        line-height: 40px;
    }
}

@media (max-width: 360px) {
    .mj-thumb {
        flex: 0 0 96px;
        width: 96px;
        height: 96px;
    }
}
