:root {
    --brand-orange: #f07c38; 
    --brand-orange-hover: #d96826;
    --text-dark: #000000;
    --text-gray: #333333;
}

/* 锁定全局宽度，防止页面左右晃动 */
html, body { width: 100%; overflow-x: hidden !important; position: relative; -webkit-text-size-adjust: 100%; }
body { background-color: #fff; color: var(--text-gray); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* =========================================
   面包屑导航样式
   ========================================= */
.breadcrumb-wrapper {
    background-color: #fff;
    padding: 15px 0;
    margin-top: 90px; 
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
}
.custom-breadcrumb {
    margin: 0;
    padding: 0 0 15px 0;
    list-style: none;
    font-size: 16px;
    color: #666;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}
.custom-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}
.custom-breadcrumb a:hover {
    color: var(--brand-orange);
}
.custom-breadcrumb .separator {
    margin: 0 8px;
    color: #999;
    font-size: 14px;
}
.custom-breadcrumb span:last-child {
    color: #666;
    font-weight: normal;
}

/* 页面主容器基础间距 */
.product-main-container { margin-bottom: 80px; }

/* =========================================
   产品图片幻灯片 (进一步放大图片占比)
   ========================================= */
.showpic_box { margin-bottom: 30px; padding-right: 15px; overflow: hidden; } /* 减少右侧留白，把空间给图片，并防止溢出 */
.bx-wrapper { margin-bottom: 35px !important; border: none !important; box-shadow: none !important; background: transparent !important; width: 100% !important; max-width: 100% !important; }

.bx-wrapper .bx-viewport {
    border: none; 
    box-shadow: none; 
    background: transparent; 
    overflow: hidden;
    width: 100% !important; /* 强制视口宽度为 100%，防止图片未加载时宽度塌陷 */
    min-height: 200px; /* 给一个最小高度，防止图片未加载时高度塌陷导致页面跳动 */
}

.bx-viewport ul {
    margin: 0;
    padding: 0;
}

.bx-viewport ul li { 
    height: auto !important; 
    display: flex !important; 
    align-items: center; 
    justify-content: center; 
    margin: 0; 
    padding: 0; 
    text-align: center;
    width: 100%; /* 确保每个幻灯片占满容器宽度 */
}

.bx-viewport ul li a { 
    display: block; 
    width: 100%; 
    text-align: center; 
}

.bx-viewport ul li img { 
    width: 100%; /* 强制宽度撑满容器 */
    max-width: 100%; 
    height: auto; 
    max-height: 800px; /* 进一步放宽高度限制，让图片能随宽度等比放大 */
    display: inline-block; 
    cursor: zoom-in; 
    object-fit: contain; 
}

.bx-wrapper .bx-pager { bottom: -25px !important; }
.bx-wrapper .bx-pager.bx-default-pager a { background: #d0d0d0; width: 8px; height: 8px; border-radius: 4px; margin: 0 5px; transition: 0.3s; }
.bx-wrapper .bx-pager.bx-default-pager a:hover, 
.bx-wrapper .bx-pager.bx-default-pager a.active { background: var(--brand-orange); width: 24px; }

/* bxSlider 左右箭头样式 */
.bx-wrapper .bx-controls-direction a {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    z-index: 9999;
    background: rgba(0,0,0,0.15) !important;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-indent: 0 !important;
    text-align: center;
    line-height: 44px !important;
    color: #fff !important;
    font-size: 28px !important;
    text-decoration: none;
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bx-wrapper .bx-controls-direction a:hover {
    background: var(--brand-orange) !important;
}
.bx-wrapper .bx-prev { left: 15px; }
.bx-wrapper .bx-next { right: 15px; }

/* =========================================
   产品标题与参数
   ========================================= */
.proinfo_box { padding-left: 30px; padding-top: 10px; } 
.product_h1 { 
    font-size: 30px; 
    font-weight: 800; 
    margin: 0 0 35px 0; 
    color: var(--text-dark); 
    border-bottom: none; 
    padding-bottom: 0; 
    line-height: 1.3; 
}

/* 极简橙色圆点参数列表 */
.spec-list { 
    list-style: none; 
    padding: 0; 
    margin: 0 0 40px 0; 
}
.spec-list li { 
    position: relative;
    padding-left: 28px; 
    margin-bottom: 20px; 
    font-size: 16px; 
    line-height: 1.6; 
    color: var(--text-gray);
}
.spec-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px; 
    width: 14px;
    height: 14px;
    background-color: var(--brand-orange);
    border-radius: 50%;
}
.spec-list li strong { 
    color: var(--text-dark); 
    font-weight: 600; 
}
.spec-list li span { 
    color: var(--text-gray); 
    word-break: break-word; 
}

/* 获取报价按钮 */
.quote-btn-wrapper { text-align: left; padding: 10px 0; }
.btn-quote-small { 
    display: inline-block; 
    background: var(--brand-orange); 
    color: #fff !important; 
    padding: 14px 40px; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 18px; 
    box-shadow: none; 
    transition: all 0.3s; 
    text-decoration: none !important; 
    border: none;
}
.btn-quote-small:hover { 
    background: var(--brand-orange-hover); 
}

/* =========================================
   选项卡布局
   ========================================= */
.product-tabs-wrapper { margin-top: 80px; overflow: hidden; }
.nav-tabs-custom { display: flex; padding: 0; margin-bottom: 0; list-style: none; border-bottom: 1px solid #eee; width: 100%; }
.nav-tabs-custom li { 
    flex: 1; text-align: center; padding: 18px 5px; font-size: 18px; font-weight: 600; 
    color: #888; cursor: pointer; background-color: #f9f9f9; 
    border: 1px solid transparent; border-bottom: 1px solid #eee; transition: 0.3s;
}
.nav-tabs-custom li.active { 
    background-color: #fff; color: var(--brand-orange) !important; 
    border: 1px solid #eee; border-bottom: 1px solid #fff; position: relative;
}
.nav-tabs-custom li.active::after { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--brand-orange); }

.tab-pane-custom { display: none !important; line-height: 1.8; padding: 50px 0; font-size: 16px; color: #444; }
.tab-pane-custom.active { display: block !important; animation: fadeIn 0.4s ease; }

/* 视频显示 */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; background: #000; }
.video-container iframe, .video-container video { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }

/* 询盘表单 */
.inquiry-wrapper { background: #fff; border-radius: 12px; padding: 60px 50px; border: 1px solid #eaeaea; margin-top: 80px; max-width: 900px; margin-left: auto; margin-right: auto; }
.modern-form .form-control { background: #fcfcfc !important; border: 1px solid #e5e5e5 !important; border-radius: 6px !important; margin-bottom: 20px; height: 52px; font-size: 15px !important; padding-left: 20px; }
.modern-form textarea.form-control { height: auto; padding-top: 15px; }
.cta-submit-btn { background: var(--brand-orange); color: #fff; border: none; padding: 16px 50px; font-size: 16px; font-weight: 700; border-radius: 6px; cursor: pointer; transition: 0.3s; width: 100%; max-width: 350px; letter-spacing: 1px; }
.cta-submit-btn:hover { background: var(--brand-orange-hover); }

/* =========================================
   【核心修复】富文本内容（详情页图片/表格）溢出问题
   ========================================= */
.content-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* 防止整个内容区出现横向滚动条 */
    word-wrap: break-word;
    word-break: break-word;
}

/* 强制清除复制过来的内联样式导致的负边距和固定宽度 */
.content-body * {
    max-width: 100% !important; /* 强制所有子元素不能超过容器宽度 */
    box-sizing: border-box !important; /* 确保 padding 不会撑破宽度 */
}

/* 修复复制过来的段落或 div 可能带有的负边距导致的左侧被切 */
.content-body p, 
.content-body div, 
.content-body section {
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* 移除强制清除 padding，因为这会破坏正常的内边距 */
}

/* 手机端强制单列显示（破坏原有的多列布局） */
@media screen and (max-width: 768px) {
    .content-body {
        /* 强制所有内部容器在手机端变为块级元素，取消浮动、Flex 或 Grid 布局 */
    }
    .content-body div,
    .content-body section,
    .content-body ul,
    .content-body li {
        display: block !important;
        width: 100% !important;
        float: none !important;
        clear: both !important;
        flex: none !important;
        grid-template-columns: 1fr !important;
    }
    
    /* 手机端图片居中且占满可用宽度 */
    .content-body img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 15px auto !important;
    }
}

/* You May Like product interaction cleanup */
.you-may-like-section .yml-img-wrapper,
.you-may-like-section .yml-img-wrapper:hover,
.you-may-like-section .yml-img-wrapper:focus,
.you-may-like-section .yml-img-wrapper:active,
.you-may-like-section .yml-img-wrapper:focus-visible,
.you-may-like-section .yml-product-card:focus,
.you-may-like-section .yml-product-card:active,
.you-may-like-section .yml-product-card:focus-within,
.you-may-like-section .yml-product-title a:focus,
.you-may-like-section .yml-product-title a:active,
.you-may-like-section .yml-product-title a:focus-visible {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.you-may-like-section .yml-img-wrapper img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.you-may-like-section .yml-product-card:hover .yml-product-title a,
.you-may-like-section .yml-product-card:focus-within .yml-product-title a,
.you-may-like-section .yml-product-title a:hover,
.you-may-like-section .yml-product-title a:focus,
.you-may-like-section .yml-product-title a:active,
.you-may-like-section .yml-product-title a:focus-visible {
    color: var(--brand-orange) !important;
    -webkit-text-fill-color: var(--brand-orange) !important;
    transition: none !important;
}

/* 修复富文本中的列表样式丢失问题 */
.content-body ul,
.content-body ol {
    padding-left: 20px !important; /* 强制保留左侧缩进，防止列表符号被切 */
    margin-left: 0 !important;
    margin-bottom: 15px;
}
.content-body ul {
    list-style-type: disc;
}
.content-body ol {
    list-style-type: decimal;
}
.content-body li {
    margin-bottom: 8px;
    line-height: 1.6;
    margin-left: 0 !important;
}

/* 强制所有富文本内的图片最大宽度不超过屏幕，高度自适应 */
.content-body img {
    max-width: 100% !important;
    height: auto !important;
    display: block; /* 改回 block，防止图文混排时因为宽度计算错误导致溢出 */
    margin: 0 auto 15px auto !important; /* 居中显示并清除左右负边距 */
}

/* 修复富文本表格样式丢失（边框、内边距） */
.content-body table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 20px;
    background-color: transparent;
    table-layout: auto !important; /* 关键修复：允许表格根据内容自动调整列宽，防止内容被截断 */
    word-break: normal !important; /* 关键修复：防止表格内的英文单词被强制截断 */
}
.content-body table th,
.content-body table td {
    border: 1px solid #ddd !important; /* 强制显示边框 */
    padding: 12px 15px !important; /* 增加内边距让表格更好看 */
    text-align: center; /* 默认居中对齐 */
    vertical-align: middle;
    word-wrap: break-word;
}
.content-body table th {
    background-color: #f9f9f9;
    font-weight: 600;
}
/* 偶数行背景色，增加可读性 */
.content-body table tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* 手机端表格横向滚动（终极解决方案 - 优化版） */
@media screen and (max-width: 768px) {
    /* 1. 将 table 作为滚动容器 */
    .content-body table {
        display: block !important; /* 强制表格变为块级元素，作为滚动视口 */
        width: 100% !important;
        overflow-x: auto !important; /* 允许横向滚动 */
        -webkit-overflow-scrolling: touch !important; /* iOS 顺滑滚动 */
        border: none !important; /* 隐藏外边框，避免滚动时断层 */
    }

    /* 2. 内部 tbody 保持表格特性，撑开宽度 */
    .content-body table tbody,
    .content-body table thead {
        display: table !important;
        width: 100% !important;
        min-width: 100% !important;
    }

    /* 3. 单元格允许换行，适当缩小内边距和字体 */
    .content-body table th,
    .content-body table td {
        white-space: normal !important; /* 允许换行，解决文字过长导致列宽过大的问题 */
        word-break: break-word !important; /* 防止长英文单词撑破单元格 */
        min-width: 80px !important; /* 降低最小宽度，让2-3列的表格能完整显示不滚动 */
        padding: 8px 6px !important; /* 缩小内边距，节省屏幕空间 */
        font-size: 14px !important; /* 稍微缩小字体 */
    }

    /* 4. 给第一列（通常是参数名）稍微多一点基础宽度，并加个浅色背景区分 */
    .content-body table th:first-child,
    .content-body table td:first-child {
        min-width: 100px !important;
        background-color: #fcfcfc !important;
    }
}

/* =========================================
   You May Like (猜你喜欢)
   ========================================= */
.you-may-like-section {
    margin-top: 60px;
    margin-bottom: 40px;
}
.yml-title-wrapper {
    text-align: left;
    margin-bottom: 40px;
}
.yml-title {
    font-size: 28px;
    font-weight: 800;
    color: #000;
    display: inline-block;
    position: relative;
    margin: 0;
    padding-bottom: 10px;
}
/* 模拟手绘双线波浪下划线 */
.yml-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M5,15 Q50,5 100,10 T195,15' fill='none' stroke='%23f27d26' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M10,18 Q60,10 110,15 T190,18' fill='none' stroke='%23f27d26' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.yml-product-card {
    text-align: center;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}
.yml-product-card:hover {
    transform: translateY(-5px);
}
.yml-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    height: 220px; /* 固定高度保持图片对齐 */
}
.yml-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.yml-product-title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0;
    line-height: 1.4;
}
.yml-product-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}
.yml-product-title a:hover {
    color: var(--brand-orange);
}

/* 视频和 iframe 响应式 */
.content-body iframe, .content-body video, .content-body embed {
    max-width: 100% !important;
}

/* =========================================
   手机端响应式优化
   ========================================= */
@media screen and (max-width: 991px) {
    .showpic_box { padding-right: 15px; }
    .proinfo_box { padding-left: 15px; margin-top: 40px; }
    .quote-btn-wrapper { text-align: center; }
}

@media screen and (max-width: 768px) {
    /* 修复：在手机端显示面包屑导航，并左对齐 */
    .breadcrumb-wrapper { 
        display: block !important; 
        margin-top: 70px !important; /* 适配手机端导航栏高度 */
        margin-bottom: 15px !important;
        padding: 10px 0;
        background-color: transparent;
    }
    .custom-breadcrumb {
        text-align: left;
        font-size: 15px;
        line-height: 1.6;
    }
    
    .product-main-container { margin-top: 10px !important; margin-bottom: 40px !important; }
    .row { margin-left: 0 !important; margin-right: 0 !important; }
    .container { padding-left: 15px !important; padding-right: 15px !important; }
    .nav-tabs-custom li { font-size: 14px; padding: 12px 2px; }
    .showpic_box { margin-bottom: 30px; padding-right: 0; }
    .bx-viewport ul li img { max-height: 400px; } 
    .bx-wrapper .bx-controls-direction { display: none !important; } /* 手机端隐藏左右切换箭头 */
    .proinfo_box { padding-left: 0; margin-top: 20px; }
    .product_h1 { font-size: 24px; margin-top: 10px; margin-bottom: 25px; text-align: left; }
    .inquiry-wrapper { padding: 30px 20px; margin-top: 40px; }
    
    .yml-title { font-size: 24px; }
    .yml-img-wrapper { height: 150px; padding: 5px; }
    .yml-product-title { font-size: 13px; }
    
    /* 缩小手机端选项卡内容的上下内边距 */
    .tab-pane-custom { padding: 20px 0; }
    
    .spec-list li { 
        font-size: 15px; 
        padding-left: 24px;
        margin-bottom: 15px;
    }
    .spec-list li::before {
        width: 12px;
        height: 12px;
        top: 5px;
    }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
