.thc-chatbot {
    --thc-accent: #6551d7;
    --thc-text: #222744;
    --thc-muted: #72788e;
    --thc-surface: #fff;
    --thc-soft: #f5f4fb;
    --thc-border: #e9e6f3;
    position: relative;
    z-index: 10000000;
    color: var(--thc-text);
    font-size: 14px;
    line-height: 1.6;
}
.thc-chatbot *, .thc-chatbot *::before, .thc-chatbot *::after { box-sizing: border-box; }
.thc-chatbot [hidden] { display: none !important; }
.thc-chatbot button { margin: 0; cursor: pointer; font: inherit; text-transform: none; letter-spacing: normal; }
.thc-chatbot button:focus-visible, .thc-chatbot a:focus-visible, .thc-chatbot input:focus-visible {
    outline: 3px solid #b9aaff;
    outline-offset: 3px;
}
.thc-chatbot__launcher {
    position: fixed;
    left: 24px;
    bottom: 258px;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 13px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(140deg, #7c68ec, #5840c7);
    color: #fff;
    box-shadow: 0 6px 22px #6551d747, 0 0 0 5px #6551d71a;
    transition: transform .18s ease, box-shadow .18s ease;
}
.thc-chatbot__launcher:hover { transform: translateY(-2px); box-shadow: 0 8px 26px #6551d75c, 0 0 0 5px #6551d724; }
.thc-chatbot__launcher > svg { display: block; width: 34px; height: 34px; }
.thc-chatbot__badge {
    position: absolute;
    right: -1px;
    bottom: -1px;
    display: grid;
    place-items: center;
    width: 25px;
    height: 20px;
    border: 2px solid var(--thc-surface);
    border-radius: 8px;
    background: #eee9ff;
    color: #5840c7;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}
.thc-chatbot__welcome {
    position: fixed;
    left: 102px;
    bottom: 246px;
    width: min(282px, calc(100vw - 120px));
    padding: 18px 20px 15px;
    border: 1px solid var(--thc-border);
    border-radius: 18px 18px 18px 5px;
    background: var(--thc-surface);
    box-shadow: 0 10px 38px #29204a1f;
    animation: thc-chat-enter .22s ease both;
}
.thc-chatbot__welcome::before {
    content: '';
    position: absolute;
    left: -7px;
    bottom: 26px;
    width: 12px;
    height: 12px;
    border-bottom: 1px solid var(--thc-border);
    border-left: 1px solid var(--thc-border);
    background: var(--thc-surface);
    transform: rotate(45deg);
}
.thc-chatbot__eyebrow { display: block; margin-bottom: 7px; color: var(--thc-accent); font-size: 9px; font-weight: 700; letter-spacing: .7px; }
.thc-chatbot__welcome > strong { display: block; color: var(--thc-text); font-size: 16px; }
.thc-chatbot__welcome p { margin: 7px 0 12px; color: var(--thc-muted); font-size: 13px; line-height: 1.7; }
.thc-chatbot .thc-chatbot__dismiss, .thc-chatbot .thc-chatbot__close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--thc-muted);
    font-size: 25px;
    line-height: 1;
}
.thc-chatbot__dismiss { position: absolute; top: 6px; right: 6px; }
.thc-chatbot .thc-chatbot__dismiss:hover { background: var(--thc-soft); }
.thc-chatbot .thc-chatbot__welcome-cta { padding: 0; border: 0; background: transparent; color: var(--thc-accent); font-size: 12px; font-weight: 600; }
.thc-chatbot__welcome-cta span { margin-left: 8px; }
.thc-chatbot__panel {
    position: fixed;
    left: 104px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    width: 390px;
    height: auto;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border: 1px solid var(--thc-border);
    border-radius: 16px;
    background: var(--thc-surface);
    box-shadow: 0 16px 65px #26213c30;
    animation: thc-chat-enter .2s ease both;
}
.thc-chatbot__panel--active { height: min(650px, calc(100vh - 48px)); height: min(650px, calc(100dvh - 48px)); }
.thc-chatbot__header { display: flex; align-items: center; flex-shrink: 0; gap: 11px; padding: 18px; background: linear-gradient(120deg, #6852d6, #5141b9); color: #fff; }
.thc-chatbot__avatar { display: grid; flex-shrink: 0; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffff30; border-radius: 14px; background: #ffffff1f; font-size: 24px; }
.thc-chatbot__header h2 { margin: 0; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.5; }
.thc-chatbot__header p { display: flex; align-items: center; gap: 5px; margin: 3px 0 0; color: #f0edff; font-size: 10px; line-height: 1.5; }
.thc-chatbot__header p > span { width: 6px; height: 6px; border-radius: 50%; background: #a9ebce; }
.thc-chatbot__lead { display: grid; flex: 0 1 auto; min-height: 0; align-content: start; grid-auto-rows: max-content; gap: 14px; padding: 22px 20px; overflow-y: auto; overscroll-behavior: contain; background: var(--thc-surface); color: var(--thc-text); }
.thc-chatbot__lead strong { font-size: 16px; line-height: 1.5; }
.thc-chatbot__lead p { margin: -7px 0 2px; color: var(--thc-muted); font-size: 12px; line-height: 1.6; }
.thc-chatbot__lead label { display: grid; gap: 7px; margin: 0; color: var(--thc-text); font-size: 12px; font-weight: 500; line-height: 1.5; }
.thc-chatbot__lead input { width: 100%; min-width: 0; height: 46px; margin: 0; padding: 11px 12px; border: 1px solid var(--thc-border); border-radius: 8px; outline: none; box-shadow: none; background: var(--thc-surface); color: var(--thc-text); font-size: 14px; font-weight: 400; line-height: 1.5; transition: border-color .15s ease, box-shadow .15s ease; }
.thc-chatbot__lead input::placeholder { color: var(--thc-muted); opacity: 1; }
.thc-chatbot__lead input:focus { border-color: var(--thc-accent); box-shadow: 0 0 0 3px #6551d714; }
.thc-chatbot .thc-chatbot__lead input:focus-visible { outline: none; }
.thc-chatbot__lead button { min-height: 44px; padding: 11px 14px; border: 0; border-radius: 8px; background: var(--thc-accent); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; transition: filter .15s ease; }
.thc-chatbot__lead button:hover { filter: brightness(.95); }
.thc-chatbot__lead small { color: #bb3f5b; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.thc-chatbot .thc-chatbot__close { flex-shrink: 0; margin-left: auto; color: #fff; background: #ffffff14; }
.thc-chatbot .thc-chatbot__close:hover { background: #ffffff2a; }
.thc-chatbot__messages { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 12px; padding: 19px 15px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; background: var(--thc-soft); }
.thc-chatbot__messages > * { flex-shrink: 0; min-width: 0; }
.thc-chatbot__bubble { align-self: flex-start; max-width: 94%; padding: 12px 14px; border: 1px solid var(--thc-border); border-radius: 15px 15px 15px 4px; background: var(--thc-surface); color: var(--thc-text); font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.thc-chatbot__bubble--user { align-self: flex-end; border-color: var(--thc-accent); border-radius: 15px 15px 4px 15px; background: var(--thc-accent); color: #fff; }
.thc-chatbot__bubble--pending { color: var(--thc-muted); }
.thc-chatbot__cards { display: grid; gap: 9px; }
.thc-chatbot__results { display: grid; flex: 0 0 auto; min-width: 0; gap: 9px; }
.thc-chatbot__catalog-header { display: grid; gap: 8px; padding: 5px 0 10px; }
.thc-chatbot__result-range { margin: 0; color: var(--thc-muted); font-size: 11px; line-height: 1.5; }
.thc-chatbot__catalog-footer { display: grid; gap: 9px; padding-top: 2px; }
.thc-chatbot__catalog-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.thc-chatbot .thc-chatbot__page-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; max-width: 100%; padding: 8px 11px; border: 1px solid var(--thc-accent); border-radius: 7px; background: var(--thc-surface); color: var(--thc-accent); font-size: 12px; line-height: 1.5; }
.thc-chatbot .thc-chatbot__page-button[data-chat-page="next"] { margin-left: auto; background: var(--thc-accent); color: var(--thc-surface); }
.thc-chatbot__page-button i { font-size: 17px; }
.thc-chatbot__catalog-filters { padding-top: 9px; border-top: 1px solid var(--thc-border); }
.thc-chatbot__card { display: grid; gap: 8px; min-width: 0; padding: 13px; border: 1px solid var(--thc-border); border-radius: 8px; background: var(--thc-surface); }
.thc-chatbot__card strong { color: var(--thc-text); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.thc-chatbot__price { color: var(--thc-accent); font-size: 14px; font-weight: 600; }
.thc-chatbot__card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--thc-muted); font-size: 10px; line-height: 1.5; }
.thc-chatbot__card-meta span + span { position: relative; padding-left: 12px; }
.thc-chatbot__card-meta span + span::before { content: ''; position: absolute; top: 50%; left: 0; width: 3px; height: 3px; border-radius: 50%; background: currentColor; transform: translateY(-50%); }
.thc-chatbot__actions { display: flex; flex-wrap: wrap; gap: 7px; }
.thc-chatbot .thc-chatbot__actions button, .thc-chatbot .thc-chatbot__actions a {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--thc-border);
    border-radius: 8px;
    background: var(--thc-surface);
    color: var(--thc-accent);
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.thc-chatbot .thc-chatbot__actions button:hover, .thc-chatbot .thc-chatbot__actions a:hover { border-color: var(--thc-accent); }
.thc-chatbot__suggestions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 6px; padding: 11px 13px; border-top: 1px solid var(--thc-border); }
.thc-chatbot__suggestions button { padding: 6px 9px; border: 1px solid var(--thc-border); border-radius: 20px; background: var(--thc-surface); color: var(--thc-accent); font-size: 10px; line-height: 1.6; }
.thc-chatbot__suggestions button:hover { background: var(--thc-soft); }
.thc-chatbot__form { display: flex; align-items: center; flex-shrink: 0; gap: 9px; margin: 0; padding: 12px 13px 6px; border-top: 1px solid var(--thc-border); }
.thc-chatbot__form input { flex: 1; min-width: 0; height: 43px; margin: 0; padding: 10px 12px; border: 1px solid var(--thc-border); border-radius: 12px; outline: none; background: var(--thc-soft); color: var(--thc-text); font-size: 13px; line-height: 1.5; }
.thc-chatbot__form input::placeholder { color: var(--thc-muted); }
.thc-chatbot .thc-chatbot__send { display: grid; flex-shrink: 0; place-items: center; width: 43px; height: 43px; padding: 11px; border: 0; border-radius: 12px; background: var(--thc-accent); color: #fff; }
.thc-chatbot__send svg { display: block; width: 21px; height: 21px; }
.thc-chatbot button:disabled { opacity: .55; cursor: wait; }
.thc-chatbot__note { flex-shrink: 0; margin: 0; padding: 10px 16px; border-top: 1px solid var(--thc-border); background: var(--thc-soft); color: var(--thc-muted); font-size: 10px; line-height: 1.5; text-align: center; }
.thc-chatbot__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.mobile-menu-open .thc-chatbot { visibility: hidden; pointer-events: none; }
.is_dark .thc-chatbot { --thc-accent: #b4a4ff; --thc-text: #f1efff; --thc-muted: #b4afc8; --thc-surface: #222138; --thc-soft: #1a192c; --thc-border: #39354e; }
.is_dark .thc-chatbot__bubble--user, .is_dark .thc-chatbot .thc-chatbot__send { background: #6551d7; border-color: #6551d7; color: #fff; }
.is_dark .thc-chatbot__lead small { color: #ff9daf; }
@keyframes thc-chat-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 575px) {
    .thc-chatbot__launcher { left: 10px; bottom: 176px; width: 44px; height: 44px; padding: 8px; }
    .thc-chatbot__launcher > svg { width: 28px; height: 28px; }
    .thc-chatbot__badge { right: -3px; bottom: -3px; width: 21px; height: 17px; font-size: 8px; }
    .thc-chatbot__welcome { left: 68px; bottom: 167px; width: min(270px, calc(100vw - 80px)); padding: 17px 17px 13px; }
    .thc-chatbot__welcome p { font-size: 12px; }
    .thc-chatbot__panel { left: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); max-width: 390px; max-height: calc(100vh - 20px - env(safe-area-inset-bottom)); max-height: calc(100dvh - 20px - env(safe-area-inset-bottom)); }
    .thc-chatbot__panel--active { height: min(650px, calc(100vh - 20px - env(safe-area-inset-bottom))); height: min(650px, calc(100dvh - 20px - env(safe-area-inset-bottom))); }
    .thc-chatbot__lead input, .thc-chatbot__form input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .thc-chatbot *, .thc-chatbot *::before, .thc-chatbot *::after { animation: none !important; transition: none !important; }
}
