@charset "utf-8";

/*
 * ========================================
 * 3D打印机产品页面样式
 * ========================================
 * 文件路径：assets/zh-cn/css/3d-printers.css
 * 
 * 【功能说明】
 * 1. 品牌导航栏样式（Sticky定位）
 * 2. 品牌分隔样式（橙色标签 + 红色波浪线）
 * 3. 产品卡片样式
 * 4. 响应式布局（重点优化移动端）
 * ========================================
 */

/* ====================================================================
 * 页面特定布局优化（仅影响 3D 打印机页面）
 * ==================================================================== */
/* 确保所有父容器都不会影响 sticky 定位 */
.site-main {
    overflow: visible !important; /* 仅在此页面生效，不影响其他页面 */
}

/* 确保 page-content 也不会影响 sticky 定位 */
.page-content {
    overflow: visible !important;
}

/* ====================================================================
 * 面包屑导航（Breadcrumb Navigation）- 精致按钮式设计
 * ==================================================================== */

/* 容器：透明背景，无边框（与详情页风格统一，整体更薄） */
.site-main .page-breadcrumb {
    background: transparent;
    padding: 0.4rem 0; /* 原 0.75rem，减薄高度 */
    border-bottom: none;
    position: relative;
}

.site-main .page-breadcrumb .container {
    padding: 0 1rem;
}

/* 面包屑列表 */
.site-main .page-breadcrumb .breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 每个面包屑项 = 精致小按钮 */
.site-main .page-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
    padding: 0.25rem 0.55rem; /* 与详情页一致，整体更紧凑 */
    /* 文字样式优化 - 简洁大气有质感 */
    font-size: 0.8125rem; /* 13px - 稍微增大，更易读 */
    line-height: 1.5; /* 优化行高，更舒适 */
    font-weight: 400; /* 使用常规字重，更精致 */
    letter-spacing: 0.01em; /* 微调字间距，更大气 */
    color: var(--text-primary); /* 使用主文字色，更深更有对比度 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; /* 优化字体栈 */
    text-transform: none; /* 确保不改变大小写 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    /* 字体渲染优化 - 提升质感 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1; /* 启用字距调整 */
}

/* 分隔符（使用符号 ›） */
.site-main .page-breadcrumb .breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    margin-right: 0;
    color: var(--text-tertiary);
    font-weight: 300; /* 更细的字重，更精致 */
    font-size: 0.9375rem; /* 稍微增大，更清晰 */
    opacity: 0.5; /* 降低透明度，更低调 */
    letter-spacing: 0; /* 分隔符不需要字间距 */
}

/* 链接样式 */
.site-main .page-breadcrumb .breadcrumb-item a {
    color: inherit; /* 默认跟随父元素颜色，避免始终是蓝色 */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
    font-weight: 400; /* 保持与父元素一致 */
    letter-spacing: inherit; /* 继承字间距 */
}

.site-main .page-breadcrumb .breadcrumb-item a:hover {
    color: var(--accent-color); /* 悬停时才高亮为主题蓝色 */
    text-decoration: none;
    font-weight: 500; /* 悬停时稍微加粗，增加交互感 */
}

/* 链接悬停时，整个按钮提升 */
/* 使用 :has() 选择器（现代浏览器支持） */
.site-main .page-breadcrumb .breadcrumb-item:has(a:hover) {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 备用方案：直接悬停包含链接的面包屑项时（兼容旧浏览器，仅对非active项生效） */
.site-main .page-breadcrumb .breadcrumb-item:not(.active):hover {
    background: rgba(0, 0, 0, 0.06);
}

/* 图标样式 */
.site-main .page-breadcrumb .breadcrumb-item a i {
    font-size: 0.875rem; /* 稍微增大，与文字更协调 */
    opacity: 0.75; /* 稍微降低透明度，更精致 */
    transition: opacity 0.2s ease;
}

.site-main .page-breadcrumb .breadcrumb-item a:hover i {
    opacity: 1; /* 悬停时图标更清晰 */
}

/* 当前页（非链接）- 淡橙色背景 */
.site-main .page-breadcrumb .breadcrumb-item.active {
    background: rgba(255, 179, 102, 0.1);
    color: var(--text-primary);
    font-weight: 500; /* 从600改为500，更精致 */
    letter-spacing: 0.015em; /* 当前页字间距稍大，更突出 */
}

/* 移动端优化 */
@media (max-width: 767.98px) {
    .site-main .page-breadcrumb {
        padding: 0.45rem 0; /* 与详情页一致，减薄高度 */
    }
    
    .site-main .page-breadcrumb .breadcrumb-item {
        font-size: 0.75rem; /* 移动端稍微增大，保持可读性 */
        padding: 0.25rem 0.45rem; /* 与详情页一致，更紧凑 */
        letter-spacing: 0.005em; /* 移动端字间距稍小 */
    }
    
    .site-main .page-breadcrumb .breadcrumb-item:not(:last-child)::after {
        margin-left: 0.375rem;
        font-size: 0.875rem; /* 移动端分隔符稍大 */
    }
    
    .site-main .page-breadcrumb .breadcrumb-item a i {
        font-size: 0.8125rem; /* 移动端图标稍大 */
    }
}

/* ====================================================================
 * 品牌导航栏（Sticky定位，不使用侧边菜单）
 * ==================================================================== */
.site-main .brand-navbar {
    position: relative; /* 初始为relative，JavaScript会切换为fixed */
    top: 0;
    z-index: 999; /* 比header低1，确保header在滚动时覆盖它 */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* JavaScript控制的fixed定位状态 */
.site-main .brand-navbar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.site-main .brand-navbar.scrolled {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    background: rgba(255, 255, 255, 0.99);
}

/* 移动端：同样粘在顶部 */
@media (max-width: 767.98px) {
    .site-main .brand-navbar {
        top: 0; /* 移动端也粘在顶部 */
    }
}

.site-main .brand-navbar .container {
    padding: 0 1rem;
}

.site-main .brand-nav-list {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    position: relative;
}

.site-main .brand-nav-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* 滚动指示器 - 左侧渐变遮罩 */
.site-main .brand-nav-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.site-main .brand-nav-list.scrollable-left::before {
    opacity: 1;
}

/* 滚动指示器 - 右侧渐变遮罩 */
.site-main .brand-nav-list::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.site-main .brand-nav-list.scrollable-right::after {
    opacity: 1;
}

.site-main .brand-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0; /* 防止压缩 */
}

/* 悬停效果 */
.site-main .brand-nav-item:hover {
    color: var(--primary-color);
    background: var(--primary-pale);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 179, 102, 0.15);
}

/* 悬停时显示下划线 */
.site-main .brand-nav-item:hover::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* 活动状态 */
.site-main .brand-nav-item.active {
    color: var(--primary-color);
    background: var(--primary-pale);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 179, 102, 0.2);
}

/* 活动状态：不显示固定下划线，只在悬停时显示 */

/* 活动状态 + 悬停：显示下划线 */
.site-main .brand-nav-item.active:hover::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 1;
    transition: all 0.3s ease;
}

/* ====================================================================
 * 品牌导航栏 - 响应式排布（根据品牌数量）
 * ==================================================================== */

/* ========== 1个品牌 ========== */
.site-main .brand-nav-list.brand-count-1 {
    justify-content: center;
}

.site-main .brand-nav-list.brand-count-1 .brand-nav-item {
    min-width: auto;
    max-width: 200px;
}

/* ========== 2个品牌 ========== */
.site-main .brand-nav-list.brand-count-2 {
    justify-content: space-between;
}

@media (min-width: 481px) {
    .site-main .brand-nav-list.brand-count-2 {
        justify-content: center;
        gap: 2rem;
    }
}

/* ========== 3个品牌 ========== */
.site-main .brand-nav-list.brand-count-3 {
    justify-content: flex-start;
}

@media (min-width: 481px) {
    .site-main .brand-nav-list.brand-count-3 {
        justify-content: center;
        gap: 1.5rem;
    }
}

/* ========== 4个品牌 ========== */
.site-main .brand-nav-list.brand-count-4 {
    justify-content: flex-start;
}

@media (min-width: 481px) and (max-width: 768px) {
    .site-main .brand-nav-list.brand-count-4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem 0.5rem;
    }
}

@media (min-width: 769px) {
    .site-main .brand-nav-list.brand-count-4 {
        justify-content: center;
        gap: 1rem;
    }
}

/* ========== 5个品牌 ========== */
.site-main .brand-nav-list.brand-count-5 {
    justify-content: flex-start;
}

@media (min-width: 769px) {
    .site-main .brand-nav-list.brand-count-5 {
        justify-content: center;
        gap: 0.875rem;
    }
    
    .site-main .brand-nav-list.brand-count-5 .brand-nav-item {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* ========== 移动端通用优化 ========== */
@media (max-width: 480px) {
    .site-main .brand-nav-list {
        justify-content: flex-start;
        padding: 0.75rem 0;
        gap: 0.75rem;
    }
    
    .site-main .brand-nav-item {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    /* 1个品牌：小屏也居中 */
    .site-main .brand-nav-list.brand-count-1 {
        justify-content: center;
    }
    
    /* 2个品牌：小屏两端对齐 */
    .site-main .brand-nav-list.brand-count-2 {
        justify-content: space-between;
        padding: 0.75rem 0.5rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .site-main .brand-nav-list {
        padding: 0.875rem 0;
    }
}

@media (min-width: 769px) {
    .site-main .brand-nav-list {
        justify-content: center;
        padding: 1rem 0;
    }
    
    /* 2个品牌：大屏加大间距 */
    .site-main .brand-nav-list.brand-count-2 {
        gap: 3rem;
    }
    
    /* 3个品牌：大屏均匀分布 */
    .site-main .brand-nav-list.brand-count-3 {
        gap: 2rem;
    }
}

/* ====================================================================
 * 品牌区域分隔（橙色标签 + 红色波浪线）
 * ==================================================================== */
.site-main .brand-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4rem 0;
    gap: 1.5rem;
    padding: 2rem 0;
    position: relative;
}

/* 渐变线条 */
.site-main .divider-line-left,
.site-main .divider-line-right {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%);
    position: relative;
    overflow: hidden;
}

.site-main .divider-line-left::after,
.site-main .divider-line-right::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.8), 
        transparent);
    animation: shimmer 2s infinite;
}

/* 品牌标签（橙色边框） */
.site-main .divider-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.site-main .brand-divider:hover .divider-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 179, 102, 0.3);
}

.site-main .badge-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
}

.site-main .badge-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 红色波浪线 */
.site-main .divider-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    overflow: hidden;
}

.site-main .wave-svg {
    width: 100%;
    height: 100%;
    fill: #EF4444; /* 红色 */
}

.site-main .wave-svg path {
    animation: waveMove 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes waveMove {
    0%, 100% {
        d: path("M0,4 Q300,0 600,4 T1200,4 L1200,8 L0,8 Z");
    }
    50% {
        d: path("M0,4 Q300,8 600,4 T1200,4 L1200,8 L0,8 Z");
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .site-main .brand-divider {
        margin: 3rem 0;
        padding: 1.5rem 0;
        gap: 1rem;
    }
    
    .site-main .divider-badge {
        padding: 0.625rem 1.25rem;
    }
    
    .site-main .badge-icon {
        width: 28px;
        height: 28px;
        font-size: 1.125rem;
    }
    
    .site-main .badge-text {
        font-size: 1rem;
    }
    
    .site-main .divider-wave {
        height: 6px;
    }
}

/* ====================================================================
 * 页面标题区域 - 简洁居中版
 * ==================================================================== */
.site-main .page-header-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 0 1.5rem;
    position: relative;
}

.page-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.page-main-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    padding: 0 1.5rem;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .site-main .page-header-section {
        margin-bottom: 2.5rem;
        padding: 2rem 0 1rem;
    }
    
    .site-main .page-main-title {
        font-size: 1.875rem;
        margin-bottom: 0.75rem;
    }
    
    .site-main .page-main-desc {
        font-size: 0.9375rem;
        padding: 0 1rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .site-main .page-header-section {
        padding: 1.5rem 0 0.75rem;
    }
    
    .site-main .page-main-title {
        font-size: 1.625rem;
    }
    
    .site-main .page-main-desc {
        font-size: 0.875rem;
    }
}

/* ====================================================================
 * 品牌区域
 * ==================================================================== */
.site-main .brand-section {
    margin-bottom: 4rem;
    padding-top: 1rem;
    scroll-margin-top: 80px; /* 为sticky导航栏留出空间 */
}

/* 移动端优化 */
@media (max-width: 768px) {
    .site-main .brand-section {
        margin-bottom: 3rem;
        padding-top: 0.5rem;
        scroll-margin-top: 60px;
    }
}

/* ====================================================================
 * 产品网格
 * ==================================================================== */
.site-main .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

/* 桌面端：4列布局（大屏） */
@media (min-width: 1400px) {
    .site-main .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 桌面端：3列布局（中屏） */
@media (min-width: 992px) and (max-width: 1399px) {
    .site-main .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 平板端：2列布局 */
@media (min-width: 769px) and (max-width: 991px) {
    .site-main .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* 产品卡片 */
.site-main .product-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.25s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    height: 100%;
}

.site-main .product-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 2px rgba(255, 107, 53, 0.25);
    border-color: var(--primary-lighter);
    text-decoration: none;
    color: var(--text-primary);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 200px;
    max-height: 300px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.site-main .product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.feature-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--primary-pale);
    color: var(--primary-color);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.site-main .product-card:hover .feature-tag {
    background: var(--primary-lighter);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .site-main .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .site-main .product-image {
        min-height: 150px;
        max-height: 200px;
    }
    
    .site-main .product-info {
        padding: 1.25rem 1rem;
    }
    
    .site-main .product-title {
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }
    
    .site-main .product-desc {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .site-main .product-features {
        gap: 0.375rem;
        margin-top: 0.5rem;
    }
    
    .site-main .feature-tag {
        padding: 0.25rem 0.625rem;
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .site-main .products-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .site-main .product-card {
        border-radius: 12px;
    }
    
    .site-main .product-image {
        min-height: 180px;
        max-height: 220px;
    }
    
    .site-main .product-info {
        padding: 1.25rem;
    }
}

/* ====================================================================
 * 页面容器优化
 * ==================================================================== */
.site-main .page-section {
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .site-main .page-section {
        padding: 2rem 0;
    }
}

/* ====================================================================
 * 容器 Padding 设置（只针对页面内容，不影响 footer）
 * ==================================================================== */
/* 只针对页面内容的容器设置 padding，不影响 footer 的宽度 */
.site-main .page-content .container,
.site-main .brand-navbar .container,
.site-main .page-section .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 768px) {
    .site-main .page-content .container,
    .site-main .brand-navbar .container,
    .site-main .page-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ====================================================================
 * 工具类
 * ==================================================================== */
.site-main .text-center {
    text-align: center;
}

.site-main .mb-4 {
    margin-bottom: 2rem;
}

.site-main .mt-4 {
    margin-top: 2rem;
}

/* 屏幕阅读器专用类（仅对屏幕阅读器可见，视觉上隐藏） */
.site-main .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
