/* ================= MARTS Smart Assistant widget ================= */
.marts-chat-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 210;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b98a2f, #8a6420);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
  transition: transform .2s ease, box-shadow .2s ease;
}
.marts-chat-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 32px rgba(0,0,0,.38); }
.marts-chat-fab .marts-chat-close-ic { display: none; }
.marts-chat-fab.open .marts-chat-close-ic { display: block; }
.marts-chat-fab.open .marts-chat-open-ic { display: none; }

.marts-chat-panel {
  position: fixed;
  left: 20px;
  bottom: 92px;
  z-index: 215;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.marts-chat-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.marts-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1d1d1f, #2c2c30);
  color: #fff;
}
.marts-chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #d4af5f, #8a6420);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #1d1d1f; flex-shrink: 0;
}
.marts-chat-head-txt { display: flex; flex-direction: column; line-height: 1.25; }
.marts-chat-head-txt strong { font-size: 14px; }
.marts-chat-status { font-size: 11px; color: #b9e6a6; display: flex; align-items: center; gap: 5px; }
.marts-chat-status i { width: 8px; height: 8px; border-radius: 50%; background: #4cd964; display: inline-block; }
.marts-chat-head-wa { margin-left: auto; }
.marts-chat-wa {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #25D366;
  color: #fff !important;
  font-size: 12px;
  text-decoration: none;
}

.marts-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f6f2;
}
.marts-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.marts-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.marts-msg-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #d4af5f, #8a6420);
  color: #1d1d1f; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.marts-msg-bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  background: #fff;
  border: 1px solid #ece7da;
  color: #232323;
}
.marts-msg-user .marts-msg-bubble {
  background: linear-gradient(135deg, #b98a2f, #a67c26);
  color: #fff;
  border: none;
}
.marts-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 34px 0; }
.marts-svc { padding: 0 34px 0; }
.marts-link {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d4af5f;
  color: #8a6420;
  font-size: 12px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.marts-link:hover { background: #d4af5f; color: #fff; }
.marts-svc-link { background: #8a6420; border-color: #8a6420; color: #fff; }
.marts-svc-link:hover { background: #b98a2f; }

.marts-props { display: flex; flex-direction: column; gap: 8px; padding: 2px 8px 0; }
.marts-props-title { font-size: 12px; font-weight: 700; color: #6b5b2e; padding: 4px 0; }
.marts-prop {
  display: flex; gap: 10px; align-items: center;
  background: #fff; border: 1px solid #ece7da; border-radius: 10px;
  padding: 8px; text-decoration: none; color: inherit;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.marts-prop:hover { border-color: #d4af5f; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.marts-prop img { width: 52px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.marts-prop-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.marts-prop-info b { font-size: 13px; color: #232323; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marts-prop-info span { font-size: 11.5px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.marts-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.marts-chip {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #d9d2bd;
  background: #fff;
  color: #6b5b2e;
  font-size: 11.5px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.marts-chip:hover { background: #f4ead2; border-color: #d4af5f; }

.marts-chat-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #ece7da;
}
.marts-chat-foot input {
  flex: 1;
  border: 1px solid #d9d2bd;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
  background: #f7f6f2;
}
.marts-chat-foot input:focus { border-color: #d4af5f; background: #fff; }
.marts-chat-foot button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #b98a2f, #8a6420);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.marts-chat-foot button:hover { background: linear-gradient(135deg, #caa03c, #9a7324); }

@media (max-width: 520px) {
  .marts-chat-panel {
    left: 10px;
    bottom: 84px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    height: calc(100vh - 120px);
  }
  .marts-chat-fab { left: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .marts-chat-panel, .marts-chat-fab { transition: none; }
}