/* Navigation */
        .nav-link:hover {
            color: var(--secondary-color);
        }

        .dropdown {
            position: absolute;
            top: 110%;
            left: 50%;
            transform: translateX(-50%);
            background-color: white;
            box-shadow: var(--shadow);
            padding: 25px;
            width: 78vw;
            overflow-y: auto;
            display: none;
            z-index: 1002;
            border-radius: 4px;
            border-top: 3px solid var(--secondary-color);
        }

         .about-dropdown {
            position: absolute;
            top: 110%;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            min-width: max-content;
            background-color: white;
            box-shadow: var(--shadow);
            display: none;
            z-index: 1002;
            border-radius: 0 0 4px 4px;
            border-top: 3px solid var(--secondary-color);
            overflow: auto;
        }

        /* 鼠标悬停时显示下拉菜单 */
        .nav-item:hover .about-dropdown {
            display: block;
        }

        .dropdown-menu {
            display: flex;
            flex-direction: column;
            padding: 20px;
            min-width: 80px;
        }

        .menu-item {
            text-decoration: none;
            color: var(--text-color);
            padding: 12px 15px;
            border-left: 3px solid transparent;
            transition: all 0.3s;
            font-weight: 500;
            font-size: 0.85rem;
        }

        .menu-item:hover {
            border-left: 3px solid var(--secondary-color);
            background-color: #f5f5f5;
            color: var(--secondary-color);
        }

        .menu-item:last-child {
            border-bottom: none;
        } 

        .dropdown-columns {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 15px;
        }

        /* 下拉菜单列样式 */
        .dropdown-column {
            padding: 0 15px;
        }

        .dropdown-category {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
            font-size: 1rem;
            text-align: center;
        }

        /* 修改：产品项和子菜单水平布局 */
        .dropdown-item {
            display: flex;
            justify-content: space-around;
            align-items: flex-start;
            padding: 8px 0;
            border-bottom: 1px solid #ddd;
            border-left: 2px solid transparent;
            transition: all 0.3s;
        }

        .dropdown-item:hover {
            border-left: 2px solid var(--secondary-color);
            padding-left: 10px;
        }

        .product-name {
            flex: 1;
            text-decoration: none;
            color: var(--text-color);
            font-weight: 500;
            font-size: 1rem;
            transition: color 0.3s;
            min-width: 120px;
            /* 确保产品名称有足够宽度 */
        }

        .dropdown-item:hover .product-name {
            color: var(--secondary-color);
        }

        /* 子菜单样式 - 右侧布局 */
        .submenu {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-left: 5px;
            max-width: 150px;
        }

        .submenu-link {
            display: inline-block;
            padding: 4px 8px;
            text-decoration: none;
            color: #666;
            font-size: 0.8rem;
            background-color: #f5f5f5;
            border-radius: 3px;
            transition: all 0.3s;
            white-space: nowrap;
        }

        .submenu-link:hover {
            color: white;
            background-color: var(--secondary-color);
        }

        .nav-item:hover .dropdown {
            display: block;
        }

        /* 展开按钮隐藏 */
        .products-grid:has(.product-item:nth-child(7)) ~ .expand-btn {
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        .products-grid:not(:has(.product-item:nth-child(7))) ~ .expand-btn {
            display: none;
        }

        /* Footer */
        .footer {
            background-color: var(--primary-color);
            color: white;
            padding: 60px 0 20px;
        }

        .footer-container {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 30px;
            margin-bottom: 40px;
        }

        /* 页脚产品列表两排布局 */
        .footer-column:first-child .footer-links {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 5px 15px;
        }

        .footer-column:first-child .footer-links li {
            margin-bottom: 8px;
        }

        .footer-column h3 {
            margin-bottom: 20px;
            font-size: 1.2em;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-column h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background-color: var(--secondary-color);
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 10px;
        }

        .footer-links a {
            color: var(--light-color);
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-links a:hover {
            color: #3498db;
        }

        .contact-info p {
            margin-bottom: 10px;
            display: flex;
            align-items: center;
        }

        .contact-info i {
            margin-right: 10px;
            width: 20px;
        }

        .map-container {
            position: relative;
            width: 100%;
            padding-top: 75%;
            /* 4:3 Aspect Ratio */
            background-color: #eee;
            overflow: hidden;
            border-radius: 4px;
        }

        .map-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        .copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.7);
        }

        .chat-widget {
            position: fixed;
            right: 20px;
            bottom: 150px;
            z-index: 1000;
        }

        .chat-panel {
            position: absolute;
            bottom: -120px;
            right: 0;
            width: 450px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
            padding: 10px;
            max-height: none;
            display: none;
            flex-direction: column;
            gap: 15px;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }

        .chat-panel.active {
            display: flex;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .chat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }

        .chat-header h3 {
            color: #2c3e50;
            margin: 0;
            font-size: 1.2em;
        }

        .close-chat {
            background: none;
            border: none;
            font-size: 2rem;
            cursor: pointer;
            color: #7f8c8d;
        }

        /* 网页对话框样式 */
        .webchat-dialog {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 200px;
            overflow-y: auto;
            padding: 11px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-bottom: 0px;
            min-height: 150px;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }

        /* 消息样式 - 专门为聊天窗口 */
        .webchat-dialog .message {
            padding: 10px 17px;
            border-radius: 8px;
            max-width: 85%;
            word-wrap: break-word;
            position: relative;
            margin-bottom: 5px;
        }

        .webchat-dialog .received {
            background: #e9ecef;
            align-self: flex-start;
            margin-right: auto;
            border-bottom-left-radius: 0;
        }

        .webchat-dialog .sent {
            background: #3498db;
            color: white;
            align-self: flex-end;
            margin-left: auto;
            border-bottom-right-radius: 0;
        }

        .webchat-dialog .message-avatar {
            position: absolute;
            top: -5px;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: white;
            font-weight: bold;
        }

        .webchat-dialog .received .message-avatar {
            left: -10.9px;
            background: #3498db;
        }

        .webchat-dialog .sent .message-avatar {
            right: -10.9px;
            background: #e74c3c;
        }

        .webchat-dialog .message-content {
            margin: 0;
            line-height: 1.0;
        }

        /* 聊天输入区域 */
        .chat-input-area {
            display: flex;
            flex-direction: column;
            gap: 0px;
            margin-bottom: 10px;
        }

        .chat-input-area input {
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            width: 100%;
        }

        .chat-input-area button {
            background: #3498db;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 15px;
            cursor: pointer;
            font-weight: 500;
            transition: background 0.3s;
            width: 100%;
        }

        .chat-input-area button:hover {
            background: #2980b9;
        }

        /* 联系选项样式 */
        .contact-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
            border-top: 1px solid #eee;
            padding-top: 15px;
        }

        .contact-option {
            display: flex;
            align-items: center;
            padding: 12px;
            border-radius: 8px;
            background: #f8f9fa;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            color: #333;
        }

        .contact-option:hover {
            background: #e9ecef;
            transform: translateX(5px);
        }

        .contact-option i {
            font-size: 20px;
            margin-right: 10px;
            width: 24px;
            text-align: center;
        }

        .wechat-option i {
            color: #07C160;
        }

        .whatsapp-option i {
            color: #25D366;
        }

        .phone-option i {
            color: #e74c3c;
        }

        .mail-option i {
            color: #4595f0;
        }

        .contact-option span {
            flex: 1;
            font-size: 14px;
        }

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


        @media (max-width: 1200px) {
            .dropdown {
                width: 70vw;
                height: max-content;
                left: 50%;
                transform: translateX(-50%);
                overflow-y: auto;
            }

            .dropdown-columns {
                grid-template-columns: 1fr 1fr;
                /* 改为两列布局 */
                gap: 5px;
            }

            /* Steel Application 内部两列布局 */
            .steel-applications {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0 5px;
                grid-column: 1 / -1;
                /* 跨所有列 */
            }

            .steel-applications .dropdown-category {
                grid-column: 1 / -1;
                /* 类别标题跨两列 */
                text-align: center;
            }
        }

        @media (max-width: 992px) {
            .dropdown {
                width: 70vw;
                height: max-content;
                left: 50%;
                transform: translateX(-50%);
                overflow-y: auto;
            }

            .dropdown-columns {
                grid-template-columns: 1fr 1fr;
                /* 改为两列布局 */
                gap: 5px;
            }

            /* Steel Application 内部两列布局 */
            .steel-applications {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0 5px;
                grid-column: 1 / -1;
                /* 跨所有列 */
            }

            .steel-applications .dropdown-category {
                grid-column: 1 / -1;
                /* 类别标题跨两列 */
                text-align: center;
            }
            .product-name {
                font-size: 0.85rem;
            }

            .dropdown-category,
            .submenu-link {
                font-size: 0.85rem;
            }

            .submenu {
                max-width: 120px;
                gap: 5px;
            }

            .submenu-link {
                font-size: 0.75rem;
                padding: 3px 6px;
            }

            .footer-container {
                grid-template-columns: repeat(2, 1fr);
            }

            .footer-column:first-child .footer-links {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 850px) {

                /* 在更小的平板尺寸进一步优化 */
            .dropdown {
                width: 70vw;
                height: max-content;
                left: 50%;
                transform: translateX(-50%);
                overflow-y: auto;
            }

            .dropdown-columns {
                gap: 5px;
            }

            .steel-applications {
                gap: 0 5px;
            }
        }

        @media (max-width: 768px) {

            /* Mobile menu styles */
            .nav-menu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background-color: white;
                flex-direction: column;
                padding: 10px 0;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
                z-index: 1000;
                max-height: 70vh;
                overflow-y: auto;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
            }

            .nav-item {
                width: 100%;
                text-align: center;  /* 文字居中 */
            }

            .nav-link {
                display: block;
                padding: 1px 20px;  /* 增加点击区域 */
                text-align: center;
                font-size: 1.1rem;
                border-bottom: 1px solid #f0f0f0;  /* 添加分隔线 */
            }

            /* 移除最后一个的下划线 */
            .nav-item:last-child .nav-link {
                border-bottom: none;
            }

            .nav-menu.active {
                display: flex;
            }

            .mobile-menu-btn {
                display: block;
            }

            .dropdown {
                position: static;
                width: 100%;
                padding: 15px 0 0 0;
                border-left: none;
                display: none;
                max-height: 50vh;
                overflow-y: auto;
                transform: none;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
                background-color: #fafafa;  /* 下拉菜单背景色区分 */
                box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
            }

            .about-dropdown {
                position: static;
                top: auto;
                left: auto;
                transform: none;
                width: 100%;
                display: none; 
                max-height: 40vh;
                overflow-y: auto; 
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
                background-color: #fafafa;
            } 

            body:has(.nav-menu.active) {
                overflow: hidden;
                position: fixed;
                width: 100%;
            }

            .dropdown.active,
            .about-dropdown.active {
                display: block ;
            }

            .dropdown-columns {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }

            /* 重置Steel Applications布局 */
            .steel-applications {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0 5px;
                grid-column: 1 / -1;
                /* 跨所有列 */
            }

            .steel-applications .dropdown-category {
                grid-column: 1 / -1;
                text-align: center;
            }

            /* 重置Aluminum Applications位置 */
            .dropdown-column:nth-child(3) {
                grid-column: auto;
                margin-top: 0;
                border-top: none;
                padding-top: 0;
            }

            .dropdown-category,
            .submenu-link {
                font-size: 0.85rem;
            }

            /* 重置子菜单样式 */
            .submenu {
                max-width: 150px;
                gap: 8px;
            }

            .submenu-link {
                font-size: 0.8rem;
                padding: 4px 8px;
            }

            .footer-container {
                grid-template-columns: 1fr;
            }

            .footer-column:first-child .footer-links {
                grid-template-columns: repeat(2, 1fr);
            }

            .chat-panel {
                width: 320px;
                right: 10px;
            }

            .chat-button {
                width: 60px;
                height: 60px;
                font-size: 28px;
            }

            /* 下拉菜单展开时的指示箭头 */
            .nav-link.dropdown-toggle,.nav-link[href="/about-us/"] {
                position: relative;
            }

            .nav-link.dropdown-toggle::after,
            .nav-link[href="/about-us/"]::after {
                content: '▼';
                font-size: 0.7rem;
                margin-left: 8px;
                display: inline-block;
                transition: transform 0.3s;
            }

            .nav-link.dropdown-toggle.active::after,
            .nav-link[href="/about-us/"].active::after {
                transform: rotate(180deg);
            }

            /* About Us 下拉菜单样式 */
            .dropdown-menu {
                align-items: center;
                padding: 10px 0;
            }

            .menu-item {
                text-align: center;
                padding: 12px 20px;
                width: 100%;
                border-left: none;
                border-bottom: 1px solid #e0e0e0;
                font-size: 0.85rem;
            }

            .menu-item:last-child {
                border-bottom: none;
            }

            .menu-item:hover {
                border-left: none;
                background-color: #f5f5f5;
            }

            /* 调整子菜单居中 */
            .submenu {
                justify-content: center;
                max-width: 100%;
            }
        }

        @media (max-height: 630px) {
            .chat-panel {
                max-height: 450px;
                overflow-y: auto;
            }

            .wechat-popup-content {
                max-height: 350px;
                overflow-y: auto;
            } 
        }
        
        @media (max-width: 576px) {
            .dropdown-columns {
                grid-template-columns: 1fr 1fr;
            }

            /* 移动端优化子菜单布局 */
            .dropdown-item {
                flex-direction: column;
                align-items: center;  /* 改为 center 实现居中 */
                text-align: center;
            }

            .product-name {
                margin-bottom: 8px;  /* 与子菜单拉开距离 */
            }

            .submenu {
                margin-left: 0;
                margin-top: 0;
                max-width: 100%;
                justify-content: center;  /* 子菜单居中 */
            }

            .footer-column:first-child .footer-links {
                grid-template-columns: repeat(2, 1fr);
            }

            .chat-panel {
            width: 300px;
            }
        }