﻿/* ========================================
   全局CSS - woodcard.cn
   所有页面共用的基础样式
   ======================================== */

/* CSS变量定义 */
:root {
    /* 主色调 - 深邃商务蓝 */
    --primary-color: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2a4f7f;
    --primary-accent: #c8a96e; /* 温润木色点缀 */
    
    /* 辅助色 - 灰色 */
    --secondary-color: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;
    
    /* 中性色 */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --black: #000000;
    
    /* 字体 */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 80px;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 阴影 - 更精致的层次 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 50px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.06);
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    background-color: var(--gray-900);
    min-height: 100vh;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

/* 没有main标签的页面，让内容区域撑开 */
body > *:not(.footer):not(script):not(.back-to-top) { flex: 0 0 auto; }

/* 标题字体 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* 全屏宽版 */
.full-width {
    width: 100%;
}

/* 栅格系统 */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3-cols {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4-cols {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5-cols {
    grid-template-columns: repeat(5, 1fr);
}

/* Flex布局 */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-start {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.flex-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.45);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

/* 卡片 */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-body {
    padding: 0;
}

/* 区块 */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-accent));
    border-radius: 2px;
    margin: 12px auto 0;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1.0625rem;
    margin-top: var(--spacing-sm);
}

/* HERO区域 */
.hero {
    width: 100%;
    min-height: 36vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f0f4f8 0%, #e8edf2 40%, #f5f0e8 100%);
    padding: var(--spacing-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(200,169,110,.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

.hero-content {
    text-align: center;
    max-width: 860px;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-lg);
    color: var(--gray-900);
    line-height: 1.15;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* 面包屑 */
.breadcrumb {
    margin-top: 20px;
    padding: var(--spacing-md) 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span { margin: 0 var(--spacing-sm); }

/* 页脚 */
.footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-xl) 0;
    width: 100%;
}

.footer a {
    color: var(--gray-300);
}

.footer a:hover {
    color: var(--white);
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    letter-spacing: 0;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
}

/* 语言切换器 - 简洁文字链接样式 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
}

.lang-switcher a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.lang-switcher a:hover {
    color: var(--primary);
    background-color: var(--gray-100);
}

.lang-switcher strong {
    color: var(--primary);
    font-weight: 600;
    padding: 2px 6px;
}
    color: var(--gray-900);
}

/* Products下拉菜单 — 商务大气风格 */
.nav-menu {
    display: flex;
    gap: 24px;
}

/* 汉堡菜单 - 桌面端隐藏 */
.menu-toggle {
    display: none;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    min-width: max-content;
}

.nav-dropdown 

.nav-dropdown .nav-dropdown-menu a {
    white-space: nowrap;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.nav-dropdown-toggle .arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.25s ease;
    margin-top: 2px;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-dropdown:hover .arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0 !important;
    margin-left: -70px;
    transform: translateY(8px);
    min-width: 260px;
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 4px 6px -1px rgba(30,58,95,.08),
        0 10px 20px -5px rgba(30,58,95,.1),
        0 25px 50px -12px rgba(30,58,95,.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    z-index: 200;
    padding: 8px;
    overflow: hidden;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 20px;
    transform: rotate(45deg);
    width: 13px;
    height: 13px;
    background: #fff;
    box-shadow: -2px -2px 5px rgba(30,58,95,.06);
    z-index: -1;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) !important;
}

.nav-dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: #3d4852;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-dropdown-menu a:not(:last-child) {
    margin-bottom: 2px;
}

.nav-dropdown-menu a:hover {
    background: #f0f4f8;
    color: #1e3a5f;
    padding-left: 22px;
}

/* 通用下拉菜单（保留兼容） */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 100;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--gray-700);
    transition: background-color var(--transition-fast);
}

.dropdown-menu a:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

/* 产品图片 */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.product-thumbnail {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.product-thumbnail:hover {
    opacity: 0.8;
}

/* 材料卡片 */
.material-card {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.material-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    transition: transform 0.4s ease;
}

.material-card:hover img {
    transform: scale(1.05);
}

.material-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.material-card p {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-bottom: 0;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background-color: var(--gray-100);
    font-weight: 600;
}

/* 表单 */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--gray-700);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 响应式 */
@media (max-width: 1024px) {
    .grid-4-cols {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-5-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .grid-2-cols,
    .grid-3-cols,
    .grid-4-cols,
    .grid-5-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: nowrap;
        height: auto;
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-sm);
        position: relative;
    }

    .navbar-logo {
        min-width: auto;
        flex-shrink: 1;
        order: 0;
    }

    .navbar-logo img {
        height: 38px;
        width: auto;
        max-width: 50%;
        object-fit: contain;
    }

    .navbar-right {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        order: 1;
        margin-left: auto;
    }

    .lang-switcher {
        order: 0;
        flex-shrink: 0;
        font-size: 0.75rem;
    }

    .lang-switcher a,
    .lang-switcher strong {
        padding: 2px 4px;
    }

    /* 汉堡菜单按钮 - 仅移动端显示 */
    .menu-toggle {
        display: flex !important;
        order: 2;
        margin-left: var(--spacing-sm);
        cursor: pointer;
        flex-direction: column;
        gap: 5px;
        padding: 8px;
        border: none;
        background: none;
    }

    .menu-toggle span {
        width: 24px;
        height: 2px;
        background: var(--gray-800);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-menu {
        display: none;
        width: 0;
        flex-direction: column;
        gap: var(--spacing-sm);
        padding-top: var(--spacing-md);
        order: 3;
        overflow: hidden;
    }

    .nav-menu.show {
        display: flex;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: var(--spacing-md);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 99;
    }

    .navbar {
        position: relative;
    }

    /* 移动端下拉菜单：改为静态定位，默认展开 */
    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: 1px solid var(--gray-200);
        margin-left: 0;
        margin-top: var(--spacing-sm);
        padding: 0;
        display: none;
    }

    .nav-dropdown.active .nav-dropdown-menu,
    .nav-dropdown:hover .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-toggle .arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .grid-2-cols,
    .grid-3-cols,
    .grid-4-cols,
    .grid-5-cols {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    /* 导航栏极致小屏 */
    .navbar-logo img {
        height: 34px;
        max-width: 45%;
        width: auto;
    }

    .lang-switcher {
        margin-left: auto;
        font-size: 0.7rem;
    }

    .lang-switcher a,
    .lang-switcher strong {
        padding: 2px 3px;
    }

    .menu-toggle {
        display: flex !important;
    }

    /* 按钮适配 */
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    /* 产品卡片 */
    .product-card-body {
        padding: 0;
    }

    .product-card-title {
        font-size: 1rem;
    }

    /* 服务卡片 */
    .service-card {
        padding: var(--spacing-md);
    }

    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* 材料卡片 */
    .material-card {
        padding: var(--spacing-sm);
    }

    .material-card h3 {
        font-size: 0.9rem;
    }

    /* 页脚 */
    .footer-brand p {
        font-size: 0.8125rem;
    }

    .footer-links ul li a,
    .footer-links ul li {
        font-size: 0.8125rem;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--gray-500); }

.bg-white { background-color: var(--white); }
.bg-gray { background-color: var(--gray-100); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }







/* footer 自动推到剩余空间底部 */
.footer {
    margin-top: auto;
}


/* 桌面端下拉菜单点击激活 */
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) !important;
}
