﻿.product-detail-page {
    width: 100%;
    padding: 60px 0 96px;
    background: #f5f8fb;
    overflow: visible;
}

.product-detail-page .container {
    position: relative;
}

.product-detail-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 34px;
}

.product-detail-main {
    width: calc(70% - 17px);
}

.product-detail-side {
    width: calc(30% - 17px);
    position: sticky;
    top: 106px;
    align-self: flex-start;
    z-index: 5;
}

/* ==============================
   Top
============================== */

.product-detail-top {
    display: flex;
    align-items: stretch;
    gap: 34px;
    padding: 42px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 39, 89, .06);
    box-sizing: border-box;
    margin-bottom: 34px;
}

/* ==============================
   Gallery
============================== */

.product-gallery {
    width: 46%;
    flex-shrink: 0;
}

.product-gallery-big {
    position: relative;
    width: 100%;
    height: 430px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef3f7;
}

.product-gallery-big img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-prev,
.product-gallery-next {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 39, 89, .82);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: all .3s ease;
}

.product-gallery-prev {
    left: 16px;
}

.product-gallery-next {
    right: 16px;
}

.product-gallery-big:hover .product-gallery-prev,
.product-gallery-big:hover .product-gallery-next {
    opacity: 1;
}

.product-gallery-prev:hover,
.product-gallery-next:hover {
    background: #002759;
}

.product-gallery-zoom {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 39, 89, .88);
    color: #fff;
    font-size: 18px;
    text-align: center;
    line-height: 44px;
    text-decoration: none;
    transition: all .3s ease;
}

.product-gallery-zoom i {
    line-height: 44px;
}

.product-gallery-zoom:hover {
    background: #002759;
    color: #fff;
    transform: scale(1.06);
}

/* ==============================
   Product Gallery Thumbs
   固定一排显示 4 张，按钮切换
============================== */

.product-gallery-thumbs-wrap {
    position: relative;
    margin-top: 14px;
    padding: 0 42px;
    box-sizing: border-box;
}

.product-gallery-thumbs-viewport {
    width: 100%;
    overflow: hidden;
}

.product-gallery-thumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform .32s ease;
    will-change: transform;
}

.product-gallery-thumbs a {
    display: block;
    flex: 0 0 calc((100% - 24px) / 3);
    height: 96px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f7;
    box-sizing: border-box;
    transition: all .3s ease;
}

.product-gallery-thumbs a.active,
.product-gallery-thumbs a:hover {
    border-color: #002759;
}

.product-gallery-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 缩略图左右按钮 */
.product-thumb-prev,
.product-thumb-next {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    border: 0;
    border-radius: 50%;
    background: #002759;
    color: #fff;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    transition: all .3s ease;
}

.product-thumb-prev {
    left: 0;
}

.product-thumb-next {
    right: 0;
}

.product-thumb-prev i,
.product-thumb-next i {
    line-height: 30px;
}

.product-thumb-prev:hover,
.product-thumb-next:hover {
    background: #002759;
}

.product-thumb-prev.disabled,
.product-thumb-next.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==============================
   Product Info
============================== */

.product-detail-info {
    flex: 1;
    min-width: 0;
}

.product-detail-label {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.product-detail-label span {
    display: inline-block;
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
    background: rgba(0, 39, 89, .08);
    border-radius: 28px;
    color: #002759;
    font-size: 13px;
    font-weight: 600;
}

.product-detail-info h1 {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.35;
    color: #222;
    font-weight: 700;
}

.product-detail-info h2 {
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.7;
    color: #555;
    font-weight: 500;
}

.product-detail-desc {
    padding: 20px 22px;
    margin-bottom: 24px;
    background: #f5f8fb;
    border-left: 4px solid #002759;
    border-radius: 8px;
    box-sizing: border-box;
}

.product-detail-desc p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.8;
}


/* actions */

.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 26px;
}

.product-contact-btn,
.product-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    height: 48px;
    padding: 0 24px;
    border-radius: 48px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: all .35s ease;
}

.product-contact-btn {
    background: linear-gradient(135deg, #002759, #002759);
    color: #fff;
}

.product-pdf-btn {
    border: 1px solid #002759;
    color: #002759;
    background: #fff;
}

.product-contact-btn i,
.product-pdf-btn i {
    margin-right: 8px;
}

.product-contact-btn:hover {
    background: linear-gradient(135deg, #001b3f, #001b3f);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 39, 89, .24);
}

.product-pdf-btn:hover {
    background: #002759;
    color: #fff;
}

/* phone qrcode */

.product-detail-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-phone {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 82px;
    padding: 18px 20px;
    background: #f5f8fb;
    border-radius: 10px;
    box-sizing: border-box;
}

.product-phone > i {
    width: 44px;
    height: 44px;
    margin-right: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #002759, #002759);
    color: #fff;
    font-size: 20px;
    line-height: 44px;
    text-align: center;
    flex-shrink: 0;
}

.product-phone strong {
    display: block;
    margin-bottom: 4px;
    color: #222;
    font-size: 15px;
}

.product-phone p {
    margin: 0;
    color: #002759;
    font-size: 20px;
    font-weight: 700;
}

.product-qrcode {
    width: 96px;
    flex-shrink: 0;
    text-align: center;
}

.product-qrcode img {
    display: block;
    width: 96px;
    height: 96px;
    padding: 4px;
    background: #fff;
    border: 1px solid #eef2f5;
    border-radius: 8px;
    box-sizing: border-box;
}

.product-qrcode p {
    margin: 6px 0 0;
    color: #666;
    font-size: 13px;
}

/* ==============================
   Content
============================== */

.product-content-box {
    padding: 44px 50px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 39, 89, .06);
    box-sizing: border-box;
}

.product-content-title {
    margin-bottom: 30px;
    border-bottom: 1px solid #eef2f5;
}

.product-content-title h2 {
    display: inline-block;
    margin: 0;
    padding: 0 0 16px;
    position: relative;
    color: #222;
    font-size: 30px;
    line-height: 1.35;
    font-weight: 700;
}

.product-content-title h2:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 54px;
    height: 3px;
    background: #002759;
    border-radius: 3px;
}

.product-content {
    color: #555;
    font-size: 16px;
    line-height: 2;
}

.product-content p {
    margin: 0 0 22px;
}

.product-content h2,
.product-content h3,
.product-content h4 {
    margin: 30px 0 18px;
    color: #222;
    line-height: 1.45;
    font-weight: 700;
}

.product-content h2 {
    padding-left: 18px;
    position: relative;
    font-size: 28px;
}

.product-content h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 26px;
    background: #002759;
    border-radius: 4px;
}

.product-content h3 {
    font-size: 24px;
}

.product-content h4 {
    font-size: 20px;
}

.product-content strong {
    color: #002759;
    font-weight: 700;
}

.product-content img {
    display: block;
    max-width: 100%;
    margin: 30px auto;
    border-radius: 10px;
}

.product-content ul,
.product-content ol {
    margin: 0 0 24px 22px;
    padding: 0;
}

.product-content li {
    margin-bottom: 8px;
list-style: disc;
}

.product-content table {
    width: 100%;
    margin: 26px 0;
    border-collapse: collapse;
    background: #fff;
}

.product-content table th,
.product-content table td {
    padding: 14px 16px;
    border: 1px solid #e5eaf0;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    text-align: left;
}

.product-content table th {
    background: #f5f8fb;
    color: #222;
    font-weight: 700;
}

/* ==============================
   Sidebar
============================== */

.product-side-box {
    margin-bottom: 28px;
    padding: 28px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 39, 89, .06);
    box-sizing: border-box;
}

.product-side-box:last-child {
    margin-bottom: 0;
}

.product-side-title {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f5;
}

.product-side-title h2 {
    margin: 0;
    padding-left: 16px;
    position: relative;
    color: #222;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
}

.product-side-title h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 4px;
    height: 22px;
    background: #002759;
    border-radius: 4px;
}

/* category */

.product-side-category {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-side-category a {
    display: block;
    height: 44px;
    line-height: 44px;
    padding: 0 12px;
    background: #f5f8fb;
    border-radius: 8px;
    color: #333;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all .3s ease;
}

.product-side-category a.active,
.product-side-category a:hover {
    background: linear-gradient(135deg, #002759, #002759);
    color: #fff;
}

/* related */

.product-related-list {
    width: 100%;
}

.product-related-item {
    display: flex;
    align-items: flex-start;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #eef2f5;
    text-decoration: none;
}

.product-related-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.product-related-img {
    width: 108px;
    height: 78px;
    margin-right: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f7;
    flex-shrink: 0;
}

.product-related-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all .5s ease;
}

.product-related-text {
    flex: 1;
    min-width: 0;
}

.product-related-text h3 {
    margin: 0 0 5px;
    height: 30px;
    color: #333;
    font-size: 15px;
    line-height: 30px;
    overflow: hidden;
    transition: all .3s ease;
}

.product-related-text p {
    margin: 0;
    height: 30px;
    color: #888;
    font-size: 13px;
    line-height: 30px;
    overflow: hidden;
}

.product-related-item:hover .product-related-img img {
    transform: scale(1.08);
}

.product-related-item:hover .product-related-text h3 {
    color: #002759;
}

/* =========================================================
   Product Lightbox
========================================================= */

.product-lightbox {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    width: 100%;
    height: 100%;
}

.product-lightbox-mask {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .72);
}

.product-lightbox-box {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    max-width: 86%;
    max-height: 86%;
    transform: translate(-50%, -50%);
}

.product-lightbox-box img {
    display: block;
    max-width: 100%;
    max-height: 86vh;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.product-lightbox-close {
    position: absolute;
    right: -18px;
    top: -18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #002759;
    font-size: 30px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    transition: all .3s ease;
}

.product-lightbox-close:hover {
    background: #002759;
    color: #fff;
    transform: rotate(90deg);
}