.chatbot-bergamini {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chatbot-toggle {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #198754, #25d366);
  color: #fff;
  min-width: 150px;
  height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(25, 135, 84, .42);
  transition: transform .18s ease, box-shadow .18s ease;
}

.chatbot-toggle i {
  font-size: 22px;
}

.chatbot-toggle:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 34px rgba(25, 135, 84, .55);
}

.chatbot-window {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  display: none;
  border: 1px solid rgba(0,0,0,.08);
}

.chatbot-window.abierto {
  display: flex;
  flex-direction: column;
}

.chatbot-header {
  background: linear-gradient(135deg, #0f5132, #198754);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.chatbot-header small {
  display: block;
  opacity: .9;
  font-size: 12px;
  margin-top: 2px;
}

.chatbot-close {
  background: rgba(255,255,255,.16);
  color: #fff;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f4f7f6;
}

.chatbot-msg {
  display: flex;
  margin-bottom: 12px;
}

.chatbot-msg.usuario {
  justify-content: flex-end;
}

.chatbot-bubble {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.42;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.chatbot-msg.bot .chatbot-bubble {
  background: #fff;
  color: #212529;
  border-bottom-left-radius: 5px;
}

.chatbot-msg.usuario .chatbot-bubble {
  background: #198754;
  color: #fff;
  border-bottom-right-radius: 5px;
}

.chatbot-shortcuts {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #e8ecea;
  background: #fff;
  overflow-x: auto;
}

.chatbot-shortcuts button {
  border: 1px solid #cfe7dc;
  background: #eef8f3;
  color: #146c43;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #e8ecea;
}

.chatbot-form input {
  flex: 1;
  border: 1px solid #ced4da;
  border-radius: 999px;
  padding: 11px 13px;
  outline: none;
  font-size: 14px;
}

.chatbot-form input:focus {
  border-color: #198754;
  box-shadow: 0 0 0 3px rgba(25, 135, 84, .12);
}

.chatbot-form button {
  border: 0;
  background: #198754;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.chatbot-productos {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.chatbot-producto {
  border: 1px solid #e2e8e5;
  border-radius: 12px;
  background: #fafafa;
  padding: 9px;
}

.chatbot-producto b {
  display: block;
  font-size: 13px;
  color: #1f2933;
}

.chatbot-producto span {
  display: block;
  color: #198754;
  font-weight: 800;
  margin-top: 4px;
}

.chatbot-wa-box {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.chatbot-wa-link {
  display: block;
  text-align: center;
  background: #25d366;
  color: #fff !important;
  text-decoration: none;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 800;
}

.chatbot-escribiendo {
  opacity: .75;
}

@media (max-width: 576px) {
  .chatbot-bergamini {
    right: 14px;
    bottom: 14px;
  }

  .chatbot-toggle {
    min-width: 58px;
    padding: 0;
  }

  .chatbot-toggle span {
    display: none;
  }

  .chatbot-window {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 84px;
    width: auto;
    height: min(560px, calc(100vh - 100px));
  }
}
