/* 首页专属样式 */
.page-home {
    background: #fff;
}

.page-home .site-main-wide {
    padding: 0;
    background: #fff;
}

.home-page {
    padding-bottom: 32px;
    background: #fff;
}

/* 服务保障 */
.home-service-bar {
    padding: 0 0 8px;
    background: #fff;
}

.home-service-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 22px 8px;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 20px;
    font-size: 13px;
    color: #666;
    border-right: 1px solid #eee;
    transition: background .2s;
}

.service-item:last-child {
    border-right: none;
}

.service-item:hover {
    background: rgba(228, 57, 60, .03);
}

.service-text strong {
    display: block;
    color: #333;
    font-size: 15px;
    margin-bottom: 2px;
}

.service-text small {
    color: #999;
    font-size: 12px;
}

.service-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #e4393c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(228, 57, 60, .25);
}

/* 主视觉区 */
.home-hero {
    padding: 16px 0 20px;
    background: #fff;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 220px 1fr 200px;
    gap: 12px;
    min-height: 380px;
}

/* 左侧分类 */
.home-cat-menu {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid #eee;
}

.home-cat-menu-title {
    background: #e4393c;
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
}

.home-cat-list {
    list-style: none;
    padding: 6px 0;
    margin: 0;
}

.home-cat-item {
    position: relative;
}

.home-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: #333;
    font-size: 14px;
    transition: background .15s, color .15s;
}

.home-cat-link:hover {
    background: #fff5f5;
    color: #e4393c;
}

.home-cat-link .arrow {
    color: #ccc;
    font-size: 16px;
}

.home-cat-popup {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 12px rgba(0,0,0,.08);
    padding: 8px 0;
    z-index: 20;
}

.home-cat-popup a {
    display: block;
    padding: 8px 16px;
    color: #555;
    font-size: 13px;
}

.home-cat-popup a:hover {
    background: #fff5f5;
    color: #e4393c;
}

.home-cat-item:hover .home-cat-popup {
    display: block;
}

.home-cat-empty {
    padding: 20px 16px;
    color: #999;
    font-size: 13px;
}

/* 轮播 */
.home-carousel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.carousel-track {
    position: relative;
    height: 100%;
    min-height: 380px;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    display: flex;
    align-items: center;
    padding: 48px;
}

.carousel-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.slide-1 { background: linear-gradient(120deg, #e4393c 0%, #ff7875 50%, #ff9c6e 100%); }
.slide-2 { background: linear-gradient(120deg, #1677ff 0%, #69b1ff 50%, #91caff 100%); }
.slide-3 { background: linear-gradient(120deg, #389e0d 0%, #73d13d 50%, #b7eb8f 100%); }

.slide-content {
    color: #fff;
    max-width: 360px;
}

.slide-tag {
    display: inline-block;
    background: rgba(255,255,255,.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 16px;
}

.slide-content h2 {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 700;
}

.slide-btn {
    display: inline-block;
    background: #fff;
    color: #333;
    padding: 10px 28px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    transition: transform .2s, box-shadow .2s;
}

.slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    color: #e4393c;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    padding: 0;
}

.carousel-dots .dot.is-active {
    background: #fff;
    width: 24px;
    border-radius: 5px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.25);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    line-height: 1;
    transition: background .2s;
}

.carousel-btn:hover { background: rgba(0,0,0,.45); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* 右侧促销 */
.home-side-promo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-card {
    flex: 1;
    border-radius: 8px;
    padding: 20px 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.promo-card:hover {
    transform: translateY(-2px);
    color: #fff;
}

.promo-a { background: linear-gradient(160deg, #722ed1, #b37feb); }
.promo-b { background: linear-gradient(160deg, #d48806, #ffc53d); }

.promo-label {
    font-size: 12px;
    opacity: .85;
    margin-bottom: 6px;
}

.promo-card strong {
    font-size: 18px;
    margin-bottom: 4px;
}

.promo-card small {
    font-size: 12px;
    opacity: .8;
}

/* 通用区块 */
.home-section {
    padding: 24px 0;
    background: #fff;
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.home-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-badge {
    display: inline-block;
    background: #e4393c;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 1px;
}

.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;
}

.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;
}

.home-more-link:hover {
    color: #e4393c;
}

/* 商品网格：每行 4 个，最多 2 行 */
.home-product-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.home-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: #333;
    transition: box-shadow .2s, transform .2s;
    border: 1px solid #eee;
}

.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: #fff;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.home-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    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%;
    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;
}

.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-bottom: 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;
}

/* 底部 CTA */
.home-cta {
    margin-top: 8px;
    padding: 40px 0;
}

.home-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.home-cta h3 {
    color: #333;
    font-size: 22px;
    margin-bottom: 6px;
}

.home-cta p {
    color: #666;
    font-size: 14px;
}

.home-cta-actions {
    display: flex;
    gap: 12px;
}

.btn-cta {
    background: #e4393c;
    padding: 12px 32px;
    font-size: 15px;
}

.btn-cta-outline {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
}

.btn-cta-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 响应式 */
@media (max-width: 1024px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }
    .home-cat-menu { display: none; }
    .home-side-promo {
        flex-direction: row;
    }
    .home-product-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .home-service-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
    .service-item {
        border-right: none;
        justify-content: flex-start;
        padding: 12px 14px;
        background: #fafafa;
        border-radius: 8px;
        border: 1px solid #f0f0f0;
    }
    .service-item:hover {
        background: #fff5f5;
    }
    .home-product-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .slide-content h2 {
        font-size: 26px;
    }
    .carousel-slide {
        padding: 32px 24px;
    }
    .home-side-promo {
        flex-direction: column;
    }
}
