/* DURAMAT v27 · Clara, asesora de compras (assets/asistente.js). Usa las variables de site.css.
   Capas: lanzador 41 (arriba del botón de WhatsApp, 40), panel 45; debajo del aviso (50), cookies (60) y carrito lateral (80). */
.cl-lanza { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 62px); z-index: 41;
  display: inline-flex; align-items: center; gap: 8px; background: var(--steel); color: #fff; border: 0; cursor: pointer; padding: 12px 16px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: .95rem; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.cl-lanza:hover { background: var(--steel-2); }
.cl-lanza:focus-visible, .cl-panel :focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.cl-lanza svg { width: 20px; height: 20px; flex: none; }
.cl-lanza .cl-punto { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 2px var(--steel); }
body.sb-on .cl-lanza { bottom: 146px; }
@media (min-width: 861px) { body.sb-on .cl-lanza { bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 62px); } }
@media (max-width: 600px) { .cl-lanza .cl-lt { display: none; } .cl-lanza { padding: 14px; } }
.cl-abierto .cl-lanza, .cl-abierto .cl-globo { display: none; }

.cl-globo { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 120px); z-index: 41;
  max-width: 260px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 34px 12px 14px; font-size: .92rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.16); cursor: pointer; }
.cl-globo button { position: absolute; top: 6px; right: 6px; border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }

.cl-panel { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 45;
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 32px)); height: min(640px, calc(100dvh - 32px));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 48px rgba(0,0,0,.28); }
.cl-panel[hidden] { display: none; }
@media (max-width: 600px) { .cl-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; } }

.cl-cab { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--steel); color: #fff; }
.cl-av { width: 36px; height: 36px; border-radius: 50%; background: var(--signal); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; flex: none; }
.cl-cab h2 { font-size: 1.02rem; color: #fff; }
.cl-cab p { margin: 0; font-size: .78rem; opacity: .85; }
.cl-cab .cl-x { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 6px; min-width: 44px; min-height: 44px; }
.cl-cab .cl-x:hover { background: rgba(255,255,255,.12); }

.cl-lista { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); overscroll-behavior: contain; }
.cl-lista > * { flex-shrink: 0; }
.cl-m { max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: .94rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-m.cl-c { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-top-left-radius: 4px; }
.cl-m.cl-u { align-self: flex-end; background: var(--steel); color: #fff; border-top-right-radius: 4px; }
.cl-m.cl-err { border-color: var(--signal); }
.cl-escribe { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.cl-escribe i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: cl-p 1.2s infinite ease-in-out; }
.cl-escribe i:nth-child(2) { animation-delay: .15s; } .cl-escribe i:nth-child(3) { animation-delay: .3s; }
@keyframes cl-p { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .cl-escribe i { animation: none; opacity: .6; } }

.cl-tarjetas { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; align-self: stretch; scroll-snap-type: x mandatory; }
.cl-t { flex: 0 0 170px; scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cl-t .cl-ph { display: block; height: 104px; border-radius: 6px; background: #fff; overflow: hidden; }
.cl-t .cl-ph img { width: 100%; height: 100%; object-fit: contain; }
.cl-t .cl-ph span { display: grid; place-items: center; height: 100%; font-family: var(--mono); color: var(--muted); font-size: .8rem; }
.cl-t .cl-n { font-size: .84rem; font-weight: 600; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.cl-t .precio { font-size: .86rem; }
.cl-t .precio small { display: none; }
.cl-t .precio.sc b { font-size: .8rem; }
.cl-t .cl-bs { display: flex; gap: 6px; margin-top: auto; }
.cl-t .btn { flex: 1; padding: 8px 6px; font-size: .82rem; min-height: 40px; }

.cl-prop { align-self: stretch; display: flex; align-items: center; gap: 10px; background: #fff8e1; border: 1px solid #f0d58a; border-radius: 10px; padding: 10px; font-size: .9rem; }
.cl-prop .btn { margin-left: auto; flex: none; padding: 9px 12px; font-size: .86rem; min-height: 40px; }
.cl-ir { align-self: flex-start; }
.cl-ir .btn { padding: 9px 14px; font-size: .88rem; min-height: 40px; }

.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-chips button { background: var(--panel); border: 1px solid var(--steel); color: var(--steel); border-radius: 999px; padding: 7px 12px; font-size: .84rem; cursor: pointer; font-family: var(--body); min-height: 36px; }
.cl-chips button:hover { background: var(--steel); color: #fff; }

.cl-pie { border-top: 1px solid var(--line); padding: 10px 12px 8px; background: var(--panel); }
.cl-forma { display: flex; gap: 8px; align-items: flex-end; }
.cl-forma textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.35; max-height: 120px; min-height: 44px; background: #fff; color: var(--ink); }
.cl-forma textarea:focus { border-color: var(--steel); outline: none; }
.cl-forma .btn { min-height: 44px; min-width: 44px; padding: 10px 14px; border-radius: 10px; }
.cl-aviso { margin: 6px 0 0; font-size: .72rem; color: var(--muted); line-height: 1.35; }
.cl-aviso a { color: var(--muted); text-decoration: underline; }
@media print { .cl-lanza, .cl-globo, .cl-panel { display: none !important; } }
