/**
 * Single Product Page Styles
 * @package Chenren
 */

/* 第一层：面包屑 */
.pd-breadcrumb {
    background-color: #f5f5f5;
    padding: 15px 0;
}

.pd-breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.pd-breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.pd-breadcrumb-nav a:hover {
    color: #e91e63;
}

.pd-breadcrumb-sep {
    margin: 0 10px;
    color: #999;
}

.pd-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* 第二层：产品主体 */
.pd-main {
    padding: 40px 0;
}

.pd-main-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 20px;
}

/* 产品相册 */
.pd-gallery {
    position: sticky;
    top: 80px; /* 页眉高度约70px + 10px间距 */
    align-self: start;
}

.pd-gallery-wrapper {
    display: flex;
    gap: 10px;
}

/* 缩略图 */
.pd-thumbs-wrapper {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.pd-thumbs-prev,
.pd-thumbs-next {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}

.pd-thumbs-prev:hover,
.pd-thumbs-next:hover {
    background: #e0e0e0;
}

.pd-thumbs-swiper {
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.pd-thumbs-swiper .swiper-slide {
    box-sizing: border-box;
}

.pd-thumb-item {
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.pd-thumb-item:hover,
.pd-thumb-item.active {
    border-color: #e91e63;
}

.pd-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 大图 */
.pd-main-swiper {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.pd-main-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-main-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* 桌面端隐藏分页器，保留导航按钮 */
.pd-main-swiper .swiper-pagination {
    display: none;
}

/* 桌面端导航按钮 - 参考首页轮播样式 */
.pd-main-swiper .swiper-button-prev,
.pd-main-swiper .swiper-button-next {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    background-color: transparent;
    width: 15%;
    height: 100%;
    top: 0;
    margin-top: 0;
    transition: background-color 0.3s, color 0.3s;
}

.pd-main-swiper .swiper-button-prev {
    left: 0;
}

.pd-main-swiper .swiper-button-next {
    right: 0;
}

.pd-main-swiper .swiper-button-prev:hover,
.pd-main-swiper .swiper-button-next:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.pd-main-swiper .swiper-button-prev::after,
.pd-main-swiper .swiper-button-next::after {
    font-size: 24px;
}

/* 产品内容 */
.pd-content {
    padding: 0 20px;
}

.pd-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* 分类和评论数 */
.pd-meta-info {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.pd-meta-cat a {
    color: #333;
    text-decoration: none;
}

.pd-meta-cat a:hover {
    color: #e91e63;
}

.pd-meta-reviews {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.pd-meta-icon {
    width: 16px;
    height: 16px;
}

/* 价格和倒计时吸顶容器 */
.pd-sticky-header {
    position: sticky;
    top: 50px; /* 页眉高度约70px + 10px间距 */
    z-index: 100;
    background: #fff;
    padding: 10px 0;
    margin: -10px 0 10px;
}

.pd-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 20px;
}

.pd-price-current {
    font-size: 36px;
    font-weight: 700;
    color: #c41230;
}

.pd-price-unit {
    font-size: 28px;
}

.pd-price-original {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.pd-price-discount {
    font-size: 16px;
    color: #c41230;
    font-weight: 500;
}

/* 活动倒计时 */
.pd-countdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fdf2f4;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pd-countdown-label {
    font-size: 24px;
    color: #333;
    font-weight: 500;
}

.pd-countdown-timer {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pd-countdown-num {
    display: inline-block;
    background: #fff;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-countdown-unit {
    font-size: 24px;
    color: #333;
    font-weight: 500;
    margin: 0 3px;
}

.pd-short-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.pd-short-desc p {
    margin: 0 0 10px;
}

.pd-short-desc ul {
    list-style: disc;
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
}

.pd-short-desc li {
    margin-bottom: 8px;
}

.pd-short-desc li:last-child {
    margin-bottom: 0;
}

/* 定制选项 */
.pd-custom-options {
    margin-bottom: 25px;
}

.pd-option-group {
    margin-bottom: 20px;
    overflow: visible;
    position: relative;
    transition: box-shadow 0.3s, border-color 0.3s;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    margin: -10px;
    margin-bottom: 20px;
}

.pd-option-group.pd-option-highlight {
    border-color: #e91e63;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.3);
    animation: highlight-pulse 0.5s ease-in-out 2;
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(233, 30, 99, 0.3); }
    50% { box-shadow: 0 0 20px rgba(233, 30, 99, 0.5); }
}

.pd-option-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pd-option-required {
    color: #e91e63;
    font-weight: bold;
}

.pd-option-selected {
    color: #666;
    font-weight: normal;
}

.pd-option-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible;
}

.pd-option-item {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    z-index: 1;
    transition: border-color 0.3s;
}

.pd-option-item:hover {
    z-index: 100;
    border-color: #999;
}

.pd-option-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pd-option-img-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    flex-shrink: 0;
}

.pd-option-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-option-item:has(.pd-option-radio:checked) {
    border-color: #e91e63;
}

.pd-option-check {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #e91e63;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.pd-option-check svg {
    color: #fff;
}

.pd-option-item:has(.pd-option-radio:checked) .pd-option-check {
    opacity: 1;
}

.pd-option-price {
    font-size: 14px;
    color: #e53935;
    font-weight: 500;
    white-space: nowrap;
}

/* 定制选项悬停提示框 */
.pd-option-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    background: #fff;
    border: 2px solid #e91e63;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9999;
    pointer-events: none;
}

.pd-option-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #e91e63;
}

.pd-option-item:hover .pd-option-tooltip {
    opacity: 1;
    visibility: visible;
}

.pd-option-tooltip img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}

.pd-option-tooltip-name {
    display: block;
    font-size: 12px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

/* 文本框样式定制选项 */
.pd-option-text-type .pd-option-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.pd-option-text-item {
    display: inline-flex;
    cursor: pointer;
}

.pd-option-text-wrap {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.3s;
}

.pd-option-text-item:hover .pd-option-text-wrap {
    border-color: #999;
}

.pd-option-text-item .pd-option-radio:checked + .pd-option-text-wrap {
    border-color: #c41230;
}

.pd-option-text-content {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.pd-option-text-name {
    font-size: 14px;
    color: #333;
}

.pd-option-text-price {
    font-size: 14px;
    color: #c41230;
    font-weight: 500;
    white-space: nowrap;
}

.pd-option-text-check {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: #c41230;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.pd-option-text-check svg {
    color: #fff;
}

.pd-option-text-item .pd-option-radio:checked + .pd-option-text-wrap .pd-option-text-check {
    opacity: 1;
}

/* 定制模式切换 */
.pd-custom-mode-switch {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px 0;
    background: #f9f9f9;
    border-radius: 8px;
}

.pd-mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.pd-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pd-mode-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c41230;
}

.pd-mode-icon svg {
    width: 50px;
    height: 50px;
}

.pd-mode-gear svg {
    animation: spin 3s linear infinite;
}

.pd-mode-option.active .pd-mode-gear svg {
    animation: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pd-mode-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 定制区块收缩动画 */
.pd-custom-options {
    overflow: visible;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.pd-custom-options.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* 自定义要求 */
.pd-custom-requirements {
    margin-top: 20px;
}

.pd-requirements-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pd-requirements-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #c41230;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.pd-requirements-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pd-checkbox-icon {
    display: none;
    color: #c41230;
}

.pd-requirements-checkbox input:checked + .pd-checkbox-icon {
    display: flex;
}

.pd-requirements-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.pd-requirements-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
}

.pd-requirements-textarea:focus {
    outline: none;
    border-color: #c41230;
}

/* 文本框展开收起动画 */
.pd-requirements-textarea {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.pd-custom-requirements.collapsed .pd-requirements-textarea {
    max-height: 0;
    min-height: 0;
    padding: 0 15px;
    opacity: 0;
    margin: 0;
}

/* 产品标签 */
.pd-tags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pd-tags-label {
    color: #666;
    font-size: 18px;
}

.pd-tag {
    color: #666;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s;
}

.pd-tag:hover {
    color: #c41230;
}

/* 底部简短描述 */
.pd-short-desc-bottom {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.pd-short-desc-bottom ul {
    list-style: disc;
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
}

.pd-short-desc-bottom li {
    margin-bottom: 8px;
}

.pd-short-desc-bottom li:last-child {
    margin-bottom: 0;
}

/* 产品比较模块 */
.pd-compare-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.pd-compare-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.pd-compare-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 25px;
}

.pd-compare-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.pd-compare-item {
    display: flex;
    gap: 10px;
}

.pd-compare-left,
.pd-compare-right {
    flex: 1;
    position: relative;
}

.pd-compare-left img,
.pd-compare-right img {
    width: 100%;
    height: auto;
    display: block;
}

.pd-compare-label {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 15px;
    font-size: 14px;
    white-space: nowrap;
}

/* 推荐产品（独立section） */
section.pd-related-section {
    padding: 50px 0;
    background: #fff;
}

/* 最近浏览产品 */
section.pd-recently-section {
    padding-bottom: 50px;
}

.pd-related-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-related-icon {
    font-size: 20px;
}

.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.pd-related-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.pd-related-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.pd-related-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #d946ef, #a855f7);
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1;
}

.pd-related-image {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}

.pd-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.pd-related-image .pd-img-primary {
    position: relative;
    z-index: 1;
}

.pd-related-image .pd-img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 2;
}

.pd-related-card:hover .pd-img-primary {
    opacity: 0;
}

.pd-related-card:hover .pd-img-hover {
    opacity: 1;
}

.pd-related-name {
    font-size: 12px;
    color: #333;
    padding: 10px;
    margin: 0;
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pd-related-price {
    padding: 0 10px 10px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.pd-related-sale {
    font-size: 16px;
    font-weight: bold;
    color: #c41230;
}

.pd-related-regular {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
}

.pd-related-btn {
    display: block;
    background: linear-gradient(90deg, #f472b6, #ec4899);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    border-radius: 4px;
    margin: 10px;
    transition: opacity 0.3s;
}

.pd-related-btn:hover {
    opacity: 0.9;
}

@media (max-width: 1200px) {
    .pd-related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 推荐产品和最近浏览 */
.pd-related,
.pd-recently-viewed {
    padding: 50px 0;
    background: #f9f9f9;
}

.pd-recently-viewed {
    background: #fff;
}

.pd-section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-title-icon {
    font-size: 24px;
}

.pd-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.pd-product-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.pd-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c41230;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 1;
}

.pd-product-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.pd-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.pd-product-card:hover .pd-product-image img {
    transform: scale(1.05);
}

.pd-product-title {
    font-size: 13px;
    color: #333;
    padding: 10px;
    margin: 0;
    line-height: 1.4;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pd-product-price {
    padding: 0 10px 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-price-sale {
    font-size: 18px;
    font-weight: bold;
    color: #c41230;
}

.pd-price-regular {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.pd-product-btn {
    display: block;
    background: #c41230;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    transition: background 0.3s;
}

.pd-product-btn:hover {
    background: #a00f28;
}

@media (max-width: 1200px) {
    .pd-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .pd-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 支付方式图标 */
.pd-payment-icons {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pd-payment-icons img {
    height: 50px;
    width: auto;
}

/* 加入购物车 */
.pd-add-to-cart {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.pd-quantity {
    display: flex;
    align-items: center;
}

.pd-qty-btn {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.pd-qty-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.pd-qty-input {
    width: 80px;
    height: 45px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 16px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pd-cart-actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 30px;
}

.pd-cart-btn {
    height: auto;
    padding: 10px 60px;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pd-cart-btn svg {
    flex-shrink: 0;
}

.pd-cart-btn:hover {
    background: linear-gradient(rgba(255,255,255,0.15), rgba(255,255,255,0.15)), #e53935;
}

.pd-wishlist-btn {
    width: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, background 0.3s;
    color: #f06292;
}

.pd-wishlist-btn:hover {
    background: #f5f5f5;
}

.pd-wishlist-btn.active {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
}

.pd-wishlist-btn.active svg {
    fill: currentColor;
}

/* 第三层：产品详情 */
.pd-details {
    padding: 40px 0 60px;
    background: #fff;
}

.pd-tab-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.pd-tab-btn {
    padding: 12px 30px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.pd-tab-btn:hover {
    color: #e91e63;
}

.pd-tab-btn.active {
    color: #e91e63;
    font-weight: 500;
}

.pd-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e91e63;
}

.pd-tab-pane {
    display: none;
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.pd-tab-pane.active {
    display: block;
}

.pd-tab-pane img {
    max-width: 100%;
    height: auto;
}

/* 评论星级样式 */
.cr-review-rating {
    display: flex;
    gap: 2px;
}

.cr-star {
    color: #ddd;
    font-size: 14px;
}

.cr-star.cr-star-filled {
    color: #f5a623;
}

/* 属性表格 */
.pd-attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.pd-attributes-table th,
.pd-attributes-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pd-attributes-table th {
    width: 200px;
    background: #f9f9f9;
    font-weight: 500;
    color: #333;
}

/* 产品描述中的通用表格样式 */
.pd-tab-pane table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.pd-tab-pane table th,
.pd-tab-pane table td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.pd-tab-pane table th {
    font-weight: 600;
    color: #333;
}

.pd-tab-pane table td {
    color: #555;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .pd-tab-pane table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pd-tab-pane table th,
    .pd-tab-pane table td {
        padding: 6px 8px;
        font-size: 13px;
        min-width: 80px;
    }
}

/* 响应式 */
@media (max-width: 992px) {
    .pd-main-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .pd-gallery-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .pd-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .pd-title {
        font-size: 20px;
    }
    
    .pd-price {
        font-size: 24px;
    }
    
    .pd-gallery-wrapper {
        flex-direction: column-reverse;
    }
    
    .pd-thumbs-wrapper {
        width: 100%;
        flex-direction: row;
        height: 80px;
    }
    
    .pd-thumbs-prev,
    .pd-thumbs-next {
        width: 30px;
        height: 100%;
    }
    
    .pd-thumbs-prev svg,
    .pd-thumbs-next svg {
        transform: rotate(-90deg);
    }
    
    .pd-thumbs-swiper {
        height: 80px;
        flex: 1;
    }
    
    .pd-thumb-item {
        height: 70px;
        width: 70px;
    }
    
    .pd-quantity {
        justify-content: center;
    }
    
    .pd-cart-actions {
        width: 100%;
    }
    
    .pd-tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pd-tab-btn {
        white-space: nowrap;
        padding: 12px 20px;
    }
}

/* ========================================
   产品卡片样式 - 用于相关产品和最近浏览
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    padding: 4px;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(238, 134, 167, 0.6);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.product-image .img-secondary {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-image:hover .img-primary {
    opacity: 0;
}

.product-image:hover .img-secondary {
    opacity: 1;
}

.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #9c27b0;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.discount-tag.yellow {
    background-color: #ff9800;
}

.discount-tag.green {
    background-color: #4caf50;
}

.product-image:hover .discount-tag {
    opacity: 0;
}

.product-info {
    padding: 15px 0 0 0;
    text-align: center;
}

.product-title {
    font-size: 13px;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.5;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: #c41230;
}

.product-price {
    margin-bottom: 15px;
}

.current-price {
    color: #e53935;
    font-size: 18px;
    font-weight: bold;
}

.original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-btn {
    display: block;
    color: #fff;
    text-align: center;
    padding: 5px;
    text-decoration: none;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(#e9c1b2, #f7c5b3 5%, #f3ae9c 6%, #ef937f 10%, #ed8579 15%, #e65262 50%, #dd1242 98%, #db5e71 100%);
    box-shadow: 2px 1px 5px rgba(0, 0, 0, .4);
    transition: opacity 0.3s;
}

.product-btn:hover {
    opacity: 0.9;
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 手机端产品详情页样式 */
@media (max-width: 768px) {
    /* 产品主体布局改为单列 */
    .pd-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 相册区域取消吸顶 */
    .pd-gallery {
        position: relative;
        top: 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* 相册布局调整 - 隐藏缩略图 */
    .pd-gallery-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* 隐藏缩略图区域 */
    .pd-thumbs-wrapper {
        display: none;
    }
    
    /* 大图轮播占满宽度 */
    .pd-main-swiper {
        width: 100% !important;
        max-width: 100%;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .pd-main-swiper .swiper-wrapper {
        width: 100%;
    }
    
    .pd-main-swiper .swiper-slide {
        width: 100% !important;
        flex-shrink: 0;
    }
    
    .pd-main-image {
        border-radius: 8px;
        width: 100%;
    }
    
    .pd-main-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* 防止页面横向滚动 - 使用clip而非hidden以支持sticky */
    .pd-main {
        overflow-x: clip;
    }
    
    
    body {
        overflow-x: clip;
    }
    
    /* 确保pd-content不阻止sticky */
    .pd-content {
        overflow: visible;
    }
    
    /* 修复页眉图标大小 - 防止WooCommerce样式覆盖 */
    .header-icons .item img {
        width: 24px !important;
        height: 24px !important;
        max-width: none !important;
    }
    
    .header-icons .item button {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-btn span {
        width: 20px !important;
        height: 2px !important;
    }
    
    /* 产品轮播导航按钮 - 参考首页样式 */
    .pd-main-swiper .swiper-button-prev,
    .pd-main-swiper .swiper-button-next {
        display: flex !important;
        color: rgba(255, 255, 255, 0.8);
        background-color: rgba(0, 0, 0, 0.3);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        top: 50%;
        margin-top: -20px;
        transition: background-color 0.3s, color 0.3s;
    }
    
    .pd-main-swiper .swiper-button-prev {
        left: 10px;
    }
    
    .pd-main-swiper .swiper-button-next {
        right: 10px;
    }
    
    .pd-main-swiper .swiper-button-prev:hover,
    .pd-main-swiper .swiper-button-next:hover {
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
    }
    
    .pd-main-swiper .swiper-button-prev::after,
    .pd-main-swiper .swiper-button-next::after {
        font-size: 16px;
        font-weight: bold;
    }
    
    /* 分页器样式 */
    .pd-main-swiper .swiper-pagination {
        display: block !important;
        bottom: 10px;
    }
    
    .pd-main-swiper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.5);
        opacity: 1;
        margin: 0 4px;
    }
    
    .pd-main-swiper .swiper-pagination-bullet-active {
        background-color: #e91e63;
    }
    
    /* 手机端价格字体调整 */
    .pd-price {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pd-price-current {
        font-size: 26px;
    }
    
    .pd-price-unit {
        font-size: 16px;
    }
    
    .pd-price-original {
        font-size: 14px;
    }
    
    .pd-price-discount {
        font-size: 14px;
    }
    
    /* 手机端倒计时上下结构 */
    .pd-countdown {
        flex-direction: column;
        gap: 8px;
    }
    
    /* 手机端定制选项样式 */
    .pd-option-group {
        margin: 0;
        padding: 0;
    }
    
    .pd-option-items {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .pd-option-item {
        flex-direction: column;
        align-items: center;
        padding: 5px;
        gap: 4px;
        min-width: 0;
        box-sizing: border-box;
    }
    
    .pd-option-img-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .pd-option-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* 价格显示在图片下方 */
    .pd-option-price {
        font-size: 10px;
        order: 2;
        margin-top: 2px;
    }
    
    /* 备注显示在价格下方 */
    .pd-option-note {
        font-size: 9px;
        color: #666;
        order: 3;
        text-align: center;
        word-break: break-word;
    }
    
    /* 文本框选项样式 */
    .pd-option-text-item {
        width: auto;
        flex: 0 1 auto;
        max-width: 100%;
        word-break: break-word;
    }
    
    .pd-option-text-type .pd-option-items {
        display: flex;
        flex-wrap: wrap;
        grid-template-columns: none;
    }
    
    /* 勾选标记位置调整 */
    .pd-option-check {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 16px;
        height: 16px;
    }
    
    .pd-option-check svg {
        width: 10px;
        height: 10px;
    }
    
    /* 手机端禁用tooltip弹出 */
    .pd-option-tooltip {
        display: none !important;
    }
    
    /* 手机端价格和倒计时吸顶 */
    .pd-sticky-header {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 100;
        padding: 10px 15px;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    /* 手机端加入购物车区域居中 */
    .pd-add-to-cart {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .pd-quantity {
        justify-content: center;
    }
    
    .pd-cart-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    
    .pd-cart-btn {
        flex: 1;
    }
    
    /* 手机端标签导航优化 */
    .pd-tab-nav {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 0;
        white-space: nowrap;
    }
    
    .pd-tab-nav::-webkit-scrollbar {
        display: none;
    }
    
    .pd-tab-btn {
        flex-shrink: 0;
        padding: 10px 15px;
        font-size: 14px;
    }
}
