/**
 * B2 Group Buy Plugin - Frontend List Page Styles
 * 前台团购列表页样式（从list.php提取）
 */

/* 引入字体图标 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* 全局重置 */
* {
    box-sizing: border-box;
}

.group-buy-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 内容淡入动画 - 使用 shared/animations.css */
.group-buy-page .main-content {
    animation: fadeInUp 0.6s ease-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面头部区域 - 全屏宽度紧贴菜单 */
.page-hero {
    position: relative;
    background: var(--gb-purple-gradient);
    color: white;
    padding: 60px 0 80px;
    overflow: hidden;
    /* 确保全屏宽度 */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 0;
    box-sizing: border-box;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-info {
    flex: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: white;
}

.breadcrumb-item i {
    margin-right: 6px;
}

.breadcrumb-separator {
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.breadcrumb-current {
    color: white;
    font-weight: 500;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-title i {
    font-size: 32px;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 18px;
    margin: 0 0 30px 0;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

.hero-actions {
    flex-shrink: 0;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-hero.btn-primary {
    background: white;
    color: var(--gb-primary);
}

.btn-hero.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 主要内容区域 */
.page-content {
    padding: 40px 0 80px;
    position: relative;
    z-index: 2;
    margin-top: -40px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #666;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.view-toggle {
    display: flex;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--gb-primary);
    color: white;
}

.view-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-card.joined {
    border-color: var(--gb-primary);
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.15);
}

/* 商品图片 */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
}

.product-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:hover .image-overlay {
    opacity: 1;
}

.quick-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    color: #333;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    transform: scale(1.05);
    color: #333;
}

/* 商品标签 */
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

.badge i {
    font-size: 10px;
}

.badge-success {
    background: rgba(46, 204, 113, 0.9);
}

.badge-expired {
    background: rgba(149, 165, 166, 0.9);
}

.badge-hot {
    background: rgba(231, 76, 60, 0.9);
}

.badge-discount {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 3;
    position: relative;
    padding: 6px 10px !important;
    font-size: 11px !important;
    min-width: 50px;
    text-align: center;
    letter-spacing: 0.5px;
    display: flex !important;
    align-items: center;
    gap: 3px;
}

.badge-discount i {
    font-size: 9px !important;
    opacity: 0.9;
}

.badge-discount:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.badge-joined {
    background: rgba(102, 126, 234, 0.9);
}

/* 商品信息 */
.product-info {
    padding: 20px;
}

.product-header {
    margin-bottom: 16px;
}

.product-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: var(--gb-primary);
}

/* 价格信息 */
.product-pricing {
    margin-bottom: 16px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.current-price {
    display: flex;
    align-items: baseline;
    color: #e74c3c;
    font-weight: 700;
}

.currency {
    font-size: 14px;
}

.amount {
    font-size: 24px;
}

.decimal {
    font-size: 16px;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
}

/* 团购进度 */
.product-progress {
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-stats {
    font-size: 14px;
    color: #666;
}

.current {
    color: var(--gb-primary);
    font-weight: 600;
}

.progress-percent {
    font-size: 14px;
    color: var(--gb-primary);
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: #f1f3f4;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--gb-purple-gradient);
    border-radius: 3px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.success-text {
    color: #27ae60;
    font-weight: 500;
}

.success-text i {
    margin-right: 4px;
}

/* 倒计时 */
.product-countdown {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--gb-purple-gradient);
    border-radius: 8px;
    color: white;
}

.countdown-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.countdown-item {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.countdown-number {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.countdown-unit {
    font-size: 9px;
    opacity: 0.8;
    text-transform: uppercase;
}

/* 操作按钮 */
.product-actions {
    margin-top: auto;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action.btn-primary {
    background: var(--gb-purple-gradient);
    color: white;
}

.btn-action.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-action.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-action.btn-secondary:hover {
    background: #7f8c8d;
    color: white;
}

.btn-action.btn-disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* 分页 */
.pagination-container {
    margin-top: 60px;
    text-align: center;
}

.pagination-wrapper ul {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-wrapper li {
    margin: 0;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #e1e5e9;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    transition: all 0.3s ease;
}

.pagination-wrapper .current {
    background: var(--gb-primary);
    color: white;
    border-color: var(--gb-primary);
}

.pagination-wrapper a:hover:not(.current) {
    background: #f8f9fa;
    border-color: var(--gb-primary);
    color: var(--gb-primary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.empty-illustration {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--gb-primary);
}

.empty-title {
    font-size: 24px;
    color: #333;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.empty-description {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-empty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--gb-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-empty:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .page-hero {
        padding: 30px 0 50px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .hero-info {
        max-width: 100%;
    }

    .breadcrumb {
        justify-content: center;
        margin-bottom: 15px;
        font-size: 13px;
    }

    .breadcrumb-current {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-title {
        font-size: 26px;
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }

    .hero-title i {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .hero-actions {
        width: 100%;
    }

    .btn-hero {
        padding: 14px 28px;
        font-size: 15px;
        min-height: 48px;
        border-radius: 10px;
    }

    /* 筛选栏优化 */
    .filter-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        border-radius: 12px;
        margin: 0 0 20px 0;
    }

    .filter-info {
        text-align: center;
    }

    .filter-actions {
        justify-content: center;
    }

    .view-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    /* 商品网格优化 */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
        gap: 15px;
        margin-bottom: 30px;
    }

    .product-card {
        border-radius: 12px;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    }

    .product-image-wrapper {
        border-radius: 12px 12px 0 0;
    }

    .product-info {
        padding: 16px;
    }

    .product-title {
        margin-bottom: 12px;
    }

    .product-title a {
        font-size: 16px;
        line-height: 1.4;
    }

    /* 价格信息移动端优化 */
    .product-pricing {
        margin-bottom: 14px;
    }

    .current-price .amount {
        font-size: 22px;
    }

    .current-price .currency {
        font-size: 13px;
    }

    .original-price {
        font-size: 13px;
    }

    /* 进度条移动端优化 */
    .product-progress {
        margin-bottom: 14px;
    }

    .progress-info {
        margin-bottom: 10px;
    }

    .progress-stats {
        font-size: 13px;
    }

    .progress-percent {
        font-size: 13px;
    }

    .progress-bar {
        height: 8px;
        border-radius: 4px;
    }

    .progress-fill {
        border-radius: 4px;
    }

    .progress-text {
        font-size: 11px;
        margin-top: 6px;
    }

    /* 倒计时移动端优化 */
    .product-countdown {
        margin-bottom: 14px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .countdown-label {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .countdown-timer {
        gap: 4px;
    }

    .countdown-item {
        background: rgba(255, 255, 255, 0.15);
        padding: 4px 4px;
        border-radius: 6px;
        backdrop-filter: blur(10px);
        min-width: 0;
        flex: 1;
    }

    .countdown-number {
        font-size: 12px;
        margin-bottom: 1px;
        line-height: 1.1;
    }

    .countdown-unit {
        font-size: 8px;
        margin-top: 1px;
        line-height: 1.1;
    }

    /* 按钮移动端优化 */
    .btn-action {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px;
        border-radius: 10px;
        gap: 10px;
    }

    .btn-action i {
        font-size: 16px;
    }

    /* 标签移动端优化 */
    .product-badges {
        gap: 6px;
    }

    .badge {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 12px;
    }

    .badge i {
        font-size: 10px;
    }

    .badge-discount {
        padding: 6px 10px !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        min-width: 50px;
        text-align: center;
        letter-spacing: 0.5px;
    }

    .badge-discount i {
        font-size: 9px !important;
        opacity: 0.9;
    }

    /* 分页移动端优化 */
    .pagination-container {
        margin-top: 40px;
    }

    .pagination-wrapper ul {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-wrapper a,
    .pagination-wrapper span {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
        border-radius: 6px;
    }

    /* 空状态移动端优化 */
    .empty-state {
        padding: 50px 20px;
        border-radius: 12px;
    }

    .empty-illustration {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
        font-size: 40px;
    }

    .empty-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .empty-description {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .btn-empty {
        padding: 14px 24px;
        font-size: 15px;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .page-hero {
        padding: 25px 0 40px;
    }

    .hero-title {
        font-size: 22px;
        gap: 8px;
    }

    .hero-title i {
        font-size: 20px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .hero-stats {
        gap: 15px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .btn-hero {
        padding: 12px 24px;
        font-size: 14px;
        min-height: 44px;
    }

    /* 小屏幕商品网格 */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 25px;
    }

    .product-card {
        border-radius: 10px;
    }

    .product-info {
        padding: 14px;
    }

    .product-title a {
        font-size: 15px;
    }

    .current-price .amount {
        font-size: 20px;
    }

    .countdown-number {
        font-size: 12px;
        margin-bottom: 2px;
        line-height: 1.2;
    }

    .countdown-unit {
        font-size: 8px;
        margin-top: 2px;
        line-height: 1.2;
    }

    .btn-action {
        padding: 12px 14px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 8px;
    }

    .btn-action i {
        font-size: 14px;
    }

    /* 筛选栏小屏优化 */
    .filter-bar {
        padding: 12px;
        gap: 12px;
    }

    .filter-info {
        font-size: 13px;
    }

    .view-btn {
        min-width: 40px;
        min-height: 40px;
        font-size: 14px;
    }

    /* 分页小屏优化 */
    .pagination-wrapper a,
    .pagination-wrapper span {
        min-width: 36px;
        height: 36px;
        font-size: 12px;
        padding: 0 8px;
    }

    /* 隐藏小屏幕上不必要的元素 */
    .breadcrumb {
        font-size: 12px;
    }

    .breadcrumb-current {
        max-width: 150px;
    }

    /* 空状态小屏优化 */
    .empty-state {
        padding: 40px 15px;
    }

    .empty-illustration {
        width: 80px;
        height: 80px;
        font-size: 32px;
        margin-bottom: 16px;
    }

    .empty-title {
        font-size: 18px;
    }

    .empty-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .btn-empty {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 20px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .product-info {
        padding: 12px;
    }

    .current-price .amount {
        font-size: 18px;
    }

    .btn-action {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }

    .countdown-item {
        padding: 3px 4px;
    }

    .countdown-number {
        margin-bottom: 1px;
        line-height: 1.1;
    }

    .countdown-unit {
        margin-top: 1px;
        line-height: 1.1;
    }

    .pagination-wrapper a,
    .pagination-wrapper span {
        min-width: 32px;
        height: 32px;
        font-size: 11px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn-action,
    .btn-hero,
    .btn-empty,
    .view-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .product-card:hover {
        transform: none;
    }

    .product-card:active {
        transform: scale(0.98);
    }

    .btn-action:hover {
        transform: none;
    }

    .btn-action:active {
        transform: scale(0.95);
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .page-hero {
        padding: 20px 0 30px;
    }

    .hero-content {
        flex-direction: row;
        text-align: left;
        gap: 20px;
    }

    .hero-title {
        font-size: 24px;
        flex-direction: row;
        justify-content: flex-start;
    }

    .hero-actions {
        width: auto;
        flex-shrink: 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ============================================
   深色模式支持
   ============================================ */
@media (prefers-color-scheme: dark) {
    .group-buy-page {
        background: var(--gb-bg-secondary);
        color: var(--gb-text-primary);
    }

    .product-card {
        background: var(--gb-bg-primary);
        border-color: var(--gb-glass-border);
    }

    .product-card:hover {
        box-shadow: var(--gb-shadow-lg);
    }

    .product-name {
        color: var(--gb-text-primary);
    }

    .product-info,
    .countdown-timer,
    .progress-text {
        color: var(--gb-text-secondary);
    }

    .product-price .original-price {
        color: var(--gb-text-muted);
    }

    .product-category {
        background: var(--gb-bg-tertiary);
        color: var(--gb-text-secondary);
    }

    .tab-item {
        color: var(--gb-text-secondary);
    }

    .tab-item:hover,
    .tab-item.active {
        color: var(--gb-text-primary);
    }

    .empty-state {
        color: var(--gb-text-secondary);
    }

    .empty-state .empty-icon {
        color: var(--gb-text-muted);
    }

    .empty-state p {
        color: var(--gb-text-muted);
    }

    .pagination-wrapper a,
    .pagination-wrapper span {
        background: var(--gb-bg-primary);
        border-color: var(--gb-glass-border);
        color: var(--gb-text-secondary);
    }

    .pagination-wrapper a:hover:not(.current) {
        background: var(--gb-bg-tertiary);
    }

    .pagination-wrapper .current {
        background: var(--gb-primary);
        color: white;
    }
}

/* 手动暗色模式（通过添加 .gb-dark-mode 类） */
:root.gb-dark-mode .group-buy-page {
    background: var(--gb-bg-secondary);
    color: var(--gb-text-primary);
}

:root.gb-dark-mode .product-card {
    background: var(--gb-bg-primary);
    border-color: var(--gb-glass-border);
}

:root.gb-dark-mode .product-name {
    color: var(--gb-text-primary);
}

:root.gb-dark-mode .product-info,
:root.gb-dark-mode .countdown-timer,
:root.gb-dark-mode .progress-text {
    color: var(--gb-text-secondary);
}
