/* ===================== D&S — chat-widget.css ===================== */
/* Widget de chat con árbol de FAQ. Reemplaza el redirect directo a WhatsApp
   por una ventana en la propia página; solo abre WhatsApp cuando el usuario
   elige "Hablar con un asesor" o "Cotizar" un item puntual. */

.ds-chat-fab{
  position:fixed; bottom:26px; right:26px; z-index:900;
  width:58px; height:58px; border-radius:50%;
  background:var(--accent2); color:#0B0B0B;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 30px -8px rgba(255,215,0,.5);
  animation:floatpulse 2.6s ease-in-out infinite;
  border:none; cursor:pointer; padding:0;
}
.ds-chat-fab svg{ width:28px; height:28px; transition:opacity .2s, transform .2s; }
.ds-chat-fab .icon-close{ position:absolute; opacity:0; transform:scale(.6) rotate(-45deg); }
.ds-chat-fab.open .icon-chat{ opacity:0; transform:scale(.6) rotate(45deg); }
.ds-chat-fab.open .icon-close{ opacity:1; transform:scale(1) rotate(0); }

.ds-chat-panel{
  position:fixed; bottom:96px; right:26px; z-index:900;
  width:min(360px, 92vw); max-height:min(560px, 70vh);
  background:linear-gradient(160deg,var(--bg-card),#161620);
  border:1px solid var(--border-strong);
  border-radius:var(--radius-m);
  box-shadow:0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03);
  display:flex; flex-direction:column;
  overflow:hidden;
  opacity:0; transform:translateY(16px) scale(.97);
  pointer-events:none;
  transition:opacity .28s var(--ease), transform .28s var(--ease);
}
.ds-chat-panel.open{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }

.ds-chat-head{
  display:flex; align-items:center; gap:12px;
  padding:16px 18px; border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.02);
  flex-shrink:0;
}
.ds-chat-back{
  background:none; border:none; color:var(--text-secondary); cursor:pointer;
  width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition:.2s; flex-shrink:0;
}
.ds-chat-back:hover{ background:var(--border); color:var(--text); }
.ds-chat-back svg{ width:18px; height:18px; }
.ds-chat-title{ font-weight:700; font-size:14.5px; flex:1; line-height:1.3; }
.ds-chat-title small{ display:block; font-family:var(--font-mono); font-size:10.5px; color:var(--text-secondary); font-weight:400; letter-spacing:.04em; margin-top:2px; }
.ds-chat-close{
  background:none; border:none; color:var(--text-secondary); cursor:pointer;
  width:28px; height:28px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.ds-chat-close:hover{ color:var(--text); }

.ds-chat-body{
  padding:16px; overflow-y:auto; flex:1;
  display:flex; flex-direction:column; gap:8px;
}
.ds-chat-body::-webkit-scrollbar{ width:6px; }
.ds-chat-body::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:4px; }

.ds-opt{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  width:100%; text-align:left;
  padding:13px 14px; border-radius:12px;
  border:1.5px solid var(--border-strong);
  background:rgba(255,255,255,.02);
  color:var(--text); font-size:14px; font-weight:600;
  cursor:pointer; transition:.2s;
}
.ds-opt:hover{ border-color:var(--accent-light); background:rgba(108,99,255,.1); }
.ds-opt svg{ width:16px; height:16px; flex-shrink:0; opacity:.6; }

.ds-answer{
  background:rgba(255,255,255,.03); border:1px solid var(--border-strong);
  border-radius:12px; padding:14px 16px; font-size:14px; color:var(--text-secondary);
  line-height:1.55; white-space:pre-line;
}

.ds-item-card{
  border:1px solid var(--border-strong); border-radius:12px; padding:14px 16px;
  background:rgba(255,255,255,.02);
}
.ds-item-card h5{ font-size:14px; margin-bottom:3px; color:var(--text); }
.ds-item-card p{ font-size:12.5px; color:var(--text-secondary); margin-bottom:10px; line-height:1.4; }
.ds-item-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ds-item-price{ font-family:var(--font-mono); font-weight:700; font-size:14px; color:var(--accent2); }
.ds-item-quote{
  font-size:12px; font-weight:700; padding:7px 12px; border-radius:100px;
  background:var(--accent); color:#fff; border:none; cursor:pointer; transition:.2s; flex-shrink:0;
}
.ds-item-quote:hover{ background:var(--accent-dark); }

.ds-chat-foot{
  padding:12px 16px; border-top:1px solid var(--border);
  flex-shrink:0;
}
.ds-cta-whatsapp{
  width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  background:var(--accent2); color:#0B0B0B; font-weight:700; font-size:13.5px;
  padding:11px; border-radius:100px; border:none; cursor:pointer; transition:.2s;
}
.ds-cta-whatsapp:hover{ filter:brightness(1.08); }
.ds-cta-whatsapp svg{ width:16px; height:16px; }

.ds-edit-note{ font-size:11px; color:var(--accent2); opacity:.85; margin-top:8px; }

@media (max-width:480px){
  .ds-chat-panel{ right:12px; bottom:90px; width:calc(100vw - 24px); max-height:65vh; }
  .ds-chat-fab{ right:16px; bottom:20px; }
}
