/* 商品详情页 */
.pd-page {
    padding: 16px 0 40px;
}

.pd-breadcrumb {
    margin-bottom: 16px;
    font-size: 13px;
    color: #999;
}

.pd-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.pd-breadcrumb a:hover {
    color: #e4393c;
}

.pd-sep {
    margin: 0 8px;
    color: #ccc;
}

.pd-current {
    color: #333;
}

.pd-card {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 16px;
}

.pd-layout {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    padding: 24px;
}

.pd-gallery-main {
    width: 100%;
    min-height: 420px;
    border: 1px solid #f0f0f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-gallery-main img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

.pd-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pd-thumb {
    width: 62px;
    height: 62px;
    padding: 0;
    border: 2px solid #eee;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.pd-thumb.active {
    border-color: #e4393c;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pd-no-image {
    min-height: 420px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #ddd;
    background: #fafafa;
}

.pd-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 600;
    color: #333;
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #999;
}

.pd-price-panel {
    background: #fff5f5;
    border: 1px solid #ffe0e0;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.pd-price-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.pd-price-line + .pd-price-line {
    margin-top: 8px;
}

.pd-field-label {
    width: 48px;
    flex-shrink: 0;
    font-size: 13px;
    color: #999;
}

.pd-sale-price {
    font-size: 30px;
    font-weight: 700;
    color: #e4393c;
    line-height: 1;
}

.pd-save-tag {
    font-size: 12px;
    color: #e4393c;
    background: #fff;
    border: 1px solid #ffc9c9;
    padding: 2px 8px;
    border-radius: 2px;
}

.pd-list-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.pd-promo-box {
    border: 1px dashed #ffd0d0;
    background: #fffafa;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.pd-promo-title {
    font-size: 13px;
    font-weight: 600;
    color: #e4393c;
    margin-bottom: 8px;
}

.pd-promo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
}

.pd-promo-item + .pd-promo-item {
    margin-top: 6px;
}

.pd-promo-tag {
    background: #e4393c;
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.pd-attrs {
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    padding: 8px 0;
    margin-bottom: 14px;
}

.pd-attrs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 4px;
}

.pd-attr-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    min-width: 0;
}

.pd-attrs-grid .pd-attr-row {
    border-top: 0;
}

.pd-attr-row-full {
    padding-top: 6px;
    margin-top: 4px;
    border-top: 1px dashed #f0f0f0;
}

.pd-attr-value {
    color: #333;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-attr-value a {
    color: #666;
    text-decoration: none;
}

.pd-attr-value a:hover {
    color: #e4393c;
}

.pd-buy-box {
    margin-bottom: 18px;
}

.pd-qty-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pd-qty-wrap {
    flex: 1;
}

.pd-qty-controls {
    display: inline-flex;
    border: 1px solid #ddd;
}

.pd-qty-controls button {
    width: 34px;
    height: 34px;
    border: none;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 16px;
    color: #666;
}

.pd-qty-controls button:hover {
    background: #eee;
}

.pd-qty-controls input {
    width: 52px;
    height: 34px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
}

.pd-qty-tip {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.pd-price-preview {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
}

.pd-preview-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #666;
}

.pd-preview-discount {
    color: #27ae60;
}

.pd-preview-final {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-weight: 700;
    color: #e4393c;
}

.pd-action-row {
    display: flex;
    gap: 12px;
}

.pd-btn {
    flex: 1;
    height: 46px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

.pd-btn-buy {
    background: #e4393c;
    color: #fff;
}

.pd-btn-buy:hover {
    background: #cf2f32;
}

.pd-btn-cart {
    background: #ff9000;
    color: #fff;
}

.pd-btn-cart:hover {
    background: #e68100;
}

.pd-soldout {
    padding: 14px;
    text-align: center;
    background: #fff5f5;
    border: 1px solid #ffd0d0;
    color: #c0392b;
    font-size: 14px;
}

.pd-shop-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
}

.pd-shop-logo {
    width: 48px;
    height: 48px;
    border: 1px solid #eee;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.pd-shop-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-shop-logo span {
    font-size: 18px;
    font-weight: 700;
    color: #999;
}

.pd-shop-info {
    flex: 1;
    min-width: 0;
}

.pd-shop-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-shop-badge {
    margin-top: 4px;
    display: inline-block;
    font-size: 11px;
    color: #27ae60;
    border: 1px solid #b8e6c8;
    background: #f0fff4;
    padding: 1px 6px;
    border-radius: 2px;
}

.pd-shop-link {
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    background: #fff;
}

.pd-shop-link:hover {
    border-color: #e4393c;
    color: #e4393c;
}

.pd-tabs-nav {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.pd-tab-nav {
    padding: 14px 28px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.pd-tab-nav.active {
    color: #e4393c;
    background: #fff;
    border-bottom-color: #e4393c;
    font-weight: 600;
}

.pd-tab-panel {
    display: none;
    padding: 24px;
}

.pd-tab-panel.active {
    display: block;
}

.pd-detail-content {
    line-height: 1.8;
    color: #333;
    font-size: 14px;
}

.pd-detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

.pd-reviews-wrap {
    padding: 0;
}

.reviews-header {
    margin-bottom: 20px;
}

.reviews-summary {
    width: 100%;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.overall-rating {
    font-size: 36px;
    font-weight: 700;
    color: #e4393c;
    line-height: 1;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-star,
.star {
    font-size: 16px;
    color: #ffb400;
}

.rating-star.empty,
.star.empty {
    color: #ddd;
}

.rating-count {
    margin-top: 4px;
    font-size: 13px;
    color: #999;
}

.rating-breakdown {
    display: grid;
    gap: 8px;
    max-width: 360px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.rating-label {
    width: 56px;
    color: #999;
}

.rating-bar {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: #ffb400;
}

.rating-value {
    width: 28px;
    text-align: right;
    color: #ffb400;
}

.reviews-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.tab-btn {
    padding: 10px 16px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 13px;
}

.tab-btn:hover,
.tab-btn.active {
    color: #e4393c;
    border-bottom-color: #e4393c;
}

.reviews-list {
    min-height: 120px;
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid #f5f5f5;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e4393c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.reviewer-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.review-date {
    margin-top: 2px;
    font-size: 12px;
    color: #999;
}

.review-ratings {
    text-align: right;
}

.rating-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 2px;
}

.rating-item-label {
    color: #999;
}

.review-text {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

.review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.review-image {
    width: 72px;
    height: 72px;
    border: 1px solid #eee;
    overflow: hidden;
    cursor: pointer;
}

.review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.merchant-reply {
    margin-top: 12px;
    padding: 12px;
    background: #fafafa;
    border-left: 3px solid #e4393c;
}

.reply-header {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #999;
}

.reply-content {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.reviews-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    min-width: 36px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}

.page-btn:hover,
.page-btn.active {
    border-color: #e4393c;
    color: #e4393c;
}

.loading,
.no-reviews {
    text-align: center;
    padding: 40px 16px;
    color: #999;
}

.no-reviews-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.image-modal img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
}

.pd-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    padding: 14px 28px;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    text-align: center;
    min-width: 140px;
    pointer-events: none;
}

.pd-toast-success {
    background: #27ae60;
}

.pd-toast-error {
    background: #e4393c;
}

@media (max-width: 992px) {
    .pd-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .pd-gallery-main,
    .pd-no-image {
        min-height: 320px;
    }

    .pd-gallery-main img {
        max-height: 320px;
    }
}

@media (max-width: 768px) {
    .pd-sale-price {
        font-size: 26px;
    }

    .pd-attrs-grid {
        column-gap: 10px;
    }

    .pd-action-row {
        flex-direction: column;
    }

    .pd-shop-strip {
        flex-wrap: wrap;
    }

    .pd-tab-nav {
        flex: 1;
        padding: 12px 10px;
        font-size: 14px;
    }

    .pd-tab-panel {
        padding: 16px;
    }

    .review-header {
        flex-direction: column;
    }

    .review-ratings {
        text-align: left;
    }
}
