/* Consultora de beleza (IA): botão fixo e janela de conversa. */
.adv-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 55; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 16px; background: var(--plum); color: #fff; font-family: var(--head); font-weight: 600; font-size: 1rem; letter-spacing: .02em; cursor: pointer; box-shadow: 0 10px 28px rgba(30, 19, 32, .25), 0 0 0 1px rgba(255, 255, 255, .22); transition: transform .16s var(--ease), background-color .2s; }
.adv-fab svg { width: 24px; height: 24px; color: #F4B9C8; }
.adv-fab:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .adv-fab:hover { background: var(--plum-2); } }
.adv-fab[aria-expanded="true"] { display: none; }
/* página de produto no celular: sobe para não ficar em cima da barra de compra */
html.has-sticky .adv-fab { bottom: calc(92px + env(safe-area-inset-bottom)); }

.adv-panel { position: fixed; right: 20px; bottom: 20px; z-index: 56; display: flex; flex-direction: column; width: min(400px, calc(100vw - 40px)); height: min(640px, calc(100dvh - 40px)); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(30, 19, 32, .28); overflow: hidden; opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right; pointer-events: none; transition: opacity .2s var(--ease), transform .3s var(--ease); }
.adv.is-on .adv-panel { opacity: 1; transform: none; pointer-events: auto; }
.adv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 20px; background: var(--header-bg, #FBEAEE); border-bottom: 1px solid var(--line); }
.adv-head h2 { font-family: var(--head); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.adv-head p { font-size: .86rem; color: var(--muted); }
.adv-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--ink); }
.adv-x svg { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { .adv-x:hover { background: rgba(30, 19, 32, .06); } }

.adv-list { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.adv-msg { max-width: 88%; display: grid; gap: 8px; font-size: .95rem; line-height: 1.45; }
.adv-msg p { margin: 0; }
.adv-assistant { align-self: flex-start; }
.adv-assistant > p { padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: #F7EFF1; }
.adv-user { align-self: flex-end; }
.adv-user > p { padding: 10px 14px; border-radius: 16px 4px 16px 16px; background: var(--plum); color: #fff; white-space: pre-wrap; }
.adv-wait { color: var(--muted); font-style: normal; padding: 6px 2px; }
.adv-err { padding: 10px 14px; border-radius: 12px; background: #FDECEC; color: #8A1C2B; }

/* card de produto dentro da conversa */
.adv-card { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.adv-thumb { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #F7EFF1; }
.adv-thumb svg, .adv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adv-card-body { display: grid; gap: 3px; min-width: 0; }
.adv-card-name { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-card-meta { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.adv-card-meta i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.adv-card-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.adv-add { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; font-size: .82rem; cursor: pointer; transition: transform .16s var(--ease); }
.adv-add:active { transform: scale(.96); }
.adv-add:disabled { background: #6D9B7B; cursor: default; }
.adv-try { font-size: .85rem; font-weight: 600; color: var(--rose-deep); }
.adv-out { font-size: .85rem; color: var(--muted); }

.adv-starters { display: grid; gap: 8px; padding: 4px 16px 12px; }
.adv-starters[hidden] { display: none; }
.adv-starters button { text-align: left; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: .9rem; cursor: pointer; transition: border-color .2s, background-color .2s; }
@media (hover: hover) and (pointer: fine) { .adv-starters button:hover { border-color: var(--ink); background: #FBF6F7; } }
.adv-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 14px; border: 1.5px solid #D9CED3; border-radius: 16px; }
.adv-form:focus-within { border-color: var(--ink); }
.adv-form textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 9px 0; border: 0; resize: none; outline: none; font: inherit; font-size: 1rem; line-height: 1.35; background: none; }
.adv-form button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--rose-deep); color: #fff; cursor: pointer; }
.adv-form button:disabled { opacity: .45; cursor: default; }
.adv-form button svg { width: 22px; height: 22px; }
.adv-note { padding: 8px 16px 12px; font-size: .75rem; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .adv-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 50px; padding: 0 16px 0 12px; font-size: .95rem; }
  html.has-sticky .adv-fab { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .adv-panel { right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  .adv-form { margin-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) {
  .adv-panel { transform: none; transition: opacity .2s; }
}
