:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin: 0 1rem;
    transition: color 0.3s;
}

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

.language-switch button {
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
}

.language-switch button.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 主要内容区域 */
main {
    margin-top: 80px;
}

#hero {
    text-align: center;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

#hero h1, #hero p {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

#hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
    background-color: var(--light-gray);
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

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

.product-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: var(--light-gray);
}

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

.product-image:not([src]),
.product-image[src=""],
.product-image-error {
    position: relative;
    background-color: var(--light-gray);
}

.product-image:not([src])::after,
.product-image[src=""]::after,
.product-image-error::after {
    content: '暂无图片';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

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

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.product-info p {
    margin-bottom: 1rem;
    color: var(--text-color);
    flex-grow: 1;
}

.price {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-top: auto;
}

/* 页脚样式 */
footer {
    background-color: var(--light-gray);
    padding: 3rem 5% 1rem;
    margin-top: 0.5rem;
}

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

.social-links a {
    color: var(--text-color);
    margin-right: 1rem;
    font-size: 1.5rem;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

/* 关于我们页面样式 */
.about-hero {
    text-align: center;
    padding: 0;
    color: var(--white);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.about-hero h1, .about-hero p {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.about-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.about-hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    padding: 4rem 5%;
    background-color: var(--light-gray);
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    padding-left: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* 联系我们页面样式 */
.contact-hero {
    text-align: center;
    padding: 0;
    color: var(--white);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1423666639041-f56000c27a9a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2074&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.contact-hero h1, .contact-hero p {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.contact-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.contact-hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-content {
    padding: 4rem 5%;
    background-color: var(--light-gray);
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

button[type="submit"] {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background: var(--secondary-color);
}

.map-section {
    padding: 4rem 5%;
    text-align: center;
}

.map-container {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.map-image {
    width: 100%;
    max-width: 800px;
    height: auto;
}

/* 产品详情页样式优化 */
.product-detail {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 100px auto 0;
}

.product-detail-container {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.product-basic-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.product-gallery {
    position: relative;
    width: 100%;
    background: var(--light-gray);
    border-radius: 12px;
    overflow: hidden;
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-detail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
    transition: transform 0.4s ease;
}

.product-info-right {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.product-detail-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.product-detail-price {
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.product-highlights {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
}

.product-summary {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.8;
}

.product-full-description {
    border-top: 1px solid #eee;
    padding-top: 3rem;
    margin-top: 3rem;
}

.product-detail-description {
    margin-top: 2rem;
}

/* 响应式设计优化 */
@media (max-width: 1024px) {
    .product-basic-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-detail-title {
        font-size: 2rem;
    }
    
    .product-detail-price {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 1rem;
    }
    
    .product-detail-container {
        padding: 1.5rem;
    }
}

.product-features {
    margin-top: 2rem;
}

.product-features h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.2rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.product-features li:last-child {
    border-bottom: none;
}

/* 产品详情页布局优化 */
.product-basic-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.product-full-description {
    border-top: 1px solid #eee;
    padding-top: 3rem;
    margin-top: 3rem;
}

.description-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.8rem 2rem;
    border: none;
    background: none;
    font-size: 1.1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

/* 响应式设计补充 */
@media (max-width: 1024px) {
    .product-basic-info {
        grid-template-columns: 1fr;
    }
    
    .product-features-grid {
        grid-template-columns: 1fr;
    }
    
    .description-tabs {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* 表单验证样式 */
.contact-form .form-group {
    position: relative;
    margin-bottom: 30px;
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: #ff4444;
    border-width: 2px;
}

.error-message {
    color: #ff4444;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 6px;
    position: absolute;
    bottom: -25px;
    left: 0;
    white-space: nowrap;
    background-color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.1);
    z-index: 1;
}

.error-message::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 10px;
    width: 8px;
    height: 8px;
    background-color: #fff;
    transform: rotate(45deg);
    z-index: -1;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #007bff;
    border-width: 2px;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form input.error:focus,
.contact-form textarea.error:focus {
    border-color: #ff4444;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-form .form-group {
        margin-bottom: 35px;
    }
    
    .error-message {
        font-size: 12px;
        white-space: normal;
        max-width: 100%;
        bottom: -30px;
    }
}

@media (max-width: 768px) {
    #hero h1, .about-hero h1, .contact-hero h1 {
        font-size: 2.5rem;
    }
    
    #hero p, .about-hero p, .contact-hero p {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
} 