/* ==================== 产品详情页（小米/华为商城风格） ==================== */
.product-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 0 40px;
}

/* 面包屑样式统一收敛至 common.css（.breadcrumb） */

/* 主容器：透明，内部各区块独立白卡 */
.product-detail {
    background: transparent;
    overflow: visible;
}

/* 主内容区：左右双栏白卡 */
.product-main {
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    gap: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    overflow: hidden;
}

/* 左侧图片区 */
.product-gallery {
    background: #fff;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    justify-content: flex-start;
    border-right: 1px solid var(--line-2);
}
.gallery-main-image {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line-2);
}
/* 有图时：直接子 img */
.gallery-main-image img {
    width: 100%;
    height: auto;
    display: block;
}
/* 无图时：占位符容器 */
.main-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: var(--bg);
}
.main-image.placeholder svg {
    width: 80px;
    height: 80px;
    color: var(--text-3);
}
/* 缩略图列表 */
.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: center;
}
.gallery-thumb {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-s);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--line);
    background: #fff;
    flex-shrink: 0;
    transition: border-color var(--fast), transform var(--fast);
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-thumb:hover {
    border-color: var(--brand);
}
.gallery-thumb.active {
    border-color: var(--brand);
}

/* 右侧信息面板 */
.product-info-panel {
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.product-header {
    padding-bottom: 0;
}
.product-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
}

/* 价格区 */
.price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 20px;
    background: var(--brand-light);
    border-radius: var(--radius);
}
.price-current {
    color: var(--brand);
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.price-symbol {
    font-size: 18px;
}
.price-value {
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
}
.price-original {
    font-size: 14px;
    color: var(--text-3);
    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: 999px;
    font-size: 12px;
    font-weight: 600;
}
.stock-badge.in-stock {
    background: #edf8ef;
    color: #2e9e4f;
}
.stock-badge.out-of-stock {
    background: var(--bg);
    color: var(--text-3);
}
.stock-count {
    color: var(--text-2);
}
.view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-3);
    margin-left: auto;
}

/* 购买决策组 */
.purchase-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* SKU 规格选择 */
.sku-section {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-top: 1px solid var(--line-2);
    border-bottom: 1px solid var(--line-2);
}
.sku-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}
.sku-group:last-child {
    margin-bottom: 0;
}
.sku-group-name {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
    min-width: 50px;
    padding-top: 8px;
}
.sku-group-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sku-value-btn {
    padding: 7px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--fast);
}
.sku-value-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}
.sku-value-btn.selected {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 500;
}
/* 不可选规格：置灰禁用 */
.sku-value-btn.spec-unavailable {
    color: var(--text-3);
    border-color: var(--line-2);
    background: var(--bg);
    text-decoration: line-through;
    cursor: not-allowed;
    pointer-events: none;
}
.sku-selected-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-s);
    font-size: 13px;
}
.sku-selected-price {
    color: var(--brand);
    font-weight: 700;
    font-size: 16px;
}
.sku-selected-stock {
    color: var(--text-2);
}
/* 选中规格缺货态 */
.sku-selected-info.out-of-stock .sku-selected-stock {
    color: var(--brand);
    font-weight: 600;
}
.sku-selected-info.out-of-stock .sku-selected-price {
    opacity: 0.5;
}
/* 通用禁用按钮 */
.btn-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* 购买操作区 */
.purchase-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
}
/* 数量选择器 */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 16px;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-2);
    transition: all var(--fast);
}
.qty-btn:hover {
    background: var(--bg);
    color: var(--brand);
}
.qty-input {
    width: 52px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--line-2);
    border-right: 1px solid var(--line-2);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 通用 section 标签 */
.section-label {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
    white-space: nowrap;
    width: 60px;
    flex-shrink: 0;
    padding-top: 5px;
    text-align: justify;
    text-align-last: justify;
    text-justify: distribute-all-lines;
}
/* 针对2字标签（如"分类"、"标签"）的文字两端对齐 Hack */
.section-label::after {
    content: '';
    display: inline-block;
    width: 100%;
}

/* 分类区 */
.category-section,
.tags-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line-2);
}
.category-tags,
.product-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}
.category-tag {
    background: var(--brand-light);
    color: var(--brand);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

/* 收藏按钮 */
.favorite-action {
    padding: 4px 0 0;
}
.btn-favorite {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #fff;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--fast);
}
.btn-favorite:hover {
    color: var(--brand);
    border-color: var(--brand);
}
.btn-favorite.active {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-light);
}
.btn-favorite.active svg {
    fill: var(--brand);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 12px;
    padding-top: 4px;
}
.action-buttons .btn {
    flex: 1;
    height: 46px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--fast);
}
/* 加入购物车：描边按钮 */
.btn-add-cart {
    background: #fff;
    color: var(--brand);
    border: 1.5px solid var(--brand) !important;
}
.btn-add-cart:hover {
    background: var(--brand-light);
    color: var(--brand);
}
/* 立即购买：实心品牌橙按钮 */
.btn-buy-now {
    background: var(--brand);
    color: #fff;
}
.btn-buy-now:hover {
    background: var(--brand-hover);
    box-shadow: 0 6px 16px rgba(255, 103, 0, 0.25);
}

/* 标签区 */
.tag-link {
    display: inline-block;
    background: var(--bg);
    color: var(--text-2);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
    transition: all var(--fast);
}
.tag-link:hover {
    background: var(--brand-light);
    color: var(--brand);
}

/* 产品描述 */
.product-description {
    margin-top: 16px;
    padding: 32px 36px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand);
    display: inline-block;
}
.description-content {
    line-height: 1.8;
    color: var(--text-2);
    font-size: 14px;
}
.description-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-s);
}

/* 上下篇导航 */
.product-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.nav-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    text-decoration: none;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    transition: transform var(--fast), box-shadow var(--fast);
}
.nav-card:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.nav-card.disabled {
    opacity: 0.5;
    cursor: default;
}
.nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
}
.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: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-card:not(.disabled):hover .nav-title {
    color: var(--brand);
}
.nav-card.disabled .nav-title {
    color: var(--text-3);
    font-style: italic;
}

/* 未找到状态 */
.no-product {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
}
.no-product-icon {
    width: 64px;
    height: 64px;
    color: var(--text-3);
    margin-bottom: 16px;
}
.no-product h2 {
    color: var(--text);
    margin: 0 0 8px 0;
    font-size: 20px;
}
.no-product p {
    color: var(--text-2);
    margin: 0 0 24px 0;
    font-size: 14px;
}
.btn-back {
    display: inline-block;
    padding: 12px 28px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all var(--fast);
}
.btn-back:hover {
    background: var(--brand-hover);
    box-shadow: 0 6px 16px rgba(255, 103, 0, 0.25);
}

/* ==================== 响应式 ==================== */
@media (max-width: 992px) {
    .product-main {
        grid-template-columns: 1fr;
    }
    .product-gallery {
        border-right: none;
        border-bottom: 1px solid var(--line-2);
        padding: 24px;
    }
    .product-info-panel {
        padding: 24px;
        gap: 18px;
    }
    .product-title {
        font-size: 20px;
    }
    .price-value {
        font-size: 28px;
    }
    .action-buttons {
        flex-direction: column;
    }
    .sku-group {
        flex-direction: column;
        gap: 8px;
    }
    .sku-group-name {
        min-width: auto;
        padding-top: 0;
    }
    .product-description {
        padding: 24px;
    }
    .product-navigation {
        grid-template-columns: 1fr;
    }
    .nav-card {
        padding: 16px 20px;
    }
    .product-reviews-section {
        padding: 24px;
    }
}

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

/* ==================== 评价区 ==================== */
.product-reviews-section {
    margin-top: 16px;
    padding: 32px 36px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
}

/* 评价统计 */
.review-summary {
    display: flex;
    gap: 40px;
    padding: 24px;
    background: var(--bg);
    border-radius: var(--radius);
    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: var(--text-3);
}
.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: var(--text-2);
    min-width: 30px;
}
.bar-track {
    flex: 1;
    height: 8px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623, #f5c77e);
    border-radius: 4px;
    transition: width var(--mid);
}
.bar-count {
    font-size: 13px;
    color: var(--text-3);
    min-width: 30px;
    text-align: right;
}

/* 评价列表 */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.review-card {
    padding: 20px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    transition: box-shadow var(--fast);
}
.review-card:hover {
    box-shadow: var(--shadow-s);
}

/* 评价头部 */
.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: var(--text);
}
.review-time {
    font-size: 12px;
    color: var(--text-3);
}
.review-rating {
    display: flex;
    gap: 2px;
    color: #f5a623;
}
.star {
    color: var(--line);
}
.star-filled {
    color: #f5a623;
}

/* 评价内容 */
.review-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    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: var(--radius-s);
    cursor: pointer;
    transition: transform var(--fast);
}
.review-media-item:hover {
    transform: scale(1.05);
}

/* 追评 */
.review-follow {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-s);
}
.follow-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.follow-badge {
    font-size: 12px;
    color: var(--brand);
    font-weight: 500;
}
.follow-time {
    font-size: 12px;
    color: var(--text-3);
}
.follow-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

/* 客服回复 */
.review-reply {
    margin-top: 12px;
    padding: 12px;
    background: var(--brand-light);
    border-radius: var(--radius-s);
    border-left: 3px solid var(--brand);
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--brand);
    font-weight: 500;
}
.reply-header svg {
    color: var(--brand);
}
.reply-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-3);
    font-weight: normal;
}
.reply-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-2);
}

/* 评价分页 */
.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 var(--line);
    background: #fff;
    border-radius: var(--radius-s);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--fast);
}
.pagination button:hover {
    border-color: var(--brand);
    color: var(--brand);
}
.page-active {
    padding: 8px 14px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-s);
    font-size: 14px;
    font-weight: 500;
}
.page-ellipsis {
    padding: 8px 4px;
    color: var(--text-3);
}

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

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

@media (max-width: 480px) {
    .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: var(--radius);
    font-size: 13px;
    line-height: 1.4;
}

/* 促销条：橙红渐变 */
.promo-bar {
    background: linear-gradient(135deg, #ff8534 0%, #ff4d00 100%);
    color: #fff;
}
.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: 999px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.promo-label {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.promo-name {
    font-weight: 600;
    color: #fff;
}
.promo-rules {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
}

/* 秒杀条变体：更红的渐变，更紧迫 */
.promo-bar-seckill {
    background: linear-gradient(135deg, #ff6700 0%, #e63a00 100%);
}
.promo-bar-seckill .promo-label {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.promo-bar-seckill .promo-name {
    color: #fff;
}
.promo-bar-seckill .promo-rules {
    color: rgba(255, 255, 255, 0.85);
}

/* 秒杀/促销价格区 */
.promo-prices {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}
.promo-price {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.promo-original {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    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(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}
.promo-stock-fill {
    height: 100%;
    background: #fff;
    border-radius: 4px;
    transition: width var(--mid);
}
.promo-stock-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    flex-shrink: 0;
}

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

/* 拼团条：白底橙边框 */
.groupbuy-bar {
    background: #fff;
    border: 1px solid var(--brand);
    color: var(--text);
}
.groupbuy-label {
    background: var(--brand);
    color: #fff;
}
.groupbuy-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
}
.groupbuy-name {
    font-weight: 600;
    color: var(--text);
}
.groupbuy-original {
    font-size: 13px;
    color: var(--text-3);
    text-decoration: line-through;
}
.groupbuy-size {
    padding: 2px 8px;
    background: var(--brand-light);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
}
.groupbuy-sold {
    font-size: 12px;
    color: var(--text-2);
}
.groupbuy-progress {
    font-size: 12px;
    color: var(--text-2);
}
.groupbuy-leader {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}
.groupbuy-remaining {
    font-size: 12px;
    color: var(--brand);
    font-weight: 500;
}

/* 去拼团按钮 */
.btn-go-groupbuy {
    margin-left: auto;
    padding: 6px 16px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fast);
    flex-shrink: 0;
}
.btn-go-groupbuy:hover {
    background: var(--brand-hover);
}
.btn-join-group {
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--brand);
}
.btn-join-group:hover {
    background: var(--brand-light);
    color: var(--brand);
}

/* 营销区响应式 */
@media (max-width: 992px) {
    .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 var(--brand-light);
}
.groupbuy-activity-header .product-title {
    margin-bottom: 8px;
}
.activity-description {
    color: var(--text-2);
    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: var(--brand-light);
    color: var(--brand);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}
.countdown-tag {
    background: var(--brand-light);
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.countdown-tag.ended {
    background: var(--bg);
    color: var(--text-3);
}
.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 var(--line-2);
    border-radius: var(--radius);
    transition: box-shadow var(--fast), transform var(--fast);
}
.groupbuy-product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.product-card-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--bg);
}
.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: var(--text-3);
}
.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: var(--text);
    text-decoration: none;
}
.product-card-name a:hover {
    color: var(--brand);
}
.product-card-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.card-groupbuy-price {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: var(--brand);
}
.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: var(--brand);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}
.card-original-price {
    font-size: 13px;
    color: var(--text-3);
    text-decoration: line-through;
}
.product-card-stock {
    font-size: 12px;
}
.stock-text {
    color: #2e9e4f;
}
.stock-text.out {
    color: var(--brand);
}

/* 发起拼团按钮 */
.btn-start-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px 20px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fast);
    align-self: flex-start;
}
.btn-start-group:hover:not(:disabled) {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 103, 0, 0.3);
}
.btn-start-group:disabled {
    background: var(--text-3);
    cursor: not-allowed;
    opacity: 0.7;
}

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

/* ==================== 移动端底部吸底购买栏 ==================== */
/* PC 端隐藏；小屏固定于底部，含价格 + 加入购物车 + 立即购买 */
.product-buy-bar {
    display: none;
}

@media (max-width: 768px) {
    .product-buy-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: saturate(180%) blur(12px);
        backdrop-filter: saturate(180%) blur(12px);
        border-top: 1px solid var(--line-2);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    }
    .buy-bar-price {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        flex: 1;
        line-height: 1.15;
    }
    .buy-bar-amount {
        display: flex;
        align-items: baseline;
        color: var(--brand);
        font-weight: 700;
    }
    .buy-bar-symbol {
        font-size: 13px;
    }
    .buy-bar-amount #barPrice {
        font-size: 20px;
    }
    .buy-bar-original {
        font-size: 12px;
        color: var(--text-3);
        text-decoration: line-through;
    }
    .buy-bar-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    .btn-bar {
        height: 42px;
        padding: 0 16px;
        border-radius: 21px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        white-space: nowrap;
        transition: transform var(--fast), background var(--fast);
    }
    .btn-bar svg {
        width: 17px;
        height: 17px;
        flex-shrink: 0;
    }
    .btn-bar-cart {
        background: var(--brand-light);
        color: var(--brand);
        border: 1px solid var(--brand);
    }
    .btn-bar-buy {
        background: var(--brand);
        color: #fff;
        border: 1px solid var(--brand);
    }
    .btn-bar:active {
        transform: scale(0.97);
    }
    /* 为吸底栏预留底部空间，避免遮挡页面末尾内容 */
    .product-detail-page {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 400px) {
    .btn-bar {
        padding: 0 12px;
        font-size: 13px;
    }
    .buy-bar-amount #barPrice {
        font-size: 18px;
    }
}

/* ============================================================
   小米商城风格 · 产品详情多图画廊（外部样式，配合 cn/js/product-gallery.js）
   覆盖：缩略图按钮化 / 计数器 / 左右切换 / 悬停放大镜 / 大图灯箱
   ============================================================ */

/* hidden 属性优先于下面的 display 声明，避免元素被误显示 */
.gallery-nav[hidden],
.gallery-counter[hidden],
.gallery-zoom-hint[hidden] {
    display: none !important;
}

/* 缩略图由 div 改为 button：重置按钮默认外观 */
.gallery-thumb {
    padding: 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    position: relative;
}
.gallery-thumb:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
}
/* 选中态：橙色描边 + 底部橙色指示条，更接近小米/电商的清晰选中反馈 */
.gallery-thumb.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--brand);
}

/* 主图区：悬停放大镜 + 交互层定位 */
.gallery-main-image {
    position: relative;
    cursor: zoom-in;
    transition: box-shadow var(--mid);
}
.gallery-main-image:hover { box-shadow: var(--shadow); }
.gallery-main-image img {
    transition: transform .35s var(--ease);
    will-change: transform;
}
/* 悬停放大（transform-origin 由 JS 跟随鼠标写入） */
.gallery-main-image.is-zooming img { transform: scale(1.9); }

/* 图片计数器 1 / 4 */
.gallery-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
    letter-spacing: .5px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}

/* 左右切换按钮 */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    box-shadow: var(--shadow-s);
    opacity: 0;
    transition: opacity var(--fast), background var(--fast), color var(--fast);
    z-index: 2;
}
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }
.gallery-main-image:hover .gallery-nav,
.gallery-nav:focus-visible { opacity: 1; }
.gallery-nav:hover { background: var(--brand); color: #fff; }

/* 放大镜提示 */
.gallery-zoom-hint {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--text-2);
    font-size: 12px;
    box-shadow: var(--shadow-s);
    opacity: 0;
    transition: opacity var(--fast);
    pointer-events: none;
}
.gallery-zoom-hint svg { width: 14px; height: 14px; }
.gallery-main-image:hover .gallery-zoom-hint { opacity: 1; }

/* 大图灯箱 */
body.gallery-lock { overflow: hidden; }
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 12, .92);
    padding: 4vh 4vw;
}
.gallery-lightbox.open { display: flex; }
.gallery-lightbox-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.gallery-lightbox-figure img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--radius-s);
    background: #fff;
}
.gallery-lightbox-figure figcaption {
    color: #cfcfcf;
    font-size: 13px;
    letter-spacing: 1px;
}
.gallery-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-lightbox-close:hover { background: var(--brand); }
.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-lightbox-nav svg { width: 24px; height: 24px; }
.gallery-lightbox-nav:hover { background: var(--brand); }
.gallery-lightbox-prev { left: 24px; }
.gallery-lightbox-next { right: 24px; }

/* 移动端：关闭悬停放大（改用手势滑动），缩略图改为横向滚动 */
@media (max-width: 768px) {
    .gallery-main-image { cursor: default; }
    .gallery-main-image.is-zooming img { transform: none; }
    .gallery-zoom-hint { display: none !important; }
    .gallery-nav {
        opacity: 1;
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, .85);
    }
    .gallery-nav svg { width: 22px; height: 22px; }
    .gallery-thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .gallery-thumb {
        width: 64px;
        height: 64px;
        scroll-snap-align: start;
    }
    .gallery-counter { right: 10px; bottom: 10px; }
    .gallery-lightbox { padding: 3vh 3vw; }
    .gallery-lightbox-nav { width: 42px; height: 42px; }
    .gallery-lightbox-prev { left: 8px; }
    .gallery-lightbox-next { right: 8px; }
    .gallery-lightbox-close { top: 10px; right: 12px; }
}
