/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #1a56db;
    --primary-dark: #0d3e9e;
    --secondary: #f97316;
    --light: #f3f4f6;
    --dark: #1f2937;
    --gray: #6b7280;
    --success: #10b981;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, #f0f5ff 0%, #e6f0ff 100%);
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 60px;
}

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

/* 导航栏样式 */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    flex-direction: column;
}

.nav-brand h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 0;
}

.nav-brand span {
    font-size: 0.8rem;
    color: var(--gray);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li a {
    display: block;
    padding: 10px 15px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 4px;
}

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

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 页面头部样式 */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.page-header::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(-5deg);
}

.page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.page-header p {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    opacity: 0.9;
    position: relative;
}

/* 页面区域样式 */
.page-section {
    padding: 40px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.page-section:last-child {
    border-bottom: none;
}

/* 搜索区域 */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 5px 20px rgba(26, 86, 219, 0.3);
}

.search-input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.search-btn:hover {
    background: #ea580c;
}

.search-tips {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.85;
    text-align: center;
    position: relative;
}

/* 搜索结果提示 */
.search-results {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 15px auto;
    box-shadow: var(--card-shadow);
    display: none;
    animation: fadeIn 0.3s ease;
}

.search-results.show {
    display: block;
}

.search-results p {
    margin-bottom: 0;
    font-size: 1rem;
}

.clear-btn {
    background: var(--gray);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    margin-left: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    background: #4b5563;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
    transition: height 0.3s ease;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card.highlighted {
    border: 2px solid var(--secondary);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}

.product-card.hidden {
    display: none;
}

.product-image {
    height: 180px;
    position: relative;
    overflow: hidden;
}

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

.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 15px;
    flex: 1;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.model {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 6px;
}

.description {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--dark);
    min-height: 40px;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.original-price {
    text-decoration: line-through;
    font-size: 1rem;
    color: var(--gray);
    margin-left: 6px;
}

.rating {
    color: #f59e0b;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.rating-count {
    color: var(--gray);
    font-size: 0.85rem;
    margin-left: 6px;
}

.contact-info {
    background: var(--light);
    padding: 12px 15px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.contact-info p {
    margin-bottom: 3px;
}

.contact-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* 关于我们页面样式 */
.about-section {
    margin: 40px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

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

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    margin: 0 20px;
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    flex: 1;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: 100%;
    border-width: 8px 16px 8px 0;
    border-color: transparent white transparent transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    left: 100%;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent white;
}

.timeline-content h3 {
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.contact-item p {
    color: var(--gray);
}

/* 固定联系方式按钮 */
.fixed-contact {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fixed-contact button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.fixed-contact button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 86, 219, 0.5);
}

/* 页脚 */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 15px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

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

/* 页面内容区域 */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    text-align: center;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-year {
        position: absolute;
        left: 0;
        top: 0;
    }
    
    .timeline-content::before {
        left: -16px !important;
        right: auto !important;
        border-width: 8px 16px 8px 0 !important;
        border-color: transparent white transparent transparent !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 20px;
        transition: 0.4s;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-input {
        padding: 12px;
        border-bottom: 1px solid #eee;
    }
    
    .search-btn {
        padding: 12px;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .fixed-contact {
        bottom: 70px;
        right: 15px;
    }
    
    .fixed-contact button {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}