/* GestorIA Avatar Commerce — Demo Mock. Dos paneles, responsive (sección 18). */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #0f172a; color: #e2e8f0; min-height: 100vh; }

.layout { display: grid; grid-template-columns: 35% 65%; min-height: 100vh; }

/* Panel avatar */
.avatar-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; background: #1e293b; border-right: 1px solid #334155;
}
.avatar {
  width: 140px; height: 140px; border-radius: 50%; background: #334155;
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: box-shadow .3s;
}
.avatar-face { width: 80px; height: 60px; position: relative; }
.avatar-face-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.avatar-eyes::before, .avatar-eyes::after {
  content: ""; position: absolute; top: 0; width: 12px; height: 12px;
  border-radius: 50%; background: #e2e8f0;
}
.avatar-eyes::before { left: 10px; } .avatar-eyes::after { right: 10px; }
.avatar-mouth {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 8px; border-radius: 4px; background: #e2e8f0; transition: height .15s;
}
.avatar[data-state="listening"] { box-shadow: 0 0 0 6px rgba(34,197,94,.4); }
.avatar[data-state="thinking"], .avatar[data-state="processing"] { box-shadow: 0 0 0 6px rgba(59,130,246,.4); }
.avatar[data-state="listening"] .avatar-mouth { height: 14px; }
.avatar-status { color: #60a5fa; min-height: 1.2em; }
.subtitle { text-align: center; font-size: 1.05rem; max-width: 320px; min-height: 3em; }
.transcript { color: #94a3b8; font-size: .85rem; }
.mic {
  padding: 12px 28px; font-size: 1rem; border: none; border-radius: 999px;
  background: #3b82f6; color: white; cursor: pointer;
}
.mic:hover { background: #2563eb; }

/* Panel productos */
.product-panel { padding: 32px; overflow-y: auto; }
.panel-state h2 { margin-bottom: 12px; }
.panel-state p { margin-bottom: 12px; color: #cbd5e1; }
input {
  display: block; width: 100%; max-width: 360px; padding: 10px; margin-bottom: 10px;
  border-radius: 8px; border: 1px solid #475569; background: #0f172a; color: #e2e8f0;
}
button {
  padding: 10px 20px; margin: 4px 8px 4px 0; border: none; border-radius: 8px;
  background: #3b82f6; color: white; cursor: pointer;
}
button.secondary { background: #475569; }
button:disabled { opacity: .5; cursor: not-allowed; }
.muted { color: #94a3b8; font-size: .85rem; }
.hidden { display: none !important; }
.error { color: #f87171; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.card {
  position: relative; background: #1e293b; border: 1px solid #334155; border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.card.big { max-width: 420px; }
.card img { width: 100%; border-radius: 8px; }
.badge {
  position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: #3b82f6; color: white; display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}
.price { font-size: 1.15rem; font-weight: bold; color: #4ade80; }

.spinner {
  width: 40px; height: 40px; border: 4px solid #334155; border-top-color: #3b82f6;
  border-radius: 50%; animation: spin 1s linear infinite; margin: 16px 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

#visual-img { max-width: 420px; width: 100%; border-radius: 12px; margin-top: 12px; }

/* Móvil: avatar compacto arriba, productos debajo */
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .avatar-panel { border-right: none; border-bottom: 1px solid #334155; padding: 16px; }
  .avatar { width: 80px; height: 80px; }
  .subtitle { min-height: 2em; font-size: .95rem; }
  .product-panel { padding: 20px; }
}
