/* 首页动态版块（秒杀/团购/热卖/分类）— 各模板共用 */

.home-section {
    padding: 32px 0;
    background: #fff;
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.home-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.title-badge {
    display: inline-block;
    background: #e4393c;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.title-badge.hot { background: #fa8c16; }
.title-badge.flash { background: #cf1322; }
.title-badge.group { background: #722ed1; }

.home-flash-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.home-flash-section {
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
}

.home-group-section {
    background: linear-gradient(180deg, #f9f0ff 0%, #fff 100%);
}

.group-promo-tip {
    color: #722ed1;
    font-weight: 500;
}

.home-more-link {
    color: #999;
    font-size: 14px;
    white-space: nowrap;
}

.home-more-link:hover {
    color: #e4393c;
}

.home-product-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.home-product-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: #333;
    transition: box-shadow .2s, transform .2s;
    border: 1px solid #eee;
    min-width: 0;
}

.home-product-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    transform: translateY(-3px);
    color: #333;
}

.home-product-thumb {
    position: relative;
    aspect-ratio: 1;
    background: #f8f8f8;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.home-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.home-product-card:hover .home-product-thumb img {
    transform: scale(1.05);
}

.home-product-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: #ccc;
    font-size: 13px;
}

.home-product-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e4393c;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 1;
}

.home-product-tag-flash { background: #cf1322; }
.home-product-tag-group { background: #722ed1; }

.home-product-body {
    padding: 12px;
}

.home-product-title {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 8px;
}

.home-product-price .current {
    color: #e4393c;
    font-size: 18px;
    font-weight: 700;
}

.home-product-price .original {
    color: #bbb;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 6px;
}

.home-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.home-empty p {
    color: #999;
    margin-bottom: 16px;
}

/* templet2 下动态版块适配 */
.template-templet2 .home-section {
    background: transparent;
    padding: 36px 0;
}

.template-templet2 .home-section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    color: #2b2118;
}

.template-templet2 .home-more-link:hover {
    color: #c45c3e;
}

.template-templet2 .home-product-price .current {
    color: #c45c3e;
}

@media (max-width: 1024px) {
    .home-product-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 24px 0;
    }

    .home-section-title {
        font-size: 18px;
    }

    .home-product-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .home-product-price .current {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .home-product-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .home-product-body {
        padding: 10px;
    }

    .home-product-title {
        font-size: 12px;
        height: 36px;
    }
}
