﻿/* shared ZBJ-style market cards */
.zbj-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: visible;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.zbj-card:hover {
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    z-index: 40;
}
.zbj-card-cover {
    position: relative;
    width: 100%;
    padding-top: 62.4%; /* 420x262 */
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}
.zbj-card-cover-link {
    position: absolute;
    inset: 0;
    display: block;
}
.zbj-card-track {
    position: absolute;
    inset: 0;
}
.zbj-card-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .28s ease;
    z-index: 0;
}
.zbj-card-slide.is-active {
    opacity: 1;
    z-index: 1;
}
.zbj-card-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.zbj-card-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 4;
    min-width: 36px;
    padding: 2px 6px 4px;
    background: linear-gradient(135deg, #ff8a3d, #ff4e00);
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    border-bottom-left-radius: 4px;
}
.zbj-card-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 22px;
    height: 28px;
    margin-top: -14px;
    border: 0;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, .28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease, background .2s ease, transform .2s ease;
    cursor: pointer;
    outline: none;
}
.zbj-card:hover .zbj-card-arrow {
    opacity: 1;
    visibility: visible;
}
.zbj-card-arrow:hover {
    background: rgba(0, 0, 0, .48);
}
.zbj-card-arrow-prev {
    left: 0;
    border-radius: 0 14px 14px 0;
}
.zbj-card-arrow-next {
    right: 0;
    border-radius: 14px 0 0 14px;
}
.zbj-card-arrow i {
    font-size: 16px;
    line-height: 28px;
    font-weight: 700;
}
.zbj-card-arrow:active {
    transform: scale(.96);
}
.zbj-card-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.zbj-card:hover .zbj-card-dots {
    opacity: 1;
    pointer-events: auto;
}
.zbj-card-dots li {
    width: 6px !important;
    height: 6px;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 2px rgba(0, 0, 0, .25);
    cursor: pointer;
    float: none;
    transition: background .15s ease, transform .15s ease;
    /* 扩大可悬停热区，不必精确对准小点 */
    position: relative;
}
.zbj-card-dots li::before {
    content: '';
    position: absolute;
    inset: -6px;
}
.zbj-card-dots li.is-active {
    background: #fff;
    transform: scale(1.15);
    width: 6px !important;
    border-radius: 50%;
}
.zbj-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    background: #fff;
    border-radius: 0 0 8px 8px;
}
.zbj-card-default {
    display: block;
    flex: 1 1 auto;
}
/* 鎮仠灞傜粷瀵瑰畾浣嶅彔鍦ㄥ師鍐呭涓婏紝涓嶆敼鍙樻枃妗ｆ祦楂樺害锛岄伩鍏嶆拺鐮存爡鏍?*/
.zbj-card-hover {
    display: none;
    position: absolute;
    left: -1px;
    right: -1px;
    top: 0;
    z-index: 5;
    box-sizing: border-box;
    min-height: 100%;
    padding: 10px 12px 56px;
    background: #fff;
    border: 1px solid #eee;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}
.zbj-card:hover .zbj-card-default {
    visibility: hidden;
}
.zbj-card:hover .zbj-card-hover {
    display: block;
}
.zbj-card-btns {
    position: relative;
    z-index: 6;
    display: flex;
    gap: 8px;
    margin-top: auto;
    background: #fff;
}
.zbj-card-rank {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    height: 20px;
    padding: 0 8px 0 0;
    /* bar asset already has gold left + curved join into dark */
    background-color: rgba(32, 38, 52, .82);
    background-image: url('../images/market/rank-bar-bg.png');
    background-position: left center;
    background-repeat: no-repeat;
    background-size: auto 100%;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}
.zbj-card-rank-badge {
    flex: 0 0 auto;
    display: inline-block;
    width: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    letter-spacing: 0;
}
.zbj-card-rank-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    margin: 0;
    padding: 0 0 0 4px;
    background: none;
    box-sizing: border-box;
}
.zbj-card-rank-main span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
}
.zbj-card-rank-arrow {
    flex: 0 0 auto;
    display: block;
    width: 5px;
    height: 9px;
}
.zbj-hover-review {
    margin-bottom: 8px;
    color: #666;
    font-size: 12px;
    line-height: 18px;
    max-height: 54px;
    overflow: hidden;
}
.zbj-hover-label {
    color: #333;
    font-weight: 600;
}
.zbj-hover-quote {
    color: #666;
}
.zbj-hover-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.zbj-hover-attrs span {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 2px;
    background: #eef5ff;
    color: #3b7ddd;
    font-size: 12px;
    line-height: 18px;
}
.zbj-hover-loc {
    margin-bottom: 10px;
    color: #999;
    font-size: 12px;
    line-height: 1.4;
}
.zbj-card-price {
    color: #ff4e00;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 6px;
}
.zbj-card-price em {
    font-style: normal;
    font-size: 14px;
    margin-right: 1px;
}
.zbj-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none !important;
}
.zbj-card-title:hover {
    color: #ff4e00;
}
.zbj-card-meta {
    margin-bottom: 8px;
    color: #999;
    font-size: 12px;
    line-height: 1.4;
}
.zbj-card-meta span {
    margin-left: 10px;
}
.zbj-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 22px;
    margin-bottom: 10px;
}
.zbj-tag {
    display: inline-block;
    padding: 0 5px;
    border: 1px solid #c8ebd4;
    border-radius: 2px;
    color: #2db55d;
    background: #edf9f1;
    font-size: 12px;
    line-height: 18px;
}
.zbj-tag-green {
    color: #fff;
    background: #2db55d;
    border-color: #2db55d;
}
.zbj-tag-gray {
    color: #888;
    background: #f7f7f7;
    border-color: #e8e8e8;
}
.zbj-card-shop {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-bottom: 12px;
    color: #666;
    text-decoration: none !important;
}
.zbj-card-shop:hover {
    color: #ff4e00;
}
.zbj-card-shop img {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.zbj-card-shop em {
    font-style: normal;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.zbj-card-v {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    flex-shrink: 0;
}
.zbj-btn {
    flex: 1;
    height: 32px;
    border-radius: 16px;
    color: #fff !important;
    font-size: 13px;
    line-height: 32px;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s ease, transform .15s ease;
}
.zbj-btn i {
    margin-right: 3px;
}
.zbj-btn-consult {
    background: #ff7a1a;
}
.zbj-btn-consult:hover {
    background: #ff4e00;
}
.zbj-btn-wechat {
    background: #1aad19;
}
.zbj-btn-wechat:hover {
    background: #129611;
}
.zbj-card:hover .zbj-btn-consult {
    box-shadow: 0 2px 8px rgba(255, 122, 26, .35);
}
.zbj-card:hover .zbj-btn-wechat {
    box-shadow: 0 2px 8px rgba(26, 173, 25, .3);
}

@media (max-width: 767px) {
    .zbj-card-price {
        font-size: 18px;
    }
    .zbj-card-title {
        min-height: 36px;
        font-size: 13px;
    }
    .zbj-btn {
        height: 28px;
        line-height: 28px;
        font-size: 12px;
        border-radius: 14px;
    }
    .zbj-card-arrow {
        opacity: 1;
        visibility: visible;
    }
    .zbj-card-dots {
        opacity: 1;
        pointer-events: auto;
    }
}


