/* Logo样式 */
.logo {
    height: 80px;
    width: auto;
}

.header-container {
    width: 100%;
}

.current-menu-item {
    color: #3b82f6;
    position: relative;
}

.current-menu-item::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3b82f6;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
}

/* 确保下拉菜单与父项之间没有间隙 */
.dropdown-menu {
    margin-top: 0;
    top: 100%;
}

/* 为下拉菜单添加一个透明的顶部padding，作为鼠标移动的缓冲区 */
.dropdown-menu::before {
    content: '';
    display: block;
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

/* 确保父项有足够的padding-bottom来容纳这个缓冲区 */
.dropdown>a {
    padding-bottom: 30px;
}

/* 或者使用这种方法 - 在父项和子菜单之间创建一个不可见的连接区域 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    top: calc(100% - 1px);
}

.dropdown-submenu:hover .dropdown-submenu-content {
    display: block;
}

.dropdown-submenu-content {
    display: none;
    left: 100%;
    top: 0;
}

.top-border {
    border-top: 1px solid #e5e7eb;
}

.bottom-border {
    border-bottom: 1px solid #e5e7eb;
}

/* 新增样式：全宽下拉菜单 */
.full-width-dropdown {
    position: static !important;
}

.full-width-dropdown .dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px;
    background: radial-gradient(circle, #abc3db 0%, #2a557f 100%);
    border-top: 1px solid #e5e7eb;
}

.products-menu-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.products-categories {
    width: 20%;
    padding-right: 20px;
    border-right: 1px solid #e5e7eb;
}

.products-subcategories {
    width: 75%;
    padding-left: 20px;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    position: relative;
    padding-bottom: 50px;
    min-height: 280px;
}

/* 确保网格有足够的高度来容纳 More 按钮的固定位置 */
.subcategory-grid::after {
    content: '';
    grid-column: 1 / -1;
    height: 0;
}

.subcategory-item {
    text-align: center;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.subcategory-item:hover {
    transform: translateY(-2px);
}

.subcategory-logo {
    height: 100px;
    width: 100px;
    margin: 0 auto 10px;
    background: #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory-name {
    font-size: 14px;
    color: #374151;
}

/* More 按钮样式 - 固定在第二行末尾位置，不受内容数量影响 */
.subcategory-more-btn {
    position: absolute;
    bottom: 0px;
    right: -100px;
    min-width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* border: 2px solid #ef4444; */
    border-radius: 6px;
    /* color: #ef4444; */
    font-weight: 600;
    font-size: 20px;
    text-decoration: none;
    /* background-color: rgba(255, 255, 255, 0.95); */
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0 16px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    cursor: pointer;
    white-space: nowrap;
}

.subcategory-more-btn:hover {
    /* background-color: #ef4444; */
    color: #ffffff;
    transform: translateY(-2px);
    /* box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); */
}

/* 确保一级菜单靠近左边 */
nav>ul {
    margin-left: 0;
    padding-left: 0;
}

/* 社交媒体图标样式 */
.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 移动端样式调整 */
@media (max-width: 1300px) {
    .header-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    /* .lg\:flex {
        display: none !important;
    } */
/* 
    #mobileMenuButton {
        display: block !important;
    } */
    .text-lg{
        font-size: 1rem !important;
    }
    .full-width-dropdown .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        width: 100%;
    }

    .products-menu-container {
        flex-direction: column;
    }

    .products-categories,
    .products-subcategories {
        width: 100%;
        padding: 0;
        border: none;
    }

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

    /* 移动端隐藏 More 按钮 */
    .subcategory-more-btn {
        display: none !important;
    }

    /* 移动端菜单项靠左 */
    #mobileMenu ul {
        padding-left: 0;
    }

    #mobileMenu li>a {
        display: block;
        width: 100%;
    }

    /* 隐藏桌面端电话，显示社交媒体 */
    .header-phone {
        display: none !important;
    }

    .header-social {
        display: flex !important;
    }
}
@media (max-width: 1279px) {

    .lg\:flex {
        display: none !important;
    }
    
}
@media (max-width: 576px) {
        /* 隐藏顶部导航栏的社交媒体图标 */
    .header-social {
        display: none !important;
    }
}

@media (min-width: 1301px) {
    /* .header-social {
        display: none !important;
    } */

    .header-phone {
        display: block !important;
    }
}

/* 移动端子菜单缩进 */
.mobile-submenu {
    padding-left: 1.5rem !important;
}

.mobile-submenu-2 {
    padding-left: 3rem !important;
}

@media (min-width: 640px) {
    .header-container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .header-container {
        max-width: 960px;
    }
}

@media (min-width: 1024px) {
    .header-container {
        max-width: 1024px;
    }
}
@media (min-width: 1024px) {
    .header-container {
        max-width: 1024px;
    }
}
@media (min-width: 1280px) {
    .header-container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .header-container {
        max-width: 1536px;
    }
}
@media (min-width: 1536px) {
    .header-container {
        max-width: 1536px;
    }
}

/* 添加到您的CSS文件 */
.products-categories a.active {
    background-color: #f3f4f6 !important;
    color: #3b82f6 !important;
}

.full-width-dropdown:hover>a {
    color: #3b82f6 !important;
}