/* common.css - 首页+单产品页通用样式 */
/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --primary-color: #FFCC00; /* CAT Yellow */
    --primary-dark: #E6B800;
    --secondary-color: #000000; /* CAT Black */
    --light-color: #F5F5F5;
    --gray-color: #757575;
    --white-color: #FFFFFF;
    --transition-default: all 0.3s ease;
    --section-padding: 80px 0;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--secondary-color);
    background-color: var(--white-color);
    line-height: 1.6;
    padding-top: 80px;
}

/* Common Styles */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-default);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

/* Header (所有页面共用) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 45px;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 30px;
}

.nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-default);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-default);
}

.nav a.active,
.nav a:hover {
    color: var(--primary-color);
}

.nav a.active::after,
.nav a:hover::after {
    width: 100%;
}

/* Mobile Menu (所有页面共用) */
.mobile-menu-btn,
.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--white-color);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 80px 20px;
    transform: translateX(100%);
    transition: var(--transition-default);
    z-index: 1000;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    margin-bottom: 20px;
}

.mobile-menu a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.mobile-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* 底部样式（所有页面共用） */
.contact {
    background-color: #000;
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 20px;
}

.footer-title {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #FFCC00;
}

.footer-info {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-contact {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.footer-contact i {
    color: #FFCC00;
    margin-right: 10px;
    margin-top: 4px;
    width: 20px;
    text-align: center;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition-default);
}

.footer-links a:hover {
    color: #FFCC00;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition-default);
}

.social-links a:hover {
    background-color: #FFCC00;
    color: #000;
    transform: translateY(-3px);
}

/* 全局响应式基础（所有页面共用） */
@media (max-width: 768px) {
    /* 头部响应式 */
    .nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .header .container {
        height: 70px;
    }

    /* 通用模块响应式 */
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* 入场动画（所有页面共用） */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}