#glightbox-body img {
    background-color: #fff !important;
}

/* 产品详情页整体布局 */
.product-template {
    padding: var(--product-template-padding);
    background-color: #F2F3F4;
    --product-base-mr: max(1.2vw, 20px);
    --product-base-pd: max(2.4vw, 20px) max(3.2vw, 30px) !important;
}
.product-template .product-template-header {
    background-color: #fff;
    padding: var(--product-base-pd) !important;
    box-sizing: border-box;
}
.woocommerce-breadcrumb .breadcrumb-item:last-child {
    display: none !important;
}
.breadcrumb-item+.breadcrumb-item {
    padding: 0;
}
.breadcrumb-item+.breadcrumb-item::before {
    display: none;
    padding: 0;
}

/* 面包屑导航 */
.breadcrumb {
    color: #999;
    font-size: var(--widget-title-p-4-fs);
    margin-bottom: var(--product-base-mr);
}

.breadcrumb a {
    color: #999;
    text-decoration: none;
}

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

.breadcrumb span {
    color: #0075C9;
    margin: 0 8px;
    text-transform: uppercase;
}
.breadcrumb span:first-child {
    margin: 0 8px 0 0;
}

/* 产品基本信息区域 */
.product-basic-info {
    display: grid;
    grid-template-columns: minmax(400px, 1fr) minmax(400px, .6fr);
    gap: max(3vw, 30px);
    grid-template-areas:
        "info gallery";
}

/* 产品图片库样式 */
.product-gallery {
    position: relative;
    grid-area: gallery;
}

.product-gallery-main {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
}

.product-gallery-main .swiper {
    width: 100%;
    height: 100%;
}

.product-gallery-main .swiper-wrapper {
    width: 100%;
    height: 100%;
}

.product-gallery-main .swiper-slide {
    width: 100% !important;
    height: max(20vw, 300px);
    display: flex;
    align-items: center;
    background-color: #F2F3F4;
    justify-content: center;
}
.product-gallery-main .swiper-slide .glightbox {
    height: 100%;
}
.product-gallery-main .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.product-gallery-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.product-gallery-main .swiper-slide:hover img {
    transform: scale(1.02);
}

/* Swiper 导航按钮样式 */
.product-gallery-main .swiper-button-next,
.product-gallery-main .swiper-button-prev {
    color: var(--theme-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-gallery-main:hover .swiper-button-next,
.product-gallery-main:hover .swiper-button-prev {
    opacity: 1;
}

.product-gallery-main .swiper-button-next:after,
.product-gallery-main .swiper-button-prev:after {
    font-size: 24px;
}

.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumb-btn {
    padding: 14px 30px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: var(--widget-title-p-3-fs);
    color: var(--theme-p-color);
}

.thumb-btn:hover,
.thumb-btn.active {
    border-color: var(--theme-color);
    color: var(--theme-color);
}

/* 产品信息样式 */
.product-info {
    display: flex;
    flex-direction: column;
    gap: var(--product-base-mr);
    grid-area: info;
    padding-right: max(3vw, 30px);
    border-right: 1px solid #eee;
}

.product-title {
    font-size: var(--widget-title-product-h2-fs);
    font-weight: 700;
    color: #000000;
    margin-bottom: 0;
}

.product-short-description {
    color: #000;
    font-size: var(--widget-title-p-3-fs);
    line-height: 1.6;
}

.product-sku {
    color: #000;
    font-size: var(--widget-title-p-3-fs);
}

.product-categories {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #000;
}

.product-categories a {
    color: #000;
    text-decoration: none;
}

.product-categories a:hover {
    text-decoration: underline;
}

.doc-download-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--theme-color);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.doc-download-btn:hover {
    background-color: #0062a9;
}

/* 下载文件列表样式 */
.product-downloads {
    margin-top: calc(40px - var(--product-base-mr));
}

.product-downloads h3,
.development-board-related-products h3 {
    font-size: var(--widget-title-p-2-fs);
    font-weight: 600;
    color: #333;
    margin-bottom: var(--product-base-mr);
}
.development-board-related-products .related-products-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.development-board-related-products .related-products-grid .related-product-card a {
    gap: 8px;
    width: fit-content;
    text-transform: uppercase;
    font-size: var(--widget-title-p-3-fs);
    color: var(--theme-color);
    font-weight: 500;
}
.development-board-related-products .related-products-grid .related-product-card a:hover {
    text-decoration: underline;
    color: #0a58ca;
}
.download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--theme-color);
    transition: all 0.3s ease;
    width: fit-content;
    font-size: var(--widget-title-p-3-fs);
}

.download-item:hover {
    text-decoration: underline;
}

.download-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-name {
    font-size: var(--widget-title-p-3-fs);
    font-weight: 500;
}

/* 产品详细信息区域 */
.product-details {
    margin-top: var(--product-base-mr);
}

/* 标签页导航 */
.product-tab-nav {
    display: flex;
    gap: max(2.4vw, 20px);
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    padding: max(1.2vw, 20px) max(3.2vw, 30px);
    background-color: #fff;
}

.product-tab-nav-item {
    color: #999999;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    font-weight: 500;
    transition: all 0.3s;
    font-size: var(--widget-title-p-3-fs);
}

.product-tab-nav-item.active {
    color: var(--theme-color);
}

.product-tab-nav-item.active::after {
    transform: scaleX(1);
}

/* 标签页内容 */
.product-tab-content-wrapper {
    position: relative;
    min-height: 200px; /* 设置最小高度避免内容切换时的跳动 */
}

.product-tab-content {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    padding: var(--product-base-pd);
    background-color: #fff;
    overflow-x: auto;
}

.product-tab-content.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.product-tab-content ul,
.product-tab-content ol,
.product-tab-content ul li {
    list-style: disc !important;
}
.product-tab-content table {
    width: 100%;
    border: 2px solid #f5f5f5;
    min-width: 800px;
    margin-bottom: max(2vw, 20px);
}
.product-tab-content table th,
.product-tab-content table td {
    padding: 18px 24px;
    line-height: 1;
}
.product-tab-content table thead {
    background-color: var(--theme-color);
    color: #fff;
    font-weight: 700;
    font-size: var(--widget-title-p-2-fs);
}
/* 双数行 */
.product-tab-content table tbody tr:nth-child(even) {
    background-color: #F7F8F9;
    font-size: var(--widget-title-p-3-fs);
}
/* 内容区域的动画效果 */
.product-tab-content > * {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    transition-delay: 0.1s;
}

.product-tab-content.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* 级联动画效果 */
.product-tab-content.active > *:nth-child(1) { transition-delay: 0.1s; }
.product-tab-content.active > *:nth-child(2) { transition-delay: 0.2s; }
.product-tab-content.active > *:nth-child(3) { transition-delay: 0.3s; }
.product-tab-content.active > *:nth-child(4) { transition-delay: 0.4s; }
.product-tab-content.active > *:nth-child(5) { transition-delay: 0.5s; }

.product-tab-item {
    margin-bottom: 40px;
}

.product-tab-item h2 {
    font-size: var(--widget-title-p-1-fs);
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.product-tab-item ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.product-tab-item li {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.6;
}

/* 相关产品 */
.related-products {
    margin-top: var(--product-base-mr);
    background-color: #fff;
    padding: var(--product-base-pd);
}

.related-products .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.related-products h2 {
    font-size: var(--widget-title-p-1-fs);
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

.related-products .product-grid .product-card .product-link {
    padding-bottom: 0;
}


/* 响应式设计 */
@media (max-width: 991.98px) {
    .product-basic-info {
        grid-template-columns: minmax(100%, 1fr);
        /* grid 布局反向填充 */
        grid-template-areas:
            "gallery"
            "info";
    }

    .product-info {
        padding-right: 0;
        border-right: none;
    }
    
    .product-tab-nav {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Fancybox 自定义样式 */
.fancybox__container {
    --fancybox-bg: rgba(24, 24, 27, 0.95);
}

.fancybox__toolbar {
    --fancybox-color: #fff;
    padding: 16px;
}

.fancybox__toolbar__items {
    gap: 16px;
}

.fancybox__toolbar__items button {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.fancybox__toolbar__items button:hover {
    opacity: 1;
}

.fancybox__toolbar__items .f-button.is-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fancybox__toolbar__items .f-button.is-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fancybox__nav {
    --fancybox-color: #fff;
    padding: 20px;
}

.fancybox__nav button {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s;
}

.fancybox__nav button:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.fancybox__thumbs {
    padding: 0 20px 20px;
}

.fancybox__thumbs__list {
    gap: 8px;
}

.fancybox__thumb {
    border-radius: 4px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.fancybox__thumb:hover,
.fancybox__thumb.is-selected {
    opacity: 1;
}

/* PhotoSwipe 自定义样式 */
.pswp__button {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50%;
    width: 44px !important;
    height: 44px !important;
    color: #fff;
    transition: background-color 0.3s;
}

.pswp__button:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.pswp__top-bar {
    padding: 15px;
}

.pswp__counter {
    font-size: 14px;
    padding: 12px 0;
}

/* Magnific Popup 自定义样式 */
.mfp-with-zoom .mfp-container,
.mfp-with-zoom.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-with-zoom.mfp-ready .mfp-container {
    opacity: 1;
}

.mfp-with-zoom.mfp-ready.mfp-bg {
    opacity: 0.8;
}

.mfp-with-zoom.mfp-removing .mfp-container,
.mfp-with-zoom.mfp-removing.mfp-bg {
    opacity: 0;
}

.mfp-zoom-in .mfp-with-anim {
    opacity: 0;
    transition: all 0.2s ease-in-out;
    transform: scale(0.8);
}

.mfp-zoom-in.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-zoom-in.mfp-ready .mfp-with-anim {
    opacity: 1;
    transform: scale(1);
}

.mfp-zoom-in.mfp-ready.mfp-bg {
    opacity: 0.8;
}

.mfp-zoom-in.mfp-removing .mfp-with-anim {
    transform: scale(0.8);
    opacity: 0;
}

.mfp-zoom-in.mfp-removing.mfp-bg {
    opacity: 0;
}

/* SimpleLightbox 自定义样式 */
.sl-overlay {
    background: #000;
    opacity: 0.8;
}

.sl-wrapper .sl-close {
    color: #fff;
    font-size: 30px;
    right: 20px;
    top: 20px;
}

.sl-wrapper .sl-navigation button {
    color: #fff;
}

.sl-wrapper .sl-counter {
    color: #fff;
    top: 20px;
    left: 20px;
}

.sl-wrapper .sl-image {
    border-radius: 4px;
}

.sl-wrapper .sl-prev {
    left: 20px;
}

.sl-wrapper .sl-next {
    right: 20px;
}

/* 动画效果 */
.sl-overlay {
    transition: opacity 0.3s ease;
}

.sl-wrapper .sl-image {
    transition: transform 0.3s ease;
}

.sl-wrapper.sl-fade-in {
    animation: slFadeIn 0.3s ease;
}

@keyframes slFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media screen and (max-width: 1480px) {
    .product-template .custom-main-width {
        padding: 0 !important;
    }
}
.product-gallery-categories {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.category-btn {
    padding: 10px 20px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--animation-duration) ease;
}

.category-btn.active {
    background: rgba(0, 117, 201, 0.05);
    color: var(--theme-color);
    border-color: var(--theme-color);
}

.category-btn:hover:not(.active) {
    border-color: var(--theme-color);
    color: var(--theme-color);
}

/* Swiper 分页器样式 */
.product-gallery-main .swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.product-gallery-main .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 50%;
    background: #fff;
    opacity: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-gallery-main .swiper-pagination-bullet-active {
    background: var(--theme-color);
    transform: scale(1.2);
}

/* 悬停效果 */
.product-gallery-main .swiper-pagination-bullet:hover {
    background: var(--theme-color);
    opacity: 0.8;
}

/* 动画效果优化 */
.product-template [data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1),
                opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-template [data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
    overflow: hidden;
}

/* 特定方向的动画 */
.product-template [data-aos="fade-right"] {
    transform: translateX(-20px);
}

.product-template [data-aos="fade-left"] {
    transform: translateX(20px);
}

.product-template [data-aos="fade-down"] {
    transform: translateY(-20px);
}

/* 优化性能 */
.product-template [data-aos] {
    will-change: transform, opacity;
}

/* 移动端动画优化 */
@media (max-width: 768px) {
    .product-template [data-aos-delay] {
        transition-delay: 0s !important;
    }
    .breadcrumb {
        display: none;
    }
}

/* 标签按钮动画 */
.product-tab-nav-item {
    position: relative;
}

.product-tab-nav-item::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--theme-color);
    transition: width 0.3s ease;
}

.product-tab-nav-item:hover::after,
.product-tab-nav-item.active::after {
    width: 100%;
}
