/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c41e3a; /* 中国红 */
    --secondary-color: #d4af37; /* 金色 */
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(196, 30, 58, 0.2);
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', 'Arial', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01a2e 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s;
}

/* 轮播横幅 */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b1538 100%);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 500"><rect fill="%23c41e3a" width="1200" height="500"/></svg>');
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s;
}

.hero-content p {
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s 0.2s both;
}

.hero-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-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background-color: var(--white);
    width: 30px;
    border-radius: 6px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01a2e 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #b8941f;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* 分类区域 */
.categories {
    padding: 60px 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-light);
}

/* 产品展示 */
.featured-products,
.products-section {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: var(--light-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.discount-badge,
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.featured-badge {
    background-color: var(--secondary-color);
    top: 45px;
}

.discount-badge.large {
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 14px;
}

.product-info {
    padding: 20px;
}

.product-category {
    display: inline-block;
    background-color: var(--light-color);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-name {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
    min-height: 54px;
}

.product-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 15px;
}

.current-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
}

.original-price {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01a2e 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 筛选区域 */
.products-filter {
    padding: 30px 0;
    background-color: var(--light-color);
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    width: 300px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.category-filter {
    display: flex;
    gap: 15px;
}

.category-filter a {
    padding: 10px 20px;
    background-color: var(--white);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-filter a:hover,
.category-filter a.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 产品详情 */
.product-detail {
    padding: 40px 0;
}

.breadcrumb {
    margin-bottom: 30px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-image-large {
    position: relative;
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
}

.product-image-large img {
    width: 100%;
    height: auto;
    display: block;
}

.product-detail-info {
    padding: 20px 0;
}

.product-category {
    display: inline-block;
    background-color: var(--light-color);
    color: var(--text-light);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.product-price-large {
    margin-bottom: 20px;
}

.product-price-large .current-price {
    font-size: 36px;
}

.product-stock {
    margin-bottom: 30px;
    color: var(--text-light);
}

.product-description,
.product-details,
.product-specifications {
    margin-bottom: 30px;
}

.product-description h3,
.product-details h3,
.product-specifications h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.spec-table td:first-child {
    font-weight: bold;
    width: 120px;
    color: var(--text-light);
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    padding: 10px 15px;
    background-color: var(--white);
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-ellipsis {
    padding: 10px 5px;
}

/* 关于我们 */
.about-section {
    padding: 60px 0;
}

.about-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.advantage-list {
    list-style: none;
    padding-left: 0;
}

.advantage-list li {
    padding: 15px;
    margin-bottom: 10px;
    background-color: var(--light-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
}

.about-preview {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--light-color) 0%, #e8e8e8 100%);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* 联系我们 */
.contact-section {
    padding: 60px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.contact-info h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-item {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 10px;
}

.contact-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.contact-item p {
    color: var(--text-light);
    margin-bottom: 5px;
}

.contact-form-wrapper h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.required {
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 相关产品 */
.related-products {
    padding: 60px 0;
    background-color: var(--light-color);
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 15px;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        height: 400px;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .product-detail-wrapper {
        grid-template-columns: 1fr;
    }

    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input {
        width: 100%;
    }

    .category-filter {
        flex-wrap: wrap;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 28px;
    }
}

