/* =========================================================
   耦合器与双工器（/products/couplers-diplexers/）详情页样式
   供 directional-couplers / diplexers 两个页面共用。
   数值、型号、频段等产品数据不在此文件内，均在 cshtml 中。
   ========================================================= */

/* ----- 小节标题 ----- */
.cd-subtitle {
    display: flex;
    align-items: center;
    gap: calc(var(--size-300) * 1rem);
    color: var(--secondary);
    font-size: calc(var(--size-500) * 1.1rem);
    margin: 0 0 calc(var(--size-500) * 1rem);
    padding-bottom: calc(var(--size-300) * 1rem);
    border-bottom: 2px solid var(--grey);
}
.cd-subtitle::before {
    content: "";
    display: block;
    width: 5px;
    height: 1.3em;
    flex: 0 0 auto;
    background: var(--secondary);
    border-radius: 3px;
}
.cd-muted { color: var(--dark-grey); }
.cd-hint { margin: calc(var(--size-300) * 1rem) 0 0; color: var(--dark-grey); font-size: calc(var(--size-300) * 1.1rem); }

/* ----- 状态徽章 ----- */
.cd-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: calc(var(--size-200) * 1rem);
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
}
.cd-badge--prod { background: var(--secondary); color: #fff; }
.cd-badge--sample { background: var(--orange); color: #fff; }
.cd-badge--plain { background: #eef2f5; color: var(--primary); border: 1px solid var(--grey); }
.cd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }

/* ----- 页面标题区（左图 + 右文 + 关键指标，参照探针台详情页） ----- */
.cd-hero { padding: calc(var(--size-600) * 1rem) 0 calc(var(--size-600) * 1rem); }
.cd-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.72fr);
    gap: calc(var(--size-600) * 1rem);
    align-items: start;
}
.cd-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: #fff;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
}
.cd-hero__title {
    margin: 0 0 calc(var(--size-400) * 1rem);
    color: var(--primary);
    font-size: calc(var(--size-700) * 1.05rem);
    font-weight: 700;
    line-height: 1.2;
}
.cd-hero__lead {
    margin: 0;
    color: var(--dark-grey);
    font-size: calc(var(--size-400) * 1.05rem);
    line-height: 1.75;
}
.cd-hero__specs { list-style: none; margin: calc(var(--size-500) * 1rem) 0 0; padding: 0; }
.cd-hero__specs li {
    display: flex;
    align-items: baseline;
    gap: calc(var(--size-500) * 1rem);
    padding: calc(var(--size-400) * 1.05rem) 0;
    border-bottom: 1px solid var(--grey);
}
.cd-hero__specs strong {
    flex: 0 0 13rem;
    color: var(--primary);
    font-size: calc(var(--size-400) * 1.1rem);
    font-weight: 700;
}
.cd-hero__specs span {
    color: var(--dark-grey);
    font-size: calc(var(--size-400) * 1.1rem);
    font-variant-numeric: tabular-nums;
}

/* ----- 标题区图片轮播（双工器页） ----- */
.cd-gallery__main img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: #fff;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
}
.cd-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.cd-gallery__thumb {
    width: 88px;
    padding: 0;
    border: 2px solid var(--grey);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease-out, transform 0.2s ease-out;
}
.cd-gallery__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.cd-gallery__thumb:hover { border-color: var(--tertiary); transform: translateY(-2px); }
.cd-gallery__thumb.is-active { border-color: var(--secondary); }

/* ----- 顶部锚点导航条（吸顶） ----- */
.cd-anchorbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--grey);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.cd-anchorbar__inner {
    display: flex;
    align-items: center;
    gap: calc(var(--size-200) * 1rem);
    overflow-x: auto;
    padding: calc(var(--size-300) * 1rem) 0;
}
.cd-anchorbar a {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--grey);
    color: var(--primary);
    font-weight: 700;
    font-size: calc(var(--size-300) * 1.05rem);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease-out;
}
.cd-anchorbar a:hover { border-color: var(--secondary); color: var(--secondary); }
.cd-anchorbar a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.cd-anchorbar__toggle {
    flex: 0 0 auto;
    margin-inline-start: auto;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--secondary);
    color: #fff;
    font-weight: 700;
    font-size: calc(var(--size-300) * 1.05rem);
    cursor: pointer;
}
.cd-anchorbar__toggle:hover { background: var(--primary); }

/* ----- 表格 ----- */
.cd-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}
.cd-tablewrap--plain { box-shadow: none; }
.cd-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: calc(var(--size-300) * 1.08rem);
}
.cd-table thead th {
    background: var(--primary);
    color: #fff;
    text-align: left;
    padding: 12px 14px;
    font-weight: 700;
    white-space: nowrap;
}
.cd-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--grey); color: #333; }
.cd-table tbody tr:last-child td { border-bottom: 0; }
.cd-table tbody tr:hover { background-color: #f2f8fb; }
.cd-table .cd-mdl a { color: var(--secondary); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cd-table .cd-mdl a:hover { color: var(--primary); text-decoration: underline; }
.cd-table .cd-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 键值表（型号卡片内的电气特性） */
.cd-kv { width: 100%; border-collapse: collapse; min-width: 320px; font-size: calc(var(--size-300) * 1.08rem); }
.cd-kv th,
.cd-kv td { padding: 10px 12px; border-bottom: 1px solid var(--grey); text-align: left; vertical-align: top; }
.cd-kv tr:last-child th,
.cd-kv tr:last-child td { border-bottom: 0; }
.cd-kv th { color: var(--primary); font-weight: 700; width: 44%; white-space: nowrap; }
.cd-kv td { color: #333; }

/* ----- 型号折叠卡片 ----- */
.cd-model {
    margin-top: calc(var(--size-500) * 1.1rem);
    background: var(--light);
    border-radius: var(--border-radius);
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    scroll-margin-top: 100px;
}
.cd-model > summary {
    display: flex;
    align-items: flex-start;
    gap: calc(var(--size-300) * 1rem);
    list-style: none;
    cursor: pointer;
    padding: calc(var(--size-400) * 1.1rem) calc(var(--size-500) * 1rem);
    border-bottom: 1px solid var(--grey);
    transition: background-color 0.2s ease-out;
}
.cd-model > summary::-webkit-details-marker { display: none; }
.cd-model > summary:hover { background: #f7fbfc; }
.cd-model__caret {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    margin-top: 0.55em;
    border-left: 6px solid var(--secondary);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform 0.25s ease-out;
}
.cd-model[open] .cd-model__caret { transform: rotate(90deg); }
.cd-model__head {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: calc(var(--size-300) * 1rem);
}
.cd-model__no {
    display: block;
    color: var(--secondary);
    font-size: calc(var(--size-200) * 1rem);
    font-weight: 700;
    letter-spacing: 0.06em;
}
.cd-model__title {
    display: block;
    margin-top: 2px;
    color: var(--primary);
    font-size: calc(var(--size-400) * 1.15rem);
    font-weight: 700;
    line-height: 1.35;
}
.cd-model__desc {
    display: block;
    margin-top: 6px;
    max-width: 46rem;
    color: var(--dark-grey);
    font-size: calc(var(--size-300) * 1.1rem);
    line-height: 1.6;
}
.cd-model__tags { display: flex; flex-wrap: wrap; gap: 8px; }

.cd-model__content { padding: calc(var(--size-500) * 1rem); }
.cd-model__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: calc(var(--size-500) * 1.1rem);
    align-items: start;
}
.cd-model__body--dip { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.cd-model__spec h3,
.cd-model__figs h3,
.cd-model__visual h3 {
    color: var(--primary);
    font-size: calc(var(--size-400) * 1rem);
    margin: 0 0 calc(var(--size-300) * 1rem);
}
.cd-model__spec h3:not(:first-child) { margin-top: calc(var(--size-500) * 1rem); }
.cd-model__mech { margin: 0; color: var(--dark-grey); font-size: calc(var(--size-300) * 1.1rem); line-height: 1.6; }
.cd-model__inquiry { margin: calc(var(--size-400) * 1rem) 0 0; }
.cd-model__figs { margin-top: calc(var(--size-500) * 1rem); }
.cd-model__visual img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--grey);
    border-radius: 10px;
    background: #fbfcfd;
}
.cd-model__visual .cd-cap {
    margin: 8px 0 0;
    text-align: center;
    font-size: calc(var(--size-200) * 1.1rem);
    color: var(--dark-grey);
}

/* 提示条（接口说明 / 系统验证） */
.cd-notice {
    display: block;
    margin: 0 0 calc(var(--size-400) * 1rem);
    padding: calc(var(--size-300) * 1rem) calc(var(--size-400) * 1rem);
    background: #fff8e6;
    border-left: 4px solid var(--orange);
    border-radius: 0 10px 10px 0;
    color: #4a3d12;
    font-size: calc(var(--size-300) * 1.1rem);
    line-height: 1.65;
}
.cd-notice strong { color: #8a6d1a; }
.cd-notice--info { background: #eef6f8; border-left-color: var(--secondary); color: #173b45; }
.cd-notice--info strong { color: var(--primary); }

/* ----- 曲线图 ----- */
.cd-figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--size-400) * 1rem); }
.cd-shot { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cd-zoom {
    padding: 0;
    border: 1px solid var(--grey);
    border-radius: 10px;
    background: #fbfcfd;
    cursor: zoom-in;
    overflow: hidden;
    transition: border-color 0.2s ease-out, transform 0.2s ease-out;
}
.cd-zoom:hover { border-color: var(--secondary); transform: translateY(-2px); }
.cd-zoom img { display: block; width: 100%; height: auto; }
/* 统一曲线图画框比例（1200 / 1001），使同一行左右两栏图片尺寸一致 */
.cd-figure-grid--fixed .cd-zoom {
    display: block;
    width: 100%;
    aspect-ratio: 1200 / 1001;
}
.cd-figure-grid--fixed .cd-zoom img {
    height: 100%;
    object-fit: contain;
}
.cd-shot figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: calc(var(--size-300) * 1.05rem);
    color: #333;
}
.cd-shot figcaption b { font-weight: 700; color: var(--primary); }

/* ----- 图片放大浮层 ----- */
.cd-viewer {
    width: min(1400px, 94vw);
    max-width: 94vw;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #0d1b26;
    color: #fff;
}
.cd-viewer::backdrop { background: rgba(0, 0, 0, 0.75); }
.cd-viewer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #9fb3c1;
}
.cd-viewer__bar button { background: none; border: 0; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.cd-viewer__bar button:hover { color: var(--secondary); }
.cd-viewer__body { padding: 0 16px 16px; }
.cd-viewer__body img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; }

/* ----- 使用要点 ----- */
.cd-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--size-500) * 1rem) calc(var(--size-600) * 1rem); }
.cd-usage-item h3 { margin: 0 0 0.5rem; color: var(--primary); font-size: calc(var(--size-400) * 1.05rem); }
.cd-usage-item p { margin: 0 0 calc(var(--size-400) * 1rem); color: var(--dark-grey); line-height: 1.7; }

/* ----- 页尾行动区 ----- */
.cd-cta-wrap { padding: calc(var(--size-600) * 1rem) 0 calc(var(--size-700) * 1rem); }
.cd-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--size-500) * 1rem);
    padding: calc(var(--size-500) * 1.2rem);
    border-radius: var(--border-radius);
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--light);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
}
.cd-cta h2 { margin: 0 0 0.5rem; color: var(--light); font-size: calc(var(--size-500) * 1.05rem); }
.cd-cta p { margin: 0; max-width: 46rem; color: rgba(255, 255, 255, 0.92); line-height: 1.6; }
.cd-cta__acts { display: flex; flex-wrap: wrap; gap: calc(var(--size-300) * 1rem); }

@media screen and (max-width: 1023px) {
    .cd-model__body,
    .cd-model__body--dip { grid-template-columns: 1fr; }
    .cd-hero__grid { grid-template-columns: minmax(0, 1fr); gap: calc(var(--size-500) * 1rem); }
}
@media screen and (max-width: 767px) {
    .cd-figure-grid { grid-template-columns: 1fr; }
    .cd-usage-grid { grid-template-columns: 1fr; }
    .cd-cta__acts { width: 100%; }
    .cd-hero__specs li { flex-wrap: wrap; gap: 4px; }
    .cd-hero__specs strong { flex: 1 1 100%; }
}
