/* Product detail — shared header offset */
.pd-breadcrumb {
    background: var(--gray-light);
    padding: 110px 0 16px;
    border-bottom: 1px solid #e8e8e8;
    background: linear-gradient(rgba(22,24,36,0.65), rgba(22,24,36,0.65)), url(https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?w=1600) center/cover no-repeat;
}
.pd-breadcrumb .breadcrumb {
    font-size: 13px;
    background: transparent;
    padding: 0;
}
.pd-breadcrumb .breadcrumb-item a {
    color: var(--text-gray);
    text-decoration: none;
}
.pd-breadcrumb .breadcrumb-item a:hover {
    color: var(--accent);
}
.pd-breadcrumb .breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 500;
}
.pd-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #aaa;
}
/* Main product block */
.pd-main {
    padding: 48px 0 64px;
    background: #fff;
}
.pd-gallery-main {
    border: 1px solid #eee;
    background: #fafafa;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.pd-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pd-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.pd-thumb {
    border: 2px solid transparent;
    padding: 0;
    background: #f5f5f5;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    transition: border-color 0.2s ease;
}
.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pd-thumb:hover,
.pd-thumb.active {
    border-color: var(--accent);
}
.pd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.pd-tags span {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-gray);
    border: 1px solid #ddd;
    padding: 4px 10px;
    background: #fff;
}
.pd-title {
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
    color: var(--text-dark);
}
.pd-sku {
    font-size: 13px;
    color: #888;
    margin-bottom: 18px;
}
.pd-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 22px;
}
.pd-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}
.pd-highlights li {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.pd-highlights .fa {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}
.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.pd-btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 12px 28px;
    border: 1px solid var(--accent);
    transition: opacity 0.2s ease;
}
.pd-btn-primary:hover {
    background-color: #fff;
    color: var(--accent);
}
.pd-btn-outline {
    display: inline-block;
    background: #fff;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 12px 28px;
    border: 1px solid #ccc;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.pd-btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pd-btn-outline-dark {
    display: inline-block;
    background: transparent;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 12px 28px;
    border: 1px solid #333;
    transition: background 0.2s ease, color 0.2s ease;
}
.pd-btn-outline-dark:hover {
    background: #333;
    color: #fff;
}
.pd-meta-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    border-top: 1px solid #eee;
    padding-top: 24px;
}
.pd-meta-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 4px;
}
.pd-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ========== 【修复】右侧局部Tab完整样式 ========== */
.pd-inline-tabs.nav-tabs {
    border-bottom: 1px solid #dee2e6;
    gap: 2px;
}
.pd-inline-tabs .nav-link {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    border: 1px solid transparent;
    border-bottom-width: 2px;
    padding: 10px 18px;
}
.pd-inline-tabs .nav-link:hover {
    color: var(--accent);
    border-color: #e9ecef #e9ecef #dee2e6;
}
.pd-inline-tabs .nav-link.active {
    color: var(--accent) !important;
    border-color: var(--accent) #dee2e6 #fff;
    font-weight: 600;
    background-color: #fff;
}
.pd-side-tab-content {
    /* box-shadow: 0 1px 6px rgba(0,0,0,0.08); */
    border-top:none;
    margin-top: -17px;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}
.pd-side-tab-content textarea.form-control {
    resize: vertical;
}
/* ============================================= */

/* Specs tabs */
.pd-specs-section {
    background: var(--gray-light);
    padding: 56px 0;
}
.pd-tabs {
    border-bottom: 1px solid #ddd;
    gap: 4px;
    margin-bottom: 0;
}
.pd-tabs .nav-link {
    color: var(--text-gray);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 18px;
    opacity: 1;
}
.pd-tabs .nav-link:hover {
    color: var(--text-dark);
    border-color: transparent;
}
.pd-tabs .nav-link.active {
    color: var(--accent) !important;
    background: transparent;
    border-bottom-color: var(--accent);
}
.pd-tab-content {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: none;
    padding: 28px 32px;
}
.pd-tab-content p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-gray);
}
.pd-spec-table th {
    width: 32%;
    font-weight: 600;
    color: var(--text-dark);
    background: #fafafa;
    border-color: #eee;
    font-size: 14px;
    vertical-align: middle;
}
.pd-spec-table td {
    font-size: 14px;
    color: var(--text-gray);
    border-color: #eee;
    vertical-align: middle;
}
.pd-app-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.9;
}
/* Related */
.pd-related {
    padding: 64px 0;
    background: #fff;
}
.pd-link-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.pd-link-more:hover {
    text-decoration: underline;
}
.pd-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    background: #fff;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.pd-related-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    color: inherit;
}
.pd-related-card img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #f5f5f5;
    display: block;
}
.pd-related-body {
    padding: 16px 18px 20px;
}
.pd-related-body h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}
.pd-related-body p {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}
/* CTA */
.pd-cta {
    background: var(--gray-blue);
    padding: 4rem 0;
}
.pd-cta h3 {
    font-weight: 700;
}
@media (max-width: 767.98px) {
    .pd-breadcrumb {
        padding-top: 96px;
    }
    .pd-main {
        padding: 32px 0 48px;
    }
    .pd-meta-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .pd-tab-content {
        padding: 22px 18px;
    }
    .pd-actions .pd-btn-primary,
    .pd-actions .pd-btn-outline {
        width: 100%;
        text-align: center;
    }
    /* 移动端表单面板缩小内边距 */
    .pd-side-tab-content {
	    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
	    border-top:none;
	}
    /* 移动端tab按钮缩小padding */
    .pd-inline-tabs .nav-link {
        padding:8px 12px;
        font-size:13px;
    }
}

.po-submit {
    background-color: var(--accent);
}

.po-submit:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(230, 74, 25, 0.35);
}

/* 大图预览图层 */
.pd-gallery-main img {
    cursor: zoom-in;
}
body.pd-lightbox-open {
    overflow: hidden;
}
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 48px 80px;
    background: rgba(10, 10, 10, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    touch-action: pan-y;
    overscroll-behavior: contain;
}
.pd-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.pd-lightbox-stage {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.pd-lightbox-stage img {
    max-width: min(1100px, 84vw);
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    cursor: default;
}
.pd-lightbox-counter {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    letter-spacing: 0.08em;
}
.pd-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}
.pd-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.pd-lightbox-nav {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.pd-lightbox-nav:hover {
    background: var(--accent);
    transform: scale(1.06);
}
@media (max-width: 767.98px) {
    .pd-lightbox {
        padding: 60px 12px;
        gap: 8px;
    }
    .pd-lightbox-stage img {
        max-width: 88vw;
        max-height: 72vh;
    }
    .pd-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .pd-lightbox-close {
        top: 12px;
        right: 12px;
    }
}
