/* Front Page Styles - 首页专用样式 */

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    margin-bottom: 60px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
}

.hero-text {
    padding-right: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #333333;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 18px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* === Section Headers === */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-footer {
    text-align: center;
    margin-top: 48px;
}

/* === Featured Categories Section === */
.featured-categories-section {
    padding: 60px 0;
    background: #ffffff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.category-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #357abd);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    color: #4a90e2;
    margin-bottom: 16px;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

.category-count {
    font-size: 14px;
    color: #999999;
    margin-bottom: 12px;
}

.category-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #357abd;
}

/* === Featured Products Section === */
.featured-products-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.product-card-homepage {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card-homepage:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-homepage:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    gap: 8px;
}

.placeholder-text {
    font-size: 12px;
    font-weight: 500;
}

.availability-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.availability-badge.in-stock {
    background: #28a745;
    color: white;
}

.availability-badge.out-of-stock {
    background: #dc3545;
    color: white;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 8px;
    height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #4a90e2;
}

.product-sku {
    font-size: 12px;
    color: #999999;
    margin-bottom: 8px;
}

.product-price {
    margin-bottom: 16px;
}

.price-range,
.price-single {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.price-contact {
    font-size: 14px;
    color: #666666;
    font-style: italic;
}

.product-action {
    text-align: center;
}

/* === Features Section === */
.features-section {
    padding: 60px 0;
    background: #ffffff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
}

.feature-icon {
    color: #4a90e2;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 16px;
    color: #666666;
    line-height: 1.6;
}

/* === Contact CTA Section === */
.contact-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.cta-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.cta-description {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

/* === Button Styles === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1;
}

.btn-primary {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.btn-primary:hover {
    background: #357abd;
    border-color: #357abd;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: #4a90e2;
    border-color: #4a90e2;
}

.btn-secondary:hover {
    background: #4a90e2;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #333333;
    border-color: #333333;
}

.btn-outline:hover {
    background: #333333;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .cta-description {
        font-size: 16px;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-card {
        padding: 24px 16px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .feature-card {
        padding: 24px 16px;
    }
}

/* === Homepage Main Container === */
.homepage-main {
    background: #ffffff;
}

.homepage-main .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Section Spacing === */
.featured-categories-section,
.featured-products-section,
.features-section {
    position: relative;
}

.featured-categories-section::after,
.featured-products-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
}
