/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00b8a9;
    --secondary: #3490de;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7fa;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

.primary-btn:hover {
    background-color: #009b8e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 169, 0.3);
}

.login-btn {
    background-color: var(--light);
    color: var(--primary);
}

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

.action-btn {
    background-color: var(--primary);
    color: white;
    font-size: 14px;
    padding: 8px 16px;
}

.action-btn:hover {
    background-color: #009b8e;
}

.section-title {
    text-align: center;
    margin: 50px 0 30px;
    font-size: 28px;
    font-weight: 600;
    color: var(--dark);
    position: relative;
}

/* 导航栏样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a:hover:after,
.nav-menu a.active:after {
    width: 100%;
}

/* 英雄区域样式 */
.hero {
    padding: 80px 0;
    background-color: #f0f8ff;
    overflow: hidden;
    position: relative;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--dark);
}

.hero-content p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    max-width: 100%;
    animation: float 3s ease-in-out infinite;
}

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

/* 热销产品区域 */
.hot-products {
    padding: 50px 0;
    background-color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    aspect-ratio: 1/1;
}

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

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

.product-card.featured {
    position: relative;
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.product-overlay .tag {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-overlay h3 {
    font-size: 18px;
    margin: 0;
}

/* 推荐产品区域 */
.recommended-products {
    padding: 50px 0;
    background-color: #f5f7fa;
}

.product-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

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

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

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--dark);
}

.product-info p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.cart-icon:hover {
    background-color: var(--primary);
    color: white;
}

/* 页脚样式 */
footer {
    background-color: #0f172a;
    color: white;
    padding: 50px 0 20px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-logo .logo {
    height: 30px;
    margin-bottom: 15px;
}

.footer-logo p {
    font-size: 14px;
    max-width: 250px;
    opacity: 0.7;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.link-group {
    margin-bottom: 20px;
    min-width: 120px;
}

.link-group h3 {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group ul li a {
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.link-group ul li a:hover {
    opacity: 1;
}

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

.footer-bottom p {
    font-size: 14px;
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .hero-content p {
        margin: 0 auto 30px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .nav-menu {
        margin: 20px 0;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-logo, .footer-links {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .nav-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

/* 购物车提示信息 */
.cart-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: fadeIn 0.3s, fadeOut 0.3s 1.7s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

.cart-icon.clicked {
    animation: pulse 0.5s;
    background-color: var(--primary);
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 导航栏滚动效果 */
header.scrolled {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
} 