/* ========================================
   RFU MOTION - 工业精密传动品牌
   配色：深石板蓝 + 工业橙 + 极简灰
   版本：2.1（兼容所有页面）
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0F172A;      /* 深石板蓝 - 头部/底部 */
    --primary-gray: #1E293B;      /* 高级灰黑 - 正文深色 */
    --bg-light: #F8FAFC;          /* 极浅灰蓝 - 主背景 */
    --bg-white: #FFFFFF;          /* 纯白 - 卡片背景 */
    --accent-orange: #E85D04;     /* 工业橙 - 强调/按钮 */
    --accent-blue: #3B82F6;       /* 科技蓝 - 次要强调 */
    --text-dark: #1E293B;         /* 正文深色 */
    --text-gray: #64748B;         /* 辅助文字 */
    --border-light: #E2E8F0;      /* 边框浅色 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    scroll-behavior: smooth;
}
.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 36px;
    width: auto;
    vertical-align: middle;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.15rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h4 { font-size: 1rem; margin-bottom: 0.5rem; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 {
    margin-bottom: 0.5rem;
}
.section-title p {
    color: var(--text-gray);
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
}
.btn-primary:hover {
    background-color: #c2410c;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
}
.btn-outline:hover {
    background-color: var(--accent-orange);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
}

/* Navigation */
.navbar {
    background-color: var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 24px;
    max-width: 1400px;
    margin: 0 auto;
}
.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.logo span {
    color: var(--accent-orange);
}
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-orange);
}
/* Language Switcher */
.lang-switcher {
    position: relative;
    margin-left: 1rem;
}
.lang-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    min-width: 130px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
    margin-top: 0.5rem;
}
.lang-switcher:hover .lang-dropdown {
    display: block;
}
.lang-dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-dark) !important;
    text-decoration: none;
    font-size: 0.875rem;
}
.lang-dropdown a:hover {
    background: var(--bg-light);
    color: var(--accent-orange) !important;
}
/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e293b 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.hero-content .subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
}
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-orange);
}
.stat-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}
.hero-image {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ========================================
   左侧栏 + 右侧内容布局（产品页面专用）
   ======================================== */
.page-with-sidebar {
    display: flex;
    gap: 2rem;
    padding: 2rem 0 4rem;
}

/* 左侧栏导航 */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-category {
    margin-bottom: 1rem;
}

.sidebar-category-title {
    font-weight: 600;
    color: var(--primary-dark);
    padding: 0.5rem 0;
    display: block;
    font-size: 0.875rem;
}

.sidebar-subnav {
    list-style: none;
    padding-left: 0.75rem;
    margin-top: 0.25rem;
}

.sidebar-subnav li {
    margin-bottom: 0.25rem;
}

.sidebar-subnav a {
    display: block;
    padding: 0.375rem 0.5rem;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.813rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-subnav a:hover {
    background: var(--bg-light);
    color: var(--accent-orange);
}

.sidebar-subnav a.active {
    background: var(--accent-orange);
    color: white;
}

/* 右侧内容区 */
.main-content {
    flex: 1;
    min-width: 0;
}

/* 产品卡片网格（用于products.html） */
.product-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-img {
    background: var(--bg-light);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
}

.category-info {
    padding: 1.25rem;
}

.category-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.category-info p {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* 产品型号列表（用于具体产品页面） */
.product-model-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-model-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.product-model-header {
    background: var(--bg-light);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.product-model-header h3 {
    margin-bottom: 0;
    color: var(--primary-dark);
}

.product-model-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
}

.product-model-specs {
    flex: 1;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.specs-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.specs-table td:first-child {
    font-weight: 600;
    width: 120px;
    color: var(--text-gray);
}

.product-model-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* 定制区块 */
.custom-section {
    background: var(--bg-light);
    border-left: 4px solid var(--accent-orange);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

/* 规格参数表格 */
.specs-full-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.specs-full-table th {
    background: var(--primary-dark);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

.specs-full-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.specs-full-table tr:hover {
    background: var(--bg-light);
}

/* Feature Bar (DDP等) */
.feature-bar {
    background: var(--bg-white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
}
.feature-icons {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}
.feature-item {
    text-align: center;
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-orange);
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-gray);
}
.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--accent-orange);
}

/* Product Tag */
.product-tag {
    display: inline-block;
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-blue);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}
.footer-col a:hover {
    color: var(--accent-orange);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
}

/* Contact Form */
.contact-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-orange);
}
.form-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    display: none;
}

/* 首页产品网格（3列） */
.home-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 992px) {
    .page-with-sidebar {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    .product-category-grid {
        grid-template-columns: 1fr;
    }
    .product-model-body {
        grid-template-columns: 1fr;
    }
    .home-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    .nav-links.active {
        display: flex;
    }
    .lang-switcher {
        margin-left: 0;
    }
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .specs-full-table {
        font-size: 0.75rem;
    }
    .specs-full-table th,
    .specs-full-table td {
        padding: 6px 4px;
    }
}

/* 占位图样式 */
.placeholder-img {
    background: #e2e8f0;
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 0.875rem;
    border-radius: 8px;
}

.placeholder-img i {
    font-size: 2rem;
    margin-right: 0.5rem;
}

/* 产品特点列表 */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
}

.feature-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.4;
}

.feature-list li::before {
    content: "✓";
    color: var(--accent-orange);
    font-weight: 600;
    flex-shrink: 0;
}
/* 侧边栏行内链接样式（用于同一行多个链接） */
.sidebar-subnav .inline-links {
    display: block;
    padding: 0.375rem 0.5rem;
}

.sidebar-subnav .inline-links a {
    display: inline;
    padding: 0;
}

.sidebar-subnav .inline-links a:hover {
    background: none;
    color: var(--accent-orange);
}

.sidebar-subnav .inline-links .separator {
    color: var(--text-gray);
    margin: 0 4px;
}
