/* home.css - 首页特定样式 */

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #0066cc 0%, #00A859 100%);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content .lead {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.hero-content .sub-lead {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ==================== 产品区域样式优化 ==================== */

/* 产品区域整体 */
.products-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.home-products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    position: relative;
}

.products-section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #0066cc 0%, #00A859 100%);
    border-radius: 2px;
}

.products-section .lead {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#products-container {
    margin-top: 1.5rem;
}

#products-container .home-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

#products-container .home-products-grid > .enhanced-product-card {
    width: 100%;
    min-width: 0;
}

.update-section-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.update-section-header {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(15, 23, 42, 0.06);
    padding: 0.95rem 1.1rem 0.95rem 1rem;
}

.update-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #0d6efd 0%, #16a34a 100%);
}

.update-section-header h5 {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: 0.2px;
}

.update-section-icon {
    font-size: 1.02rem;
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #0d6efd;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.update-list-item {
    position: relative;
    display: block;
    border-bottom: 1px solid #eef2f7;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.update-list-item:last-child {
    border-bottom: 0;
}

.update-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: transparent;
    transition: height 0.2s ease, background-color 0.2s ease;
}

.update-list-item {
    padding-inline: 2px;
}

.update-list-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
    color: #0f172a !important;
}

.update-list-item:hover::before {
    height: 70%;
    background: linear-gradient(180deg, #0d6efd 0%, #16a34a 100%);
}

.update-list-main {
    display: block;
}

.update-list-title {
    position: relative;
    padding-left: 10px;
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 500;
    padding-right: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.update-list-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #cbd5e1;
    flex: 0 0 6px;
    margin-top: 0.45rem;
}

.update-list-text {
    min-width: 0;
    display: block;
}


@media (max-width: 1199.98px) {
    #products-container .home-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    #products-container .home-products-grid {
        grid-template-columns: 1fr;
    }
}

/* 市场卡片 */
.market-card {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.market-card:hover {
    transform: translateY(-5px);
}

/* 优势项 */
.advantage-item {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* 新闻卡片 */
.news-card {
    transition: transform 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* ==================== 响应式调整 ==================== */

@media (max-width: 1200px) {
    .product-image {
        height: 180px;
    }
    
    .product-title {
        font-size: 1.05rem;
    }
}

@media (max-width: 992px) {
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 1rem !important;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content .lead {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.2rem;
    }
    
    .hero-content .sub-lead {
        font-size: 1rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    #products-container .col {
        margin-bottom: 24px;
    }
    
    /* 在手机屏幕上，产品卡片可能需要更紧凑 */
    .product-card {
        border-radius: 8px;
    }
    
    .product-info {
        padding: 0.875rem !important;
    }
}

@media (max-width: 576px) {
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 1rem;
        height: 2.8em;
    }
    
    .product-description {
        font-size: 0.8125rem;
        height: 4em;
    }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* ==================== 产品类别筛选样式 ==================== */

.product-categories-filter {
    margin: 1rem 0 1.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.product-categories-filter .btn {
    border-radius: 20px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-width: 2px;
    margin: 0.25rem;
}

.product-categories-filter .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-categories-filter .btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #00A859 100%);
    color: white;
    border-color: #0066cc;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.2);
}

/* 空状态提示 */
.no-products-message {
    text-align: center;
    padding: 2rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.no-products-message i {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 1.1rem;
}

.no-products-message h5 {
    color: #495057;
    margin-bottom: 0.9rem;
}

.no-products-message p {
    color: #6c757d;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .products-section {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
    
    .products-section h2 {
        font-size: 2rem;
    }
    
    .products-section .lead {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .product-categories-filter {
        margin: 0.75rem 0 1.25rem;
        padding: 0.5rem;
    }
    
    .product-categories-filter .btn {
        padding: 0.375rem 1rem;
        font-size: 0.85rem;
        margin: 0.2rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    #products-container {
        margin-top: 1.25rem;
    }
}

@media (max-width: 768px) {
    .products-section h2 {
        font-size: 1.8rem;
    }
    
    .products-section .lead {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .product-categories-filter {
        margin: 0.5rem 0 1rem;
    }
    
    .product-categories-filter .btn {
        padding: 0.375rem 0.875rem;
        font-size: 0.8rem;
        margin: 0.15rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 0.875rem !important;
    }
    
    #products-container .col {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .products-section h2 {
        font-size: 1.6rem;
    }
    
    .products-section .lead {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .product-categories-filter {
        margin: 0.5rem 0;
        padding: 0.5rem;
    }
    
    .product-categories-filter .btn {
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
        margin: 0.1rem;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-title {
        font-size: 0.95rem;
        height: 2.6em;
    }
    
    .product-description {
        font-size: 0.8rem;
        height: 3.8em;
    }
    
    .no-products-message {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
    }
    
    .no-products-message i {
        font-size: 2rem;
    }
}