/* ============================================
   Prolrey Biotech — Product Detail Page Stylesheet
   ============================================ */

.pd-page {
    margin-top: var(--nav-h);
    padding: 40px 0 64px;
    background: var(--bg-white);
    min-height: 60vh;
}

/* ---------- Breadcrumb ---------- */
.pd-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-light);
    margin-bottom: 32px;
}

.pd-breadcrumb a {
    color: var(--gray);
    transition: color var(--transition);
}

.pd-breadcrumb a:hover {
    color: var(--red);
}

.pd-sep {
    color: var(--gray-light);
    font-size: 12px;
}

.pd-cur {
    color: var(--dark);
    font-weight: 600;
}

/* ---------- Main two-column ---------- */
.pd-main {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: start;
}

/* Gallery — reuse the product card "底图" treatment */
.pd-gallery {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    background: var(--bg-light);
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}

.pd-gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(145deg, #F5F7FA 0%, #EBEEF3 100%);
    background-image: url('ASSETS/PRODUCT/HotProductsBG.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.pd-gallery-img img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 36px rgba(0,0,0,0.10));
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.pd-gallery:hover .pd-gallery-img img {
    transform: scale(1.05);
}

/* ---------- Info panel ---------- */
.pd-info {
    padding-top: 8px;
}

.pd-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--red);
    background: var(--red-light);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.pd-name {
    font-size: 38px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 36px;
    padding: 18px 0;
    margin-bottom: 22px;
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.pd-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pd-meta-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-light);
}

.pd-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}

.pd-desc {
    font-size: 15px;
    line-height: 1.9;
    color: var(--gray);
    margin-bottom: 32px;
}

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* ---------- Rich-text detail ---------- */
.pd-detail {
    margin-top: 56px;
    padding-top: 44px;
    border-top: 1px solid rgba(0,0,0,0.06);
    animation: pdFadeIn 0.6s ease both;
}

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

.pd-detail-head {
    margin-bottom: 22px;
}

.pd-detail-head h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
    margin: 0;
    position: relative;
    padding-left: 16px;
}

.pd-detail-head h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 22px;
    background: var(--red);
    border-radius: 3px;
}

.pd-detail-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--gray);
}

.pd-detail-empty {
    margin: 0;
    color: var(--muted);
    font-style: italic;
}

.pd-detail-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 28px 0 12px;
}

.pd-detail-content h3:first-child {
    margin-top: 0;
}

.pd-detail-content p {
    margin: 0 0 14px;
}

.pd-detail-content ul,
.pd-detail-content ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.pd-detail-content li {
    margin-bottom: 8px;
}

.pd-detail-content a {
    color: var(--red);
    text-decoration: underline;
}

.pd-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

/* ---------- Rich-text embeds written by the admin editor ---------- */
.pd-detail-content video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 16px 0;
    background: #000;
}

.pd-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
    overflow: hidden;
    border-radius: 8px;
}

.pd-detail-content table td,
.pd-detail-content table th {
    border: 1px solid var(--line, #e6e8eb);
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}

.pd-detail-content table th {
    background: var(--bg-light);
    font-weight: 600;
}

.pd-detail-content blockquote {
    margin: 16px 0;
    padding: 12px 18px;
    border-left: 4px solid var(--red-light);
    background: var(--bg-light);
    color: var(--gray);
}

/* ---------- Related products ---------- */
.pd-related {
    padding: 72px 0 88px;
    background: var(--bg-light);
}

.pd-related .section-title {
    margin-bottom: 44px;
}

.pd-related .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

/* ---------- Not found ---------- */
.pd-notfound {
    text-align: center;
    padding: 80px 20px;
}

.pd-notfound p {
    font-size: 16px;
    color: var(--gray);
    margin-bottom: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .pd-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pd-gallery {
        position: static;
        max-width: 520px;
    }

    .pd-name {
        font-size: 30px;
    }

    .pd-related .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pd-page {
        padding: 24px 0 48px;
    }

    .pd-name {
        font-size: 26px;
    }

    .pd-actions {
        flex-direction: column;
    }

    .pd-actions .btn {
        width: 100%;
    }

    .pd-related .product-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }
}
