/* ==========================================================================
   产品详情页 - 视觉升级样式
   依赖：仅作用于 detail_product_info.html，类名统一使用 pd- 前缀，互不影响
   ========================================================================== */

:root {
    --pd-brand: var(--backcolor, #004f91);
    --pd-ink: #0f172a;
    --pd-gray: #64748b;
    --pd-line: #e8edf3;
    --pd-soft: #f6f9fc;
    --pd-radius: 5px;
    --pd-shadow-sm: 0 2px 10px rgba(15, 23, 42, .05);
    --pd-shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
    --pd-shadow-lg: 0 18px 45px rgba(15, 23, 42, .14);
}

.pd-container {

    padding: 10px;

}

/* 通用区块标题 ---------------------------------------------------------- */
.pd-section-title {
    position: relative;
    margin: 0 10px ;
    padding-bottom: 14px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: -.3px;
    color: var(--pd-ink);
}

.pd-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 3px;
    border-radius:var(--pd-radius);
    background: linear-gradient(90deg, var(--pd-brand), rgba(0, 79, 145, .25));
}

/* ============================ 顶部 Hero ================================ */
.pd-hero {
    position: relative;
    overflow: hidden;
    background: #050d14;
    color: #fff;
}

.pd-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
            radial-gradient(900px 420px at 12% 10%, rgba(0, 79, 145, .55), transparent 70%),
            radial-gradient(700px 400px at 88% 80%, rgba(0, 79, 145, .35), transparent 70%);
    pointer-events: none;
}

.pd-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
    max-width: 1280px;
    padding: 120px 10px 40px 10px;
    margin: 0 auto;
}

/* 面包屑 */
.pd-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
}

.pd-crumb a {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    transition: color .2s ease;
}

.pd-crumb a:hover {
    color: #fff;
}

.pd-crumb-sep {
    opacity: .4;
}

.pd-crumb-current {
    color: #fff;
    font-weight: 600;
}

.pd-hero-badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--pd-radius);
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}

.pd-title {
    margin: 0;
    font-size: clamp(30px, 4.2vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    color: #fff;
}

.pd-subtitle {
    margin: 14px 0 0;
    font-size: clamp(15px, 1.6vw, 20px);
    font-weight: 500;
    color: #7fb6f0;
}

.pd-desc {
    margin: 18px 0 0;
    max-width: 560px;
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .7);
}

/* 卖点图标 */
.pd-selling {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.pd-selling-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 96px;
    text-align: center;
    transition: transform .25s ease;
}

.pd-selling-item:hover {
    transform: translateY(-4px);
}

.pd-selling-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.pd-selling-icon img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.pd-selling-text {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .72);
}

/* Hero 产品图 */
.pd-hero-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-hero-media img {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
    filter: drop-shadow(0 30px 45px rgba(0, 0, 0, .55));
}

/* ========================= 图库 + 参数选项 ============================= */
.pd-gallery-section {
    background: linear-gradient(180deg, #fff, var(--pd-soft));
}

.pd-gallery-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr);
    gap: clamp(24px, 3vw, 40px);
    align-items: start;
}

.pd-gallery {
    display: grid;
    gap: 16px;
    width: 100%;
    height: 100%;
}

.pd-main-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    padding: 24px;
    /*border: 1px solid var(--pd-line);*/
    border-radius: var(--pd-radius);
    /*background:*/
    /*        radial-gradient(circle at 50% 62%, #ffffff 0%, #eef2f7 55%, #dfe5ec 100%);*/
    /*box-shadow: var(--pd-shadow-sm);*/
    overflow: hidden;
}

.pd-main-image img {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    transition: opacity .35s ease, transform .5s ease;
}

.pd-main-image img:hover {
    transform: scale(1.03);
}

.pd-main-image .pd-single {
}

.pd-empty {
    font-size: 14px;
    color: #dc2626;
}

.pd-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    align-items: center;
}

.pd-thumb {
    flex: none;
    width: 96px;
    height: 96px;
    padding: 6px;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background:
            radial-gradient(circle at 50% 60%, #ffffff 0%, #eef2f7 60%, #dfe5ec 100%);
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.pd-thumb:hover {
    transform: translateY(-2px);
    box-shadow: var(--pd-shadow-sm);
}

.pd-thumb.active {
    border-color: var(--pd-brand);
    box-shadow: 0 0 0 2px rgba(0, 79, 145, .18);
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 选项区 */
.pd-options {
    padding: 24px;
    /*border: 1px solid var(--pd-line);*/
    border-radius: var(--pd-radius);
    background: #fff;
    box-shadow: var(--pd-shadow-sm);
}

.pd-option-group + .pd-option-group {
    /*margin-top: 22px;*/
    padding-top: 22px;
    /*border-top: 1px dashed var(--pd-line);*/
}

.pd-option-label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pd-gray);
}

.pd-option-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pd-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #dde3ea;
    border-radius: var(--pd-radius);
    background: #fff;
    font-size: 14px;
    color: #334155;
    cursor: default;
    transition: all .2s ease;
}

.pd-chip.active {
    border-color: var(--pd-brand);
    background: var(--pd-brand);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0, 79, 145, .28);
}

/* ============================ 产品特性 ================================= */
.pd-features {
    background: #fff;
}

.pd-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.pd-feature-card {
    padding: 18px;
    /*border: 1px solid var(--pd-line);*/
    border-radius: var(--pd-radius);
    background: #fff;
    box-shadow: var(--pd-shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}

.pd-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pd-shadow-md);
}

.pd-feature-media {
    height: 210px;
    border-radius: var(--pd-radius);
    background: linear-gradient(135deg, #f2f6fa, #e6edf5);
    overflow: hidden;
}

.pd-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-feature-card p {
    margin: 14px 2px 2px;
    font-size: 14px;
    line-height: 1.75;
    color: #475569;
}

/* ======================= 规格 / 下载 / FAQ ============================= */
.pd-info-section {
    background: var(--pd-soft);
}

.pd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: clamp(16px, 2vw, 24px);
    align-items: start;
}

.pd-card {

    /*border: 1px solid var(--pd-line);*/
    border-radius: var(--pd-radius);
    background: #fff;
    box-shadow: var(--pd-shadow-sm);
    height: 100%;
}



/* 规格表 */
.pd-spec-table {
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    overflow: hidden;
    margin: 10px;
}

.pd-spec-table table {
    width: 100%;
    border-collapse: collapse;
}

.pd-spec-table tr + tr {
    border-top: 1px solid var(--pd-line);
}

.pd-spec-table tr:hover {
    background: #f4f9ff;
}

.pd-spec-table th,
.pd-spec-table td {
    padding: 14px 18px;
    font-size: 14px;
    text-align: left;
    vertical-align: middle;
}

.pd-spec-table th {
    width: 45%;
    background: var(--pd-soft);
    font-weight: 600;
    color: #334155;
}

.pd-spec-table td {
    color: var(--pd-ink);
    font-weight: 500;
}

/* 下载 */
.pd-download-list {
    display: grid;
    gap: 12px;
    padding: 10px;
}

.pd-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: #fff;
    color: var(--pd-ink);
    text-decoration: none;
    transition: all .25s ease;
}

.pd-download-item:hover {
    border-color: var(--pd-brand);
    background: #f4f9ff;
    transform: translateX(4px);
    box-shadow: var(--pd-shadow-sm);
}

.pd-download-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pd-doc-icon {
    flex: none;
    width: 22px;
    height: 26px;
    stroke: var(--pd-brand);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pd-download-name {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-download-tag {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 79, 145, .1);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--pd-brand);
}

/* FAQ */
.pd-faq-list {
    display: grid;
    gap: 12px;
    padding: 10px;
}

.pd-faq-item {
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: #fff;
    overflow: hidden;
    transition: border-color .5s ease, box-shadow .5s ease;

}

.pd-faq-item[open] {
    border-color: rgba(0, 79, 145, .45);
    box-shadow: var(--pd-shadow-sm);
}

.pd-faq-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--pd-ink);
    cursor: pointer;
    list-style: none;
}

.pd-faq-trigger::-webkit-details-marker {
    display: none;
}

.pd-faq-trigger:hover {
    background: #f8fbff;
}

.pd-faq-icon {
    position: relative;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 79, 145, .1);
    transition: transform .3s ease, background .2s ease;
}

.pd-faq-icon::before,
.pd-faq-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 2px;
    border-radius: var(--pd-radius);
    background: var(--pd-brand);
    transform: translate(-50%, -50%);
}

.pd-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.pd-faq-item[open] .pd-faq-icon {
    transform: rotate(45deg);
    background: var(--pd-brand);
}

.pd-faq-item[open] .pd-faq-icon::before,
.pd-faq-item[open] .pd-faq-icon::after {
    background: #fff;
}

.pd-faq-answer {
    padding: 0 18px 18px;
    font-size: 14px;
    line-height: 1.8;
    color: #475569;
}

.pd-faq-item[open] .pd-faq-answer {
    animation: pdFadeIn .28s ease;
}

@keyframes pdFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================ 推荐产品 ================================= */
.pd-recommend {
    background: #fff;
}

.pd-recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: clamp(16px, 2vw, 24px);
    padding: 10px;
}

.pd-recommend-card {
    display: block;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background:
            radial-gradient(circle at 50% 45%, #ffffff 0%, #eef2f7 70%, #e2e8ef 100%);
    box-shadow: var(--pd-shadow-sm);
    text-decoration: none;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.pd-recommend-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pd-shadow-md);
}

.pd-recommend-media {
    height: 210px;
    padding: 16px;
    overflow: hidden;
}

.pd-recommend-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .45s ease;
}

.pd-recommend-card:hover .pd-recommend-media img {
    transform: scale(1.07);
}

.pd-recommend-title {
    padding: 14px 18px;
    background: linear-gradient(301deg, #41414163, #003366);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================ 响应式 =================================== */
@media (max-width: 1100px) {
    .pd-gallery-wrap {
        grid-template-columns: 1fr;
    }

    .pd-main-image {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .pd-hero-inner {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .pd-options{
        padding: 12px!important;
    }

    .pd-hero-media {
        order: -1;
    }

    .pd-hero-media img {
        max-height: 260px;
    }

    .pd-selling {
        gap: 16px;
    }

    .pd-selling-item {
        width: 80px;
    }

    .pd-selling-icon {
        width: 54px;
        height: 54px;
    }

    .pd-gallery {
        grid-template-columns: 1fr;
    }

    .pd-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        padding-bottom: 4px;
        padding-top: 4px;
    }

    .pd-thumb {
        width: 84px;
        height: 84px;
    }

    .pd-main-image {
        min-height: 300px;
    }

    .pd-main-image img {
        max-height: 260px;
    }

    /* 规格表在移动端改为两行堆叠 */
    .pd-spec-table th,
    .pd-spec-table td {
        display: block;
        width: 100%;
        padding: 10px 16px;
    }

    .pd-spec-table th {
        padding-bottom: 0;
        background: transparent;
        font-size: 12px;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--pd-gray);
    }

    .pd-spec-table tr + tr {
        border-top: 1px solid var(--pd-line);
    }

    .pd-recommend-media {
        height: 180px;
    }
}
