/* 团购前端页面样式 */
.group-buy-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 头部样式 */
.group-buy-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.page-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #ff6b6b;
    border-radius: 2px;
}

.group-buy-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #eee;
    border-radius: 20px;
    background: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: #fff;
}

/* 网格布局 */
.group-buy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 团购卡片 */
.group-buy-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.group-buy-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 图片区域 */
.item-image {
    position: relative;
    padding-top: 75%;
    background: #f8f8f8;
    overflow: hidden;
}

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

.group-buy-item:hover .item-image img {
    transform: scale(1.05);
}

.item-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.group-buy-item.completed .item-status {
    background: rgba(76, 175, 80, 0.9);
}

.group-buy-item.upcoming .item-status {
    background: rgba(33, 150, 243, 0.9);
}

.countdown {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    text-align: center;
}

.countdown span {
    font-weight: 700;
    margin: 0 2px;
}

/* 内容区域 */
.item-content {
    padding: 20px;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-price {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    color: #ff6b6b;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.current-price .symbol {
    font-size: 16px;
    margin-right: 2px;
}

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

.discount {
    background: #fff0f0;
    color: #ff6b6b;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.item-progress {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #ff6b6b, #ffa502);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.join-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #ff6b6b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.join-btn:hover {
    background: #ff5252;
    color: #fff;
    transform: translateY(-2px);
}

.group-buy-item.completed .join-btn {
    background: #4caf50;
}

.group-buy-item.completed .join-btn:hover {
    background: #43a047;
}

.start-time {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* 空状态 */
.no-groups {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #eee;
}

.empty-icon {
    margin-bottom: 20px;
}

.empty-icon svg {
    fill: #ddd;
}

.no-groups p {
    color: #999;
    font-size: 16px;
    margin: 0;
}

/* 分页 */
.group-buy-pagination {
    margin-top: 40px;
    text-align: center;
}

.group-buy-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 4px;
    border: 1px solid #eee;
    border-radius: 18px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.group-buy-pagination .page-numbers:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.group-buy-pagination .page-numbers.current {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

.group-buy-pagination .prev-icon:before {
    content: "←";
}

.group-buy-pagination .next-icon:before {
    content: "→";
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .group-buy-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .page-title {
        font-size: 24px;
    }

    .group-buy-filters {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 13px;
    }

    .group-buy-grid {
        gap: 15px;
    }

    .item-content {
        padding: 15px;
    }

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

    .join-btn {
        padding: 10px;
        font-size: 14px;
    }
}

/* 动画效果 - 使用 shared/animations.css 中的 pulse */
.group-buy-item.upcoming .item-status {
    animation: pulse 2s infinite;
} 