/* ============================================================
   产品定制页 /custom-product（cp-* 命名空间）
   配色沿用 main.css 的 CSS 变量：深蓝科技底 + 品牌蓝
   ============================================================ */

/* ---------- 通用小件 ---------- */
.cp-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--brand);
    text-transform: uppercase;
}

/* ---------- 页头 ---------- */
.cp-hero {
    position: relative;
    padding: 54px 0 58px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 58%, #0d2b4c 100%);
    overflow: hidden;
}
.cp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(620px 300px at 88% 12%, rgba(98, 168, 255, .16), transparent 62%),
        radial-gradient(520px 260px at 8% 96%, rgba(11, 94, 215, .18), transparent 64%);
    pointer-events: none;
}
.cp-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: 40px;
    align-items: center;
}
.cp-hero__inner > * { min-width: 0; }
.cp-hero .cp-eyebrow { color: var(--brand-on-dark); }
.cp-hero__h1 {
    margin: 0 0 14px;
    font-size: 40px;
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
}
.cp-hero__sub {
    margin: 0 0 20px;
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--on-navy);
    max-width: 34em;
}
.cp-hero__points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}
.cp-hero__points li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: var(--on-navy);
}
.cp-hero__points svg { color: var(--brand-on-dark); flex: none; }
.cp-hero__ops { display: flex; flex-wrap: wrap; gap: 12px; }
.cp-hero__ops .btn--outline,
.cp-hero__ops .btn--outline-light {
    border-color: rgba(160, 200, 255, .45);
    color: #dce8f7;
    background: rgba(255, 255, 255, .06);
}
.cp-hero__ops .btn--outline:hover,
.cp-hero__ops .btn--outline-light:hover {
    border-color: var(--brand-on-dark);
    color: #fff;
    background: rgba(98, 168, 255, .14);
}
.cp-hero__media {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(3, 12, 26, .48);
    border: 1px solid var(--navy-line);
}
.cp-hero__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;   /* 2026-11-02 全站 banner 统一 16:9 */
    height: auto;
    object-fit: cover;
    background: var(--navy-2);
}

/* ---------- 能力指标条 ---------- */
.cp-metrics { padding: 30px 0 4px; background: var(--bg); border-bottom: 1px solid var(--line); }
.cp-metrics__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.cp-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
}
.cp-metric__v {
    font-size: 25px;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1.15;
    word-break: break-word;
}
.cp-metric__l { font-size: 13px; color: var(--ink-3); }
.cp-metrics__note {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--ink-4);
}

/* ---------- 区块骨架 ---------- */
.cp-sec { padding: 58px 0; }
.cp-sec--tint { background: var(--bg-tint); }
.cp-sec__head { max-width: 760px; margin-bottom: 30px; }
.cp-sec__h2 {
    margin: 0 0 10px;
    font-size: 27px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.3;
}
.cp-sec__sub {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink-3);
}

/* ---------- 可定制品类 ---------- */
.cp-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.cp-cat {
    display: block;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cp-cat:hover {
    transform: translateY(-3px);
    border-color: var(--brand-line);
    box-shadow: var(--shadow);
}
.cp-cat__img { display: block; height: 132px; background: var(--bg-tint); }
.cp-cat__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-cat__body {
    display: block;
    padding: 13px 14px;
    border-top: 1px solid var(--line);
}
.cp-cat__name {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.45;
}
.cp-cat__count {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-style: normal;
    color: var(--ink-4);
}

/* ---------- 定制流程 ---------- */
.cp-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.cp-step {
    position: relative;
    padding: 0 22px 0 0;
    min-width: 0;
}
.cp-step + .cp-step { padding-left: 22px; border-left: 1px dashed var(--brand-line); }
.cp-step__no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.cp-step__t {
    margin: 0 0 7px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}
.cp-step__d {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.72;
    color: var(--ink-3);
}

/* ---------- 表单区（左介绍 + 右卡片） ---------- */
.cp-sec--form { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%); }
.cp-form-layout {
    display: grid;
    grid-template-columns: .84fr 1.16fr;
    gap: 40px;
    align-items: start;
}
.cp-form-layout > * { min-width: 0; }
.cp-form-intro .cp-sec__h2 { font-size: 25px; }
.cp-form-desc {
    margin: 0 0 22px;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--ink-3);
}
.cp-highlights { display: flex; flex-direction: column; gap: 14px; }
.cp-highlight {
    display: flex;
    gap: 14px;
    padding: 15px 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.cp-highlight__no {
    flex: none;
    font-size: 19px;
    font-weight: 800;
    color: var(--brand-line);
    line-height: 1.1;
}
.cp-highlight__t {
    margin: 0 0 5px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
}
.cp-highlight__d {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-3);
}

/* ---------- 表单卡片 ---------- */
.cp-form-card {
    position: relative;
    padding: 28px 28px 30px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cp-form__req {
    margin: 0 0 16px;
    font-size: 12.5px;
    color: var(--ink-4);
}
.cp-fs { margin: 0 0 22px; padding: 0; border: 0; }
.cp-fs__t {
    padding: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--brand-dark);
    border-bottom: 1px solid var(--brand-line);
    width: 100%;
}
.cp-fs__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    margin-top: 14px;
}
.cp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cp-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
}
.cp-req { color: #d0433c; font-weight: 700; }
.cp-field input[type=text],
.cp-field input[type=email],
.cp-field input[type=tel],
.cp-field select,
.cp-field textarea {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 7px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cp-field textarea { resize: vertical; line-height: 1.7; }
.cp-field input:focus,
.cp-field select:focus,
.cp-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 94, 215, .12);
}
.cp-field input::placeholder,
.cp-field textarea::placeholder { color: #b3bcc9; }
.cp-field.is-err input,
.cp-field.is-err select { border-color: #d0433c; background: #fff7f6; }
.cp-field__err {
    display: none;
    font-size: 12px;
    color: #d0433c;
}
.cp-field.is-err .cp-field__err { display: block; }
.cp-field__hint {
    margin: 0;
    font-size: 12px;
    color: var(--ink-4);
    line-height: 1.6;
}

/* 带单位的输入框 */
.cp-input { position: relative; display: block; }
.cp-input input { padding-right: 42px !important; }
.cp-input__u {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 12.5px;
    font-style: normal;
    color: var(--ink-4);
    pointer-events: none;
}

/* 资料邮件发送（替代原附件上传） */
.cp-mail {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg, #f4f8ff 0%, #eef4fd 100%);
    border: 1px solid var(--brand-line);
    border-radius: 10px;
}
.cp-mail__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--brand);
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 50%;
}
.cp-mail__body { min-width: 0; }
.cp-mail__t {
    margin: 0 0 6px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--navy);
}
.cp-mail__d {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--ink-2);
}
.cp-mail__fmt {
    margin: 8px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-dark);
}
.cp-mail__ops {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.cp-mail__addr {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-dark);
    background: #fff;
    border: 1px dashed var(--brand);
    border-radius: 7px;
    text-decoration: none;
    word-break: break-all;
}
.cp-mail__addr:hover { background: var(--brand-soft); text-decoration: underline; }
.cp-mail__copy {
    padding: 8px 14px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-3);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
}
.cp-mail__copy:hover { color: var(--brand-dark); border-color: var(--brand); }
.cp-mail__btn { display: inline-block; margin-top: 12px; }
.cp-mail__note {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-4);
}
@media (max-width: 520px) {
    .cp-mail { flex-direction: column; gap: 10px; padding: 16px 14px; }
    .cp-mail__btn { display: block; text-align: center; }
}

.cp-form__ops { margin-top: 4px; }

/* 提交结果卡 */
.cp-result {
    padding: 34px 26px;
    text-align: center;
    color: var(--brand-dark);
}
.cp-result svg { color: #2f9e5f; margin-bottom: 12px; }
.cp-result strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    color: var(--ink);
}
.cp-result p {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--ink-3);
}

/* ---------- 能力范围表 ---------- */
.cp-table-wrap {
    overflow-x: auto;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.cp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.cp-table thead th {
    padding: 13px 18px;
    text-align: left;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
    background: var(--brand-soft);
    border-bottom: 1px solid var(--brand-line);
    white-space: nowrap;
}
.cp-table tbody td {
    padding: 13px 18px;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
    line-height: 1.65;
}
.cp-table tbody tr:last-child td { border-bottom: 0; }
.cp-table tbody tr:hover td { background: var(--bg-tint); }
.cp-table td strong { color: var(--ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.cp-faq {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.cp-faq__item {
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
}
.cp-faq__q {
    margin: 0 0 8px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
}
.cp-faq__a {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--ink-3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .cp-hero__inner { grid-template-columns: 1fr; gap: 26px; }
    .cp-hero__media img { height: auto; }   /* 比例交给 aspect-ratio:16/9，别写死高度 */
    .cp-cats { grid-template-columns: repeat(2, 1fr); }
    .cp-steps { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
    .cp-step:nth-child(odd) { padding-left: 0; border-left: 0; }
    .cp-step:nth-child(even) { padding-left: 24px; }
    .cp-form-layout { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 720px) {
    .cp-hero { padding: 34px 0 36px; }
    .cp-hero__h1 { font-size: 29px; }
    .cp-hero__media img { height: auto; }
    .cp-metrics__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cp-metric { padding: 13px 12px; }
    /* 「200–14000nm」在 2 列布局里必须压到一行，否则会断成「200– / 14000nm」 */
    .cp-metric__v { font-size: 17.5px; white-space: nowrap; letter-spacing: -.01em; }
    .cp-sec { padding: 38px 0; }
    .cp-sec__h2 { font-size: 22px; }
    .cp-cats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cp-cat__img { height: 104px; }
    .cp-steps { grid-template-columns: 1fr; gap: 20px; }
    .cp-step { padding: 0; border-left: 0; }
    .cp-step + .cp-step { padding-top: 20px; border-left: 0; border-top: 1px dashed var(--brand-line); }
    .cp-form-card { padding: 20px 18px 24px; }
    .cp-fs__grid { grid-template-columns: 1fr; gap: 12px; }

    /* 参数表转卡片，避免手机上横向滚动 */
    .cp-table-wrap { overflow-x: visible; border: 0; background: transparent; }
    .cp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .cp-table, .cp-table tbody, .cp-table tr, .cp-table td { display: block; width: 100%; }
    .cp-table tr {
        margin-bottom: 10px;
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
    }
    .cp-table tbody td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 14px;
        border-bottom: 1px dashed var(--line);
        text-align: right;
    }
    .cp-table tbody td:last-child { border-bottom: 0; }
    .cp-table tbody td::before {
        content: attr(data-label);
        flex: none;
        font-size: 12px;
        color: var(--ink-4);
        text-align: left;
    }
    .cp-table tbody td > * { min-width: 0; word-break: break-word; }
}

@media (max-width: 420px) {
    .cp-cats { grid-template-columns: 1fr; }
}
