:root {
    --primary-color: #0056b3;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b35;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

a {
    text-decoration: none;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* 下拉菜单 */
.dropdown-menu {
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    padding: 2rem;
    min-width: 1200px;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

.product-category {
    padding: 0 1.5rem;
    border-right: 1px solid #e9ecef;
    height: 100%;
}

.product-category:last-child {
    border-right: none;
}

.product-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

.product-category-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-category h6 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

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

.product-category ul li {
    margin-bottom: 0.6rem;
}

.product-category ul li a {
    color: #555;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.product-category ul li a:hover {
    color: var(--primary-color);
    background: rgba(0, 86, 179, 0.08);
    padding-left: 1.2rem;
}

.product-category ul li a i {
    font-size: 0.7rem;
    margin-right: 0.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--accent-color);
}

.product-category ul li a:hover i {
    opacity: 1;
    margin-right: 0.8rem;
}

.product-hot {
    position: relative;
}

.product-hot::after {
    content: 'HOT';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* 通用头部 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    color: white;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 面包屑 */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: ">";
    color: #999;
}

.breadcrumb-item a {
    color: #666;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* 咨询弹窗 */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.1);
}
/* 页脚 */
footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-links a {
    color: #bdc3c7;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: white;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- 语言菜单终极定位修正 --- */

/* 1. 强制父级容器为定位基准 */
/* 这一步非常重要，它确保下拉框是相对于"这个按钮"定位，而不是相对于整个网页 */
#langNavItem {
    position: relative !important;
}

/* 2. 下拉框定位样式 */
.language-menu {
    /* 位置控制 */
    position: absolute !important;
    top: 100% !important;
    /* 紧贴按钮底部 */
    right: 0 !important;
    /* 右侧对齐 */
    left: auto !important;
    /* 禁止左侧对齐（防止被超级菜单样式拉扯） */
    margin-top: 10px !important;
    /* 增加一点顶部间距，不要贴太死 */

    /* 尺寸控制 */
    width: auto !important;
    /* 宽度自适应 */
    min-width: 180px;
    /* 最小宽度 */
    max-height: 400px;
    /* 最大高度 */
    overflow-y: auto;
    /* 超高显示滚动条 */

    /* 外观美化 */
    padding: 8px 0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid #eee;
    z-index: 9999;
    /* 确保显示在最上层 */

    /* 移除可能存在的 Flex/Grid 干扰 */
    display: none;
    /* 默认隐藏，Bootstrap 会在点击时切换为 block */
}

/* 当添加了 .show 类时显示 (Bootstrap 控制) */
.language-menu.show {
    display: block !important;
}

/* 选项样式微调 */
.language-menu .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    background: transparent;
    /* 防止背景色干扰 */
}

.language-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    /* 浅灰背景 */
    color: #0d6efd;
    /* 蓝色文字 */
}

.language-menu .dropdown-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* 国旗图标样式 */
.language-menu .flag-icon {
    width: 1.2em;
    line-height: 1em;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 响应式 */
@media (max-width: 1400px) {
    .dropdown-menu {
        min-width: 1000px;
    }
}

@media (max-width: 1200px) {
    .dropdown-menu {
        min-width: 900px;
    }

    .product-category {
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }

    .dropdown-menu {
        min-width: 100%;
        left: 0;
        transform: none;
        margin-top: 0;
        padding: 1rem;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .dropdown-menu::before {
        display: none;
    }

    .product-category {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 1rem 0;
    }

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