
/* ========== AI Car Detailing Expert (fixed to screen, chat icon opens panel) ========== */
#pm-ai-assistant-root,
#pm-ai-assistant-root.pm-ai-fixed {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    font-family: var(--font-sans);
    color: var(--color-text);
}
#pm-ai-assistant-root .pm-ai-toggle,
.pm-ai-toggle.pm-ai-chat-icon,
.pm-ai-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c41e3a 0%, #a01930 50%, #8b1528 100%);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:0 0px 29px rgba(196,30,58,.4);
    transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .35s;
}
/* #pm-ai-assistant-root .pm-ai-toggle:hover,
.pm-ai-toggle.pm-ai-chat-icon:hover,
.pm-ai-toggle:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(196,30,58,.5);
} */
#pm-ai-assistant-root .pm-ai-toggle svg,
.pm-ai-toggle .pm-ai-chat-svg,
.pm-ai-chat-icon svg {
    width: 28px;
    height: 28px;
}
.pm-ai-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 2rem);
    height: 520px;
    background: var(--color-bg-card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, visibility .25s, transform .25s;
}
.pm-ai-panel.pm-ai-panel-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pm-ai-header {
    padding: .85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(196,30,58,.12) 0%, transparent 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.pm-ai-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: .5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.pm-ai-header h4 span { color: var(--color-accent); }
.pm-ai-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: .35rem;
    line-height: 1;
    font-size: 1.5rem;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}
.pm-ai-close:hover { color: var(--color-accent); background: rgba(255,255,255,.06); }
.pm-ai-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    padding: .5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.15);
}
.pm-ai-links a {
    font-size: .75rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .2s;
    cursor: pointer;
}
.pm-ai-links a:hover { color: var(--color-accent); }
#pm-ai-assistant-root button { cursor: pointer; }
.pm-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.pm-ai-msg {
    max-width: 90%;
    padding: .75rem 1rem;
    border-radius: 12px;
    font-size: .9rem;
    line-height: 1.5;
}
.pm-ai-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #c41e3a 0%, #a01930 50%, #8b1528 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(196,30,58,.35);
}
.pm-ai-msg-bot {
    align-self: flex-start;
    background: var(--color-bg-alt);
    border: 1px solid rgba(255,255,255,.06);
    color: var(--color-text);
}
.pm-ai-msg-bot .pm-ai-response { margin: 0; }
.pm-ai-response-message { margin: 0 0 .75rem; color: var(--color-text-muted); }
.pm-ai-recommendation { margin: 0 0 .5rem; color: var(--color-text); }
.pm-ai-recommendation strong { color: var(--color-accent); }
.pm-ai-addons { margin: .35rem 0 0 1rem; padding: 0; list-style: disc; color: var(--color-text-muted); font-size: .85rem; }
.pm-ai-meta { margin: .35rem 0; font-size: .85rem; color: var(--color-text-muted); }
.pm-ai-meta a { color: var(--color-accent); }
.pm-ai-cta {
    margin-top: .75rem;
    display: inline-block;
    padding: .6rem 1.25rem;
    font-size: .9rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #c41e3a 0%, #a01930 50%, #8b1528 100%);
    color: var(--color-white);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(196,30,58,.4);
    transition: transform .35s, box-shadow .35s;
}
.pm-ai-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(196,30,58,.5);
    color: var(--color-white);
}
.pm-ai-follow-up {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
    align-self: flex-start;
}
.pm-ai-follow-up-btn {
    padding: .4rem .75rem;
    font-size: .8rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.pm-ai-follow-up-btn:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-text);
}
.pm-ai-follow-up a.pm-ai-follow-up-btn:hover { color: var(--color-text); }
.pm-ai-quick-prompts-wrap {
    padding: 0 1rem .75rem;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.08);
    max-height: 140px;
    transition: opacity .2s ease, max-height .25s ease, padding .2s ease, border .2s ease;
    overflow: hidden;
}
.pm-ai-quick-prompts-wrap.pm-ai-quick-prompts-hidden {
    display: none !important;
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
    pointer-events: none;
    visibility: hidden;
}
.pm-ai-quick-prompts-label {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
}
.pm-ai-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.pm-ai-chip {
    padding: .4rem .7rem;
    font-size: .75rem;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.05);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.pm-ai-chip:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-text);
}
.pm-ai-input-row {
    padding: .75rem 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    gap: .5rem;
    align-items: center;
}
.pm-ai-input {
    flex: 1;
    padding: .6rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,.2);
    background: var(--color-bg-alt);
    color: var(--color-text);
    font-size: .9rem;
    font-family: inherit;
}
.pm-ai-input::placeholder { color: var(--color-text-muted); opacity: .8; }
.pm-ai-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}
.pm-ai-send {
    padding: .6rem 1rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #c41e3a 0%, #a01930 50%, #8b1528 100%);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
    box-shadow: 0 4px 15px rgba(196,30,58,.35);
    transition: transform .2s, box-shadow .2s;
}
.pm-ai-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196,30,58,.5);
}
@media (max-width: 768px) {
    #pm-ai-assistant-root { bottom: 5.5rem; right: 1rem; }
}
@media (max-width: 480px) {
    #pm-ai-assistant-root { bottom: 5.5rem; right: 1rem; }
    .pm-ai-panel { width: calc(100vw - 2rem); height: 70vh; max-height: 480px; }
}
