/* 产品详情页，参考 moban4 / 外站布局 */

.product-detail-page .pd-main {
    background: var(--cat-bg, #f5f5f5);
    padding-bottom: 24px;
}

/* 与页头 .site-header__inner、分类/筛选页 var(--cat-max) 同宽，避免中间内容偏窄 */
.pd-wrap {
    max-width: 100%;
    width: var(--cat-max);
    margin: 0 auto;
    padding: 0 10px 24px;
    box-sizing: border-box;
}

.pd-breadcrumb {
    margin-top: 8px;
}

/* 与 category_filter_page 共用类名，详情页需自带样式（未引入 category_filter_page.css） */
.filter-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 40px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.filter-breadcrumb__item {
    display: flex;
    align-items: center;
}

.filter-breadcrumb__item a {
    color: #333;
    text-decoration: none;
}

.filter-breadcrumb__item a:hover {
    text-decoration: none;
}

.filter-breadcrumb__sep {
    color: #666;
    font-size: 12px;
    margin: 0 6px;
}

.pd-intro-stock {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* stretch：两列同高；内层卡片再 flex:1 铺满列高 */
    align-items: stretch;
}

.pd-intro {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.pd-stock {
    width: 100%;
    max-width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .pd-intro-stock {
        flex-wrap: nowrap;
        align-items: stretch;
    }

    /* 约 3:1，贴近设计图主卡 / 侧栏比例 */
    .pd-intro {
        flex: 3 1 0;
        min-width: 0;
    }

    .pd-stock {
        flex: 1 1 280px;
        max-width: 360px;
    }
}

.pd-intro-card {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    flex: 1;
    width: 100%;
    min-height: 0;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    align-items: flex-start;
}

.pd-media {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 220px;
}

.pd-media-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.pd-media-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    line-height: 1.2;
}

.pd-media-btn__ico {
    flex-shrink: 0;
}

.pd-media-btn--fav {
    background: #e8e8e8;
    color: #333;
}

.pd-media-btn--fav:hover {
    background: #dedede;
}

.pd-media-btn--fav.is-favorited {
    background: #fff0f3;
    color: #c41e3a;
}

.pd-media-btn--fav.is-favorited:hover {
    background: #ffe4ea;
}

.pd-media-btn--compare {
    background: var(--cat-primary, #1a5fb4);
    color: #fff;
}

.pd-media-btn--compare:hover {
    filter: brightness(0.92);
}

.pd-image-box {
    border: 1px solid #eee;
    padding: 12px;
    background: transparent;
    box-sizing: border-box;
    width: 100%;
}

.pd-image {
    display: block;
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.pd-image--placeholder {
    display: block;
    width: 100%;
    min-height: 220px;
    max-height: 280px;
    background: linear-gradient(145deg, #ececec 0%, #f5f5f5 50%, #e8e8e8 100%);
    border-radius: 2px;
}

.pd-info {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pd-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
    line-height: 1.3;
}

.pd-props {
    font-size: 14px;
    color: #333;
}

.pd-prop {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    line-height: 1.5;
}

.pd-prop-label {
    flex: 0 0 100px;
    max-width: 40%;
    color: #666;
}

.pd-prop-value {
    flex: 1;
    min-width: 160px;
}

.pd-link {
    color: #1a5fb4;
    text-decoration: none;
}

.pd-link:hover {
    text-decoration: none;
}

.pd-sheets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.pd-sheets .pd-sheet-link {
    color: #c99700;
}

.pd-buy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .pd-buy-row {
        margin-top: auto;
        padding-top: 20px;
    }
}

.pd-qty-label {
    font-size: 14px;
    color: #666;
}

.pd-qty-input {
    width: 100px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-sizing: border-box;
}

.pd-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.pd-btn--primary {
    background: #1a5fb4;
    color: #fff;
    border: 1px solid #1a5fb4;
}

.pd-btn--ghost {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.pd-btn--ghost:hover {
    border-color: #999;
}

.pd-btn--warning {
    background: #c99700;
    color: #fff;
}

.pd-stock-card {
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pd-stock-head {
    margin-bottom: 10px;
}

.pd-stock-line {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ff7b21;
    line-height: 1.3;
}

.pd-stock-num {
    font-weight: 700;
    color: inherit;
}

.pd-stock-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.pd-rfq-hint {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.pd-price-table {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    font-size: 13px;
}

.pd-price-head,
.pd-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    min-height: 36px;
    align-items: center;
}

.pd-price-head {
    background: #f6f8fc;
    font-weight: 600;
}

/* 表头为第 1 子元素，数据行从第 2 起：白 / 浅灰斑马纹 */
.pd-price-row:nth-child(2n + 2) {
    background: #fff;
}

.pd-price-row:nth-child(2n + 3) {
    background: #f3f3f3;
}

.pd-information {
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Tab 行 + 通栏浅灰分割线（对齐设计图） */
.pd-tabs-head {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e5e5e5;
    box-sizing: border-box;
}

.pd-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.pd-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 0;
}

.pd-tab {
    padding: 10px 22px;
    border: 1px solid #d8d8d8;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #f3f3f3;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.pd-tab:hover {
    background: #e9e9e9;
}

.pd-tab.is-active {
    background: #1a5fb4;
    border: 1px solid #1a5fb4;
    border-radius: 4px;
    color: #fff;
    z-index: 2;
}

.pd-tab.is-active:hover {
    background: #174a96;
    border-color: #174a96;
}

.pd-tabs-body {
    padding: 16px 20px 20px;
}

.pd-tab-panel {
    display: none;
}

.pd-tab-panel.is-active {
    display: block;
}

.pd-attr-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.pd-attr-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 44px;
    font-size: 14px;
    font-weight: 400;
    color: #222;
}

.pd-attr-row:nth-child(odd) {
    background: #fff;
}

.pd-attr-row:nth-child(even) {
    background: #f7f7f7;
}

.pd-attr-name {
    flex: 0 0 38%;
    max-width: 420px;
    padding: 12px 16px;
    color: #222;
    box-sizing: border-box;
    border-right: 1px solid #eee;
    align-self: center;
}

.pd-attr-val {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    word-break: break-word;
    color: #222;
    align-self: center;
}

.pd-empty-spec {
    color: #999;
    margin: 0;
    font-size: 14px;
}

.pd-remark-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

@media (max-width: 991.98px) {
    .pd-media {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    /* 立即购买 + 加入购物车：同一行，均分宽度 */
    .pd-buy-row {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .pd-buy-row .pd-btn {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 手机版：名称与数值同一行，过长用省略号（与 PC 两栏一致） */
@media (max-width: 576px) {
    .pd-tabs-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pd-attr-row {
        flex-wrap: nowrap;
        align-items: center;
        min-height: 40px;
    }

    .pd-attr-name {
        flex: 0 0 40%;
        max-width: 40%;
        min-width: 0;
        padding: 10px 8px;
        border-right: 1px solid #eee;
        border-bottom: none;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pd-attr-val {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        word-break: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
