.megachatbot-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color3, #000000);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color3, #000000);
}
button#megachatbot-open-btn {
    padding: 6px 12px !important;
}
.megachatbot-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(103, 0, 172, 0.4);
}

.megachatbot-trigger-btn:active {
    transform: translateY(0);
}

.megachatbot-trigger-btn svg {
    width: 20px;
    height: 20px;
}

.megachatbot-fab {
    position: fixed;
    bottom: 110px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--color3, #000000);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(103, 0, 172, 0.4);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.megachatbot-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(103, 0, 172, 0.5);
}

.megachatbot-fab:active {
    transform: scale(0.95);
}

.megachatbot-fab-icon,
.megachatbot-fab-close {
    position: absolute;
    color: white;
    transition: all 0.3s ease;
}

.megachatbot-fab-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.megachatbot-fab-close {
    opacity: 0;
    transform: rotate(90deg);
}

.megachatbot-fab.megachatbot-open .megachatbot-fab-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.megachatbot-fab.megachatbot-open .megachatbot-fab-close {
    opacity: 1;
    transform: rotate(0deg);
}

#megachatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    z-index: 9999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#megachatbot-widget.megachatbot-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.megachatbot-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
    max-height: calc(100vh - 100px);
}


.megachatbot-header {
    background: var(--color3, #000000);
    padding: 16px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.megachatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.megachatbot-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.megachatbot-header-text h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.megachatbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.megachatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.megachatbot-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

.megachatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}


.megachatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f7f9fb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.megachatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.megachatbot-messages::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.megachatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}


.megachatbot-message {
    max-width: 85%;
    animation: fadeInMessage 0.3s ease-out;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.megachatbot-message-content {
    padding: 12px 16px;
    border-radius: 14px;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
}

.megachatbot-message--user {
    align-self: flex-end;
}

.megachatbot-message--user .megachatbot-message-content {
    background: var(--color3, #000000);
    color: white;
    border-bottom-right-radius: 4px;
}

.megachatbot-message--bot {
    align-self: flex-start;
}

.megachatbot-message--bot .megachatbot-message-content {
    background: #e8e8e8;
    color: #333;
    border-bottom-left-radius: 4px;
}


.megachatbot-typing {
    padding: 12px 16px;
    background: #e8e8e8;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    display: none;
    gap: 4px;
}

.megachatbot-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

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

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

.megachatbot-typing span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.megachatbot-product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    margin-top: 8px;
    cursor: pointer;
}

.megachatbot-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--color3, #3b82f6);
}

.megachatbot-product-card__image-wrapper {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.megachatbot-product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.megachatbot-product-card__image-placeholder {
    font-size: 2.5rem;
    opacity: 0.5;
}

.megachatbot-product-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.megachatbot-product-card__name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.megachatbot-product-card__desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 2px;
}

.megachatbot-product-card__cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color3, #3b82f6);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.megachatbot-product-card:hover .megachatbot-product-card__cta {
    color: var(--color3, #2563eb);
}


.megachatbot-input-area {
    display: flex;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    gap: 10px;
    align-items: center;
}

.megachatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #f9f9f9;
    font-family: inherit;
}

.megachatbot-input:focus {
    border-color: #6700ac;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(103, 0, 172, 0.1);
}

.megachatbot-send-btn {
    width: 44px;
    height: 44px;
    background: var(--color3, #000000);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(103, 0, 172, 0.3);
}

.megachatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(103, 0, 172, 0.4);
}

.megachatbot-send-btn:active {
    transform: scale(0.95);
}

.megachatbot-footer {
    background: #fafafa;
    padding: 10px;
    text-align: center;
    font-size: 11px;
    color: #888;
    border-top: 1px solid #eee;
}
.megachatbot-message.megachatbot-message--bot a {
    color: var(--color3, #000000);
}
/* ===== BANNER EN FICHA DE PRODUCTO (estilo PC Componentes) ===== */
.container_reset {
	display: flex;
	gap: 8px;
	align-items: center;
}
.chatbotBannerContentWrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 1px solid #d0e0ff;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.chatbotBannerContentWrapper:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--color3, #6700ac);
}

.bannerText {
    font-size: 15px;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 500;
    flex: 1;
}

.chatbotLink {
    color: var(--color3, #6700ac);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.chatbotLink:hover {
    border-bottom-color: var(--color3, #6700ac);
}

.chatbotButton {
    background: var(--color3, #6700ac);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(103, 0, 172, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbotButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(103, 0, 172, 0.4);
    background: var(--color3-hover, #5500a0);
}

.chatbotButton:active {
    transform: translateY(0);
}

.styledChild {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hideOnDesktop {
    display: none;
}

.hideOnMobile {
    display: flex;
}

.megachatbot-reset-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 8px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 12px;
    font-weight: 500;
    width: 36px;
    height: 36px;

.megachatbot-reset-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.megachatbot-reset-btn svg {
    width: 16px;
    height: 16px;
} 

.megachatbot-waiting-msg .megachatbot-message-content {
    opacity: 0.7;
    font-style: italic;
    font-size: 0.85em;
}

.megachatbot-waiting-msg .megachatbot-message-content em::after {
    content: '';
    animation: waitingDots 1.4s infinite;
}

@keyframes waitingDots {
    0%   { content: '';   }
    25%  { content: '.';  }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: '';   }
}
@media (max-width: 768px) {
    .megachatbot-fab {
        bottom: 105px;
        right: 15px;
        width: 56px;
        height: 56px;
    }

    #megachatbot-widget {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .megachatbot-container {
        border-radius: 16px 16px 0 0;
        height: 100vh;
        max-height: 100vh;
    }

    .megachatbot-trigger-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    /* Tarjetas de producto en móvil */
    .megachatbot-product-card {
        gap: 10px;
        padding: 10px;
    }

    .megachatbot-product-card__image-wrapper {
        width: 70px;
        height: 70px;
    }

    .megachatbot-product-card__name {
        font-size: 0.88rem;
    }

    .megachatbot-product-card__desc {
        font-size: 0.72rem;
    }

    .megachatbot-product-card__cta {
        font-size: 0.75rem;
    }

    /* Banner responsive */
    .chatbotBannerContentWrapper {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }

    .hideOnDesktop {
        display: inline;
    }

    .hideOnMobile {
        display: none;
    }

    .bannerText {
        font-size: 14px;
    }
}
