
    /* 1. 先在CSS中定义默认值 */
    :root {
        --navbar-height: 56px; /* Bootstrap导航栏默认高度 */
    }

    /* ============ 全屏覆盖层样式 ============ */
    .fullscreen-overlay {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background-color: rgba(0, 0, 0, 0.9);
        display: none;
        z-index: 1030;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .fullscreen-overlay.show {
        display: flex;
        opacity: 1;
    }

    /* 覆盖层内部内容 - 两栏布局 */
    .overlay-content {
        display: flex;
        width: 100%;
        height: 100%;
        background-color: white;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    /* 左侧目录区域 */
    .overlay-categories {
        width: 280px;
        background-color: #f8f9fa;
        border-right: 1px solid #dee2e6;
        overflow-y: auto;
        padding: 20px;
        box-sizing: border-box;
    }

    .overlay-categories h3 {
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #007bff;
        color: #333;
    }

    .category-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .category-item {
        padding: 12px 15px;
        margin-bottom: 8px;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-left: 4px solid transparent;
    }

    .category-item:hover {
        background-color: #e9ecef;
        border-left-color: #6c757d;
    }

    .category-item.active {
        background-color: #007bff;
        color: white;
        border-left-color: #0056b3;
    }

    /* 右侧产品区域 */
    .overlay-products {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .overlay-products h3 {
        margin-bottom: 20px;
        color: #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }


    /* ============ 产品卡片布局修正 ============ */
    .hd-products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);  /* 每行两个产品 */
        gap: 20px;
        margin-bottom: 30px;
    }

    /* 产品卡片 - 核心修正 */
    .hd-product-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        width: 100% !important;
        height: 180px !important; /* 固定高度确保整齐 */
        min-height: 180px !important;
        max-height: 180px !important;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background-color: #ffffff;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        box-sizing: border-box !important;
        position: relative;
    }

    .hd-product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-color: #007bff;
    }

    /* 左侧图片容器 - 精确控制为25% */
    .hd-product-image-container {
        width: 180px !important; /* 固定宽度，不是百分比 */
        min-width: 180px !important;
        max-width: 180px !important;
        height: 100% !important;
        background-color: #f8f9fa;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        border-right: 1px solid #eee;
        flex-shrink: 0 !important;
    }

    /* 图片本身 - 完整显示 */
    .hd-product-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: scale-down !important;  /* 保持比例，但不留白 contain !important; /* 关键：保持原比例完整显示 */
        object-position: center center !important;
        display: block !important;
        background-color: #ffffff;
        border-radius: 4px;
    }

    /* 右侧内容区域 - 精确控制为75% */
    .hd-product-content {
        flex: 1 !important;
        min-width: 0 !important; /* 关键：允许内容收缩 */
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        height: 100% !important;
    }

    /* 标题区域 */
    .hd-product-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333333 !important;
        margin: 0 0 10px 0 !important;
        line-height: 1.4 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-height: 44px !important; /* 2行高度 */
        word-break: break-word !important;
        word-wrap: break-word !important;
    }

    /* 描述区域 */
    .hd-product-description {
        font-size: 14px !important;
        color: #666666 !important;
        line-height: 1.5 !important;
        margin: 0 0 10px 0 !important;
        flex-grow: 1 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-height: 63px !important; /* 3行高度 */
        word-break: break-word !important;
        word-wrap: break-word !important;
    }

    /* 底部区域 */
    .hd-product-footer {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: auto !important;
        padding-top: 8px !important;
        border-top: 1px solid #f0f0f0;
    }

    .hd-product-date {
        font-size: 12px !important;
        color: #999999 !important;
        font-style: italic;
    }

    .hd-product-link {
        font-size: 13px !important;
        color: #007bff !important;
        text-decoration: none !important;
        font-weight: 500;
        white-space: nowrap;
        padding: 4px 8px;
        border-radius: 4px;
        transition: all 0.2s ease;
    }

    .hd-product-link:hover {
        color: #0056b3 !important;
        background-color: #f0f8ff;
        text-decoration: none !important;
    }

    /* 图片加载失败时的样式 */
    .hd-product-image[src*="default-product"],
    .hd-product-image:not([src]),
    .hd-product-image[src=""],
    .hd-product-image[src="null"],
    .hd-product-image[src="undefined"] {
        background-color: #f8f9fa;
        border: 1px dashed #dee2e6;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        color: #999;
    }

    .hd-product-image[src*="default-product"]::after,
    .hd-product-image:not([src])::after,
    .hd-product-image[src=""]::after,
    .hd-product-image[src="null"]::after,
    .hd-product-image[src="undefined"]::after {
        content: "暂无图片";
        display: block;
    }

    /* 响应式调整 */
    @media (max-width: 1200px) {
        .hd-products-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .hd-product-card {
            height: 170px !important;
            min-height: 170px !important;
        }

        .hd-product-image-container {
            width: 160px !important;
            min-width: 160px !important;
            max-width: 160px !important;
            padding: 12px !important;
        }

        .hd-product-image {
            max-width: 140px !important;
            max-height: 140px !important;
        }
    }

    @media (max-width: 992px) {
        .hd-products-grid {
            gap: 12px;
        }

        .product-card {
            height: 160px !important;
            min-height: 160px !important;
        }

        .hd-product-image-container {
            width: 150px !important;
            min-width: 150px !important;
            max-width: 150px !important;
            padding: 10px !important;
        }

        .hd-product-content {
            padding: 12px !important;
        }

        .hd-product-title {
            font-size: 15px !important;
            margin-bottom: 8px !important;
        }

        .hd-product-description {
            font-size: 13px !important;
            -webkit-line-clamp: 2 !important;
            max-height: 42px !important;
        }
    }

    @media (max-width: 768px) {
        .hd-products-grid {
            grid-template-columns: 1fr !important; /* 手机端单列 */
            gap: 15px;
        }

        .hd-product-card {
            height: auto !important;
            min-height: 150px !important;
            flex-direction: column !important;
        }

        .hd-product-image-container {
            width: 100% !important;
            min-width: 100% !important;
            max-width: 100% !important;
            height: 180px !important;
            padding: 20px !important;
            border-right: none !important;
            border-bottom: 1px solid #eee;
        }

        .hd-product-image {
            max-width: 100% !important;
            max-height: 140px !important;
        }

        .hd-product-content {
            height: auto !important;
            min-height: 120px !important;
        }

        .hd-product-description {
            -webkit-line-clamp: 2 !important;
        }
    }

    @media (max-width: 576px) {
        .hd-product-image-container {
            height: 160px !important;
            padding: 15px !important;
        }

        .hd-product-image {
            max-height: 130px !important;
        }
    }

    /* 空状态样式 */
    .hd-no-products {
        grid-column: 1 / -1;
        text-align: center;
        padding: 60px 20px;
        color: #666;
        background-color: #f8f9fa;
        border-radius: 8px;
        border: 1px dashed #dee2e6;
        font-size: 16px;
    }


    /* ============ 响应式布局 ============ */

/* 桌面端布局 */
.desktop-layout {
    display: none;
}

@media (min-width: 992px) {
    .desktop-layout {
        display: flex !important;
    }

    .mobile-layout {
        display: none !important;
    }
}

/* 移动端布局 */
.mobile-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 移动端分类切换头部 */
.category-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.category-toggle-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.category-toggle-header .toggle-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.category-toggle-header.active .toggle-icon {
    transform: rotate(180deg);
}

/* 移动端分类抽屉 */
.mobile-categories-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.mobile-categories-drawer.show {
    max-height: 40vh;
    overflow-y: auto;
}

/* 移动端分类列表 */
.mobile-category-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.mobile-category-list .category-item {
    padding: 12px 20px;
    border-left: none;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.mobile-category-list .category-item:last-child {
    border-bottom: none;
}

.mobile-category-list .category-item.active {
    background-color: #e8f4ff;
    color: #007bff;
}

/* 移动端产品区域 */
.mobile-products-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.mobile-products-area .hd-products-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
}

.mobile-products-area .product-card {
    flex-direction: column !important;
    height: auto !important;
    min-height: 150px !important;
}

.mobile-products-area .product-image-container-bg {
    width: 100% !important;
    height: 160px !important;
    border-right: none !important;
    border-bottom: 1px solid #eee;
}

/* 移动端分页 */
.mobile-products-area .pagination-container {
    padding: 10px;
    margin-top: 20px;
}

/* 移动端产品计数 */
#mobileProductCount {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}



/* ============ 移动端产品卡片样式 ============ */
.mobile-product-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 360px !important;  /* 确保卡片有足够高度 */
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    margin-bottom: 15px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
}

.mobile-product-image-container {
    width: 100% !important;
    height: 180px !important;
    background-color: #f8f9fa !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-bottom: 1px solid #eee !important;
}

.mobile-product-content {
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;  /* 让内容区域填充剩余空间 */
    min-height: 150px !important;  /* 确保文字区域有足够空间 */
}

.mobile-product-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.4 !important;
    display: block !important;
    word-break: break-word !important;
}

.mobile-product-description {
    font-size: 14px !important;
    color: #666666 !important;
    line-height: 1.5 !important;
    margin: 0 0 5px 0 !important;
    display: block !important;
    word-break: break-word !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 63px !important;  /* 从42px改为63px (14*1.5*3) */
}

.mobile-product-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: auto !important;
    padding-top: 10px !important;
    border-top: 1px solid #f0f0f0 !important;
}

.mobile-product-date {
    font-size: 12px !important;
    color: #999999 !important;
    font-style: italic !important;
}

.mobile-product-link {
    font-size: 13px !important;
    color: #007bff !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.mobile-product-link:hover {
    color: #0056b3 !important;
    background-color: #f0f8ff !important;
    text-decoration: none !important;
}

/* 确保移动端产品网格正确显示 */
.mobile-products-area .hd-products-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* 覆盖可能隐藏内容的样式 */
.mobile-products-area .product-card,
.mobile-products-area .product-content,
.mobile-products-area .product-title,
.mobile-products-area .product-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
}

