/* 全局样式 */
:root {
    --huawei-red: #c7000b;
    --huawei-dark: #1f1f1f;
    --huawei-light-gray: #f5f5f5;
    --transition-speed: 0.3s;
    --huawei-font: "Microsoft YaHei", "微软雅黑", sans-serif;
}

body {
    font-family: var(--huawei-font);
    color: #333;
    overflow-x: hidden;
}

/* 顶部导航样式 */
.huawei-header {
    height: 80px; /* 增加高度 */
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0; /* 增加内边距 */
    font-family: var(--huawei-font);
    height: 80px; /* 增加高度 */
}

.navbar-brand img {
    transition: transform var(--transition-speed);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 0.7rem 1.2rem !important; /* 增加内边距 */
    transition: color var(--transition-speed);
    font-size: 16px; /* 增大字体 */
    font-family: var(--huawei-font);
    letter-spacing: 0.5px; /* 增加字间距 */
}

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

.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--huawei-red);
}

/* 多级菜单样式 */
.dropdown-menu {
    border: none;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0; /* 移除内边距 */
    --bs-dropdown-padding-y: 0; /* 设置Bootstrap变量为0 */
    min-width: 220px;
    margin-top: 10px; /* 增加顶部外边距，使二级菜单下移 */
    z-index: 1000;
    font-family: var(--huawei-font);
}

/* 确保mega-dropdown正确定位 */
.mega-dropdown {
    position: static !important;
}

.mega-dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    padding: 0; /* 移除内边距 */
    --bs-dropdown-padding-y: 0; /* 设置Bootstrap变量为0 */
    border-top: 1px solid #eee;
    margin-top: 10px; /* 增加顶部外边距，使二级菜单下移 */
}

/* 覆盖Bootstrap的shadow-lg类的内边距 */
.shadow-lg.py-4 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 为内容区域添加内边距，而不是整个下拉菜单 */
.dropdown-menu-inner {
    padding: 1.5rem 0;
}

.mega-dropdown-menu .dropdown-menu-inner {
    padding: 2.5rem 0;
}

/* 个人及家庭产品二级菜单样式 */
.product-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 10px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all var(--transition-speed);
    padding: 10px;
}

.category-item:hover {
    transform: translateY(-5px);
    color: var(--huawei-red);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    max-width: 100%;
    max-height: 100%;
    transition: transform var(--transition-speed);
}

.category-item:hover .category-icon img {
    transform: scale(1.1);
}

.category-name {
    font-size: 15px; /* 增大字体 */
    font-weight: 500;
    text-align: center;
    font-family: var(--huawei-font);
}

/* 显示菜单的关键样式 */
.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* 二级菜单标题样式 */
.submenu-title {
    font-size: 18px; /* 增大字体 */
    font-weight: 600;
    color: #333;
    margin-bottom: 18px; /* 增加间距 */
    position: relative;
    font-family: var(--huawei-font);
    letter-spacing: 0.5px; /* 增加字间距 */
}

/* 三级菜单列表样式 */
.submenu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0; /* 增加底部间距 */
    font-family: var(--huawei-font);
}

.submenu-list li {
    margin-bottom: 12px; /* 增加间距 */
}

.submenu-list a {
    color: #666;
    text-decoration: none;
    font-size: 15px; /* 增大字体 */
    transition: color var(--transition-speed);
    display: block;
    font-family: var(--huawei-font);
    letter-spacing: 0.3px; /* 增加字间距 */
}

.submenu-list a:hover {
    color: var(--huawei-red);
    text-decoration: none;
}

/* 查看更多链接样式 */
.view-more {
    color: #666;
    text-decoration: none;
    font-size: 15px; /* 增大字体 */
    display: inline-flex;
    align-items: center;
    transition: color var(--transition-speed);
    font-family: var(--huawei-font);
    letter-spacing: 0.3px; /* 增加字间距 */
}

.view-more:hover {
    color: var(--huawei-red);
    text-decoration: none;
}

.view-more i {
    font-size: 12px;
    margin-left: 5px;
}

/* 红色边框样式 - 模拟图片中的效果 */
.mega-dropdown-menu .col-md-3,
.mega-dropdown-menu .col-md-4 {
    position: relative;
    padding: 0 20px;
}

.mega-dropdown-menu .col-md-3:not(:last-child)::after,
.mega-dropdown-menu .col-md-4:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 1px;
    background-color: #eee;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .mega-dropdown-menu .col-md-3,
    .mega-dropdown-menu .col-md-4 {
        margin-bottom: 20px;
    }
    
    .mega-dropdown-menu .col-md-3:not(:last-child)::after,
    .mega-dropdown-menu .col-md-4:not(:last-child)::after {
        display: none;
    }
}

/* 活动状态的下拉菜单按钮 */
.dropdown-toggle.active {
    color: var(--huawei-red) !important;
}

/* 语言选择器样式 */
.language-dropdown {
    min-width: 150px;
    padding: 0.5rem 0;
    font-family: var(--huawei-font);
    z-index: 1030; /* 确保下拉菜单在其他元素之上 */
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-dropdown .dropdown-item {
    padding: 0.8rem 1.5rem;
    font-size: 14px;
    font-family: var(--huawei-font);
    transition: all 0.2s ease;
}

.language-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--huawei-red);
}

.language-dropdown .dropdown-item.active {
    background-color: rgba(199, 0, 11, 0.1);
    color: var(--huawei-red);
    font-weight: 500;
}

#languageSelector {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--huawei-dark);
    text-decoration: none;
    padding: 0.5rem;
    transition: color 0.3s;
}

#languageSelector:hover {
    color: var(--huawei-red);
}

#languageSelector .bi-globe {
    font-size: 18px;
}

.language-text {
    display: inline-block;
}

/* 移动端语言选择器样式优化 */
@media (max-width: 991.98px) {
    .dropdown-menu.language-dropdown.show {
        display: block;
        position: absolute;
        right: 15px;
        left: auto;
        top: 100%;
        width: 160px;
        margin-top: 5px;
        background-color: white;
        animation: fadeIn 0.2s ease-in-out;
    }
    
    .language-dropdown .dropdown-item {
        text-align: left;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .language-dropdown .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .language-dropdown .dropdown-item.active {
        background-color: rgba(199, 0, 11, 0.05);
    }
    
    #languageSelector {
        padding: 10px;
        margin-right: 5px;
    }
    
    #languageSelector .bi-globe {
        font-size: 20px;
    }
    
    /* 在小屏幕上隐藏语言文本，只显示图标 */
    /* .language-text {
        display: none;
    } */
    
    /* 添加淡入动画 */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* 特小屏幕优化 */
@media (max-width: 375px) {
    .dropdown-menu.language-dropdown.show {
        right: 5px;
        width: 140px;
    }
    
    .language-dropdown .dropdown-item {
        padding: 10px 15px;
    }
}

/* 在小屏幕上隐藏语言文本，只显示图标 */
@media (max-width: 768px) {
    .dropdown-menu-inner{
        padding: 0;
        margin: 0;
    }
}

/* 确保下拉菜单正确显示在右侧 */
.dropdown-menu-end {
    right: 0;
    left: auto;
}

/* 轮播Banner样式 */
.carousel {
    margin-top: 10px;
    position: relative;
    box-shadow: 0 4px 15px -5px rgba(0, 0, 0, 0.1); /* 减轻整体阴影，只保留底部 */
}

.carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative; /* 确保底部阴影可以相对于此定位 */
}

/* 幻灯片链接样式 */
.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.carousel-link:hover {
    color: inherit;
    text-decoration: none;
}

/* 添加链接标签指示器 */
.carousel-link::after {
    content: '点击查看详情';
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 3;
}

.carousel-link:hover::after {
    background-color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 移除遮罩层，仅保留底部淡阴影 */
.carousel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px; /* 保持较小高度 */
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 100%); /* 非常淡的阴影 */
    pointer-events: none;
    z-index: 2;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/* 确保轮播文字在底部阴影上方 */
.carousel-caption {
    bottom: 20%;
    text-align: left;
    max-width: 550px;
    left: 10%;
    right: auto;
    font-family: var(--huawei-font);
    z-index: 2; /* 确保文字在阴影上方 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 保持轻微文字阴影 */
}

.carousel-caption h2 {
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); /* 保持轻微标题阴影 */
}

.carousel-caption .btn {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); /* 保持轻微按钮阴影 */
    transition: all 0.3s ease;
    pointer-events: none; /* 防止按钮点击事件与幻灯片链接冲突 */
}

.carousel-caption .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12); /* 保持轻微悬停阴影 */
}

/* 轮播控制按钮样式改进 */
.carousel-control-prev, .carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: all var(--transition-speed);
}

/* 添加背景色和边框使按钮在任何背景上都可见 */
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-size: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 悬停效果 */
.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.9);
}

/* 移动端轮播控制按钮样式修复 */
@media (max-width: 768px) {
    .carousel-control-prev, .carousel-control-next {
        width: 10%; /* 增加点击区域 */
    }
    
    .carousel-control-prev-icon, .carousel-control-next-icon {
        width: 30px; /* 减小尺寸 */
        height: 30px;
        background-size: 40%;
        border-width: 1px;
    }
    
    /* 确保图标居中显示 */
    .carousel-control-prev-icon {
        background-position: center center;
    }
    
    .carousel-control-next-icon {
        background-position: center center;
    }
}

/* 超小屏幕设备进一步优化 */
@media (max-width: 480px) {
    .carousel-control-prev-icon, .carousel-control-next-icon {
        width: 25px;
        height: 25px;
    }
}

/* 轮播指示器样式改进 */
.carousel-indicators {
    bottom: 20px;
    z-index: 3; /* 提高z-index确保在所有层上方 */
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 为指示器添加阴影 */
    transition: all var(--transition-speed);
}

.carousel-indicators .active {
    background-color: var(--huawei-red);
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); /* 为活动指示器增强阴影 */
}

/* 产品展示区样式 */
.products-section {
    padding: 5rem 0;
}

.products-section h2 {
    font-weight: bold;
    margin-bottom: 3rem;
    position: relative;
}

.products-section h2:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--huawei-red);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.product-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-speed);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card img {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-card .btn {
    margin-top: 1rem;
    transition: all var(--transition-speed);
    border-width: 2px;
}

.product-card .btn:hover {
    background-color: var(--huawei-dark);
    color: white;
    border-color: var(--huawei-dark);
}

/* 新闻与活动区域样式 */
.news-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.section-title {
    position: relative;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    padding-bottom: 15px;
    color: #333;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--huawei-red);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-item {
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--huawei-red);
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
    transition: color 0.2s ease;
}

.news-item:hover .news-title {
    color: var(--huawei-red);
}

.news-time {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
    display: inline-block;
    font-weight: 500;
    position: relative;
}

.news-summary {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-link {
    display: inline-block;
    color: var(--huawei-red);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-right: 20px;
    transition: all 0.2s ease;
}

.news-link:after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.news-link:hover {
    color: #a50009;
    padding-right: 25px;
}

.news-link:hover:after {
    transform: translate(5px, -50%);
}

/* 响应式调整 */
@media (min-width: 768px) {
    .news-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 25px;
    }
    
    .news-item {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .news-summary {
        flex-grow: 1;
    }
}

@media (max-width: 767px) {
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .news-item {
        padding: 20px;
    }
    
    .news-title {
        font-size: 18px;
    }
}

/* 商用产品及方案菜单样式 */
.enterprise-tabs {
    border-bottom: 1px solid #eee;
}

.enterprise-tabs .nav-link {
    color: #333;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 16px;
    font-weight: 500;
}

.enterprise-tabs .nav-link.active {
    color: var(--huawei-red);
    background-color: transparent;
    border-bottom: 2px solid var(--huawei-red);
}

.enterprise-tabs .nav-link:hover {
    color: var(--huawei-red);
}

.enterprise-category {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.enterprise-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.enterprise-list li {
    margin-bottom: 8px;
}

.enterprise-list a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-speed);
}

.enterprise-list a:hover {
    color: var(--huawei-red);
}

.enterprise-sites {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.enterprise-site-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-speed);
}

.enterprise-site-link:hover {
    color: var(--huawei-red);
}

.enterprise-site-link img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/* 视频区块样式 */
.video-section {
    width: 100%;
    background-color: #fff; /* 改为白色背景 */
}

.video-container {
    position: relative;
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    background-color: #fff; /* 确保容器背景也是白色 */
}

.feature-video {
    position: relative;
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    display: block;
    background-color: #fff; /* 视频背景设为白色 */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2); /* 高透明度背景 */
    z-index: 2; /* 确保遮罩层在视频上方 */
    pointer-events: none; /* 允许点击穿透到下方元素 */
}

.view-more-btn {
    border: 2px solid white;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: auto; /* 确保按钮可以被点击 */
    position: relative; /* 相对定位 */
    z-index: 3; /* 确保按钮在遮罩层之上 */
}

.view-more-btn:hover {
    background-color: white;
    color: var(--huawei-red) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .video-container {
        height: auto;
    }
    
    .feature-video {
        height: auto;
    }
    
    .view-more-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* 底部区域样式 */
footer {
    background-color: var(--huawei-dark);
    color: white;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

footer h5 {
    font-weight: bold;
    margin-bottom: 1.5rem;
    position: relative;
}

footer h5:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--huawei-red);
    bottom: -8px;
    left: 0;
}

footer ul li a {
    transition: all var(--transition-speed);
    display: inline-block;
}

footer ul li a:hover {
    color: white !important;
    transform: translateX(5px);
    text-decoration: none;
}

footer .social-icons a {
    margin-right: 1rem;
    transition: all var(--transition-speed);
}

footer .social-icons a:hover {
    color: var(--huawei-red) !important;
    transform: translateY(-3px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 992px) {
    .carousel-item {
        height: 450px;
    }
    
    .carousel-caption {
        bottom: 10%;
        max-width: 80%;
    }
    
    .carousel-caption h2 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption {
        bottom: 5%;
        max-width: 90%;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .product-card img {
        height: 180px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body.dark-theme {
        background-color: #121212;
        color: #f5f5f5;
    }
    
    body.dark-theme .navbar {
        background-color: #1a1a1a !important;
    }
    
    body.dark-theme .nav-link {
        color: #f5f5f5 !important;
    }
    
    body.dark-theme .dropdown-menu {
        background-color: #1a1a1a;
    }
    
    body.dark-theme .dropdown-item {
        color: #f5f5f5;
    }
    
    body.dark-theme .dropdown-item:hover {
        background-color: #2a2a2a;
    }
    
    body.dark-theme .card {
        background-color: #1a1a1a;
        color: #f5f5f5;
    }
    
    body.dark-theme .list-group-item {
        background-color: #1a1a1a;
        color: #f5f5f5;
    }
    
    body.dark-theme .bg-light {
        background-color: #1a1a1a !important;
    }
}

/* 移动端导航样式优化 */
@media (max-width: 991.98px) {
    /* 导航栏样式 */
    .navbar {
        padding: 0.6rem 1rem;
        height: auto;
    }
    
    /* 汉堡菜单按钮样式 */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        outline: none !important;
        box-shadow: none !important;
        z-index: 1050; /* 确保汉堡按钮始终可点击 */
    }
    
    /* 折叠菜单样式 */
    .navbar-collapse {
        background-color: white;
        margin-top: 0.5rem;
        border-top: 1px solid #f0f0f0;
        padding-top: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1040;
    }
    
    /* 展开状态的折叠菜单样式 - 添加底部阴影边框 */
    .navbar-collapse.show {
        box-shadow: 0 8px 15px -5px rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* 移动端导航项样式 */
    .navbar-nav .nav-item {
        border-bottom: 1px solid #f0f0f0;
        position: relative; /* 确保子菜单定位正确 */
    }
    
    /* 移动端下拉菜单样式 */
    .navbar-nav .dropdown-menu {
        margin-top: 0;
        border: none;
        box-shadow: none;
        padding: 0 0 0.5rem 1rem;
        background-color: #f9f9f9;
        position: static !important; /* 确保子菜单不会使用绝对定位 */
        transform: none !important; /* 防止Bootstrap的变换 */
        float: none; /* 防止浮动 */
        overflow: hidden; /* 确保高度动画正常工作 */
        max-height: 0; /* 初始状态为关闭 */
        transition: max-height 0.3s ease-out;
        display: block; /* 始终显示，但通过max-height控制可见性 */
        opacity: 1; /* 确保可见 */
        visibility: visible; /* 确保可见 */
    }
    
    .navbar-nav .dropdown-menu.show {
        max-height: 1000px; /* 足够大的值以显示所有内容 */
    }
    
    /* 移动端展开/折叠动画 */
    .navbar-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, box-shadow 0.3s ease;
        display: block; /* 始终显示，但通过max-height控制可见性 */
    }
    
    .navbar-collapse.show {
        max-height: 100vh;
        overflow-y: auto; /* 允许滚动 */
    }
    
    /* 移动端额外链接样式 */
    .mobile-extra-links {
        padding: 0.5rem 1rem;
        border-top: 1px solid #f0f0f0;
    }
    
    .mobile-promo-link {
        display: block;
        padding: 0.5rem 0;
        color: #333;
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
    }
    
    .mobile-promo-link.text-danger {
        color: var(--huawei-red) !important;
    }
    
    /* 确保点击区域足够大 */
    .navbar-nav .nav-link,
    .mobile-promo-link {
        position: relative;
        z-index: 1;
    }
    
    /* 修复Bootstrap的collapse类可能导致的问题 */
    .collapse:not(.show) {
        display: block;
        max-height: 0;
        overflow: hidden;
    }
}

/* 移动端特定样式 - 小屏幕 */
@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 25px;
    }
    
    .product-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navbar-nav .nav-link {
        font-size: 15px;
    }
}

/* 移动端二级菜单标题样式 */
@media (max-width: 991.98px) {
    .submenu-title {
        padding: 8px 0;
        margin-bottom: 0;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        cursor: pointer;
    }
    
    .submenu-title:after {
        content: '\f078'; /* 使用FontAwesome的向下箭头图标 */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        position: absolute;
        right: 10px;
        transition: transform 0.3s ease;
    }
    
    .submenu-title.active:after {
        transform: rotate(180deg);
    }
    
    .submenu-list {
        padding-left: 15px;
        margin-top: 5px;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    /* 移动端三级菜单项样式 */
    .submenu-list li {
        margin-bottom: 8px;
    }
    
    .submenu-list a {
        padding: 5px 0;
        display: block;
    }
    
    /* 移动端菜单箭头图标 */
    .mobile-submenu-arrow {
        float: right;
        transition: transform 0.3s ease;
    }
    
    .mobile-submenu-arrow.active {
        transform: rotate(180deg);
    }
}

/* 移除二级菜单项右侧的X图标 */
.dropdown-menu .submenu-title:after,
.dropdown-menu .submenu-list:after,
.dropdown-menu .category-item:after,
.dropdown-menu li:after,
.dropdown-menu a:after {
    display: none !important;
}

/* 确保没有其他元素添加这些图标 */
.dropdown-menu .close-icon,
.dropdown-menu .remove-icon,
.dropdown-menu .delete-icon,
.dropdown-menu .cancel-icon {
    display: none !important;
}

/* 移除可能的伪元素 */
.dropdown-menu *::after {
    content: none !important;
}

/* 移除可能的绝对定位元素 */
.dropdown-menu .position-absolute {
    display: none !important;
}

/* 移除右侧边框 */
.mega-dropdown-menu .col-md-3:not(:last-child)::after,
.mega-dropdown-menu .col-md-4:not(:last-child)::after {
    display: none !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .carousel-link::after {
        bottom: 15px;
        right: 15px;
        font-size: 12px;
        padding: 4px 12px;
    }
    
    .carousel-item {
        height: 400px; /* 移动端减小高度 */
    }
}

/* 轮播Banner移动端兼容性优化 */
@media (max-width: 768px) {
    /* 调整轮播图高度，确保比例合适 */
    .carousel-item {
        height: 300px; /* 减小高度以适应手机屏幕 */
    }
    
    /* 修复控制按钮位置 */
    .carousel-control-prev, 
    .carousel-control-next {
        width: 15%; /* 增加点击区域 */
        opacity: 0.7; /* 增加默认透明度，使按钮更明显 */
    }
    
    /* 调整指示器位置，确保在底部居中 */
    .carousel-indicators {
        bottom: 10px;
        margin-bottom: 0;
        width: 100%;
        left: 0;
        right: 0;
        justify-content: center;
        z-index: 15;
    }
    
    /* 调整指示器样式，使其更易点击 */
    .carousel-indicators button {
        width: 10px;
        height: 10px;
        margin: 0 4px;
        background-color: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: none;
    }
    
    /* 活动指示器样式 */
    .carousel-indicators .active {
        background-color: var(--huawei-red);
        transform: scale(1.1);
    }
    
    /* 确保图片正确填充容器 */
    .carousel-item img {
        height: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* 修复上下控制按钮样式 */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 25px;
        height: 25px;
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        background-size: 50%;
        background-position: center;
    }
}

/* 超小屏幕设备进一步优化 */
@media (max-width: 480px) {
    .carousel-item {
        height: 200px; /* 进一步减小高度 */
    }
    
    /* 调整控制按钮大小 */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
    
    /* 减小指示器大小 */
    .carousel-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    /* 确保轮播图标题在小屏幕上正确显示 */
    .carousel-caption {
        bottom: 10%;
        left: 5%;
        right: 5%;
        padding: 10px;
    }
    
    .carousel-caption h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
}

/* 推荐信息样式 */
.recommendations-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-family: var(--huawei-font);
}

/* 推荐信息卡片样式重构 */
.recommendation-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--huawei-font);
    position: relative;
    height: 350px; /* 统一高度为350px */
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}

/* 图片容器 */
.recommendation-image-container {
    position: relative;
    width: 100%;
    height: 350px; /* 固定高度350px */
    overflow: hidden;
    border-radius: 12px;
}

.recommendation-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.recommendation-card:hover .recommendation-image-container img {
    transform: scale(1.05);
}

/* 类型标签 */
.recommendation-type-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
}

.recommendation-type {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-family: var(--huawei-font);
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--huawei-red);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 文字内容覆盖层 */
.recommendation-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
    z-index: 2;
}

.recommendation-text {
    color: white;
}

.recommendation-title {
    font-family: var(--huawei-font);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.3;
}

.recommendation-desc {
    font-family: var(--huawei-font);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 悬停时的查看详情覆盖层 */
.recommendation-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(360deg, rgba(0, 0, 0, 0) 0%, rgba(0,0,0, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
    border-radius: 12px;
}

.recommendation-card:hover .recommendation-hover-overlay {
    opacity: 1;
}

.recommendation-link {
    color: white;
    text-decoration: none;
    font-family: var(--huawei-font);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: 2px solid white;
    border-radius: 30px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.recommendation-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.recommendation-link .bi-arrow-right {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.recommendation-link:hover .bi-arrow-right {
    transform: translateX(5px);
}

/* 所有卡片统一高度 */
.recommendations-section .col-lg-8 .recommendation-card,
.recommendations-section .col-md-8 .recommendation-card,
.recommendations-section .col-lg-4 .recommendation-card,
.recommendations-section .col-md-4 .recommendation-card {
    height: 350px;
}

.recommendations-section .col-lg-8 .recommendation-image-container,
.recommendations-section .col-md-8 .recommendation-image-container,
.recommendations-section .col-lg-4 .recommendation-image-container,
.recommendations-section .col-md-4 .recommendation-image-container {
    height: 350px;
}

/* 大卡片文字样式调整 */
.recommendations-section .col-lg-8 .recommendation-title,
.recommendations-section .col-md-8 .recommendation-title {
    font-size: 1.6rem;
}

.recommendations-section .col-lg-8 .recommendation-desc,
.recommendations-section .col-md-8 .recommendation-desc {
    font-size: 1rem;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .recommendation-card {
        height: 280px;
    }
    
    .recommendation-image-container {
        height: 280px;
    }
    
    .recommendation-title {
        font-size: 1.1rem;
    }
    
    .recommendation-desc {
        font-size: 0.85rem;
    }
    
    .recommendation-content-overlay {
        padding: 20px;
    }
    
    .recommendation-link {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

@media (max-width: 575.98px) {
    .recommendation-card {
        height: 250px;
    }
    
    .recommendation-image-container {
        height: 250px;
    }
    
    .recommendation-content-overlay {
        padding: 15px;
    }
}

