/* 自定义样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
}

/* 导航栏样式 */
.navbar {
    position: relative !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1030;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* 最强制的导航栏定位覆盖 - 确保绝对不会被固定 */
* .navbar,
*[class*="navbar"],
nav.navbar,
nav[class*="navbar"],
.navbar,
.navbar.navbar-expand-lg,
.navbar.navbar-light,
.navbar.bg-white,
.navbar.shadow-sm,
.navbar.navbar-scrolled,
header .navbar,
body .navbar,
html .navbar,
.container .navbar,
.navbar[class*="navbar"] {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
    /* 防止任何可能的固定定位 */
    position: relative !important;
    /* 再次确保不是固定定位 */
    position: static !important;
}

/* 确保导航栏容器也不会被固定 */
.navbar .container,
.navbar .container-fluid {
    position: static !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffb366 !important;
}

/* 大型下拉菜单样式 */
.mega-dropdown .mega-menu {
    position: absolute;
    width: 800px;
    left: 50%;
    right: 0;
    transform: translateX(-50%);
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0;
    margin-top: 0;
    min-width: 800px;
    z-index: 9999;
    max-width: 90vw;
}

.mega-menu .container {
    max-width: 100%;
    width: 100%;
    padding: 30px 40px;
}

.mega-menu-left {
    border-right: 1px solid #e9ecef;
    padding-right: 30px;
}

.mega-menu-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-item {
    display: block;
    padding: 12px 16px;
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mega-menu-item:hover,
.mega-menu-item.active {
    background-color: #f8f9fa;
    color: #0d6efd;
    text-decoration: none;
}

.mega-menu-right {
    padding-left: 30px;
}

.mega-menu-section {
    display: none;
}

.mega-menu-section.active {
    display: block;
}

.mega-section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}

.mega-product-item {
    margin-bottom: 16px;
}

.mega-product-link {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mega-product-link:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mega-product-link h6 {
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}

.mega-product-link p {
    font-size: 12px;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .mega-menu {
        position: relative !important;
        width: auto !important;
        min-width: auto !important;
    }
    
    .mega-menu .container {
        padding: 20px 15px;
    }
    
    .mega-menu-left {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-right: 15px;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .mega-menu-right {
        padding-left: 15px;
    }
}

@media (max-width: 767px) {
    .mega-dropdown .mega-menu {
        position: static;
        box-shadow: none;
        border: 1px solid #e9ecef;
        border-top: none;
    }
    
    .mega-menu-item {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .mega-product-link {
        padding: 12px;
    }
}

/* 智能穿戴产品样式 */
#wearableProductsSection {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 3px solid var(--primary-color);
}

/* 智能穿戴产品内嵌子菜单样式 */
.wearable-toggle {
    position: relative;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.wearable-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.wearable-submenu {
    background-color: #f8f9fa;
    margin-left: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submenu-item {
    padding: 10px 20px 10px 40px !important;
    font-size: 13px;
    line-height: 1.4;
    color: #6c757d;
    border: none !important;
    background-color: transparent;
    transition: all 0.3s ease;
    position: relative;
}

.submenu-item:hover {
    background-color: transparent !important;
    color: #ff6600 !important;
    padding-left: 45px !important;
}

.submenu-item:active,
.submenu-item.selected {
    background-color: transparent !important;
    color: #ff6600 !important;
}

.submenu-item.selected::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
}

/* 响应式子菜单 */
@media (max-width: 768px) {
    .submenu-item {
        padding: 8px 15px 8px 35px !important;
        font-size: 12px;
    }
    
    .submenu-item:hover {
        padding-left: 40px !important;
    }
}

/* 产品分类菜单项样式 */
.product-category-item.active {
    background-color: transparent !important;
    color: #ff6600 !important;
    border-color: transparent !important;
}

.product-category-item:hover {
    background-color: transparent !important;
    color: #ff6600 !important;
    border-color: transparent !important;
}

.product-category-item:focus {
    background-color: transparent !important;
    color: #ff6600 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* 选中产品的特殊样式 */
.selected-product {
    border: 2px solid var(--primary-color) !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.selected-product .card-body {
    position: relative;
}

.selected-product .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 4px 4px 0 0;
}

.selected-product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(13, 110, 253, 0.2) !important;
}

.selected-product .badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.wearable-product-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.wearable-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}

.wearable-product-card .card-img-top {
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0;
}

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

.wearable-product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wearable-product-card .card-text {
    font-size: 0.9rem;
    line-height: 1.4;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wearable-product-card .features {
    min-height: 60px;
}

.wearable-product-card .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.wearable-product-card .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wearable-product-card .btn:hover {
    transform: translateY(-2px);
}

/* 分页样式 */
#wearablePagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

#wearablePagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

#wearablePagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

#wearablePagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* 关闭按钮样式 */
#closeWearableSection {
    border-radius: 8px;
    transition: all 0.3s ease;
}

#closeWearableSection:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wearable-product-card .card-title {
        font-size: 1rem;
        height: auto;
        -webkit-line-clamp: unset;
    }
    
    .wearable-product-card .card-text {
        height: auto;
        -webkit-line-clamp: unset;
    }
    
    .wearable-product-card .features {
        min-height: auto;
    }
    
    #wearablePagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Hero区域样式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    padding-top: 80px;
}

/* 轮播图样式 */
.carousel {
    margin-top: 0;
}

.carousel-item img {
    /* 移除暗化滤镜，让图片显示更明亮 */
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 20px;
}

/* 产品卡片图片样式优化 */
.product-card .card-img-top {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    padding: 15px;
    transition: transform 0.3s ease;
    aspect-ratio: 1/1;
}

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

.product-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* 统计数据样式 */
.stat-item {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    transition: color 0.3s ease;
}

.stat-item:hover i {
    color: var(--success-color) !important;
}

/* 产品卡片样式 */
.product-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* 解决方案卡片 */
.solution-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background: rgba(255, 255, 255, 0.95);
}

.solution-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.solutions-section {
    position: relative;
}

/* 产品中心卡片 */
.product-center-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.product-center-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* 硬件产品卡片 */
.hardware-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.hardware-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 应用案例卡片 */
.case-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* 合作伙伴logo */
.partner-logo {
    transition: transform 0.3s ease;
}

.partner-logo:hover {
    transform: scale(1.1);
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

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

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

.product-card .card-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.product-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 图片展示样式 */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* 卡片样式 */
.card {
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
}

footer h5, footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* 返回顶部按钮 */
#backToTop {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .carousel-caption {
        padding: 10px;
    }
    
    .carousel-caption h5 {
        font-size: 1rem;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* 模态框样式 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 产品卡片悬停效果 */
.product-card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card-hover:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.product-card-hover:hover h6 {
    color: #ff8c00 !important;
    transition: color 0.3s ease;
}

/* 服务步骤样式 */
.service-step {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    height: 100%;
}

.service-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.service-icon {
    transition: all 0.3s ease;
}

.service-step:hover .service-icon i {
    transform: scale(1.1);
}

.service-step h5 {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.service-step:hover h5 {
    color: var(--primary-color);
}

/* 企业优势样式 */
.advantage-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.advantage-icon {
    transition: all 0.3s ease;
}

.advantage-card:hover .advantage-icon i {
    transform: scale(1.1);
}

.advantage-card .card-title {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.advantage-card:hover .card-title {
    color: var(--primary-color);
}

/* 关于我们样式 */
.about-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.about-image-container img {
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
}

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

.about-content {
    padding: 20px 0;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-color);
    text-align: justify;
}