/* 产品列表样式 */
.left-nav {
    background-color: #daecff;
    border-radius: 8px;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.left-nav > div {
    position: relative;
}

.left-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    flex: 1;
}

.left-nav a:hover,
.left-nav a.active {
    color: #123271;
    font-weight: 600;
}

.left-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 导航链接包装器 - 控制hover宽度100% */
.nav-link-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.nav-link-wrapper:hover {
    background-color: #c4e2ff;
    border-left-color: #123271;
}

.nav-link-wrapper:hover .nav-link {
    color: #123271;
    font-weight: 600;
}

.nav-link.active {
    color: #123271;
    font-weight: 600;
}

.nav-link-wrapper:hover .nav-link.active {
    color: #123271;
    font-weight: 600;
}

/* 当链接是active状态时，包装器也要有背景色 */
.nav-link-wrapper.active {
    background-color: #c4e2ff;
    border-left-color: #123271;
}

.nav-link-wrapper.active:hover {
    background-color: #c4e2ff;
    border-left-color: #123271;
}

/* 展开/收起按钮 */
.nav-toggle-btn {
    background: none;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.nav-toggle-btn:hover {
    color: #123271;
}

.nav-toggle-btn i {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.has-children.active .nav-toggle-btn i {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.active {
    max-height: 500px;
}

.submenu a {
    padding-left: 40px;
    font-size: 0.95em;
    width: 100%;
    border-left: 4px solid transparent;
}

.submenu a:hover,
.submenu a.active {
    background-color: #c4e2ff;
    border-left-color: #123271;
    color: #123271;
    font-weight: 600;
}

.no-children > a {
    cursor: pointer;
    width: 100%;
}

.no-children > a:hover {
    background-color: #c4e2ff;
    border-left-color: #123271;
    color: #123271;
    font-weight: 600;
}

.tab-button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button.active {
    background: #123271;
    color: white;
    border-color: #123271;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
}

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

.product-image {
    height: 200px;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: none !important;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a.active,
.pagination a:hover:not(.disabled) {
    background: #123271;
    color: white;
    border-color: #123271;
}

.pagination a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 移动端导航控制 */
.mobile-nav-toggle {
    display: none;
    background-color: #123271;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    font-weight: 600;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.mobile-nav-toggle i {
    transition: transform 0.3s ease;
}

.mobile-nav-toggle.active i {
    transform: rotate(180deg);
}

@media (max-width: 1024px) {
    .left-nav-container {
        position: relative;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .left-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 100;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .left-nav.active {
        display: block;
    }

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

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .tab-container {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-button {
        display: inline-block;
        min-width: 100px;
    }
}