/* 首页轮播区域 */
.home-slider .layui-carousel,
.home-slider .layui-carousel > [carousel-item],
.home-slider .layui-carousel > [carousel-item] > * {
    height: 500px !important;
}

/* 确保图片占满容器 */
.home-slider .layui-carousel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .home-slider .layui-carousel,
    .home-slider .layui-carousel > [carousel-item],
    .home-slider .layui-carousel > [carousel-item] > * {
        height: 300px !important;
    }
}

@media (max-width: 576px) {
    .home-slider .layui-carousel,
    .home-slider .layui-carousel > [carousel-item],
    .home-slider .layui-carousel > [carousel-item] > * {
        height: 200px !important;
    }
}

/* ===== 清仓尾货模块 ===== */
.overstock-seller-area {
    background: #f9f9f9;
    padding-top: 30px;
}

/* 图片容器：flex居中 + 相对定位用于标签 */
.overstock-seller-product-img {
    position: relative;
    height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden; /* 防止标签溢出 */
}

.overstock-seller-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;      /* 保证图片完整显示，不留白不裁剪 */
    display: block;            /* 移除图片下方间隙 */
    margin: 0 auto;            /* 额外居中保险 */
}

/* 条件标签 */
.condition-tag {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 10;
}

.condition-tag .layui-badge {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 2px;
}

/* 商品内容区域 */
.overstock-seller-product-content {
    background: #fff;
    padding: 15px;
}

.overstock-seller-product-content .title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    min-height: 44px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.products-rating {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    min-height: 16px;
}

.products-rating li a {
    color: #888;
    font-size: 12px;
    text-decoration: none;
}

.products-price {
    min-height: 24px;
}

/* ===== 销售精英模块 ===== */
.merchant-recommend-area {
    background: #fff;
    padding: 30px 0;
}

.merchant-recommend-area .single-merchant {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.merchant-recommend-area .single-merchant:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.merchant-logo-img {
    height: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 15px;
}

.merchant-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.merchant-recommend-area .layui-card-body {
    padding: 15px;
}

.merchant-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    display: block;
    text-decoration: none;
}

.merchant-title:hover {
    color: #ff6b6b;
}

.merchant-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.merchant-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.merchant-score {
    font-size: 14px;
    color: #ffa500;
}

.merchant-score i {
    margin-right: 3px;
}

.merchant-products {
    font-size: 14px;
    color: #666;
}

/* ===== 分类商品展示（电气达人等共用） ===== */
.featured-products-area {
    background: #f9f9f9;
    padding: 30px 0;
}

.featured-product-img {
    height: 200px;
    text-align: center;
    background: #fff;
}

.featured-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== 技术达人模块 ===== */
.single-virtuoso {
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
    background: #fff;
}

.single-virtuoso:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.virtuoso-avatar {
    position: relative;
    height: auto;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.virtuoso-avatar img {
    width: 50%;
    height: 50%;
    object-fit: cover; /* 达人头像适合用cover突出人物 */
}

.work-years {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 150, 136, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.virtuoso-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.virtuoso-name .realname {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.virtuoso-intro {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.virtuoso-info {
    margin-bottom: 15px;
}

.virtuoso-location {
    color: #666;
    font-size: 13px;
}

.virtuoso-location .layui-icon {
    margin-right: 5px;
}

.virtuoso-actions .layui-btn {
    width: 100%;
    margin-bottom: 5px;
}

/* ===== 电气资讯模块 ===== */
.news-card-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 300px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-card-header {
    height: 160px;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
    color: white;
}

.news-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index: 1;
}

.news-card-header.layui-card-header {
    border: none;
}

.card-info {
    position: relative;
    z-index: 2;
    color: white;
}

.en-info {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
}

.card-info-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.keyword {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

.news-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.news-list p {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

.news-list p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-time {
    color: #888;
    font-size: 0.85rem;
    min-width: 45px;
}

.article-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    flex-grow: 1;
    margin-left: 1rem;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-link:hover {
    color: #ff6b6b;
}

/* 新闻卡片背景图 */
.news-update-bg {
    background-image: url(/assets/image/news-1.png);
}
.news-company-bg {
    background-image: url(/assets/image/news-2.png);
}
.news-industry-bg {
    background-image: url(/assets/image/news-3.png);
}

/* ===== 响应式调整 ===== */
@media (max-width: 992px) {
    .news-card {
        flex: 0 0 calc(50% - 15px);
    }
    .merchant-logo-img {
        height: 120px;
    }
}

@media (max-width: 768px) {
    .home-slider .layui-carousel {
        height: 300px !important;
    }
    .overstock-seller-product-img {
        height: 180px;
    }
    .featured-product-img {
        height: 180px;
    }
    .merchant-logo-img {
        height: 100px;
    }
    .news-card-header {
        height: 140px;
    }
    .merchant-title {
        font-size: 14px;
    }
    .merchant-desc {
        font-size: 12px;
    }
    .virtuoso-avatar {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .home-slider .layui-carousel {
        height: 200px !important;
    }
    .overstock-seller-product-img {
        height: 150px;
    }
    .news-card-header {
        height: 120px;
    }
    .merchant-logo-img {
        height: 80px;
    }
    .virtuoso-avatar {
        height: 140px;
    }
}