/* =================================================================================
   1. FAB CHAT SYSTEM (右下角即时通讯悬浮菜单)
   ================================================================================= */
#uyaai-fab-container { 
    position: fixed !important; 
    bottom: 30px !important; 
    right: 20px !important; 
    z-index: 999999 !important; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.fab-main { 
    width: 56px; 
    height: 56px; 
    background: var(--uyaai-pink); 
    color: #fff; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
    transition: var(--transition);
}

.fab-options { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin-bottom: 10px; 
    opacity: 0; 
    transform: translateY(20px); 
    transition: var(--transition); 
    pointer-events: none; 
}

#uyaai-fab-container.active .fab-options { 
    opacity: 1; 
    transform: translateY(0); 
    pointer-events: auto; 
}

.fab-link { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    text-decoration: none; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fab-link.wa { background: #25D366; } 
.fab-link.fb { background: #0084FF; }

/* =================================================================================
   2. BASKET PANEL (侧边询盘篮面板)
   ================================================================================= */

/* 面包基础容器 */
#basket-panel { 
    position: fixed !important; 
    top: 0 !important; 
    right: -400px; /* 初始隐藏 */
    width: 350px; 
    height: 100vh !important; 
    background: #fff !important; 
    z-index: 1000001 !important; 
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    box-shadow: -15px 0 40px rgba(0,0,0,0.15) !important;
    display: flex; 
    flex-direction: column; 
    padding: 0 !important;
    overflow: hidden !important;
}

#basket-panel.active { right: 0 !important; }

/* 遮罩层 (背景变暗) */
#basket-panel-overlay { 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    background: rgba(0,0,0,0.6) !important; 
    z-index: 1000000 !important; 
    display: none; 
    backdrop-filter: blur(3px); 
}
#basket-panel-overlay.active { display: block !important; }

/* 面板头部 */
.basket-header {
    background: var(--uyaai-black);
    color: #fff;
    padding: 20px 25px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.basket-header h3 {
    margin: 0 !important; font-size: 18px !important; font-weight: 700 !important;
    text-transform: uppercase; letter-spacing: 1px; color: #fff !important;
}
.basket-header .close-btn { font-size: 28px !important; color: #fff !important; cursor: pointer; line-height: 1; }

/* 核心滚动区域 */
#basket-items-container {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-bottom: 20px;
}

/* 产品行样式 */
.basket-item-row { 
    padding: 15px 20px !important; 
    border-bottom: 1px solid #f5f5f5 !important; 
}
.basket-item-row:hover { background: #fafafa; }

/* 底部操作区 (固定在下方) */
.basket-footer {
    flex-shrink: 0 !important;
    padding: 20px !important; 
    border-top: 1px solid #eee;
    background: #fff;
    display: grid !important; 
    grid-template-columns: 1fr 2fr !important; 
    gap: 10px !important;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    z-index: 10;
}

.btn-clear-all { 
    background: #eee !important; 
    color: #666 !important; 
    border: none; 
    border-radius: 4px; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 12px !important;
    white-space: nowrap !important;
}

.btn-go-inquiry { 
    background: var(--uyaai-pink) !important; 
    color: #fff !important; 
    border: none; 
    border-radius: 4px; 
    padding: 12px !important; 
    font-weight: 700; 
    text-transform: uppercase;
    cursor: pointer;
}

/* =================================================================================
   3. QUANTITY BOX (询盘篮加减号 - 彻底白底修复版)
   ================================================================================= */
.u-qty-box-clean {
    display: flex !important; 
    border: 1px solid #ddd !important;
    border-radius: 4px !important; 
    width: 105px !important; 
    height: 32px !important;
    background: #fff !important; 
    margin-top: 8px;
    overflow: hidden;
}

.u-qty-box-clean button {
    flex: 0 0 30px !important; 
    background: #fff !important; 
    color: var(--uyaai-black) !important;
    border: none !important; 
    cursor: pointer; 
    font-size: 18px !important; 
    font-weight: bold !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.u-qty-box-clean button:hover { background: #f9f9f9 !important; }

.u-qty-box-clean input {
    flex: 1 !important;
    width: 45px !important;
    height: 32px !important;
    line-height: 32px !important;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--uyaai-black) !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    /* stylelint-disable-next-line property-no-vendor-prefix */
    -moz-appearance: textfield;
}

/* 移除 Chrome/Safari 数字输入框默认箭头 */
.u-qty-box-clean input::-webkit-outer-spin-button,
.u-qty-box-clean input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =================================================================================
   4. INQUIRY MODAL (全屏询盘表单弹窗)
   ================================================================================= */
.uyaai-modal { 
    display: none; 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    background: rgba(0,0,0,0.8) !important; 
    z-index: 1000002 !important; 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(5px);
}

.modal-body { 
    background: #fff; 
    width: 95%; 
    max-width: 500px; 
    /* 核心修复：限制高度并支持内部滚动，适配 15.6 寸笔记本 */
    max-height: 90vh; 
    border-radius: 12px; 
    position: relative; 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

.modal-scroll-box { 
    flex: 1; 
    overflow-y: auto; 
    margin-top: 15px; 
    padding-right: 5px;
}

/* 美化滚动条 */
.modal-scroll-box::-webkit-scrollbar,
#basket-items-container::-webkit-scrollbar {
    width: 6px;
}
.modal-scroll-box::-webkit-scrollbar-thumb,
#basket-items-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.modal-scroll-box::-webkit-scrollbar-thumb:hover,
#basket-items-container::-webkit-scrollbar-thumb:hover {
    background: var(--uyaai-pink);
}