/* ==========================================
   Zibll 销量排行幻灯片 - 自定义样式
   极简间距 + 暗色适配
   ========================================== */

.zss-slider-wrapper {
    margin: 0 auto 15px !important;
    max-width: 100%;
    padding: 0 10px;
}

.zss-swiper {
    overflow: hidden;
    padding-bottom: 28px !important;
    margin-bottom: 0 !important;
}

.zss-slide {
    border-radius: 8px;
    overflow: hidden;
    background: var(--main-bg-color, #1a1a2e);
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    transition: transform 0.3s, box-shadow 0.3s;
}

.zss-slide:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.zss-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.zss-slide-img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1a1a2e;
}

.zss-slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.zss-slide:hover .zss-slide-img {
    transform: scale(1.05);
}

.zss-slide-no-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d3561 0%, #3a2a5e 100%);
}

.zss-no-img-icon {
    font-size: 36px;
    opacity: 0.45;
}

.zss-rank-badge {
    position: absolute;
    top: 6px; left: 6px;
    width: 26px; height: 26px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.zss-rank-badge.rank-1,
.zss-rank-badge.rank-2,
.zss-rank-badge.rank-3 {
    font-size: 17px;
    background: transparent;
    backdrop-filter: none;
}

.zss-slide-info {
    padding: 8px 12px;
}

.zss-slide-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: #d0d0d0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zss-slide-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

.zss-slide-sales {
    color: #f56c6c;
    font-weight: 500;
}

.zss-slide-price {
    margin-left: auto;
    color: #ff6b6b;
    font-weight: 700;
    font-size: 13px;
}

/* ---- Swiper 导航 ---- */
.zss-swiper .swiper-button-prev,
.zss-swiper .swiper-button-next {
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.06);
    width: 34px; height: 34px;
    border-radius: 50%;
    transition: background 0.2s;
}

.zss-swiper .swiper-button-prev:hover,
.zss-swiper .swiper-button-next:hover {
    background: rgba(255,255,255,0.15);
}

.zss-swiper .swiper-button-prev::after,
.zss-swiper .swiper-button-next::after {
    font-size: 13px;
    font-weight: 700;
}

/* ---- 分页器 ---- */
.zss-swiper .swiper-pagination {
    bottom: 2px !important;
}

.zss-swiper .swiper-pagination-bullet {
    width: 5px; height: 5px;
    background: rgba(255,255,255,0.3);
    opacity: 0.5;
    transition: all 0.3s;
}

.zss-swiper .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 3px;
    background: var(--theme-color, #f56c6c);
    opacity: 1;
}

/* ---- 移动端 ---- */
@media (max-width: 768px) {
    .zss-slider-wrapper {
        padding: 0 6px;
        margin-bottom: 10px !important;
    }
    .zss-slide-title { font-size: 12px; }
    .zss-slide-info { padding: 6px 8px; }
    .zss-swiper .swiper-button-prev,
    .zss-swiper .swiper-button-next { display: none; }
}

/* ---- 浅色回退 ---- */
body:not(.dark-theme):not(.dark) .zss-slide {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
body:not(.dark-theme):not(.dark) .zss-slide-title { color: #333; }
body:not(.dark-theme):not(.dark) .zss-slide-meta { color: #888; }
body:not(.dark-theme):not(.dark) .zss-slide-img-wrap { background: #f5f6f8; }

/* 消除幻灯片下方空白（针对 Zibll 主题紧随其后的容器） */
.zss-slider-wrapper + *,
.zss-slider-wrapper + div,
.zss-slider-wrapper + main,
.zss-slider-wrapper + section,
.zss-slider-wrapper ~ .container,
.zss-slider-wrapper ~ main,
.zss-slider-wrapper ~ .index-main,
.zss-slider-wrapper ~ .home-main,
.zss-slider-wrapper ~ .zib-home-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
