/* ===== 组件样式：多语言 / 社媒 / 客服 / 产品商城 ===== */

/* 语言切换器 — 外贸站风格自定义下拉 */
.lang-dropdown{position:relative;margin-left:14px;z-index:100}
.lang-current{display:flex;align-items:center;gap:6px;background:#1e293b;color:#e2e8f0;border:1px solid #334155;border-radius:8px;padding:6px 9px;font-size:13px;cursor:pointer;white-space:nowrap}
.lang-current:hover{background:#27354c}
.lang-flag{display:inline-flex;line-height:1}
.lang-flag img{width:22px;height:16px;object-fit:cover;border-radius:2px;display:block;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.lang-arrow{font-size:10px;color:#94a3b8;margin-left:2px}
.lang-menu{position:absolute;right:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.15);min-width:150px;display:none;flex-direction:column;overflow:hidden}
.lang-menu.show{display:flex}
.lang-option{display:flex;align-items:center;gap:8px;padding:9px 12px;font-size:13px;color:#334155;text-decoration:none;transition:.1s}
.lang-option:hover{background:#f1f5f9}
.lang-option.active{background:#eff6ff;color:var(--primary);font-weight:700}
.lang-option:not(:last-child){border-bottom:1px solid #f1f5f9}

/* 页脚社媒 —— 官方品牌色图标 */
.footer-social{max-width:1100px;margin:0 auto;padding:14px 20px 0;display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;color:#94a3b8}
.footer-social-label{color:#94a3b8}
.social-ico{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:transparent;font-size:18px;transition:.15s;text-decoration:none}
.social-ico i{display:block;line-height:1}
.social-ico:hover{transform:translateY(-3px) scale(1.08)}

/* 首页产品区块 */
.home-products{max-width:1100px;margin:0 auto;padding:10px 20px 20px}
.home-products .prod-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;margin-top:20px}
.home-products .view-all{text-align:center;margin-top:26px}

/* 产品橱窗（/products 页） */
.shop-wrap{max-width:1100px;margin:30px auto;padding:0 20px}
.shop-head{text-align:center;margin-bottom:10px}
.shop-head h1{font-size:28px;margin-bottom:8px}
.shop-head p{color:var(--muted)}
.prod-filters{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:22px 0}
.prod-filters button{padding:8px 18px;border:1px solid var(--border);background:#fff;border-radius:20px;cursor:pointer;font-size:14px;font-weight:600;color:var(--muted)}
.prod-filters button.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.prod-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px}
.product-card{background:var(--card);border:1px solid var(--border);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;transition:.15s;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.product-card:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(0,0,0,.08)}
.product-thumb{height:170px;display:flex;align-items:center;justify-content:center;font-size:60px;background:linear-gradient(135deg,#eef2ff,#e0e7ff);position:relative}
.product-badge{position:absolute;top:10px;left:10px;background:var(--danger);color:#fff;font-size:12px;padding:3px 10px;border-radius:20px;font-weight:700}
.product-body{padding:16px;display:flex;flex-direction:column;flex:1}
.product-body h3{font-size:16px;margin-bottom:6px}
.product-desc{font-size:13px;color:var(--muted);flex:1;margin-bottom:12px}
.product-price{font-size:20px;font-weight:800;color:var(--primary);margin-bottom:12px}
.product-price .cur{font-size:13px;font-weight:500;color:var(--muted)}
.product-buy{width:100%;text-align:center}

/* 在线客服组件 */
.support-bubble{
  position:fixed;right:22px;bottom:22px;width:58px;height:58px;border-radius:50%;
  background:var(--primary);color:#fff;border:none;cursor:pointer;font-size:26px;
  box-shadow:0 6px 18px rgba(37,99,235,.45);z-index:200;display:flex;align-items:center;justify-content:center;
}
.support-bubble:hover{background:var(--primary-d)}
.support-panel{
  position:fixed;right:22px;bottom:22px;width:360px;max-width:calc(100vw - 30px);height:480px;max-height:calc(100vh - 40px);
  background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.25);z-index:201;display:flex;flex-direction:column;overflow:hidden;
}
.support-head{background:linear-gradient(135deg,#1e3a8a,#2563eb);color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center}
.support-head .title{font-weight:700;font-size:15px}
.support-head .close{background:none;border:none;color:#fff;font-size:20px;cursor:pointer;line-height:1}
.support-body{flex:1;overflow-y:auto;padding:14px;background:#f8fafc}
.support-msg{margin-bottom:10px;max-width:80%}
.support-msg .bubble{padding:9px 12px;border-radius:12px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.support-msg.visitor{margin-left:auto;text-align:right}
.support-msg.visitor .bubble{background:var(--primary);color:#fff;border-bottom-right-radius:4px}
.support-msg.agent .bubble{background:#fff;border:1px solid var(--border);border-bottom-left-radius:4px}
.support-msg .who{font-size:11px;color:var(--muted);margin:2px 4px}
.support-faq{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 8px;background:#f8fafc}
.support-faq button{font-size:12px;padding:5px 10px;border:1px solid var(--primary);color:var(--primary);background:#fff;border-radius:16px;cursor:pointer}
.support-input{display:flex;gap:8px;padding:10px;border-top:1px solid var(--border);background:#fff}
.support-input input{flex:1;padding:10px;border:1px solid var(--border);border-radius:8px;font-size:14px}
.support-input button{padding:0 16px;background:var(--primary);color:#fff;border:none;border-radius:8px;cursor:pointer;font-weight:600}
.support-start{padding:16px}
.support-start label{display:block;font-size:13px;font-weight:600;margin:10px 0 5px}
.support-start input{padding:10px;width:100%;border:1px solid var(--border);border-radius:8px;font-size:14px}

/* 管理后台客服/产品表格复用 .data-table */
.ticket-list{display:grid;gap:10px}
.ticket-item{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:12px 14px;cursor:pointer}
.ticket-item:hover{background:#f9fafb}
.ticket-item .meta{font-size:12px;color:var(--muted);margin-top:4px}
.tag.open{background:#fef3c7;color:#92400e}
.tag.resolved{background:#dcfce7;color:#166534}
.admin-split{display:flex;gap:18px;align-items:flex-start}
.admin-split .list{flex:1;min-width:280px;max-width:380px}
.admin-split .detail{flex:2;min-width:320px}
.detail-box{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;min-height:300px}
.detail-msg{margin-bottom:10px;max-width:78%}
.detail-msg.agent{margin-left:auto;text-align:right}
.detail-msg .bubble{padding:8px 12px;border-radius:12px;font-size:14px;white-space:pre-wrap;word-break:break-word}
.detail-msg.visitor .bubble{background:#eef2ff;border:1px solid #dbeafe}
.detail-msg.agent .bubble{background:var(--primary);color:#fff}
.detail-reply{display:flex;gap:8px;margin-top:14px}
.detail-reply input{flex:1;padding:9px 12px;border:1px solid var(--border);border-radius:8px}
.detail-reply button{padding:0 16px;background:var(--primary);color:#fff;border:none;border-radius:8px;cursor:pointer;font-weight:600}

/* 产品橱窗补充类 */
.prod-filter{padding:8px 18px;border:1px solid var(--border);background:#fff;border-radius:20px;cursor:pointer;font-size:14px;font-weight:600;color:var(--muted);text-decoration:none}
.prod-filter:hover{color:var(--primary)}
.prod-filter.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.product-name{font-size:16px;font-weight:700;margin-bottom:6px}
.product-price .from{font-size:12px;font-weight:500;color:var(--muted);margin-left:2px}
.shop-foot{margin-top:36px;text-align:center}

/* 工单列表项 */
.ti-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.ti-code{font-weight:700;font-family:monospace;font-size:13px}
.ti-status{font-size:11px;padding:2px 8px;border-radius:10px;font-weight:700}
.ti-status.open{background:#fef3c7;color:#92400e}
.ti-status.resolved{background:#dcfce7;color:#166534}
.ti-name{font-size:14px;font-weight:600;margin-bottom:2px}
.ti-last{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ti-time{font-size:11px;margin-top:4px}

/* 工单详情 */
.detail-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:14px}
.detail-msgs{max-height:360px;overflow-y:auto;padding:6px 2px}
.detail-msg{margin-bottom:10px;max-width:78%}
.detail-msg.visitor{margin-left:auto;text-align:right}
.dm-bubble{padding:8px 12px;border-radius:12px;font-size:14px;white-space:pre-wrap;word-break:break-word;display:inline-block}
.detail-msg.visitor .dm-bubble{background:#eef2ff;border:1px solid #dbeafe}
.detail-msg.agent .dm-bubble{background:var(--primary);color:#fff}
.dm-who{font-size:11px;color:var(--muted);margin:2px 4px}
.detail-reply{flex-direction:column;align-items:stretch}
.detail-reply textarea{flex:1;padding:9px 12px;border:1px solid var(--border);border-radius:8px;font-size:14px;resize:vertical;font-family:inherit}
.detail-actions{display:flex;gap:8px;margin-top:8px}
.detail-actions .btn{flex:1}

/* 响应式 */
@media(max-width:768px){
  .lang-dropdown{margin-left:8px}
  .lang-current{padding:6px 8px;font-size:12px}
  .lang-current .lang-name{display:none}
  .lang-menu{right:-10px}
  .support-panel{right:10px;bottom:10px}
}
