/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d97706;
    --primary-light: #fbbf24;
    --primary-dark: #b45309;
    --secondary-color: #ec4899;
    --accent-color: #a78bfa;
    --background-color: #fffbeb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #ec4899 50%, #a78bfa 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cart-btn, .search-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.cart-btn:hover, .search-btn:hover {
    background: var(--background-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 600;
}

.search-bar {
    padding: 1rem 2rem;
    background: var(--white);
    border-top: 1px solid #e5e7eb;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ==================== Hero Section ==================== */
.hero {
    background: var(--gradient-primary);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
}

.hero-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--white);
    top: -100px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent-color);
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--secondary-color);
    top: 50%;
    left: 10%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==================== Section Header ==================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

/* ==================== Featured Carousel ==================== */
.featured-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 3rem;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease;
}

.featured-card {
    flex: 0 0 340px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.featured-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-info {
    padding: 1.5rem;
}

.featured-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.featured-seller {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.featured-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.featured-rating .stars {
    color: var(--primary-light);
}

.featured-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.featured-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.featured-btn:hover {
    background: var(--primary-dark);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ==================== Categories ==================== */
.categories-section {
    padding: 3rem 2rem;
    background: var(--white);
}

.categories-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 3rem;
    background: var(--background-color);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover, .category-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(236, 72, 153, 0.1));
}

.category-icon {
    font-size: 2.5rem;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== Products Grid ==================== */
.products-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.filter-bar select {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-info {
    padding: 1.25rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-seller {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars {
    color: var(--primary-light);
    font-size: 0.875rem;
}

.rating-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    color: var(--text-secondary);
    text-decoration: line-through;
    font-size: 0.875rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.add-to-cart-btn, .quick-view-btn {
    flex: 1;
    padding: 0.625rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
}

.quick-view-btn {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.quick-view-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ==================== Trust Section ==================== */
.trust-section {
    padding: 4rem 2rem;
    background: var(--white);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.trust-item {
    text-align: center;
    padding: 2rem;
}

.trust-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.trust-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.trust-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== Footer ==================== */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ==================== Notification ==================== */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .featured-card {
        flex: 0 0 280px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .category-card {
        padding: 1.5rem 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .hero {
        padding: 4rem 1rem;
    }
    
    .featured-section,
    .products-section,
    .categories-section,
    .trust-section {
        padding: 3rem 1rem;
    }
}
