/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e91e63;
    --primary-light: #f48fb1;
    --primary-dark: #c2185b;
    --secondary-color: #9c27b0;
    --accent-color: #ff4081;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-color: #fff;
    --bg-light: #fafafa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

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

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

/* 顶部公告栏 */
.top-banner {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}

.marquee {
    display: inline-block;
    animation: marquee 20s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100%, 0);
    }
}

/* 头部 */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    text-decoration: none;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.logo p {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.search-box {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary-light);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.search-box input {
    border: none;
    padding: 10px 20px;
    width: 300px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.user-actions {
    display: flex;
    gap: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-color);
    position: relative;
    transition: color 0.3s;
}

.action-item:hover {
    color: var(--primary-color);
}

.action-item .icon {
    font-size: 20px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 主导航 */
.main-nav {
    background: #fff;
    border-bottom: 2px solid var(--primary-color);
}

.nav-list {
    display: flex;
    justify-content: center;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s;
}

.nav-item:hover > a,
.nav-item.active > a {
    color: var(--primary-color);
    background: rgba(233, 30, 99, 0.05);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: var(--shadow-hover);
    border-radius: 4px;
    z-index: 100;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: rgba(233, 30, 99, 0.05);
    color: var(--primary-color);
    padding-left: 25px;
}

/* 轮播图 */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-wrapper {
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slide-content h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: #fff;
    color: var(--primary-color);
    border-color: #fff;
}

.btn-primary:hover {
    background: transparent;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 分类导航 */
.category-nav {
    padding: 50px 0;
    background: var(--bg-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-item {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-item h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.category-item p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 区块标题 */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.section-header p {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 3px;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

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

.product-image {
    position: relative;
    aspect-ratio: 1;
    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.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.product-badge.new {
    background: var(--secondary-color);
}

.product-badge.hot {
    background: #ff5722;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    height: 40px;
    overflow: hidden;
}

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

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

.original-price {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-sales {
    font-size: 12px;
    color: var(--text-muted);
}

.section-footer {
    text-align: center;
    margin-top: 20px;
}

/* 新闻区块 */
.news-section {
    padding: 60px 0;
    background: var(--bg-light);
}

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

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

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

.news-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

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

.news-content {
    padding: 20px;
}

.news-category {
    display: inline-block;
    background: rgba(233, 30, 99, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* 品牌优势 */
.advantages {
    padding: 60px 0;
    background: #fff;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 30px;
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.advantage-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.advantage-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: #2a2a2a;
    color: #fff;
    padding-top: 50px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #444;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    font-size: 14px;
    transition: color 0.3s;
}

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

.footer-bottom {
    padding: 30px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #aaa;
    font-size: 14px;
    margin: 0 10px;
    transition: color 0.3s;
}

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

.footer-links span {
    color: #666;
}

.copyright p {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 100px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .nav-list {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .nav-item > a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 28px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
    }
}
