/**
 * Zibll 拼团 - 前台样式
 *
 * 配色与圆角沿用子比主题的视觉规范，并支持通过 CSS 变量覆盖：
 * :root{ --zibpt-primary:#e74c3c; --zibpt-radius:8px; }
 */

:root {
    --zibpt-primary: #f5564e;
    --zibpt-primary-dark: #e0453d;
    --zibpt-radius: 8px;
    --zibpt-border: rgba(0, 0, 0, .08);
    --zibpt-muted: #999;
}

/* ---------------------------------------------------------
   商品详情页拼团区块
   --------------------------------------------------------- */
.zibpt-block {
    padding: 15px 0 5px;
    overflow: hidden;
}

.zibpt-block-header {
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--zibpt-border);
}

.zibpt-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, var(--zibpt-primary), var(--zibpt-primary-dark));
    border-radius: 4px;
}

.zibpt-price {
    color: var(--zibpt-primary);
    font-weight: 700;
    font-size: 1.2em;
}

/* 团列表 */
.zibpt-team-list {
    padding-top: 5px;
}

.zibpt-team-item {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--zibpt-border);
}

.zibpt-team-item:last-child {
    border-bottom: none;
}

.zibpt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
}

.zibpt-avatar.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #bbb;
    font-size: 18px;
    border: 1px dashed #ddd;
}

.zibpt-leader-tag {
    display: inline-block;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--zibpt-primary);
    border: 1px solid var(--zibpt-primary);
    border-radius: 3px;
    vertical-align: middle;
}

.zibpt-empty {
    padding: 10px 0;
    text-align: center;
}

/* ---------------------------------------------------------
   购买弹窗
   --------------------------------------------------------- */
.zibpt-modal-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
}

/* 规格选择 */
.zibpt-opt-list {
    gap: 8px;
}

.zibpt-opt-item {
    padding: 5px 12px;
    margin: 0 8px 8px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all .15s;
    user-select: none;
}

.zibpt-opt-item.active {
    color: var(--zibpt-primary);
    border-color: var(--zibpt-primary);
    background: rgba(245, 86, 78, .08);
}

.zibpt-opt-item.disabled {
    cursor: not-allowed;
    opacity: .75;
}

/* 数量选择 */
.zibpt-count-box {
    border: 1px solid var(--zibpt-border);
    border-radius: 4px;
    overflow: hidden;
}

.zibpt-count-btn {
    width: 32px;
    height: 30px;
    line-height: 1;
    background: #f7f7f7;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.zibpt-count-btn:hover {
    background: #eee;
}

.zibpt-count-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--zibpt-border);
    border-right: 1px solid var(--zibpt-border);
    -moz-appearance: textfield;
}

.zibpt-count-input::-webkit-outer-spin-button,
.zibpt-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 输入框 */
.zibpt-input {
    width: 100%;
}

/* 支付方式 */
.zibpt-pay-list {
    gap: 8px;
}

.zibpt-pay-item {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--zibpt-border);
    border-radius: var(--zibpt-radius);
    transition: all .15s;
}

.zibpt-pay-item i.fa {
    color: #ddd;
    font-size: 18px;
}

.zibpt-pay-item.active {
    border-color: var(--zibpt-primary);
    background: rgba(245, 86, 78, .05);
}

.zibpt-pay-item.active i.fa {
    color: var(--zibpt-primary);
}

.zibpt-pay-item img,
.zibpt-pay-item svg {
    width: 22px;
    height: 22px;
}

.zibpt-notice {
    padding: 8px 10px;
    line-height: 1.6;
    background: rgba(0, 0, 0, .03);
    border-radius: 4px;
}

/* ---------------------------------------------------------
   团详情 / 成员
   --------------------------------------------------------- */
.zibpt-member-list {
    padding: 5px 0;
}

.zibpt-member-item {
    width: 56px;
}

.zibpt-member-item .zibpt-avatar {
    margin: 0 auto;
}

.zibpt-team-detail .zibpt-modal-thumb {
    width: 80px;
    height: 80px;
}

/* ---------------------------------------------------------
   用户中心 / 我的拼团
   --------------------------------------------------------- */
.zibpt-user-team {
    overflow: hidden;
}

.zibpt-list-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
}

.zibpt-order-tag {
    font-size: 12px;
}

/* ---------------------------------------------------------
   移动端底部按钮
   --------------------------------------------------------- */
.foot-tabbar-item.zibpt-open-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--zibpt-primary), var(--zibpt-primary-dark));
}

.foot-tabbar-item.zibpt-open-btn .zibpt-price {
    color: #fff;
    font-size: 14px;
}

/* ---------------------------------------------------------
   响应式
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .zibpt-block-header {
        font-size: 13px;
    }

    .zibpt-team-item .but {
        padding: 4px 10px;
    }

    .zibpt-modal-thumb {
        width: 60px;
        height: 60px;
    }

    /* 团详情弹窗按钮间距与层级兜底 */
    .zibpt-team-detail-btn {
        margin-left: 4px;
    }

    .zibpt-detail-modal {
        z-index: 1060;
    }
    .zibpt-detail-modal .modal-body {
        max-height: 75vh;
        overflow-y: auto;
    }
}
