/* ===== 产品详情页样式 ===== */

/* ---------- 面包屑区 ---------- */
.page-header {
    background: linear-gradient(135deg, #1A365D 0%, #2B6CB0 100%);
    padding: 30px 0;
    color: #fff;
}
.breadcrumb { font-size: 14px; color: #94A3B8; }
.breadcrumb a { color: #CBD5E1; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: #fff; font-weight: 600; }

/* ---------- 主体 ---------- */
.page-content { padding: 50px 0 80px; background: var(--bg-light); }

/* ---------- 产品核心区（左图右文） ---------- */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* ---------- 左侧图片区 ---------- */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

/* 主图：1:1 正方形，cover 填满不留白 */
.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-sizing: border-box;
}
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 缩略图外层：限宽 + 左右箭头 */
.thumbnail-wrap {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 左右箭头 */
.thumb-arrow {
    flex: 0 0 auto;
    width: 28px;
    height: 76px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    user-select: none;
}
.thumb-arrow:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.thumb-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: var(--white);
    color: var(--text-light);
    border-color: var(--border);
}

/* 缩略图列表：一行显示，超出横向滚动 */
.thumbnail-list {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 6px;
}
.thumbnail-list::-webkit-scrollbar { height: 4px; }
.thumbnail-list::-webkit-scrollbar-track { background: transparent; }
.thumbnail-list::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

/* 缩略图：1:1 正方形 */
.thumbnail {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--bg-light);
    overflow: hidden;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumbnail:hover,
.thumbnail.active {
    border-color: var(--accent);
}

/* 兼容旧单图结构 */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-light);
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
}

/* ---------- 右侧信息区 ---------- */
.product-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-summary h1 {
    font-size: 28px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* 产品型号 */
.product-summary .model {
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.product-summary .desc {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.8;
}

/* ---------- 特性标签 ---------- */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}
.feature-tags span {
    background: var(--bg-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.feature-tags span::before {
    content: '\2713';
    color: var(--accent);
    font-weight: bold;
}

/* ---------- 快速参数表 ---------- */
.quick-specs {
    margin-bottom: 30px;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
}
.quick-specs h4 {
    font-size: 16px;
    color: var(--primary);
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
.quick-specs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.quick-specs li {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 14px;
    padding: 6px 0;
}
.quick-specs li span:first-child {
    color: var(--text-light);
    flex-shrink: 0;
}
.quick-specs li span:last-child {
    font-weight: 600;
    color: var(--primary);
    text-align: right;
}
/* 参数最多显示 6 行，第 7 行起隐藏 */
.quick-specs li:nth-child(n+7) {
    display: none;
}

/* ---------- 按钮 ---------- */
.cta-box { display: flex; gap: 15px; flex-wrap: wrap; }
.btn-send-inquiry {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 15px 40px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-send-inquiry:hover { background: var(--accent-hover) !important; }
.btn-whatsapp {
    background: #25D366 !important;
    color: #fff !important;
    padding: 15px 30px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-whatsapp:hover { opacity: 0.9; }

/* ---------- 富文本内容区 ---------- */
.product-content {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 40px;
    margin-bottom: 40px;
    line-height: 1.8;
    color: var(--text-main);
    font-size: 15px;
}
.product-content h1,
.product-content h2,
.product-content h3,
.product-content h4 {
    color: var(--primary);
    margin: 30px 0 15px;
    line-height: 1.4;
}
.product-content h2 { font-size: 24px; font-weight: 800; }
.product-content h3 { font-size: 20px; font-weight: 700; }
.product-content h4 { font-size: 17px; font-weight: 700; }
.product-content > *:first-child { margin-top: 0; }
.product-content p { margin-bottom: 15px; }
.product-content ul,
.product-content ol { margin: 0 0 15px 22px; }
.product-content li { margin-bottom: 8px; }

.product-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.product-content table th,
.product-content table td {
    padding: 12px 15px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.product-content table th {
    background: var(--bg-light);
    color: var(--primary);
    font-weight: 700;
}
.product-content table tr:hover td { background: rgba(43,108,176,0.02); }

.product-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}
.product-content a { color: var(--accent); text-decoration: underline; }
.product-content strong { color: var(--primary); font-weight: 700; }

/* ---------- 询盘区 ---------- */
.inquiry-section {
    padding: 80px 0;
    background: var(--primary);
    color: #fff;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}
.inquiry-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.inquiry-text h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
}
.inquiry-text p {
    color: #D1D9E6;
    margin-bottom: 20px;
    font-size: 16px;
}
.inquiry-features { list-style: none; padding: 0; }
.inquiry-features li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #E2E8F0;
}
.inquiry-features li::before {
    content: '\2713';
    color: var(--accent);
    font-weight: bold;
    font-size: 18px;
}
.inquiry-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.inquiry-form h3 {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 25px;
    font-weight: 800;
}
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-light);
    box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43,108,176,0.1);
}
.form-group textarea { height: 120px; resize: vertical; }
.submit-btn {
    background: var(--accent) !important;
    color: #fff !important;
    border: none;
    padding: 14px 30px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}
.submit-btn:hover { background: var(--accent-hover) !important; }

/* ---------- 相关产品 ---------- */
.related-products { padding-top: 20px; }
.related-products .section-title { text-align: center; margin-bottom: 40px; }
.related-products .section-title h2 {
    font-size: 28px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 12px;
}
.related-products .section-title span {
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 0 auto;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}
.related-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(43,108,176,0.15);
}
.related-img {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: var(--bg-light);
    background-size: cover;
    background-position: center;
}
.related-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.related-info h3 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-info a {
    color: var(--accent) !important;
    font-weight: 600;
    font-size: 13px;
}
.related-info a:hover { color: var(--accent-hover) !important; }

/* ---------- 底部 CTA banner ---------- */
.cta-banner {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 70px 0;
    text-align: center;
}
.cta-banner h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}
.cta-banner p {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-banner .cta-btn {
    display: inline-block;
    background-color: var(--accent) !important;
    color: #fff !important;
    padding: 16px 45px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(43,108,176,0.3);
}
.cta-banner .cta-btn:hover {
    background-color: var(--accent-hover) !important;
}

/* ---------- 响应式：992px ---------- */
@media (max-width: 992px) {
    .product-main { grid-template-columns: 1fr; gap: 30px; padding: 25px; }
    .product-images { max-width: 100%; }
    .thumbnail-wrap { max-width: 100%; }
    .inquiry-layout { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- 响应式：768px ---------- */
@media (max-width: 768px) {
    .product-summary h1 { font-size: 22px; }
    .product-summary .model { font-size: 14px; }
    .feature-tags span { font-size: 12px; padding: 5px 10px; }
    .quick-specs { padding: 15px; }
    .quick-specs li { font-size: 13px; }
    .cta-box { flex-direction: column; }
    .btn-send-inquiry,
    .btn-whatsapp { width: 100%; justify-content: center; }
    .thumb-arrow { width: 26px; height: 60px; font-size: 16px; }
    .thumbnail { width: 60px; height: 60px; }
    .product-content { padding: 20px; }
    .product-content table th,
    .product-content table td { padding: 8px 10px; font-size: 13px; }
    .inquiry-section { padding: 55px 0; }
    .inquiry-text h2 { font-size: 24px; }
    .inquiry-form { padding: 25px; }
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .cta-banner { padding: 50px 0; }
    .cta-banner h2 { font-size: 24px; }
    .cta-banner p { font-size: 15px; }
}

/* ---------- 响应式：480px ---------- */
@media (max-width: 480px) {
    .related-grid { grid-template-columns: 1fr; }
}

/* 询盘表单必填星号 */
.required-mark {
    color: #E53E3E;
    font-weight: 700;
    margin-left: 2px;
}
/* ---------- 移动端兜底 ---------- */
@media (max-width: 768px) {
    /* 富文本内容里的表格可横向滑动 */
    .product-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 13px;
    }
    .product-content table th,
    .product-content table td { white-space: nowrap; }

    /* 缩略图加大触控面积 */
    .thumb-arrow { width: 32px; height: 64px; font-size: 18px; }
    .thumbnail { width: 64px; height: 64px; }

    /* 主按钮全宽 */
    .cta-box { flex-direction: column; }
    .btn-send-inquiry,
    .btn-whatsapp { width: 100%; justify-content: center; padding: 14px 20px; }
}
/* ============ 产品详情页 - 移动端精细适配 ============ */

/* ---------- 手机：≤ 768px ---------- */
@media (max-width: 768px) {

    /* 1. 缩略图列表：允许换行，取消横向溢出 */
    .thumbnail-list {
        flex-wrap: wrap;
        overflow-x: visible;
        overflow-y: visible;
        justify-content: center;
        padding-bottom: 0;
    }
    .thumbnail {
        width: 60px;
        height: 60px;
        flex: 0 0 auto;
    }

    /* 2. 文字区域：取消固定宽度，允许换行 */
    .product-summary {
        width: 100%;
        min-width: 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .product-summary h1 {
        font-size: 22px;
        line-height: 1.3;
        word-break: break-word;
    }
    .product-summary .desc {
        font-size: 14px;
        line-height: 1.7;
        overflow-wrap: break-word;
    }

    /* 3. 产品主图容器：防止溢出 */
    .product-images {
        max-width: 100%;
        overflow: hidden;
    }
    .main-image {
        max-width: 100%;
    }
    .thumbnail-wrap {
        max-width: 100%;
        overflow: hidden;
    }

    /* 4. 右侧信息区整体约束 */
    .product-main {
        overflow: hidden;
    }

    /* 5. 型号文字防溢出 */
    .product-summary .model {
        font-size: 14px;
        word-break: break-all;
    }
}
/* ============ 移动端缩略图：一行横滑 ============ */
@media (max-width: 768px) {
    .thumbnail-wrap {
        overflow: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .thumbnail-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;      /* 关键：不许换行 */
        overflow-x: auto !important;       /* 关键：横向滑动 */
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;           /* 关键：flex 子项收缩 */
        justify-content: flex-start !important;
        padding-bottom: 6px !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .thumbnail-list::-webkit-scrollbar {
        display: none !important;
    }
    .thumbnail {
        flex: 0 0 60px !important;         /* 关键：固定宽度，不许收缩 */
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        height: 60px !important;
    }
    .thumb-arrow {
        display: flex !important;
        width: 28px !important;
        height: 60px !important;
        flex: 0 0 auto !important;
    }
}

/* ============ 富文本图片：等比例显示 ============ */
.product-content img,
.article-body img,
.case-body img,
.industry-body img {
    max-width: 100% !important;
    width: auto !important;       /* ★ 覆盖 HTML width 属性 */
    height: auto !important;      /* ★ 覆盖 HTML height 属性 */
    object-fit: contain;
    display: block;
    margin: 15px auto;
    border-radius: 4px;
}

/* 移动端进一步优化 */
@media (max-width: 768px) {
    .product-content img {
        max-width: 100% !important;
        width: 100% !important;   /* 手机端撑满宽度 */
        height: auto !important;
        margin: 12px 0;
    }
}