/* ИИ-помощник «Долина цветов» — виджет в правом нижнем углу */
.aih-launcher {
  position: fixed; right: 18px; bottom: 92px; z-index: 9000;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: #c8102e; color: #fff; font: 600 14px/1 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-shadow: 0 10px 26px rgba(200, 16, 46, .32);
  transition: transform .15s ease, box-shadow .15s ease;
}
.aih-launcher:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(200, 16, 46, .38); }
.aih-launcher svg { width: 18px; height: 18px; }

.aih-panel {
  position: fixed; right: 18px; bottom: 92px; z-index: 9001;
  width: 372px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 130px);
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #eee6e2; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(30, 20, 18, .22);
  font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1f1a18;
}
.aih-panel.on { display: flex; }

.aih-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: #fff7f5; border-bottom: 1px solid #f3e7e3;
}
.aih-head b { font-size: 14.5px; }
.aih-head span { display: block; font-size: 11.5px; color: #8a7c77; }
.aih-close { margin-left: auto; border: 0; background: transparent; font-size: 18px; color: #8a7c77; cursor: pointer; padding: 4px 6px; }

.aih-body { flex: 1; overflow-y: auto; padding: 14px; background: #fbf9f8; scrollbar-width: thin; }
.aih-msg { display: flex; margin-bottom: 10px; }
.aih-msg.user { justify-content: flex-end; }
.aih-bubble {
  max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; white-space: pre-wrap;
  background: #fff; border: 1px solid #efe7e3;
}
.aih-msg.user .aih-bubble { background: #c8102e; border-color: #c8102e; color: #fff; }
.aih-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.aih-typing i { width: 6px; height: 6px; border-radius: 50%; background: #c9b9b3; animation: aih-blink 1.2s infinite; }
.aih-typing i:nth-child(2) { animation-delay: .2s; }
.aih-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes aih-blink { 0%, 80%, 100% { opacity: .3 } 40% { opacity: 1 } }

.aih-products { display: grid; gap: 8px; margin: 4px 0 12px; }
.aih-card {
  display: flex; gap: 10px; align-items: center; padding: 8px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid #efe7e3; border-radius: 12px;
}
.aih-card:hover { border-color: #e2b9b3; }
.aih-card .ph { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 9px; object-fit: cover; background: #f4eeeb; }
.aih-card .ph--empty { display: grid; place-items: center; font-size: 20px; }
.aih-card b { display: block; font-size: 12.8px; line-height: 1.3; }
.aih-card span { font-size: 11.5px; color: #8a7c77; }
.aih-card .pr { margin-left: auto; font-weight: 700; font-size: 13px; white-space: nowrap; }

.aih-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: #fbf9f8; }
.aih-chip {
  border: 1px solid #efd9d3; background: #fff; color: #8a3a2e; border-radius: 999px;
  padding: 7px 11px; font-size: 12px; cursor: pointer;
}
.aih-chip:hover { background: #fff2ee; }

.aih-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #f3e7e3; background: #fff; }
.aih-input {
  flex: 1; border: 1px solid #e9ded9; border-radius: 12px; padding: 10px 12px; font-size: 13.5px;
  outline: none; resize: none; max-height: 90px; font-family: inherit;
}
.aih-input:focus { border-color: #e2b9b3; }
.aih-send {
  border: 0; border-radius: 12px; width: 42px; background: #c8102e; color: #fff; cursor: pointer;
  font-size: 16px; flex: 0 0 42px;
}
.aih-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 640px) {
  .aih-launcher { bottom: 84px; right: 12px; padding: 11px 14px; font-size: 13px; }
  .aih-panel { right: 8px; left: 8px; bottom: 84px; width: auto; height: calc(100vh - 120px); max-height: none; }
}
