/* 产品详情页面 */
.product-detail-page { max-width: 1100px; margin: 0 auto; padding: 20px 0; }

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 16px;
    font-size: 13px;
    color: #999;
}
.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: #764ba2; }
.breadcrumb .sep { color: #ccc; }
.breadcrumb .current { color: #555; }

/* 主卡片 */
.product-detail {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* 主内容区：左右分栏 */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* 左侧图片区 */
.product-gallery {
    background: #f8f9fb;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-image {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.main-image img {
    width: 100%;
    height: auto;
    display: block;
}
.main-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}
.main-image.placeholder svg {
    width: 80px;
    height: 80px;
    color: #ccc;
}

/* 右侧信息面板 */
.product-info-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.product-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.4;
}

/* 价格区 */
.price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border-radius: 12px;
}
.price-current {
    color: #f56c6c;
    font-weight: 700;
}
.price-symbol {
    font-size: 18px;
}
.price-value {
    font-size: 32px;
    line-height: 1;
}
.price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* 库存状态 */
.stock-section {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}
.stock-badge.in-stock {
    background: #e8f5e9;
    color: #388e3c;
}
.stock-badge.out-of-stock {
    background: #f5f5f5;
    color: #999;
}
.stock-count {
    color: #666;
}
.view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #999;
    margin-left: auto;
}

/* 分类区 */
.category-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.section-label {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    min-width: 40px;
}
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.category-tag {
    background: #f0f2ff;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
}

/* 收藏按钮 */
.favorite-action {
    padding: 8px 0;
}
.btn-favorite {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s;
}
.btn-favorite:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}
.btn-favorite.active {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff5f5;
}
.btn-favorite.active svg {
    fill: #e74c3c;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}
.action-buttons .btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
}
.btn-add-cart {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea !important;
}
.btn-add-cart:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}
.btn-buy-now {
    background: linear-gradient(135deg, #f56c6c 0%, #e03e3e 100%);
    color: #fff;
}
.btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 108, 108, 0.4);
}

/* 标签区 */
.tags-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f5;
    padding-top: 16px;
}
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-link {
    display: inline-block;
    background: #fff8e1;
    color: #f57c00;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.tag-link:hover {
    background: #f57c00;
    color: #fff;
}

/* 产品描述 */
.product-description {
    padding: 32px 40px;
    border-top: 1px solid #f0f0f5;
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}
.description-content {
    line-height: 1.8;
    color: #555;
    font-size: 14px;
}
.description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 上下篇导航 */
.product-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #f0f0f5;
}
.nav-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 40px;
    text-decoration: none;
    transition: background 0.2s;
}
.nav-card:not(.disabled):hover {
    background: #f8f9fb;
}
.nav-card.disabled {
    opacity: 0.5;
    cursor: default;
}
.nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
}
.nav-card.nav-next .nav-label {
    justify-content: flex-end;
}
.nav-card.nav-next .nav-title {
    text-align: right;
}
.nav-title {
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-card.disabled .nav-title {
    color: #999;
    font-style: italic;
}

/* 未找到状态 */
.no-product {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.no-product-icon {
    width: 64px;
    height: 64px;
    color: #ddd;
    margin-bottom: 16px;
}
.no-product h2 {
    color: #666;
    margin: 0 0 8px 0;
    font-size: 20px;
}
.no-product p {
    color: #999;
    margin: 0 0 24px 0;
    font-size: 14px;
}
.btn-back {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.25s;
}
.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 响应式 */
@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
    }
    .product-gallery {
        padding: 24px;
    }
    .product-info-panel {
        padding: 24px;
    }
    .product-title {
        font-size: 20px;
    }
    .price-value {
        font-size: 28px;
    }
    .action-buttons {
        flex-direction: column;
    }
    .product-description {
        padding: 24px;
    }
    .product-navigation {
        grid-template-columns: 1fr;
    }
    .nav-card {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .product-detail-page { padding: 12px 0; }
    .product-gallery { padding: 16px; }
    .product-info-panel { padding: 16px; }
    .product-title { font-size: 18px; }
    .price-value { font-size: 24px; }
    .product-description { padding: 16px; }
}

/* ==================== 评价区 ==================== */
.product-reviews-section {
    padding: 32px 40px;
    border-top: 1px solid #f0f0f5;
}

/* 评价统计 */
.review-summary {
    display: flex;
    gap: 40px;
    padding: 24px;
    background: #f8f9fb;
    border-radius: 12px;
    margin-bottom: 24px;
}
.summary-score {
    text-align: center;
    min-width: 120px;
}
.score-number {
    font-size: 48px;
    font-weight: 700;
    color: #f5a623;
    line-height: 1;
}
.score-stars {
    margin: 8px 0;
    color: #f5a623;
    display: flex;
    justify-content: center;
    gap: 2px;
}
.score-count {
    font-size: 13px;
    color: #999;
}
.summary-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}
.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bar-label {
    font-size: 13px;
    color: #666;
    min-width: 30px;
}
.bar-track {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623, #f5c77e);
    border-radius: 4px;
    transition: width 0.3s;
}
.bar-count {
    font-size: 13px;
    color: #999;
    min-width: 30px;
    text-align: right;
}

/* 评价列表 */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.review-card {
    padding: 20px;
    border: 1px solid #f0f0f5;
    border-radius: 12px;
    transition: box-shadow 0.2s;
}
.review-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* 评价头部 */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50%;
}
.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
.review-time {
    font-size: 12px;
    color: #999;
}
.review-rating {
    display: flex;
    gap: 2px;
    color: #f5a623;
}
.star {
    color: #e0e0e0;
}
.star-filled {
    color: #f5a623;
}

/* 评价内容 */
.review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 12px;
}

/* 评价媒体 */
.review-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.review-media-item {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}
.review-media-item:hover {
    transform: scale(1.05);
}

/* 追评 */
.review-follow {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fb;
    border-radius: 8px;
}
.follow-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.follow-badge {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}
.follow-time {
    font-size: 12px;
    color: #999;
}
.follow-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* 客服回复 */
.review-reply {
    margin-top: 12px;
    padding: 12px;
    background: #fff8e1;
    border-radius: 8px;
    border-left: 3px solid #f5a623;
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #f57c00;
    font-weight: 500;
}
.reply-header svg {
    color: #f57c00;
}
.reply-time {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    font-weight: normal;
}
.reply-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* 评价分页 */
.review-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pagination button {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.pagination button:hover {
    border-color: #667eea;
    color: #667eea;
}
.page-active {
    padding: 8px 14px;
    background: #667eea;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}
.page-ellipsis {
    padding: 8px 4px;
    color: #999;
}

/* 空状态 */
.review-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #999;
}
.review-empty svg {
    margin-bottom: 16px;
    color: #ddd;
}
.review-empty p {
    font-size: 14px;
    margin: 0;
}

/* 评价区响应式 */
@media (max-width: 768px) {
    .product-reviews-section {
        padding: 24px;
    }
    .review-summary {
        flex-direction: column;
        gap: 20px;
    }
    .summary-score {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .product-reviews-section {
        padding: 16px;
    }
    .review-summary {
        padding: 16px;
    }
    .score-number {
        font-size: 36px;
    }
    .review-card {
        padding: 16px;
    }
    .review-media-item {
        width: 64px;
        height: 64px;
    }
}

/* ==================== 营销活动区（促销 + 拼团） ==================== */
.marketing-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: -4px;
}
/* 单条活动横条 */
.promo-bar,
.groupbuy-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
}
/* 促销条：暖橙渐变 */
.promo-bar {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe8d1 100%);
    border: 1px solid #ffcc80;
    color: #6b4500;
}
.promo-icon,
.groupbuy-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.promo-label,
.groupbuy-label {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}
.promo-label {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}
.promo-name {
    font-weight: 600;
    color: #5d3200;
}
.promo-rules {
    color: #8a5a00;
    font-size: 12px;
}
/* 秒杀条变体：红粉渐变，更紧迫 */
.promo-bar-seckill {
    background: linear-gradient(135deg, #ffe8e8 0%, #ffd6d6 100%);
    border: 1px solid #ff9999;
    color: #8a0000;
}
.promo-bar-seckill .promo-label {
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
}
.promo-bar-seckill .promo-name {
    color: #8a0000;
}
.promo-bar-seckill .promo-rules {
    color: #a83232;
}

/* 秒杀/促销价格区 */
.promo-prices {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}
.promo-price {
    font-size: 20px;
    font-weight: 800;
    color: #e03e3e;
    line-height: 1;
}
.promo-original {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

/* 库存进度条 */
.promo-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 120px;
}
.promo-stock-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.promo-stock-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800 0%, #ff4d4f 100%);
    border-radius: 4px;
    transition: width 0.3s;
}
.promo-stock-text {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 倒计时 */
.promo-countdown {
    margin-left: auto;
    padding: 3px 10px;
    background: rgba(224, 62, 62, 0.1);
    color: #e03e3e;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.promo-countdown.ended {
    background: rgba(153, 153, 153, 0.15);
    color: #999;
}

/* 拼团条：紫蓝渐变 */
.groupbuy-bar {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    color: #3730a3;
}
.groupbuy-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.groupbuy-price {
    font-size: 18px;
    font-weight: 700;
    color: #e03e3e;
}
.groupbuy-name {
    font-weight: 600;
    color: #4338ca;
}
.groupbuy-original {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}
.groupbuy-size {
    padding: 2px 8px;
    background: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
}
.groupbuy-progress {
    font-size: 12px;
    color: #4338ca;
}
.groupbuy-remaining {
    font-size: 12px;
    color: #764ba2;
    font-weight: 500;
}
/* 去拼团按钮 */
.btn-go-groupbuy {
    margin-left: auto;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s;
    flex-shrink: 0;
}
.btn-go-groupbuy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 营销区响应式 */
@media (max-width: 768px) {
    .btn-go-groupbuy {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }
}

/* ==================== 拼团活动页 ==================== */
/* 活动标题区 */
.groupbuy-activity-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eef2ff;
}
.groupbuy-activity-header .product-title {
    margin-bottom: 8px;
}
.activity-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}
.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.meta-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #f0f4ff;
    color: #667eea;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}
.countdown-tag {
    background: rgba(224, 62, 62, 0.1);
    color: #e03e3e;
    font-variant-numeric: tabular-nums;
}
.countdown-tag.ended {
    background: rgba(153, 153, 153, 0.15);
    color: #999;
}
.countdown-text {
    font-weight: 700;
}

/* 参与商品列表 */
.groupbuy-products {
    margin-bottom: 32px;
}
.groupbuy-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.groupbuy-product-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 12px;
    transition: box-shadow 0.25s, transform 0.25s;
}
.groupbuy-product-card:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
}
.product-card-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}
.image-placeholder svg {
    width: 40px;
    height: 40px;
}
.product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-card-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.product-card-name a {
    color: #2c3e50;
    text-decoration: none;
}
.product-card-name a:hover {
    color: #667eea;
}
.product-card-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.card-groupbuy-price {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: #e03e3e;
}
.card-groupbuy-price .price-value {
    font-size: 22px;
    font-weight: 800;
}
.card-groupbuy-price .price-symbol {
    font-size: 14px;
}
.card-groupbuy-price .price-tag {
    font-size: 11px;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}
.card-original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}
.product-card-stock {
    font-size: 12px;
}
.stock-text {
    color: #27ae60;
}
.stock-text.out {
    color: #e74c3c;
}
/* 发起拼团按钮 */
.btn-start-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    align-self: flex-start;
}
.btn-start-group:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.btn-start-group:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 拼团活动页响应式 */
@media (max-width: 768px) {
    .groupbuy-product-list {
        grid-template-columns: 1fr;
    }
    .groupbuy-product-card {
        flex-direction: column;
    }
    .product-card-image {
        width: 100%;
        height: 160px;
    }
}
