/* 商品详情页 · 全页布局（配合 base_product_detail.html） */
body.page-product-detail {
    --pd-page-width: 1680px;
    --pd-page-gutter: 24px;
    --pd-sidebar-width: 420px;
    background: #f4f4f4;
    font-size: 14px;
    color: #333;
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: visible !important;
}
body.page-product-detail #head_wrap1 {
    max-width: var(--pd-page-width) !important;
    width: calc(100% - 48px) !important;
}

/* 详情页 · 精简顶栏 */
.pd-topbar {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #ebebeb;
}
.pd-topbar-inner {
    max-width: var(--pd-page-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pd-page-gutter);
    box-sizing: border-box;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.pd-topbar-left,
.pd-topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.pd-topbar-locale {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    color: #666;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}
.pd-topbar-locale:hover {
    color: #e3101e;
    border-color: #f0c0c0;
}
.pd-topbar-locale-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #6eb5ff, #2d6cdf);
    flex-shrink: 0;
}
.pd-topbar-locale-icon--lang {
    border-radius: 2px;
    background: linear-gradient(180deg, #ff8a8a, #e3101e);
    font-size: 0;
}
.pd-topbar-sitenav {
    position: relative;
    display: inline-flex;
}
.pd-topbar-sitenav .wzdh a {
    color: #666;
    text-decoration: none;
}
.pd-topbar-sitenav .wzdh a:hover { color: #e3101e; }
.pd-topbar-sitenav .index_down.site-nav-mega {
    right: 0;
    left: auto;
}
.pd-topbar-lang select {
    border: none;
    background: transparent;
    color: #666;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    padding: 0;
    max-width: 52px;
}
.pd-topbar-right {
    justify-content: flex-end;
    font-size: 12px;
    color: #888;
}
.pd-topbar-right a {
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}
.pd-topbar-right a:hover { color: #e3101e; }
.pd-topbar-welcome em {
    font-style: normal;
    color: #333;
    font-weight: 500;
}
body.page-product-detail .pd-container {
    max-width: var(--pd-page-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pd-page-gutter);
    box-sizing: border-box;
}
body.page-product-detail .site-moss-promo {
    display: none !important;
}
body.page-product-detail > div[style*="margin-top"] {
    margin-top: 0 !important;
}
body.page-product-detail .footer {
    margin-top: 0 !important;
    border-top: 1px solid #eee;
}
body.page-product-detail .pd-page,
body.page-product-detail .pd-container,
body.page-product-detail .pd-body,
body.page-product-detail .pd-left-col {
    overflow: visible !important;
}

/* 覆盖 main.css 旧详情页样式 */
body.page-product-detail .goods_detail_list {
    width: 100% !important;
    margin: 0 !important;
}
body.page-product-detail .goods_detail_list h3 {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    font-weight: 600 !important;
}
body.page-product-detail .goods_detail_list p {
    line-height: 1.6 !important;
}
body.page-product-detail .prize_bar {
    height: auto !important;
    line-height: normal !important;
    background: #fff5f5 !important;
}
body.page-product-detail .prize_bar .show_pirze {
    font-size: 14px !important;
    padding-left: 0 !important;
}
body.page-product-detail .prize_bar .show_pirze em {
    font-size: 32px !important;
    padding-left: 4px !important;
}
body.page-product-detail .prize_bar .show_unit {
    padding-left: 16px !important;
}
body.page-product-detail .goods_num {
    height: auto !important;
    margin-top: 0 !important;
}
body.page-product-detail .operate_btn {
    height: auto !important;
    margin-top: 16px !important;
    font-size: inherit !important;
}

/* 左右分栏 sticky 核心 */
.pd-body {
    display: flex;
    gap: 24px;
    align-items: stretch;
    overflow: visible;
}
.pd-left-col {
    flex: 1;
    min-width: 0;
}
.pd-right-col {
    width: var(--pd-sidebar-width);
    flex-shrink: 0;
    position: relative;
    align-self: stretch;
}
.pd-sticky-placeholder {
    display: none;
}
.pd-sticky-panel {
    position: -webkit-sticky;
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #eee;
    padding: 18px 16px;
    box-sizing: border-box;
    z-index: 20;
}
.pd-sticky-panel.is-fixed {
    position: fixed;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.pd-sticky-panel.is-bottom {
    position: absolute;
    bottom: 0;
    top: auto !important;
    left: 0 !important;
    width: 100% !important;
    box-shadow: none;
}

/* 顶部搜索区 · 左 Logo / 中大搜索 / 右入口 */
.pd-mall-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    --pd-search-max-width: 880px;
    --pd-ctrl-height: 48px;
}
.pd-mall-header-inner {
    max-width: var(--pd-page-width);
    width: 100%;
    margin: 0 auto;
    padding: 16px var(--pd-page-gutter) 14px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 300px;
    align-items: start;
    column-gap: 32px;
}
.pd-mall-logo {
    justify-self: start;
    flex-shrink: 0;
    padding-top: 1px;
}
.pd-mall-logo img {
    height: 50px;
    width: auto;
    display: block;
}
.pd-mall-search {
    justify-self: center;
    width: 100%;
    max-width: var(--pd-search-max-width);
    min-width: 560px;
}
.pd-mall-search form {
    display: flex;
    border: 2px solid #ff6b9d;
    border-radius: 6px;
    overflow: hidden;
    height: var(--pd-ctrl-height);
    box-sizing: border-box;
    box-shadow: none;
}
.pd-mall-search input[type="text"] {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    line-height: var(--pd-ctrl-height);
    outline: none;
    background: #fff;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}
.pd-mall-search button {
    width: 108px;
    flex-shrink: 0;
    border: none;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 2px;
    height: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.28);
}
.pd-mall-search button:hover {
    background: linear-gradient(135deg, #ec7ef0 0%, #e84a5f 100%);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.38);
}
.pd-mall-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    justify-self: end;
    flex-shrink: 0;
    height: var(--pd-ctrl-height);
}
.pd-mall-user-group {
    display: inline-flex;
    align-items: stretch;
    height: 100%;
    border: 1px solid #f0c8c8;
    border-radius: calc(var(--pd-ctrl-height) / 2);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(227, 16, 30, 0.05);
}
.pd-mall-user-group .pd-mall-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 16px;
    color: #444;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-right: 1px solid #f5dede;
    transition: color .15s, background .15s;
}
.pd-mall-user-group .pd-mall-action-link:last-child {
    border-right: none;
}
.pd-mall-user-group .pd-mall-action-link:hover {
    color: #e3101e;
    background: #fff5f5;
}
.pd-mall-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid #f0c0c0;
    border-radius: calc(var(--pd-ctrl-height) / 2);
    background: #fff5f5;
    color: #e3101e !important;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.pd-mall-cart:hover {
    border-color: #e3101e;
    box-shadow: 0 2px 8px rgba(227, 16, 30, 0.12);
}
.pd-mall-cart em {
    font-style: normal;
    background: #e3101e;
    color: #fff;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    font-size: 11px;
    padding: 0 5px;
}

/* 频道导航 */
.pd-channel-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
}
.pd-channel-nav-inner {
    max-width: var(--pd-page-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pd-page-gutter);
    box-sizing: border-box;
}
.pd-channel-nav ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 2px;
}
.pd-channel-nav li a {
    display: block;
    padding: 8px 16px;
    color: #444;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.pd-channel-nav li a:hover {
    color: #e3101e;
    background: #fff5f5;
}
.pd-channel-nav li.pd-nav-hot a {
    color: #e3101e;
    font-weight: 600;
    background: #fff0f0;
}
.pd-channel-nav li.pd-nav-hot a:hover {
    background: #ffe8e8;
}

/* 商家顶栏 */
.pd-shop-header {
    background: #fff;
    border-bottom: 1px solid #eee;
}
.pd-shop-header-inner {
    max-width: var(--pd-page-width);
    width: 100%;
    margin: 0 auto;
    padding: 16px var(--pd-page-gutter);
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pd-shop-header-left {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.pd-shop-header-logo {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #eee;
    flex-shrink: 0;
}
.pd-shop-header-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin: 0 0 6px;
}
.pd-shop-header-name a {
    color: inherit;
    text-decoration: none;
}
.pd-shop-header-name a:hover { color: #e3101e; }
.pd-shop-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pd-shop-badge-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid #ddd;
    color: #666;
    background: #fafafa;
}
.pd-shop-badge-tag.red {
    border-color: #ffc9c9;
    color: #e3101e;
    background: #fff5f5;
}
.pd-shop-header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.pd-shop-header-actions a {
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.pd-shop-btn-outline {
    border: 1px solid #e3101e;
    color: #e3101e;
    background: #fff;
}
.pd-shop-btn-outline:hover { background: #fff5f5; }
.pd-shop-btn-solid {
    background: #e3101e;
    color: #fff !important;
    border: 1px solid #e3101e;
}
.pd-shop-btn-solid:hover { background: #c40000; }

/* 店铺 Tab 导航 */
.pd-tab-panels {
    scroll-margin-top: 72px;
}
.pd-shop-tabs {
    background: #fff;
    border-bottom: 2px solid #e3101e;
    margin-bottom: 0;
}
.pd-shop-tabs-inner {
    max-width: var(--pd-page-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--pd-page-gutter);
    box-sizing: border-box;
    display: flex;
    gap: 0;
}
.pd-shop-tabs a {
    padding: 12px 22px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.pd-shop-tabs a:hover { color: #e3101e; }
.pd-shop-tabs a.active {
    color: #e3101e;
    font-weight: 600;
    border-bottom-color: #e3101e;
    background: #fff;
}

/* 左侧 Tab 内容区（与顶部店铺 Tab 联动切换） */
.pd-tab-panels {
    background: #fff;
    border: 1px solid #eee;
    border-top: 2px solid #e3101e;
    min-height: 360px;
    margin-bottom: 16px;
}
.pd-tab-panel {
    display: none;
    padding: 20px;
}
.pd-tab-panel.active {
    display: block;
    animation: pdTabFadeIn .22s ease;
}
@keyframes pdTabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 无店铺头时的本地 Tab 条 */
.pd-content-tabs {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-bottom: 2px solid #e3101e;
    margin-bottom: 0;
}
.pd-content-tabs a {
    padding: 12px 22px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.pd-content-tabs a:hover { color: #e3101e; }
.pd-content-tabs a.active {
    color: #e3101e;
    font-weight: 600;
    border-bottom-color: #e3101e;
}

/* 右侧浮动条 */
.pd-float-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    background: #fff;
    border: 1px solid #eee;
    border-right: none;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 0 8px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
}
.pd-float-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    padding: 12px 6px;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    border-bottom: 1px solid #f5f5f5;
    transition: color .15s, background .15s;
}
.pd-float-bar a:last-child { border-bottom: none; }
.pd-float-bar a:hover {
    color: #e3101e;
    background: #fff5f5;
}
.pd-float-bar a span:first-child {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 4px;
}

@media (min-width: 1920px) {
    body.page-product-detail {
        --pd-page-width: 1760px;
        --pd-sidebar-width: 440px;
    }
    .pd-mall-header {
        --pd-search-max-width: 960px;
    }
}

@media (max-width: 960px) {
    .pd-mall-header-inner {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }
    .pd-mall-search {
        grid-column: 1 / -1;
        justify-self: stretch;
        max-width: none;
        width: 100%;
    }
    .pd-mall-actions {
        grid-column: 2;
        grid-row: 1;
        height: var(--pd-ctrl-height);
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .pd-mall-user-group {
        max-width: 100%;
    }
    .pd-mall-user-group .pd-mall-action-link {
        padding: 0 12px;
        font-size: 12px;
    }
    .pd-float-bar { display: none; }
    .pd-shop-header-inner { flex-direction: column; }
    .pd-body { flex-direction: column; }
    .pd-right-col { width: 100%; }
    .pd-sticky-panel {
        position: static !important;
        max-height: none;
    }
    .pd-sticky-panel.is-fixed,
    .pd-sticky-panel.is-bottom {
        position: static !important;
        width: auto !important;
        left: auto !important;
        top: auto !important;
        box-shadow: none !important;
    }
}
