/* 首页样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 轮播区域 */
.hero-carousel {
    position: relative;
    height: 500px;
    margin-bottom: 60px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slides {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.carousel-slide {
    width: 20%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 80px;
}

.carousel-slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.carousel-slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.carousel-slide:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.carousel-slide:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.slide-content {
    text-align: center;
    z-index: 2;
}

.slide-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slide-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 32px;
    opacity: 0.9;
}

.slide-btn {
    padding: 16px 32px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.slide-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* 轮播控制按钮 */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 3;
}

.carousel-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 35%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 主分类展示 */
.main-categories {
    margin-bottom: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #495057, #6c757d);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 64px;
    margin: 0 auto;
    display: block;
    width:60px;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 12px 0;
}

.category-desc {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 16px;
}

.category-count {
    font-size: 12px;
    color: #adb5bd;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* 产品展示区域通用样式 */
.product-section {
    margin-bottom: 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 240px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #adb5bd;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.badge-new {
    background: #28a745;
}

.badge-hot {
    background: #dc3545;
}

.badge-recommended {
    background: #007bff;
}

.product-info {
    padding: 24px;
}

.product-category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: #2c3e50;
    text-decoration: none;
}

.product-title a:hover {
    color: #0056b3;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.original-price {
    font-size: 14px;
    color: #adb5bd;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars {
    color: #ffc107;
    font-size: 14px;
}

.rating-text {
    font-size: 12px;
    color: #6c757d;
}

.product-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: #495057;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #343a40;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    width: 40px;
    height: 40px;
    padding: 0;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* 查看更多按钮 */
.view-more {
    text-align: center;
    margin-top: 40px;
}

.btn-view-more {
    padding: 16px 40px;
    background: transparent;
    color: #495057;
    border: 2px solid #495057;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-view-more:hover {
    background: #495057;
    color: white;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-carousel {
        height: 400px;
    }
    
    .slide-title {
        font-size: 36px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-carousel {
        height: 300px;
        margin-bottom: 40px;
    }
    
    .slide-title {
        font-size: 28px;
    }
    
    .slide-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .category-card {
        padding: 24px;
    }
    
    .category-icon {
        font-size: 48px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .product-image {
        height: 200px;
        font-size: 60px;
    }
    
    .product-section {
        margin-bottom: 60px;
    }
} 