/* ==========================================================================
   Kangum — AI Chatbot & WhatsApp Closer Widget
   Brand Identity: Athletic Blue & Carbon Dark (Strictly NO Orange)
   ========================================================================== */

:root {
    --kg-blue: #0084D6;
    --kg-cyan: #00A3FF;
    --kg-sky: #38BDF8;
    --kg-carbon: #0A0A0E;
    --kg-navy: #0F172A;
    --kg-slate: #1E293B;
    --kg-text-muted: #94A3B8;
    --kg-text-light: #F8FAFC;
    --kg-emerald: #059669;
    --kg-emerald-hover: #047857;
    --kg-border: rgba(255, 255, 255, 0.08);
}

/* 1. Botón Flotante Launcher (Ubicado a la izquierda) */
#kangum-ai-launcher {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: auto;
    z-index: 999990;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--kg-carbon) 0%, #111827 100%);
    border: 2px solid var(--kg-blue);
    color: #FFFFFF !important;
    padding: 10px 18px;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 132, 214, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
}

#kangum-ai-launcher:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 163, 255, 0.4);
    border-color: var(--kg-cyan);
}

#kangum-ai-launcher .kg-icon-bubble {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kg-blue) 0%, var(--kg-cyan) 100%);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
}

#kangum-ai-launcher .kg-label {
    color: #FFFFFF !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* 2. Ventana de Chat (Ubicada a la izquierda) */
#kangum-ai-window {
    position: fixed;
    bottom: 86px;
    left: 24px;
    right: auto;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 110px);
    background: var(--kg-carbon);
    border: 1px solid rgba(0, 132, 214, 0.35);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 132, 214, 0.15);
    z-index: 999995;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: kgFadeSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#kangum-ai-window.kg-open {
    display: flex;
}

@keyframes kgFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.kg-chat-header {
    background: var(--kg-navy);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--kg-border);
}

.kg-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kg-header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #E2E8F0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    margin: 0;
    outline: none;
}

.kg-header-icon-btn:hover {
    background: rgba(0, 163, 255, 0.25);
    border-color: rgba(0, 163, 255, 0.6);
    color: #FFFFFF;
    transform: scale(1.08);
    box-shadow: 0 2px 10px rgba(0, 163, 255, 0.4);
}

.kg-header-icon-btn svg {
    color: currentColor;
    display: block;
}

.kg-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kg-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kg-blue) 0%, var(--kg-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 132, 214, 0.4);
}

.kg-header-info h3 {
    margin: 0;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
}

.kg-header-status {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: var(--kg-sky);
    display: flex;
    align-items: center;
    gap: 5px;
}

.kg-header-status::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #00E676;
    border-radius: 50%;
}

.kg-close-btn {
    background: transparent;
    border: none;
    color: var(--kg-text-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s;
}

.kg-close-btn:hover {
    color: #FFFFFF;
}

/* Área de Mensajes */
.kg-chat-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 16px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    background: #08080C;
    scroll-behavior: smooth;
}

.kg-chat-body > * {
    flex-shrink: 0 !important;
}

.kg-chat-body::-webkit-scrollbar {
    width: 5px;
}

.kg-chat-body::-webkit-scrollbar-thumb {
    background: #1E293B;
    border-radius: 4px;
}

/* Mensajes individuales */
.kg-msg {
    max-width: 85%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-word;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.kg-msg.bot {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(26, 38, 57, 0.90) 50%, rgba(0, 132, 214, 0.16) 100%) !important;
    color: var(--kg-text-light);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0, 163, 255, 0.24);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(0, 163, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kg-msg.bot::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 163, 255, 0.6) 45%, rgba(56, 189, 248, 0.8) 55%, transparent 100%);
    pointer-events: none;
}

.kg-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--kg-blue) 0%, var(--kg-cyan) 100%);
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 132, 214, 0.25);
    font-weight: 500;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
}

.kg-msg.bot.has-products {
    max-width: 96% !important;
    padding: 12px 10px 14px 12px !important;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
}

.kg-msg.bot.custom-block {
    max-width: 96% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
}

.kg-msg.bot.custom-block::before {
    display: none !important;
}

/* Chips / Sugerencias rápidas mejoradas */
.kg-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    padding: 2px 0 4px 0;
}

#kangum-ai-window button.kg-chip,
#kangum-ai-window .kg-chip,
button.kg-chip,
.kg-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%) !important;
    border: 1px solid rgba(0, 163, 255, 0.35) !important;
    color: #F8FAFC !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.15px !important;
    padding: 8px 14px !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    text-decoration: none !important;
    outline: none !important;
}

#kangum-ai-window button.kg-chip:hover,
#kangum-ai-window .kg-chip:hover,
button.kg-chip:hover,
.kg-chip:hover {
    background: linear-gradient(135deg, #0084D6 0%, #00A3FF 100%) !important;
    color: #FFFFFF !important;
    border-color: #00A3FF !important;
    box-shadow: 0 4px 16px rgba(0, 163, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

#kangum-ai-window button.kg-chip:active,
#kangum-ai-window .kg-chip:active,
button.kg-chip:active,
.kg-chip:active {
    transform: translateY(0) scale(0.97) !important;
}

/* Typing Indicator (Tres puntos pulsantes) */
.kg-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: var(--kg-slate);
    border-radius: 12px;
    width: fit-content;
}

.kg-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--kg-sky);
    border-radius: 50%;
    animation: kgBounce 1.4s infinite ease-in-out both;
}

.kg-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.kg-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes kgBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Barra de Cierre WhatsApp */
.kg-whatsapp-bar {
    padding: 10px 16px;
    background: var(--kg-navy);
    border-top: 1px solid var(--kg-border);
    display: flex;
    justify-content: center;
}

#kangum-ai-window .kg-btn-whatsapp,
#kangum-ai-window a.kg-btn-whatsapp,
.kg-btn-whatsapp {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: var(--kg-emerald) !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.35) !important;
    border: none !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

#kangum-ai-window .kg-btn-whatsapp #kg-wa-btn-label,
#kangum-ai-window .kg-btn-whatsapp span,
.kg-btn-whatsapp span {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

.kg-wa-icon-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

#kangum-ai-window .kg-btn-whatsapp svg,
.kg-btn-whatsapp svg,
.kg-wa-icon-wrap svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    fill: none !important;
    stroke-width: 18px !important;
}

#kangum-ai-window .kg-btn-whatsapp:hover,
#kangum-ai-window a.kg-btn-whatsapp:hover,
.kg-btn-whatsapp:hover {
    background: var(--kg-emerald-hover) !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
}

/* Botón de Menú Sutil en Footer Input */
.kg-chat-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 50% !important;
    background: var(--kg-slate) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

.kg-chat-menu-btn:hover {
    background: rgba(0, 163, 255, 0.18) !important;
    border-color: rgba(0, 163, 255, 0.5) !important;
    color: var(--kg-cyan) !important;
    transform: scale(1.08) !important;
    box-shadow: 0 2px 12px rgba(0, 163, 255, 0.35) !important;
}

.kg-chat-menu-btn svg {
    display: block !important;
    color: currentColor !important;
}

/* Chip sutil con flecha de retorno */
.kg-chip.kg-chip-back {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(0, 163, 255, 0.3) !important;
    color: #CBD5E1 !important;
    font-size: 11.5px !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    transition: all 0.2s ease !important;
}

.kg-chip.kg-chip-back:hover {
    background: rgba(0, 163, 255, 0.15) !important;
    border-color: var(--kg-cyan) !important;
    color: #FFFFFF !important;
}

/* Input y Footer */
.kg-chat-footer {
    padding: 12px 14px;
    background: var(--kg-carbon);
    border-top: 1px solid var(--kg-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kg-chat-input {
    flex: 1;
    background: var(--kg-slate);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.kg-chat-input:focus {
    border-color: var(--kg-blue);
    background: #243248;
}

.kg-chat-input::placeholder {
    color: var(--kg-text-muted);
}

#kangum-ai-window .kg-chat-send,
#kangum-ai-window #kg-chat-send,
.kg-chat-send {
    background: var(--kg-blue) !important;
    border: none !important;
    outline: none !important;
    color: #FFFFFF !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 132, 214, 0.35) !important;
    transition: all 0.2s ease !important;
}

#kangum-ai-window .kg-chat-send:hover,
#kangum-ai-window #kg-chat-send:hover,
.kg-chat-send:hover {
    background: var(--kg-cyan) !important;
    transform: scale(1.06) !important;
}

#kangum-ai-window .kg-chat-send:disabled,
#kangum-ai-window #kg-chat-send:disabled,
.kg-chat-send:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

#kangum-ai-window .kg-chat-send svg,
#kangum-ai-window #kg-chat-send svg,
.kg-chat-send svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: block !important;
    margin: 0 auto !important;
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    fill: none !important;
    overflow: visible !important;
    pointer-events: none !important;
}

#kangum-ai-window .kg-chat-send svg rect,
.kg-chat-send svg rect {
    display: none !important;
    fill: none !important;
    stroke: none !important;
}

#kangum-ai-window .kg-chat-send svg line,
#kangum-ai-window .kg-chat-send svg path,
.kg-chat-send svg line,
.kg-chat-send svg path {
    fill: none !important;
    stroke: #FFFFFF !important;
    stroke-width: 20px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* Responsive para Móviles */
@media (max-width: 480px) {
    #kangum-ai-window {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }

    #kangum-ai-launcher {
        bottom: 16px;
        left: 16px;
        right: auto;
        padding: 8px 14px;
    }
}

/* ==========================================================================
   Tarjetas Interactivas de Producto (Product Cards con Slider & Fly-to-Cart)
   ========================================================================== */
.kg-msg.bot.has-products {
    max-width: 96%;
    padding: 12px 10px 14px 12px;
}

/* Contenedor del Slider con flechas de navegación */
.kg-slider-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.kg-products-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 2px 8px 2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 132, 214, 0.45) transparent;
}

.kg-products-carousel::-webkit-scrollbar {
    height: 4px;
}

.kg-products-carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

.kg-products-carousel::-webkit-scrollbar-thumb {
    background: rgba(0, 132, 214, 0.55);
    border-radius: 4px;
}

/* Flechas de Navegación del Slider (Navigation Arrows) */
.kg-products-carousel.single-item {
    justify-content: center !important;
}

/* Flechas de Navegación del Slider (Navigation Arrows) */
.kg-slider-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    background: rgba(10, 10, 14, 0.95) !important;
    border: 1.5px solid rgba(0, 163, 255, 0.5) !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 15 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 132, 214, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    backdrop-filter: blur(8px) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.kg-slider-arrow:hover {
    background: var(--kg-blue) !important;
    border-color: var(--kg-cyan) !important;
    color: #FFFFFF !important;
    transform: translateY(-50%) scale(1.12) !important;
    box-shadow: 0 6px 18px rgba(0, 163, 255, 0.6) !important;
}

.kg-arrow-prev {
    left: -8px !important;
}

.kg-arrow-next {
    right: -8px !important;
}

.kg-slider-arrow.disabled {
    opacity: 0.2 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Tarjeta individual */
.kg-product-card {
    flex: 0 0 162px !important;
    width: 162px !important;
    min-width: 162px !important;
    background: #111827 !important;
    border: 1px solid rgba(0, 132, 214, 0.28) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    scroll-snap-align: start !important;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.22s !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
    box-sizing: border-box !important;
}

.kg-product-card:hover {
    transform: translateY(-3px) !important;
    border-color: var(--kg-cyan) !important;
    box-shadow: 0 8px 22px rgba(0, 132, 214, 0.3) !important;
}

/* Contenedor de Imagen de Producto (Studio White limpio) */
.kg-card-img-wrap {
    position: relative !important;
    width: calc(100% - 14px) !important;
    margin: 7px auto 0 auto !important;
    height: 120px !important;
    background: #FFFFFF !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
}

.kg-card-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    padding: 6px !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: block !important;
}

.kg-product-card:hover .kg-card-img {
    transform: scale(1.08) !important;
}

/* Botón '+' de Carrito (Circular protegido contra temas) */
.kg-card-add-btn {
    position: absolute !important;
    bottom: 7px !important;
    right: 7px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--kg-blue) 0%, var(--kg-cyan) 100%) !important;
    color: #FFFFFF !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 132, 214, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.kg-card-add-btn:hover {
    background: linear-gradient(135deg, var(--kg-cyan) 0%, #38BDF8 100%) !important;
    transform: scale(1.14) !important;
    box-shadow: 0 5px 16px rgba(0, 163, 255, 0.7) !important;
}

.kg-card-add-btn.added {
    background: var(--kg-emerald) !important;
    border-color: #A7F3D0 !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.6) !important;
}

.kg-card-add-btn svg {
    width: 17px !important;
    height: 17px !important;
    color: #FFFFFF !important;
}

.kg-card-add-btn svg.kg-icon-cart-add {
    display: block !important;
    fill: #FFFFFF !important;
    stroke: none !important;
}

.kg-card-add-btn svg.kg-icon-check {
    display: none !important;
    fill: none !important;
    stroke: #FFFFFF !important;
    stroke-width: 2.5px !important;
}

.kg-card-add-btn.added svg.kg-icon-cart-add {
    display: none !important;
}

.kg-card-add-btn.added svg.kg-icon-check {
    display: block !important;
}

.kg-card-info {
    padding: 8px 10px 11px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
    justify-content: space-between !important;
    background: #111827 !important;
    box-sizing: border-box !important;
}

.kg-card-title {
    color: #F8FAFC !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.15s !important;
}

.kg-card-title:hover {
    color: var(--kg-sky) !important;
}

/* Recomendación o Ideal generado sutil */
.kg-card-ideal {
    background: rgba(0, 132, 214, 0.12) !important;
    border: 1px solid rgba(0, 163, 255, 0.25) !important;
    color: #38BDF8 !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-top: 2px !important;
}

.kg-card-price {
    color: var(--kg-sky) !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    margin-top: 3px !important;
    letter-spacing: -0.2px !important;
    display: block !important;
}

/* Animación Flying-to-Cart (Ghost que vuela hacia la cesta de la derecha) */
.kg-fly-ghost {
    position: fixed;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0A0A0E;
    border: 2px solid #00A3FF;
    box-shadow: 0 6px 20px rgba(0, 163, 255, 0.7);
    z-index: 9999999;
    pointer-events: none;
    transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.75s ease-in;
    will-change: transform, opacity;
}

@keyframes kgCartPulseAnim {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.18);
        box-shadow: 0 0 24px rgba(0, 163, 255, 0.8);
    }

    70% {
        transform: scale(0.96);
    }

    100% {
        transform: scale(1);
    }
}

.kg-cart-pulse {
    animation: kgCartPulseAnim 0.65s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ==========================================================================
   Tarjeta Explorar Catálogo y Botón de Acción Directo
   ========================================================================== */
.kg-product-card.kg-explore-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    background: #0B1120 !important;
    border: 1.5px dashed rgba(0, 163, 255, 0.45) !important;
    padding: 16px 12px !important;
    box-sizing: border-box !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
}

.kg-product-card.kg-explore-card:hover {
    border-color: var(--kg-cyan) !important;
    background: rgba(0, 132, 214, 0.12) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(0, 132, 214, 0.25) !important;
}

.kg-explore-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    width: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
}

.kg-explore-icon-wrap {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(0, 132, 214, 0.18) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.kg-product-card.kg-explore-card:hover .kg-explore-icon-wrap {
    transform: scale(1.1) !important;
    background: var(--kg-blue) !important;
}

.kg-product-card.kg-explore-card:hover .kg-explore-icon-wrap svg {
    stroke: #FFFFFF !important;
}

.kg-explore-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #F8FAFC !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
}

.kg-explore-count {
    font-size: 11px !important;
    color: #94A3B8 !important;
    margin-bottom: 12px !important;
}

.kg-explore-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 14px !important;
    background: var(--kg-blue) !important;
    color: #FFFFFF !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    transition: background 0.2s ease !important;
}

.kg-explore-btn:hover {
    background: var(--kg-blue-dark) !important;
}

/* Botón de acción debajo del carrusel */
.kg-catalog-action-wrap {
    margin-top: 10px !important;
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.kg-catalog-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 9px 14px !important;
    background: #0B1120 !important;
    border: 1px solid rgba(0, 163, 255, 0.4) !important;
    border-radius: 10px !important;
    color: #38BDF8 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    box-sizing: border-box !important;
}

.kg-catalog-action-btn:hover {
    background: var(--kg-blue) !important;
    color: #FFFFFF !important;
    border-color: var(--kg-cyan) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(0, 132, 214, 0.35) !important;
}

.kg-catalog-action-btn svg {
    flex-shrink: 0 !important;
}

/* ==========================================================================
   Kangum Coach Pro v2.0 Extensions
   ========================================================================== */

/* 1. PDP NUDGE PROACTIVO */
.kg-pdp-nudge {
    position: fixed;
    bottom: 84px;
    left: 24px;
    max-width: 320px;
    background: #0A0A0E;
    border: 1px solid rgba(0, 163, 255, 0.45);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 132, 214, 0.2);
    z-index: 999992;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: kgNudgeFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes kgNudgeFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kg-pdp-nudge .kg-nudge-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.kg-pdp-nudge .kg-nudge-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

.kg-pdp-nudge .kg-nudge-badge {
    display: inline-block;
    background: #0084D6;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.kg-pdp-nudge .kg-nudge-body {
    font-size: 13px;
    color: #F8FAFC;
    line-height: 1.45;
    margin-bottom: 12px;
}

.kg-pdp-nudge .kg-nudge-body strong {
    color: #38BDF8;
}

.kg-pdp-nudge .kg-nudge-cta {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0084D6 0%, #00A3FF 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kg-pdp-nudge .kg-nudge-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* 2. BARRA DE PROGRESO B2B MAYORISTA */
.kg-b2b-bar {
    background: #0D1424;
    border-bottom: 1px solid rgba(0, 132, 214, 0.25);
    padding: 10px 14px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.kg-b2b-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
}

.kg-b2b-pill {
    background: rgba(0, 132, 214, 0.15);
    color: #38BDF8;
    border: 1px solid rgba(0, 163, 255, 0.35);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.3px;
}

.kg-b2b-pill.qualified {
    background: rgba(5, 150, 105, 0.2);
    color: #34D399;
    border-color: #059669;
}

.kg-b2b-meta {
    color: #94A3B8;
    font-size: 11px;
}

.kg-b2b-text {
    color: #34D399;
    font-weight: 700;
    font-size: 11px;
}

.kg-b2b-progress-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.kg-b2b-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0084D6 0%, #00A3FF 100%);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kg-b2b-progress-fill.qualified {
    background: linear-gradient(90deg, #059669 0%, #10B981 100%);
}

.kg-b2b-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #94A3B8;
}

.kg-b2b-footer strong {
    color: #F8FAFC;
}

#kangum-ai-window .kg-b2b-action-link,
#kangum-ai-window button.kg-b2b-action-link,
.kg-b2b-action-link {
    background: transparent !important;
    border: none !important;
    color: #00A3FF !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 0 !important;
    text-decoration: underline !important;
    box-shadow: none !important;
    outline: none !important;
}

#kangum-ai-window .kg-b2b-action-link:hover,
#kangum-ai-window button.kg-b2b-action-link:hover,
.kg-b2b-action-link:hover {
    color: #FFFFFF !important;
    background: transparent !important;
    border: none !important;
}

/* 3. STACK BUILDER */
.kg-stack-card {
    background: #0E172A;
    border: 1px solid rgba(0, 163, 255, 0.3);
    border-radius: 12px;
    padding: 14px;
    margin-top: 6px;
    box-sizing: border-box;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
}

.kg-stack-card.completed {
    opacity: 0.65;
    pointer-events: none;
}

.kg-stack-badge {
    display: inline-block;
    background: #0084D6;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
}

.kg-stack-question {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.kg-stack-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.kg-stack-btn {
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.kg-stack-btn:hover {
    background: #0084D6;
    border-color: #00A3FF;
    color: #FFFFFF;
    transform: translateX(3px);
}

/* 4. LEAD CAPTURE BOX */
.kg-lead-box {
    background: #0A1424;
    border: 1px solid #0084D6;
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
    box-sizing: border-box;
}

.kg-lead-box.completed {
    display: none;
}

.kg-lead-badge {
    display: inline-block;
    background: #059669;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.kg-lead-title {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.kg-lead-desc {
    color: #94A3B8;
    font-size: 12px;
    margin-bottom: 10px;
}

.kg-lead-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kg-lead-input {
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    color: #FFFFFF;
    font-size: 13px;
    box-sizing: border-box;
}

.kg-lead-input:focus {
    outline: none;
    border-color: #0084D6;
    box-shadow: 0 0 8px rgba(0, 132, 214, 0.4);
}

.kg-lead-submit-btn {
    background: linear-gradient(135deg, #0084D6 0%, #00A3FF 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.kg-lead-submit-btn:hover {
    filter: brightness(1.1);
}

/* 5. STACK RESULT CARD */
.kg-stack-result {
    background: #0E172A;
    border: 1px solid #00A3FF;
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
    box-sizing: border-box;
}

.kg-stack-result .kg-stack-title {
    color: #38BDF8;
    font-size: 15px;
    font-weight: 800;
    margin: 4px 0 6px 0;
}

.kg-stack-result .kg-stack-desc {
    color: #CBD5E1;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.kg-stack-items {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #F8FAFC;
}

.kg-stack-items li {
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #0084D6;
}

.kg-stack-items li span {
    color: #34D399;
    font-weight: 700;
}

.kg-btn-combo-add {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kg-btn-combo-add:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* 6. MEDIOS DE PAGO */
.kg-payments-card {
    background: #0A111E;
    border: 1px solid rgba(0, 163, 255, 0.35);
    border-radius: 12px;
    padding: 14px;
    margin-top: 6px;
    box-sizing: border-box;
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
}

.kg-payments-badge {
    display: inline-block;
    background: #0084D6;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.kg-payments-title {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.kg-payment-item {
    background: #111A2E;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 7px;
}

.kg-payment-name {
    color: #38BDF8;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.kg-payment-desc {
    color: #94A3B8;
    font-size: 11px;
    line-height: 1.4;
}

.kg-payment-cta {
    width: 100%;
    padding: 9px;
    background: #059669;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
}

.kg-payment-cta:hover {
    background: #047857;
}

/* 7. CROSS-SELLING */
.kg-cross-sell-box {
    background: #0A1324;
    border: 1px solid rgba(0, 163, 255, 0.4);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    box-sizing: border-box;
}

.kg-cross-sell-badge {
    display: inline-block;
    background: #0288D1;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    margin-bottom: 5px;
}

.kg-cross-sell-title {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.kg-cross-sell-text {
    color: #CBD5E1;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.kg-cross-sell-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #111E36;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #F8FAFC;
}

.kg-cross-sell-btn {
    background: #0084D6;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.kg-cross-sell-btn:hover {
    background: #00A3FF;
}

/* 8. MODO RECLAMO (SOPORTE PRIORITARIO) */
.kg-btn-whatsapp.complaint-mode {
    background: #DC2626 !important;
    border-color: #EF4444 !important;
    animation: kgPulseRed 1.8s infinite !important;
}

.kg-btn-whatsapp.complaint-mode:hover {
    background: #B91C1C !important;
}

@keyframes kgPulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* 9. PROHIBICION TOTAL DE TONALIDADES PURPURA / VIOLETA & OVERRIDES HELLO ELEMENTOR */
#kangum-ai-window button,
#kangum-ai-window [type="button"],
#kangum-ai-window [type="submit"],
#kangum-ai-window [type="reset"],
#kangum-ai-launcher,
#kangum-ai-launcher button,
.kg-pdp-nudge button {
    border-color: transparent;
    color: inherit;
    background-color: transparent;
    outline: none;
}

#kangum-ai-window button:focus,
#kangum-ai-window button:hover,
#kangum-ai-window [type="button"]:focus,
#kangum-ai-window [type="button"]:hover {
    background-color: transparent;
    color: #FFFFFF !important;
    border-color: transparent;
}
#kangum-ai-launcher,
#kangum-ai-launcher:hover,
#kangum-ai-launcher .kg-label,
#kangum-ai-launcher span {
    color: #FFFFFF !important;
}

#kangum-ai-window,
#kangum-ai-window *,
#kangum-ai-launcher,
.kg-pdp-nudge {
    outline-color: var(--kg-blue) !important;
}

/* Enlaces generales del chat (excluyendo el botón verde de WhatsApp) */
#kangum-ai-window a:not(.kg-btn-whatsapp),
#kangum-ai-window a:not(.kg-btn-whatsapp):visited,
#kangum-ai-window a:not(.kg-btn-whatsapp):hover,
#kangum-ai-window a:not(.kg-btn-whatsapp):active {
    color: var(--kg-cyan) !important;
    text-decoration: none !important;
}

#kangum-ai-window .kg-card-title,
#kangum-ai-window .kg-card-title:visited {
    color: var(--kg-text-light) !important;
}

#kangum-ai-window .kg-card-title:hover {
    color: var(--kg-cyan) !important;
}

#kangum-ai-window .kg-explore-link,
#kangum-ai-window .kg-explore-link:visited {
    color: var(--kg-blue) !important;
}

#kangum-ai-window .kg-explore-link:hover {
    color: var(--kg-cyan) !important;
}

#kangum-ai-window .kg-msg a,
#kangum-ai-window .kg-msg a:visited {
    color: var(--kg-cyan) !important;
    text-decoration: underline !important;
}

/* Blindaje absoluto para el botón WhatsApp: texto 100% blanco e icono blanco */
#kangum-ai-window .kg-btn-whatsapp,
#kangum-ai-window a.kg-btn-whatsapp,
#kangum-ai-window .kg-btn-whatsapp:visited,
#kangum-ai-window a.kg-btn-whatsapp:visited,
#kangum-ai-window .kg-btn-whatsapp:hover,
#kangum-ai-window a.kg-btn-whatsapp:hover,
#kangum-ai-window .kg-btn-whatsapp:active,
#kangum-ai-window a.kg-btn-whatsapp:active {
    color: #FFFFFF !important;
    background-color: var(--kg-emerald) !important;
    border: none !important;
    text-decoration: none !important;
}

#kangum-ai-window .kg-btn-whatsapp span,
#kangum-ai-window a.kg-btn-whatsapp span,
#kangum-ai-window #kg-wa-btn-label,
#kangum-ai-window a.kg-btn-whatsapp #kg-wa-btn-label {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

#kangum-ai-window .kg-btn-whatsapp svg,
#kangum-ai-window a.kg-btn-whatsapp svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    fill: none !important;
}

#kangum-ai-window .kg-btn-whatsapp:hover,
#kangum-ai-window a.kg-btn-whatsapp:hover {
    background-color: var(--kg-emerald-hover) !important;
}

/* Blindaje de botones secundarios y de opciones */
#kangum-ai-window .kg-stack-btn {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #F8FAFC !important;
    background: #1E293B !important;
}

#kangum-ai-window .kg-stack-btn:hover {
    background: #0084D6 !important;
    border-color: #00A3FF !important;
    color: #FFFFFF !important;
}