/* 主页专用样式 - 生鲜超市主题 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部通知栏 */
.top-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-notice .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-actions {
    display: flex;
    gap: 20px;
}

.notice-actions a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notice-actions a:hover {
    opacity: 0.8;
}

/* 头部导航 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.logo img {
    height: 40px;
    width: auto;
}

/* 搜索框 */
.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.search-input {
    position: relative;
    display: flex;
}

.search-input input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input input:focus {
    border-color: #2563eb;
}

.search-input button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-input button:hover {
    background: #1d4ed8;
}

/* 头部操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 15px;
}

.cart-icon, .user-icon {
    position: relative;
    color: #333;
    text-decoration: none;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.cart-icon:hover, .user-icon:hover {
    background: #f3f4f6;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 主导航 */
.main-nav {
    border-top: 1px solid #e5e7eb;
    padding: 15px 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: center;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background: #2563eb;
    color: white;
}

/* 主要内容 */
.main-content {
    min-height: 100vh;
}

/* 轮播图 */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    margin-bottom: 60px;
}

.hero-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 40px;
    z-index: 2;
}

.slide-text {
    flex: 1;
    padding-right: 40px;
}

.slide-text h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.2;
}

.slide-text p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

.slide-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-image img {
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 轮播控制 */
.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 3;
}

.slider-btn {
    position: absolute;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    color: #333;
}

.slider-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #2563eb;
    transform: scale(1.2);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* 特色服务 */
.features {
    padding: 60px 0;
    background: white;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.feature-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.feature-content p {
    color: #666;
    font-size: 14px;
}

/* 区块标题 */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 商品分类 */
.categories {
    padding: 60px 0;
    background: #f8f9fa;
    margin-bottom: 60px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 25px;
    text-align: center;
}

.category-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.category-content p {
    color: #666;
    margin-bottom: 20px;
}

/* 商品网格 */
.products-grid, .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
    max-width: 280px;
    margin: 0 auto;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.wishlist-btn, .quick-view-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.wishlist-btn:hover, .quick-view-btn:hover {
    background: #2563eb;
    color: white;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.product-content {
    padding: 20px;
}

.product-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-content h3 a {
    color: #333;
    text-decoration: none;
}

.product-content h3 a:hover {
    color: #2563eb;
}

.product-price {
    margin-bottom: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #ef4444;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars {
    color: #fbbf24;
}

.rating-count {
    font-size: 12px;
    color: #666;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: #1d4ed8;
}

/* 热门商品 */
.featured-products {
    padding: 60px 0;
    background: white;
    margin-bottom: 60px;
}

.section-footer {
    text-align: center;
}

/* 最新商品 */
.latest-products {
    padding: 60px 0;
    background: #f8f9fa;
    margin-bottom: 60px;
}

/* 统计数据 */
.stats {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
}

/* 品牌优势 */
.brand-advantages {
    padding: 60px 0;
    background: white;
    margin-bottom: 60px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 30px;
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.advantage-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.advantage-item p {
    color: #666;
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #f9fafb;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background: #2563eb;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #d1d5db;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-methods i {
    font-size: 24px;
    color: #d1d5db;
}

/* 特惠商品样式 */
.deals-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.deal-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
    max-width: 280px;
    margin: 0 auto;
}

.deal-card:hover {
    transform: translateY(-5px);
}

.deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.deal-image {
    height: 200px;
    overflow: hidden;
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.deal-card:hover .deal-image img {
    transform: scale(1.1);
}

.deal-content {
    padding: 20px;
}

.deal-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.price-info {
    margin-bottom: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #ef4444;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.countdown {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 卖家卡片样式 */
.sellers-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.seller-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}

.seller-card:hover {
    transform: translateY(-5px);
}

.seller-avatar {
    margin-bottom: 20px;
}

.seller-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
}

.seller-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.seller-rating {
    margin-bottom: 15px;
}

.seller-rating .stars {
    color: #fbbf24;
    margin-right: 8px;
}

.rating-text {
    font-size: 14px;
    color: #666;
}

.seller-info p {
    color: #666;
    font-size: 14px;
}

/* 优势卡片样式 */
.advantages-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.advantage-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.advantage-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.advantage-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 用户评价样式 */
.reviews-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.review-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    max-width: 350px;
    margin: 0 auto;
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.reviewer-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.review-rating {
    color: #fbbf24;
}

.review-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        margin: 0;
        max-width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .slide-content h2 {
        font-size: 32px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .features-grid,
    .categories-grid,
    .products-grid,
    .advantages-grid,
    .deals-grid,
    .sellers-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .slide-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .slide-text {
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .slide-text h1 {
        font-size: 28px;
    }
    
    .slide-text p {
        font-size: 16px;
    }
    
    .slide-image img {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .slide-text h1 {
        font-size: 24px;
    }
    
    .slide-text p {
        font-size: 14px;
    }
    
    .slide-image img {
        max-width: 150px;
    }
    
    .prev-btn, .next-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
} 