/* ========== 全站悬浮工具栏（品牌红主题） ========== */
.fb-toolbar{
    position: fixed;
    right: 16px;
    top: 75%;
    transform: translateY(-50%);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 12px;
    user-select: none;
    -webkit-user-select: none;
}
.fb-toolbar.fb-dragging{
    transition: none;
}
.fb-btn{
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4000C, #FD7457);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212,0,12,.32);
    transition: transform .25s ease, box-shadow .25s ease;
}
.fb-btn:hover{
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(212,0,12,.5);
}
/* 点击反馈：按下时轻微回弹缩放 */
.fb-btn:active{
    transform: translateY(-1px) scale(.9);
    transition: transform .08s ease;
}
.fb-btn svg{
    width: 24px;
    height: 24px;
    display: block;
}
.fb-btn.fb-top{
    background: linear-gradient(135deg, #1a6cb8, #0f4c81);
    box-shadow: 0 4px 14px rgba(15,76,129,.32);
    /* 滚动跟随：默认隐藏，滚动超过 300px 后淡入滑出 */
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease, box-shadow .25s ease;
}
.fb-btn.fb-top.fb-show{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.fb-btn.fb-top.fb-show:hover{
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(15,76,129,.5);
}
.fb-tip{
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.8);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.fb-btn:hover .fb-tip{
    opacity: 1;
}

/* 二维码弹层：从右侧平滑滑入 + 淡入（参考站 .overlay 交互） */
.fb-qr{
    position: absolute;
    right: 66px;
    top: 50%;
    transform: translateY(-50%) translateX(18px);
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    border: 2px solid rgba(212,0,12,.12);
    box-shadow: 0 6px 22px rgba(0,0,0,.18);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.fb-qr.show{
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
.fb-qr img{
    width: 130px;
    height: 130px;
    display: block;
    object-fit: contain;
}
.fb-qr span{
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #333;
}

/* 电话悬停内容卡
   注意：原 .fb-qr 用 top:50% 会把卡片定位到整个工具栏的垂直中点（4 个按钮共高 252px），
   导致悬停第一个"电话"按钮时卡片下移约 99px，与按钮完全对不上。
   这里改为按按钮实际位置对齐：按钮高 54px + 间距 12px
   → 电话(第1个)中心 27px、微信(第2个) 93px、抖音(第3个) 159px */
.fb-qr#fbTelOverlay{
    top: 27px;
    min-width: 210px;
    padding: 14px 16px;
    text-align: left;
}
.fb-qr#fbWxQr{ top: 93px; }
.fb-qr#fbDyQr{ top: 159px; }
.fb-tel-info{
    display: flex;
    align-items: center;
    gap: 12px;
}
.fb-tel-info svg{
    width: 34px;
    height: 34px;
    flex: none;
    color: #D4000C;
}
.fb-tel-info div{ line-height: 1.4; }
.fb-tel-info p{
    font-size: 12px;
    color: #666;
    margin: 0;
}
.fb-tel-info b{
    font-size: 18px;
    color: #D4000C;
    font-weight: 600;
}

/* 客服面板 */
.fb-panel{
    position: fixed;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9991;
    width: 320px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 36px rgba(0,0,0,.2);
    display: none;
    overflow: hidden;
}
.fb-panel.show{
    display: block;
    animation: fbPop .25s ease-out;
}
@keyframes fbPop{
    from{ opacity: 0; transform: translateY(-50%) translateX(12px); }
    to{ opacity: 1; transform: translateY(-50%) translateX(0); }
}
.fb-panel .fb-ph{
    background: linear-gradient(135deg, #D4000C, #FD7457);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}
.fb-panel .fb-ph .fb-close{
    font-size: 20px;
    cursor: pointer;
    opacity: .85;
}
.fb-panel .fb-ph .fb-close:hover{ opacity: 1; }
.fb-panel .fb-pc{ padding: 18px; }
.fb-panel .fb-tel{
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f6f8fb;
    border: 1px solid #e7eef6;
    border-radius: 10px;
    padding: 12px 14px;
}
.fb-panel .fb-tel svg{ width: 30px; height: 30px; color: #D4000C; flex: none; }
.fb-panel .fb-tel p{ font-size: 13px; color: #666; margin: 0; }
.fb-panel .fb-tel b{ font-size: 19px; color: #D4000C; }
.fb-panel .fb-qrs{
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin: 16px 0;
}
.fb-panel .fb-qrbox{ text-align: center; }
.fb-panel .fb-qrbox img{
    width: 110px;
    height: 110px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.fb-panel .fb-qrbox span{ display: block; margin-top: 6px; font-size: 13px; color: #666; }
.fb-panel .fb-shop{
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #D4000C, #FD7457);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background .3s;
}
.fb-panel .fb-shop:hover{ background: #b8000a; }

@media (max-width: 768px){
    .fb-toolbar{ right: 10px; gap: 9px; }
    .fb-btn{ width: 46px; height: 46px; }
    .fb-btn svg{ width: 20px; height: 20px; }
    .fb-panel{
        right: 10px;
        left: 10px;
        width: auto;
        top: auto;
        bottom: 80px;
        transform: none;
    }
    .fb-panel.show{ animation: fbPopM .25s ease-out; }
    @keyframes fbPopM{
        from{ opacity: 0; transform: translateY(12px); }
        to{ opacity: 1; transform: none; }
    }
    .fb-qr{ right: 58px; }
    .fb-qr img{ width: 100px; height: 100px; }
    /* 移动端按钮 46px + 间距 9px → 各浮层对齐到对应按钮中心 */
    .fb-qr#fbTelOverlay{ min-width: auto; padding: 10px 12px; top: 23px; }
    .fb-qr#fbWxQr{ top: 78px; }
    .fb-qr#fbDyQr{ top: 133px; }
    .fb-tel-info svg{ width: 28px; height: 28px; }
    .fb-tel-info b{ font-size: 16px; }
}
