/* 拼单商品详情页 - 移动端优化 */

/* 详情容器 */
.group-buy-detail-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

/* 商品信息卡片 */
.product-detail-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 商品主图 - 移动端适配 */
.product-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 320px; /* 限制最大高度 */
    object-fit: contain; /* 保持比例，完整显示 */
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

/* 商品基本信息 */
.product-basic-info h1 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 拼单价格卡片 */
.group-buy-price-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.group-price {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.save-tag {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.original-price-row {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* 拼单规则 */
.group-buy-rules {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.group-buy-rules span {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
}

/* 拼单操作按钮 */
.group-buy-actions {
    margin-bottom: 20px;
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

/* 正在进行的拼单区域 */
.active-teams-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.active-teams-section h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-count {
    font-size: 13px;
    color: #999;
    font-weight: normal;
}

/* 拼团列表 */
.teams-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 拼团卡片 */
.team-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.team-card:active {
    transform: scale(0.98);
    background: #e9ecef;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.leader-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.leader-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.team-status {
    background: #ff6b6b;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 拼团进度 */
.team-progress {
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

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

/* 拼团底部信息 */
.team-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.members-preview {
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    margin-left: -8px;
}

.member-avatar:first-child {
    margin-left: 0;
}

.more-members {
    font-size: 11px;
    color: #999;
    margin-left: 4px;
}

.time-remaining {
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 500;
}

/* 空状态 */
.empty-state-small {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 14px;
}

/* 移动端优化 - 小屏幕 */
@media (max-width: 375px) {
    .product-main-image {
        max-height: 280px; /* 小屏幕更小的图片高度 */
    }
    
    .group-price {
        font-size: 28px; /* 小屏幕稍小的价格字体 */
    }
    
    .product-basic-info h1 {
        font-size: 16px;
    }
}

/* 中等屏幕优化 */
@media (min-width: 768px) {
    .group-buy-detail-container {
        max-width: 600px;
        padding: 20px;
    }
    
    .product-main-image {
        max-height: 400px;
    }
    
    .product-basic-info h1 {
        font-size: 20px;
    }
    
    .group-price {
        font-size: 36px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1024px) {
    .group-buy-detail-container {
        max-width: 800px;
        padding: 30px;
    }
    
    .product-main-image {
        max-height: 500px;
    }
    
    .teams-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}
