/* ============================================
   Cataloge Page Specific Styles
   ============================================ */

   *{ z-index: 1; }

/* --- Hero 区域 --- */
.product-hero {
    position: relative;
    width: 100%;
    min-height: 50vh;
    background: linear-gradient(135deg, #0a1a15 0%, #1a3a2e 50%, #0a1a15 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../resources/landingpic.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: 0;
}

.product-hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 8%;
}

.product-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.product-hero-content h2 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.product-hero-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* --- 筛选栏 --- */
.filter-wrapper {
    /* position: sticky; */
    /* top: 84px;
    z-index: 99; */
    padding: 20px 8%;
    border-bottom: 1px solid #e0e0e0;
    /* background: linear-gradient(to bottom, #ffffff, #f8f9f8); */
}

.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 20px;
    flex-wrap: wrap;
    /* background: rgba(255, 255, 255, 0.95); */
    /* backdrop-filter: blur(8px); */
}
.filter-bar.glass-box {
    backdrop-filter: none;
    background: none;
    box-shadow: none;
}
.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-right: 15px;
}

.filter-option {
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-option i {
    font-size: 14px;
}

.filter-option:hover {
    color: var(--primary-green);
    background: rgba(34, 62, 54, 0.08);
}

.filter-option.active {
    color: white;
    background: var(--primary-green);
}

.search-btn {
    background: rgba(34, 62, 54, 0.05);
    border-radius: 8px;
}

/* --- 产品网格 --- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0;
    padding: 20px 8% 80px;
    background: #ffffff;
}

/* 产品卡片 */
.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(34, 62, 54, 0.08);
    border-right: 1px solid rgba(34, 62, 54, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #ffffff;
}

/* 4列布局时，第4个元素去掉右边框 */
.catalog-grid .product-card:nth-child(4n) {
    border-right: none;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .catalog-grid .product-card:nth-child(4n) {
        border-right: 1px solid rgba(34, 62, 54, 0.08);
    }
    .catalog-grid .product-card:nth-child(3n) {
        border-right: none;
    }
}

@media (max-width: 900px) {
    .catalog-grid .product-card:nth-child(3n) {
        border-right: 1px solid rgba(34, 62, 54, 0.08);
    }
    .catalog-grid .product-card:nth-child(2n) {
        border-right: none;
    }
}

@media (max-width: 600px) {
    .catalog-grid .product-card {
        border-right: none !important;
    }
}


/* 1. 基础卡片：增加一个平滑的过渡，并锁定变换中心 */
.product-card {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
    will-change: transform; /* 告诉浏览器提前准备动画，减少闪烁 */
}

.product-card:hover {
    background: #eff1ef;
    /* 减小位移幅度，或确保鼠标位于中心 */
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

/* 2. 图片容器：解决渐变闪烁的黑科技 */
.image-container {
    background: #f5f7f5; /* 默认纯色背景 */
    border-radius: 8px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease;
}

/* 使用伪元素承载渐变背景，通过控制透明度来实现平滑过渡 */
.image-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at 30% 40%, #1a3a2ea4 0%, #0a1a15d7 100%);
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.6s ease; /* 渐变淡入，时间略长一点更高级 */
    z-index: 1;
}

.product-card:hover .image-container::after {
    opacity: 1; /* 鼠标移入时淡淡浮现，不再有突变感 */
}

/* 3. 图片处理：确保图片在渐变层之上 */
.image-container img {
    width: 75%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2; /* 确保在渐变伪元素之上 */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .image-container img {
    transform: scale(1.08); /* 稍微缩小缩放比例，视觉更稳 */
}

.product-card:hover {
    & .tag-badge {
        color: rgba(255, 255, 255, 1);
        transition: color 1s ease;
    }
}

/* 标签徽章 */
.tag-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    /* background: var(--primary-green); */
    color: rgba(255, 255, 255, 0);
    font-size: 9px;
    padding: 4px 10px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 2;
    backdrop-filter: blur(4px);
    transition: color 1s ease;
}

/* 产品信息 */
.info-content {
    margin-top: 20px;
}

.cat-text {
    font-size: 10px;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    font-weight: 600;
}

.name-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.product-card:hover .name-text {
    color: var(--accent-green);
}

.tech-text {
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 8px;
    border-top: 1px solid rgba(34, 62, 54, 0.1);
    display: inline-block;
}

/* 筛选动画 */
.catalog-grid .product-card {
    transition: all 0.4s ease;
}

.catalog-grid .product-card.filter-hidden {
    opacity: 0;
    transform: scale(0.8);
    display: none;
}

/* --- 定制区域 --- */
.customize-section {
    padding: 80px 8%;
    background: linear-gradient(135deg, #f8f9f8 0%, #ffffff 100%);
    border-top: 1px solid rgba(34, 62, 54, 0.08);
    border-bottom: 1px solid rgba(34, 62, 54, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.customize-content {
    flex: 1;
}

.customize-content h3 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.customize-content p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.6;
}

.customize-btn {
    padding: 14px 32px !important;
    background: var(--primary-green) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.customize-btn:hover {
    background: var(--accent-green) !important;
    transform: translateX(4px);
}

/* --- 响应式调整 --- */
@media (max-width: 768px) {
    .filter-wrapper {
        top: 70px;
    }
    
    .filter-bar {
        gap: 4px;
        padding: 12px 16px;
    }
    
    .filter-label {
        display: none;
    }
    
    .filter-option {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .customize-section {
        flex-direction: column;
        text-align: center;
    }
    
    .customize-content p {
        margin: 0 auto;
    }
    
    .product-hero-content h2 {
        font-size: 28px;
    }
    
    .product-hero-content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        padding: 20px 4% 60px;
        gap: 0;
    }
    
    .product-card {
        padding: 16px;
    }
    
    .name-text {
        font-size: 16px;
    }
    
    .tech-text {
        font-size: 10px;
    }
}

/* --- 空状态 --- */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 16px;
}

/* --- 加载动画 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog-grid .product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.catalog-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.catalog-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
.catalog-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
.catalog-grid .product-card:nth-child(4) { animation-delay: 0.2s; }
.catalog-grid .product-card:nth-child(5) { animation-delay: 0.25s; }
.catalog-grid .product-card:nth-child(6) { animation-delay: 0.3s; }
.catalog-grid .product-card:nth-child(7) { animation-delay: 0.35s; }
.catalog-grid .product-card:nth-child(8) { animation-delay: 0.4s; }


.filter-bar {
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

.filter-bar.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none; /* 隐藏时禁止点击 */
    visibility: hidden;
}


/* --- 新的布局容器 --- */
.catalogue-container {
    display: flex;
    max-width: 1400px; /* 或者根据你的需求设置 */
    margin: 0 auto;
    padding: 40px 5%;
    gap: 40px;
    align-items: flex-start; /* 必须设置，否则侧边栏高度会撑满整体 */
}

/* --- 左侧边栏 (Sticky) --- */
.filter-wrapper {
    position: sticky;
    top: 100px; /* 距离顶部高度，需根据你的 Header 高度调整 */
    width: 260px;
    flex-shrink: 0; /* 防止被压缩 */
    padding: 0; /* 重置原有 padding */
    border-bottom: none; /* 去掉顶部的底边线 */
}

.filter-bar {
    display: flex;
    flex-direction: column; /* 改为垂直排列 */
    gap: 12px;
    padding: 0;
}

.filter-label {
    margin-bottom: 15px;
    padding-left: 10px;
}

.filter-option {
    width: 100%;
    padding: 12px 18px;
    justify-content: flex-start; /* 靠左对齐 */
    background: transparent;
    border-radius: 12px;
}

.filter-option:hover {
    background: rgba(34, 62, 54, 0.05);
}

.filter-option.active {
    background: var(--primary-green);
    box-shadow: 0 4px 15px rgba(34, 62, 54, 0.15);
}

/* 搜索按钮在侧边栏的特殊样式 */
.search-btn {
    margin-top: 20px;
    border: 1px solid rgba(34, 62, 54, 0.1);
}

/* --- 右侧网格调整 --- */
.catalog-grid {
    flex: 1; /* 占据剩余空间 */
    padding: 0 !important; /* 取消原有内边距 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* gap: 20px;  */
}

/* 移除原有的边框样式，改为更现代的卡片感 */
.product-card {
    border: 1px solid rgba(34, 62, 54, 0.05);
    /* border-radius: 16px; */
 
}

/* --- 响应式处理：在手机端恢复为顶部滑动或隐藏 --- */
@media (max-width: 1024px) {
    .catalogue-container {
        flex-direction: column;
        padding: 20px 5%;
    }

    .filter-wrapper {
        position: static; /* 手机端取消固定 */
        width: 100%;
        margin-bottom: 20px;
    }

    .filter-bar {
        flex-direction: row; /* 恢复水平排列 */
        overflow-x: auto; /* 允许横向滑动 */
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .filter-option {
        width: auto;
    }
}



h3.name-text:after{
    content: "→";
    padding-left: 10px;
    display: inline-block;
    width: 2em;
    height: 2px;
    
}



/* 1. 基础卡片调整：去掉原来的 a 标签默认下划线，改为 div 容器 */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    /* 保持原有边框和过渡动画 */
}

.card-main-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 2. 下载容器 */
.download-container {
    position: relative;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(34, 62, 54, 0.08);
}

/* 3. 下载按钮样式（模仿图一） */
.download-trigger {
    width: 100%;
    padding: 10px 15px;
    background: #f4f4f4; /* 浅灰色背景 */
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: var(--primary-green);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-trigger:hover {
    background: #ebebeb;
    border-color: #ccc;
}

/* 4. 下拉菜单（默认隐藏） */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 8px 0;
    z-index: 999;
    
    /* 动画初始状态：透明且偏上 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px); 
    transition: all 0.3s ease;
}

/* 鼠标悬停容器时显示菜单 */
.download-container:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px); /* 向下浮现 */
}

/* 5. 菜单项样式 */
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.dropdown-menu a i {
    font-size: 16px;
    color: var(--primary-green);
}

.dropdown-menu a:hover {
    background: #f8f9f8;
    color: var(--primary-green);
}

/* 兼容性处理：如果卡片在网格边缘，确保下拉框不被裁切 */
.catalog-grid {
    overflow: visible; /* 必须为 visible */
}