/* ===== ZIC Chat Widget (เว็บแชท — สมองเดียวกับ LINE bot) ===== */
.zc-btn{position:fixed;right:18px;bottom:18px;z-index:9990;width:56px;height:56px;border:none;border-radius:50%;
  background:#E5004F;color:#fff;cursor:pointer;box-shadow:0 6px 18px rgba(229,0,79,.4);
  display:flex;align-items:center;justify-content:center;transition:transform .18s ease,box-shadow .18s ease}
.zc-btn:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 10px 24px rgba(229,0,79,.5)}
.zc-btn svg{width:26px;height:26px;fill:#fff}
.zc-btn .zc-x{display:none;font-size:22px;line-height:1}
.zc-open .zc-btn .zc-ic{display:none}
.zc-open .zc-btn .zc-x{display:block}

.zc-panel{position:fixed;right:18px;bottom:86px;z-index:9991;width:372px;max-width:calc(100vw - 24px);
  height:540px;max-height:calc(100vh - 110px);background:#fff;border-radius:14px;overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.22);display:none;flex-direction:column;
  font-family:'Kanit','Signs',sans-serif}
.zc-open .zc-panel{display:flex;animation:zcIn .22s ease}
@keyframes zcIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

.zc-head{background:#E5004F;color:#fff;padding:13px 16px;display:flex;align-items:center;gap:10px}
.zc-head .zc-ava{width:36px;height:36px;border-radius:50%;background:#fff;color:#E5004F;font-weight:700;
  display:flex;align-items:center;justify-content:center;font-size:13px;flex:none}
.zc-head .zc-t{line-height:1.25}
.zc-head .zc-t b{display:block;font-size:15px;font-weight:600}
.zc-head .zc-t span{font-size:11.5px;opacity:.85}

.zc-msgs{flex:1;overflow-y:auto;padding:14px 12px;background:#F5F6F8;display:flex;flex-direction:column;gap:8px}
.zc-m{max-width:82%;padding:8px 12px;border-radius:14px;font-size:13.5px;line-height:1.55;
  white-space:pre-line;word-break:break-word}
.zc-m.user{align-self:flex-end;background:#E5004F;color:#fff;border-bottom-right-radius:4px}
.zc-m.bot{align-self:flex-start;background:#fff;color:#222;border-bottom-left-radius:4px;
  box-shadow:0 1px 3px rgba(0,0,0,.08)}
.zc-m.typing{color:#999;font-style:normal}
.zc-m.typing i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#bbb;margin:0 1.5px;
  animation:zcDot 1s infinite}
.zc-m.typing i:nth-child(2){animation-delay:.15s}
.zc-m.typing i:nth-child(3){animation-delay:.3s}
@keyframes zcDot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* การ์ดสินค้าในแชท — ข้อมูลชุดเดียวกับ LINE Flex */
.zc-prods{align-self:flex-start;display:flex;gap:8px;overflow-x:auto;max-width:100%;padding-bottom:4px}
.zc-card{flex:none;width:138px;background:#fff;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.1);
  overflow:hidden;text-decoration:none;color:#222;transition:transform .15s ease}
.zc-card:hover{transform:translateY(-2px)}
.zc-card img{width:100%;height:96px;object-fit:contain;background:#fff;padding:6px;display:block}
.zc-card .zc-ci{padding:7px 9px 9px}
.zc-card .zc-cn{font-size:12px;font-weight:600;line-height:1.3;display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.zc-card .zc-cv{font-size:11.5px;color:#E5004F;font-weight:600;margin-top:2px}

/* การ์ดติดต่อเจ้าหน้าที่ (need_human) */
.zc-human{align-self:flex-start;background:#fff;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.1);
  padding:10px 12px;font-size:12.5px;line-height:1.5}
.zc-human a{display:inline-block;margin:6px 6px 0 0;padding:6px 12px;border-radius:16px;font-size:12.5px;
  text-decoration:none;background:#E5004F;color:#fff}
.zc-human a.alt{background:#06C755}

/* ปุ่มคำถามแนะนำ (แสดงตอนแชทว่าง) */
.zc-sugs{display:flex;flex-wrap:wrap;gap:6px;align-self:flex-start}
.zc-sugs button{border:1px solid #E5004F;color:#E5004F;background:#fff;border-radius:16px;
  padding:5px 12px;font-size:12.5px;cursor:pointer;font-family:inherit}
.zc-sugs button:hover{background:#E5004F;color:#fff}

.zc-foot{border-top:1px solid #eee;background:#fff}
.zc-inrow{display:flex;align-items:center;gap:8px;padding:10px 12px 6px}
.zc-inrow input{flex:1;border:1px solid #ddd;border-radius:20px;padding:9px 14px;font-size:13.5px;
  font-family:inherit;outline:none}
.zc-inrow input:focus{border-color:#E5004F}
.zc-inrow button{flex:none;width:38px;height:38px;border:none;border-radius:50%;background:#E5004F;
  color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.zc-inrow button:disabled{background:#e9a5bd;cursor:default}
.zc-inrow button svg{width:17px;height:17px;fill:#fff}
.zc-pdpa{font-size:10.5px;color:#aaa;text-align:center;padding:0 12px 8px}
.zc-pdpa a{color:#aaa}

@media (max-width:480px){
  .zc-panel{right:12px;left:12px;width:auto;bottom:80px;height:70vh}
  .zc-btn{right:14px;bottom:14px}
}
