/* Market Section - StarV1 Style for StarPolicy */
/* 主色调: #0052d9 */

.zd-2-section {
    padding: 60px 0;
    background: #fff;
}

.zd-2-section-breach {
    display: none;
}

.zd-2-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 5;
}

.zd-2-section-hd {
    text-align: center;
    margin-bottom: 30px;
}

.zd-2-section-title {
    font-size: 28px;
    color: #1a1a1a;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.zd-2-section-title i {
    color: #0052d9;
    font-style: normal;
}

.zd-2-section-title.mobile {
    display: none;
}

.zd-2-section-desc {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Tabs Bar */
.zd-tabs {
    position: relative;
}

.zd-tabs-bar {
    text-align: center;
    font-size: 0;
}

.zd-tabs-list {
    border-bottom: #e5e5e5 1px solid;
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.zd-tabs-item {
    display: inline-block;
    text-align: center;
    position: relative;
    cursor: pointer;
    margin: 0 40px;
    padding-bottom: 12px;
}

.zd-tabs-item-con {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 16px;
    line-height: 28px;
    color: #333;
}

.zd-tabs-item-con-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.zd-tabs-item-con-desc {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

.zd-tabs-active .zd-tabs-item-con-title,
.zd-tabs-item:hover .zd-tabs-item-con-title {
    color: #0052d9;
}

.zd-tabs-active .zd-tabs-item-con-desc {
    color: #0052d9;
}

/* Tab底部线条动画 */
.zd-tabs-active .zd-tabs-item-con:after {
    display: inline-block;
    content: "";
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0052d9;
    z-index: 1;
}

.tabs-animation {
    display: none;
}


/* Tabs Content */
.zd-tabs-content {
    padding: 20px;
    background: #f9f9f9;
    position: relative;
    box-shadow: inset 8px 8px 20px 0 rgba(55,99,170,.11), inset -8px -8px 20px 0 #fff;
    overflow: hidden;
}

#section-tc .zd-tabs-content {
    background: #f9f9f9;
    position: relative;
    box-shadow: inset 8px 8px 20px 0 rgba(55,99,170,.11), inset -8px -8px 20px 0 #fff;
    min-height: auto;
}

#section-tc .zd-2-section-inner {
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 15px;
}

/* Market Panel */
.zd-market-panel {
    padding-left: 0 !important;
    position: relative;
    min-height: auto;
    display: none;
}

/* 无侧边栏全宽布局 */
.zd-market-panel-full {
    width: 100%;
}

.zd-market-panel[style*="display: block"],
.zd-market-panel:first-child {
    display: block;
}

.zd-market-panel-main {
    box-sizing: border-box;
}

.zd-market-panel-main-cont {
    font-size: 0;
}

.zd-market-panel-main-cont .zd-market-info {
    display: inline-block;
    vertical-align: top;
    font-size: 14px;
    text-align: left;
}

.zd-market-panel-main-cont.list-2 .zd-market-info {
    margin-left: 10px;
    width: calc((100% - 30px) / 4);
    margin-bottom: 10px;
}

.zd-market-panel-main-cont.list-2 .zd-market-info:nth-child(4n+1) {
    margin-left: 0;
}

/* Market Card */
.zd-market-info-panel {
    display: block !important;
    position: relative;
    top: 0;
    box-shadow: 0 2px 4px rgba(3, 27, 78, .06);
    box-sizing: border-box;
    padding: 18px 20px;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s linear;
    text-decoration: none;
}

.zd-market-info-panel:hover {
    box-shadow: 0 4px 12px rgba(3, 27, 78, .15);
    transform: translateY(-2px);
}

.zd-market-info-panel:hover .zd-market-title {
    color: #0052d9;
}

.zd-market-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zd-market-title {
    font-size: 16px;
    color: #000;
    line-height: 24px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    transition: color 0.2s;
}

.zd-market-tags {
    flex-shrink: 0;
}

/* 产品描述 */
.zd-market-desc {
    font-size: 13px;
    color: #999;
    line-height: 20px;
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zd-market-tag {
    display: inline-block;
    background: #f5f7fa;
    border: 1px solid #e5e8ed;
    line-height: 16px;
    text-align: center;
    padding: 0 6px;
    font-size: 10px;
    color: #666;
    border-radius: 2px;
    margin-right: 4px;
}

/* Specs */
.zd-market-tc {
    font-size: 13px;
    color: #666;
    margin: 12px 0 !important;
    border-top: 1px solid #eee !important;
    padding: 12px 0 0 !important;
}

.zd-market-tc p {
    margin: 3px 0 !important;
    line-height: 26px !important;
}

/* Price */
.zd-market-prices-wrap {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zd-market-prices {
}

.zd-market-prices-num {
    color: #0052d9;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
}

.zd-market-original-price {
    color: #b0b0b0;
    font-size: 12px;
    line-height: 22px;
    margin-left: 6px;
}

.zd-market-text {
    font-size: 14px;
    color: #666;
    line-height: 32px;
}

.zd-market-text.ky {
    float: right;
    color: #0052d9;
    font-weight: 500;
}

/* Sidebar */
.zd-market-panel-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 270px;
    height: 417px;
    background-color: #fff;
    background-size: cover;
    background-position: center;
    border: 1px solid #E5E8ED;
    box-shadow: 0 2px 4px rgba(3, 27, 78, .06);
    border-radius: 4px;
    overflow: hidden;
}

.zd-market-panel-sidebar-cont {
    padding: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
    box-sizing: border-box;
}

.zd-market-panel-sidebar-title {
    font-size: 22px;
    line-height: 32px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zd-market-panel-sidebar-text {
    margin-top: 10px;
    font-size: 14px;
    line-height: 24px;
    color: rgba(255,255,255,0.9);
    word-wrap: break-word;
    word-break: break-all;
}


/* Responsive */
@media screen and (min-width: 769px) {
    .zd-tabs-skin-2 .zd-tabs-item-con-desc,
    .zd-tabs-skin-2 .zd-tabs-item-con-title {
        display: block;
        text-align: center;
    }

    .zd-tabs-skin-2 .zd-tabs-item-con-title {
        line-height: 28px;
        font-size: 16px;
    }

    .zd-tabs-skin-2 .zd-tabs-item-con-desc {
        line-height: 24px;
        font-size: 13px;
    }

    .zd-tabs-skin-2 .zd-tabs-item.zd-tabs-active .zd-tabs-item-con-desc {
        color: #0052d9;
    }

    .zd-tabs-skin-2 .zd-tabs-active .zd-tabs-item-con:before {
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 3px;
        background: #0052d9;
        z-index: 2;
    }

    .zd-tabs-skin-2 .zd-tabs-item {
        margin: 0 50px -1px;
        overflow: hidden;
    }
}

@media screen and (max-width: 992px) {
    .zd-market-panel {
        padding-left: 0;
    }
    
    .zd-market-panel-sidebar {
        display: none;
    }
    
    .zd-market-panel-main-cont.list-2 .zd-market-info {
        width: 100%;
        margin-left: 0;
    }
    
    .zd-2-section-title {
        font-size: 22px;
    }
    
    .zd-2-section-title.mobile {
        display: block;
    }
    
    .zd-2-section-title:not(.mobile) {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .zd-tabs-skin-2 .zd-tabs-item-con-desc {
        display: none;
    }

    .zd-tabs-skin-2 .zd-tabs-item {
        margin-left: 0;
        margin-right: 0;
    }

    .zd-market-section .zd-tabs-skin-2 .zd-tabs-list {
        font-size: 0;
        box-sizing: border-box;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0;
        border-bottom: 1px solid #e5e5e5;
    }

    .zd-market-section .zd-tabs-skin-2 .zd-tabs-item {
        width: auto;
        padding-bottom: 0;
        margin: 0;
        flex-shrink: 0;
    }

    .zd-market-section .zd-tabs-skin-2 .zd-tabs-item-con {
        font-size: 15px;
        line-height: 44px;
        padding: 0 20px;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .zd-market-section .zd-tabs-skin-2 .zd-tabs-active .zd-tabs-item-con {
        background: transparent;
        color: #0052d9;
    }

    .zd-market-section .zd-tabs-skin-2 .zd-tabs-active .zd-tabs-item-con:after {
        display: block;
        content: "";
        height: 2px;
        width: 100%;
        position: absolute;
        left: 0;
        bottom: 0;
        background: #0052d9;
    }

    .zd-market-section .zd-tabs-skin-2 .zd-tabs-active .zd-tabs-item-con-title {
        color: #0052d9;
    }
    
    .zd-market-tc p {
        width: 50%;
    }
    
    .zd-2-section {
        padding: 40px 0;
    }
}

@media screen and (max-width: 576px) {
    .zd-market-section .zd-tabs-skin-2 .zd-tabs-item-con {
        padding: 0 14px;
        font-size: 13px;
        line-height: 32px;
    }
    
    .zd-market-title {
        font-size: 16px;
        width: 100%;
    }
    
    .zd-market-tags {
        position: relative;
        right: auto;
        top: auto;
        margin-top: 8px;
    }
    
    .zd-market-title-wrap {
        height: auto;
        flex-wrap: wrap;
    }
    
    .zd-market-prices-num {
        font-size: 18px;
    }
}


/* ========== 动画效果 ========== */

/* 卡片悬停增强效果 */
.zd-market-info-panel {
    transition: all 0.3s ease;
}

.zd-market-info-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 82, 217, 0.15);
}

/* Tab项悬停动画 */
.zd-tabs-item {
    transition: all 0.3s ease;
}

.zd-tabs-item:hover:not(.zd-tabs-active) {
    transform: translateY(-2px);
}

/* Tab切换时的卡片动画 */
.zd-market-panel .zd-market-info {
    animation: cardSlideIn 0.5s ease forwards;
}

.zd-market-panel .zd-market-info:nth-child(1) { animation-delay: 0s; }
.zd-market-panel .zd-market-info:nth-child(2) { animation-delay: 0.1s; }
.zd-market-panel .zd-market-info:nth-child(3) { animation-delay: 0.2s; }
.zd-market-panel .zd-market-info:nth-child(4) { animation-delay: 0.3s; }

@keyframes cardSlideIn {
    from {
        opacity: 0.5;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 侧边栏淡入 */
.zd-market-panel-sidebar {
    animation: sidebarFadeIn 0.8s ease forwards;
}

@keyframes sidebarFadeIn {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}


/* 立即选购按钮样式 */
.zd-market-prices-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.zd-market-buy-btn {
    display: inline-block;
    background: #0052d9 !important;
    color: #fff !important;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    position: relative !important;
    overflow: hidden !important;
}

.zd-market-buy-btn .btn-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: left 0.4s ease;
}

.zd-market-buy-btn:hover .btn-sweep {
    left: 100%;
}

.zd-market-buy-btn::before,
.zd-market-buy-btn::after {
    display: none !important;
    content: none !important;
}

.zd-market-buy-btn:hover {
    color: #fff !important;
}

/* 卡片不再是链接，移除cursor */
.zd-market-info-panel {
    cursor: default;
}

/* 产品加载动画 */
.zd-market-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
}

.zd-market-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #0052d9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
