/* Marta Chat Widget Styles - v4.3.1 Professional Design */

/* ============================================
   TIPOGRAFÍA - DM Sans
   ============================================ */

/* Importar DM Sans desde Google Fonts (también cargado en PHP) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* Variable base de tipografía */
:root {
    --marta-font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Forzar emojis a color */
.marta-chat-modal,
.marta-message-bubble {
    font-family: var(--marta-font-family), 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;
}


/* Aplicar tipografía a todo el widget */
.marta-chat-modal,
.marta-chat-modal *,
.marta-chat-btn,
.marta-toast {
    font-family: var(--marta-font-family) !important;
}

/* Pesos de tipografía según contexto */
/* Light (300) - Texto secundario, hints */
.marta-next-step,
.marta-variation-item.disabled .marta-variation-name {
    font-weight: 300 !important;
}

/* Regular (400) - Texto del cuerpo, mensajes */
.marta-message-bubble,
.marta-message-bubble p,
.marta-variation-name,
.marta-chat-input {
    font-weight: 400 !important;
}

/* Medium (500) - Botones, etiquetas, texto destacado */
.marta-chat-mic-btn,
.marta-variations-title,
.marta-qty-input,
.marta-action-btn {
    font-weight: 500 !important;
}

/* Regular (400) - Título header y botón enviar */
.marta-chat-send-btn,
.marta-chat-header-title,
.marta-chat-header-title h3 {
    font-weight: 400 !important;
}

/* Bold (700) - Nombres de productos, precios */
.marta-product-name,
.marta-product-price,
.marta-variation-price {
    font-weight: 700 !important;
}

/* ============================================
   ESTILOS DEL WIDGET
   ============================================ */

/* Backdrop */
.marta-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.1);
}

/* Chat Modal */
.marta-chat-modal {
    position: fixed;
    width: 380px;
    height: 650px;
    bottom: 100px;
    right: 24px;
    background: linear-gradient(135deg, #1197DA, #159BDD);
    border-radius: 32px 32px 16px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 300ms ease-in, transform 300ms ease-in;
}

.marta-chat-modal.show {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.marta-chat-header {
    background: linear-gradient(135deg, #1197DA, #159BDD);
    color: white;
    padding: 12px 12px 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 32px 32px 0 0;
}

.marta-chat-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marta-chat-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.marta-chat-header-title h3 {
    font-size: 17px;
    margin: 0;
    line-height: 1.4;
}

.marta-chat-close-btn {
    margin-right: 8px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.marta-chat-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Messages */
.marta-chat-messages {
    flex: 1;
    background-color: #ffffff;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 32px 32px 0 0;
}

.marta-message {
    display: flex;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.marta-message-user {
    justify-content: flex-end;
}

.marta-message-assistant {
    justify-content: flex-start;
}

.marta-message-bubble {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    word-break: break-word;
    overflow-wrap: break-word;
}

.marta-message-bubble a {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Solo mostrar imágenes dentro de productos */
.marta-product-image img {
    display: block !important;
}

/* Asegurar que los emojis se muestren correctamente */
.marta-message-bubble img.emoji,
.marta-message-bubble img.wp-smiley {
    display: inline !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 .07em !important;
    vertical-align: -0.1em !important;
    border: none !important;
    box-shadow: none !important;
}

.marta-message-user .marta-message-bubble {
    background: #ebebeb;
    color: #000000 !important;
    border: 1px solid #cfcfcf;
    border-radius: 24px 24px 4px 24px;
}

.marta-message-assistant .marta-message-bubble {
    background: #ffffff;
    color: #000000 !important;
    border-radius: 24px 24px 24px 4px;
    border: 1px solid #cfcfcf;
}

/* Párrafos dentro de mensajes */
.marta-message-bubble p {
    margin: 0 0 8px 0;
    line-height: 1.4;
    padding: 0;
}

.marta-message-bubble p:last-child {
    margin-bottom: 0;
}

/* Forzar color negro en todo el contenido del bocadillo */
.marta-message-bubble,
.marta-message-bubble p,
.marta-message-bubble span,
.marta-message-bubble div,
.marta-message-bubble li,
.marta-message-bubble strong,
.marta-message-bubble em,
.marta-message-bubble b {
    color: #000000 !important;
}

/* Excepciones para enlaces */
.marta-message-bubble a {
    color: #0ea5e9 !important;
}

/* OVERRIDE: Botones con fondo deben tener texto blanco */
.marta-checkout-message a,
.marta-special-equipment-message a,
.marta-checkout-btn,
.marta-special-equipment-btn {
    color: #FFF !important;
}

/* Listas dentro de mensajes */
.marta-message-bubble ul {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
}

.marta-message-bubble ul li {
    margin: 8px 0;
    padding-left: 26px;
    position: relative;
    line-height: 1.5;
}

.marta-message-user .marta-message-bubble ul li {
    color: #000000 !important;
}

.marta-message-assistant .marta-message-bubble ul li {
    color: #000000 !important;
}

.marta-message-assistant .marta-message-bubble ul li:before {
    content: "•";
    position: absolute;
    left: 6px;
    top: 0;
    color: #0ea5e9;
    font-size: 14px;
    line-height: 1.6;
    font-weight: bold;
}

.marta-message-user .marta-message-bubble ul li:before {
    content: "•";
    position: absolute;
    left: 6px;
    top: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    font-weight: bold;
}

/* Enlaces dentro de mensajes */
.marta-message-assistant .marta-message-bubble a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.marta-message-assistant .marta-message-bubble a:hover {
    color: #0284c7;
    text-decoration: underline;
}

.marta-message-user .marta-message-bubble a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

/* Negritas dentro de mensajes */
.marta-message-bubble strong {
    font-weight: 700;
}

.marta-message-assistant .marta-message-bubble strong {
    color: #0f172a;
}

.marta-message-loading {
    background: white;
    border: 1px solid #cfcfcf;
    color: #6b7280;
    border-radius: 24px 24px 24px 4px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.marta-loading-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.marta-loading-dot {
    width: 4px;
    height: 4px;
    background: #9ca3af;
    border-radius: 50%;
    animation: marta-bounce 1.4s infinite ease-in-out both;
}

.marta-loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.marta-loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes marta-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced thinking indicator for streaming */
#marta-thinking-text {
    transition: opacity 0.15s ease-in-out;
}

#marta-thinking-text.updating {
    opacity: 0.4;
}

/* Spinner para botones */
.marta-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: marta-spin 0.6s linear infinite;
}

@keyframes marta-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.marta-chat-divider {
    display: none !important;
}

/* Input Container */
.marta-chat-input-container {
    background-color: #ffffff !important;
    padding: 12px 12px 0 12px !important;
}

.marta-chat-input-wrapper {
    display: flex !important;
    gap: 8px !important;
    background: #f3f4f6 !important;
    padding: 8px 6px 8px 14px !important;
    border-radius: 24px !important;
    align-items: center !important;
    min-height: 44px !important;
    transition: all 0.15s ease !important;
}

.marta-chat-input {
    flex: 1 !important;
    line-height: 20px !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    height: 20px !important;
}

.marta-chat-input::placeholder {
    color: #9ca3af !important;
    letter-spacing: 0.3px !important;
    font-weight: 400 !important;
}

.marta-chat-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.marta-chat-send-btn {
    height: 32px !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
    background: #159BDD !important;
    color: white !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-transform: none !important;
    flex-shrink: 0 !important;
}

.marta-chat-send-btn:hover {
    background: #1197DA !important;
}

/* Microphone Button - Same blue theme */
.marta-chat-mic-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #6b7280 !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

.marta-chat-mic-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
}

.marta-chat-mic-btn:hover {
    color: #159BDD !important;
}

.marta-chat-mic-btn.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse-recording 1.5s infinite;
    color: white;
}

@keyframes pulse-recording {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Recording Indicator */
.marta-recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin: 0 20px 10px 20px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.marta-recording-indicator span {
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
}

.marta-recording-pulse {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: recording-pulse 1s infinite;
}

@keyframes recording-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ============================================
   WhatsApp-style Recording UI
   ============================================ */

/* Hide input wrapper during recording */
.marta-chat-input-wrapper.recording-mode {
    display: none !important;
}

/* WhatsApp-style recording container */
.marta-whatsapp-recording {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-radius: 24px;
    margin: 8px 16px;
    animation: slideInUp 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cancel button */
.marta-recording-cancel {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.marta-recording-cancel:hover {
    background: #fecaca;
    transform: scale(1.1);
}

.marta-recording-cancel svg {
    width: 18px;
    height: 18px;
}

/* Waveform visualization */
.marta-recording-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
    flex: 1;
    justify-content: center;
}

.marta-wave-bar {
    width: 4px;
    height: 8px;
    background: linear-gradient(180deg, #ef4444, #dc2626);
    border-radius: 2px;
    transition: height 0.1s ease;
}

/* Timer display */
.marta-recording-timer {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    min-width: 40px;
    text-align: center;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* Recording status indicator */
.marta-recording-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marta-recording-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

/* Send button */
.marta-recording-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #159BDD, #0d7ab8);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(21, 155, 221, 0.4);
}

.marta-recording-send:hover {
    background: linear-gradient(135deg, #1aa5eb, #0d7ab8);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(21, 155, 221, 0.5);
}

.marta-recording-send svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Permission Denied Message
   ============================================ */

.marta-permission-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    margin: 12px;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.marta-permission-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marta-permission-icon svg {
    width: 24px;
    height: 24px;
    color: #d97706;
}

.marta-permission-content {
    flex: 1;
}

.marta-permission-content strong {
    display: block;
    color: #92400e;
    font-size: 14px;
    margin-bottom: 4px;
}

.marta-permission-content p {
    color: #a16207;
    font-size: 13px;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.marta-permission-content small {
    color: #b45309;
    font-size: 11px;
}

.marta-permission-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #92400e;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.marta-permission-close:hover {
    opacity: 1;
}

.marta-chat-send-btn:active {
    transform: translateY(0);
}

.marta-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Floating Button */
.marta-chat-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0090d4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: 9999px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    z-index: 9997;
    transition: all 0.3s;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.marta-chat-floating-btn:hover {
    transform: scale(1.05);
}

.marta-chat-btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marta-chat-btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.marta-chat-btn-text {
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    text-transform: none !important;
}

/* Botón flotante en modo cerrar (X) */
.marta-chat-floating-btn.marta-chat-btn-close {
    background: white;
    border: 2px solid #0090d4;
    padding: 12px;
    width: 50px;
    height: 50px;
    justify-content: center;
}

.marta-chat-floating-btn.marta-chat-btn-close svg {
    color: #0090d4;
    stroke: #0090d4;
}

.marta-chat-floating-btn.marta-chat-btn-close:hover {
    background: #f0f9ff;
}

/* Toast Notifications */
.marta-toast {
    position: fixed;
    bottom: 100px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 300ms ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.marta-toast.show {
    opacity: 1 !important;
}

.marta-toast-success {
    background: #10b981;
    color: white;
}

.marta-toast-error {
    background: #ef4444;
    color: white;
}

/* Product Cards - Diseño compacto estilo referencia */
.marta-product-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    box-sizing: border-box !important;
}

.marta-product-card:hover {
    border-color: #0ea5e9 !important;
}

/* Imagen del producto */
.marta-product-image {
    flex-shrink: 0 !important;
}

.marta-product-image img {
    width: 90px !important;
    height: 90px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

/* Info del producto (nombre + precio) */
.marta-product-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.marta-product-name {
    font-weight: 400 !important;
    font-size: 14px !important;
    color: #1e293b !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.marta-product-price {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #0ea5e9 !important;
    font-style: normal !important;
    /* Reset estilos externos del tema */
    font-feature-settings: normal !important;
    font-variant: normal !important;
    font-variant-ligatures: normal !important;
    font-variant-caps: normal !important;
    font-variant-numeric: normal !important;
    font-variant-east-asian: normal !important;
    -webkit-font-feature-settings: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
}

.marta-product-price.marta-commercial {
    font-size: 13px !important;
    color: #8b5cf6 !important;
}

/* Iconos de acción (debajo del precio) - Fila horizontal */
.marta-product-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: 8px !important;
    align-items: center !important;
}

.marta-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    color: #4b5563 !important;
    padding: 0 !important;
}

.marta-action-btn:hover {
    border-color: #159BDD !important;
    color: #159BDD !important;
    background: transparent !important;
}

.marta-action-btn svg {
    stroke: currentColor !important;
    width: 18px !important;
    height: 18px !important;
}

.marta-action-btn.marta-add-to-cart-btn:hover,
.marta-action-btn.marta-select-variation-btn:hover {
    border-color: #159BDD !important;
    color: #159BDD !important;
}

.marta-action-btn.marta-commercial-contact-btn:hover {
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
}

/* Subcategory Cards - for category browsing */
.marta-subcategories {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.marta-subcategory-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.marta-subcategory-card:hover {
    border-color: #0ea5e9 !important;
    background: #f8fafc !important;
}

.marta-subcategory-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.marta-subcategory-name {
    font-weight: 500 !important;
    font-size: 14px !important;
    color: #1e293b !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.marta-subcategory-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.marta-subcat-link-btn:hover {
    border-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
}

.marta-subcat-select-btn {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border-color: #86efac !important;
    color: #16a34a !important;
}

.marta-subcat-select-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
    border-color: #16a34a !important;
    color: white !important;
}

/* Grupo cantidad + carrito - diseño con divisor vertical */
.marta-cart-group {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.marta-cart-group .marta-action-btn {
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
}

.marta-cart-group .marta-action-btn:hover {
    background: linear-gradient(135deg, #159BDD 0%, #0ea5e9 100%) !important;
    border-color: #159BDD !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.marta-cart-group .marta-qty-input {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    border-radius: 50% !important;
    background: #159BDD !important;
    color: white !important;
    border: 2px solid white !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 16px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    z-index: 1 !important;
}

.marta-cart-group .marta-qty-input:focus {
    outline: none !important;
    background: #0284c7 !important;
}

/* Input de cantidad - mismo tamaño que los botones de acción */
.marta-qty-input {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    background: transparent !important;
    padding: 0 !important;
    -moz-appearance: textfield !important;
    font-style: normal !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    line-height: 30px !important;
    margin: 0 !important;
}

.marta-qty-input::-webkit-outer-spin-button,
.marta-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.marta-qty-input:focus {
    outline: none !important;
    border-color: #159BDD !important;
}

/* Legacy buttons (ocultar si existen) */
.marta-product-buttons {
    display: none !important;
}

/* NextStep - Siguiente paso hint */
.marta-next-step {
    background-color: #f9fafb;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #1f2937;
    font-style: italic;
    font-family: Calibri, 'Segoe UI', Arial, sans-serif !important;
    font-weight: 400;
    margin-top: 8px;
}

/* Nota con emoji - solo aplica si hay múltiples párrafos */
.marta-message-bubble > p:not(:first-child):last-child {
    margin-top: 8px;
}

/* Asegurar que el primer/único párrafo no tenga margin-top */
.marta-message-bubble > p:first-child {
    margin-top: 0 !important;
}

/* Productos no deben heredar italic */
.marta-products,
.marta-products * {
    font-style: normal !important;
}

/* Scrollbar customization */
.marta-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.marta-chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.marta-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.marta-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .marta-chat-modal {
        width: 360px;
        right: 16px;
        bottom: 80px;
        height: 550px;
    }

    .marta-chat-floating-btn {
        right: 16px;
        bottom: 16px;
    }
}

/* Responsive - Móviles */
@media (max-width: 480px) {
    .marta-chat-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        z-index: 999999 !important;
    }

    .marta-chat-header {
        border-radius: 0 !important;
        padding: 12px 16px !important;
    }

    .marta-chat-messages {
        height: calc(100% - 140px) !important;
        padding: 12px !important;
    }

    .marta-chat-input-container {
        padding: 12px !important;
        border-radius: 0 !important;
    }

    .marta-chat-floating-btn {
        right: 16px;
        bottom: 16px;
        padding: 10px 18px;
    }

    .marta-product-card {
        padding: 10px !important;
        flex-direction: column !important;
    }

    .marta-product-image {
        width: 100% !important;
        max-width: 120px !important;
        margin: 0 auto 10px auto !important;
    }

    .marta-product-info {
        text-align: center !important;
    }

    .marta-product-name {
        font-size: 13px !important;
    }

    .marta-product-price {
        font-size: 15px !important;
    }

    .marta-product-actions {
        justify-content: center !important;
    }

    .marta-product-buttons {
        flex-direction: column !important;
    }

    .marta-product-buttons button,
    .marta-product-buttons a {
        width: 100% !important;
        text-align: center !important;
    }

    .marta-message-bubble {
        max-width: 90% !important;
        font-size: 14px !important;
    }

    .marta-chat-input {
        font-size: 16px !important; /* Evita zoom en iOS */
    }

    .marta-variation-item {
        padding: 10px !important;
    }

    .marta-variation-name {
        font-size: 12px !important;
    }

    .marta-variation-price {
        font-size: 14px !important;
    }

    .marta-cart-group {
        flex-wrap: nowrap !important;
    }

    .marta-qty-input {
        width: 40px !important;
        min-width: 40px !important;
    }
}

/* Responsive - Móviles pequeños */
@media (max-width: 360px) {
    .marta-chat-header-title h3 {
        font-size: 14px !important;
    }

    .marta-product-card {
        padding: 8px !important;
    }

    .marta-product-image {
        max-width: 100px !important;
    }

    .marta-message-bubble {
        max-width: 95% !important;
        padding: 8px 12px !important;
    }
}

/* Modal de Incidencias */
.incidencia-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}

.incidencia-modal-overlay.show {
    opacity: 1;
}

.incidencia-modal-container {
    background: white;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.incidencia-modal-title {
    margin: 0 0 20px 0;
    color: #0ea5e9;
    font-size: 20px;
    font-weight: 700;
}

.incidencia-modal-summary {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
}

.incidencia-modal-summary div {
    margin-bottom: 6px;
}

.incidencia-modal-summary div:last-child {
    margin-bottom: 0;
}

.incidencia-modal-summary strong {
    color: #0f172a;
    font-weight: 700;
}

.incidencia-checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.6;
}

.incidencia-checkbox {
    margin-right: 10px;
    margin-top: 3px;
    cursor: pointer;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.incidencia-checkbox-text {
    color: #475569;
}

.incidencia-checkbox-text a {
    color: #0ea5e9;
    font-weight: 600;
}

.incidencia-checkbox-text a:hover {
    color: #0284c7;
}

.incidencia-recaptcha {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
}

.incidencia-modal-buttons {
    display: flex;
    gap: 12px;
}

.incidencia-btn-submit {
    flex: 1;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.incidencia-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.incidencia-btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.incidencia-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.incidencia-btn-cancel:hover {
    background: #e2e8f0;
}

/* Variaciones de productos - Contenedor compacto */
.marta-variations-container {
    width: 100% !important;
    margin-top: 8px !important;
    box-sizing: border-box !important;
}

.marta-variations-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #374151 !important;
}

.marta-variation-item {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
}

.marta-variation-item:hover {
    background: white !important;
    border-color: #0ea5e9 !important;
}

.marta-variation-item.disabled {
    background: #f3f4f6 !important;
    opacity: 0.7 !important;
}

.marta-variation-item.disabled .marta-variation-name,
.marta-variation-item.disabled .marta-variation-price {
    color: #9ca3af !important;
}

.marta-variation-info {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Input de cantidad y botón dentro de variaciones - alineados */
.marta-variation-item .marta-qty-input,
.marta-variation-item .marta-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
}

.marta-variation-name {
    font-size: 11px !important;
    color: #374151 !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
}

.marta-variation-price {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #159BDD !important;
    margin-top: 2px !important;
}

.marta-variation-item button {
    flex-shrink: 0 !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.marta-variation-item .marta-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
}

/* Estado loading para botones */
.marta-action-btn.loading {
    opacity: 0.5 !important;
    cursor: wait !important;
}

.marta-action-btn.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Fallback para estilos inline antiguos */
.marta-product-card .marta-product-buttons > div {
    width: 100% !important;
    box-sizing: border-box !important;
}

.marta-product-card .marta-product-buttons > div > div:first-child {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #374151 !important;
}

.marta-product-card .marta-product-buttons > div > div:not(:first-child) {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 6px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
}

.marta-product-card .marta-product-buttons > div > div:not(:first-child):hover {
    background: white !important;
    border-color: #0ea5e9 !important;
}

.marta-product-card .marta-product-buttons > div > div button {
    flex-shrink: 0 !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

/* ============================================
   NUEVO DISEÑO: Grupo carrito con divisor vertical (Captura.PNG)
   ============================================ */
.marta-cart-group {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #f5f5f5 !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    gap: 0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    position: static !important;
}

.marta-cart-group .marta-qty-input {
    position: static !important;
    width: 32px !important;
    height: 28px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    border: none !important;
    border-right: 1px solid #d0d0d0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4a4a4a !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 0 !important;
    padding-right: 12px !important;
    margin-right: 12px !important;
    text-align: center !important;
    line-height: 28px !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
}

.marta-cart-group .marta-qty-input::-webkit-outer-spin-button,
.marta-cart-group .marta-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.marta-cart-group .marta-qty-input:focus {
    outline: none !important;
    background: transparent !important;
}

.marta-cart-group .marta-action-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4a4a4a !important;
    padding: 0 !important;
    margin-left: 0 !important;
    transition: color 0.2s ease !important;
}

.marta-cart-group .marta-action-btn:hover {
    background: transparent !important;
    border: none !important;
    color: #159BDD !important;
    transform: none !important;
}

.marta-cart-group .marta-action-btn svg {
    width: 22px !important;
    height: 22px !important;
}

/* Precio sin negrita */
.marta-product-price {
    font-weight: 400 !important;
}

/* Igualar tamaño y estilo del grupo carrito al botón de redirigir */
.marta-cart-group {
    background-color: transparent !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    justify-content: center !important;
}

.marta-cart-group .marta-qty-input {
    display: none !important;
}

.marta-cart-group .marta-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #4b5563 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.marta-cart-group .marta-action-btn:hover {
    border-color: #4b5563 !important;
    color: #4b5563 !important;
    background: transparent !important;
}

.marta-cart-group .marta-action-btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* CORREGIDO: Restaurar diseño con cantidad + divisor + carrito */
.marta-cart-group {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #f5f5f5 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    gap: 0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: auto !important;
}

.marta-cart-group .marta-qty-input {
    display: block !important;
    position: static !important;
    width: 32px !important;
    height: 28px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    border: none !important;
    border-right: 1px solid #d0d0d0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4b5563 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 0 !important;
    padding-right: 12px !important;
    margin-right: 12px !important;
    text-align: center !important;
    line-height: 28px !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
}

.marta-cart-group .marta-action-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4b5563 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.marta-cart-group .marta-action-btn:hover {
    background: transparent !important;
    border: none !important;
    color: #374151 !important;
}

.marta-cart-group .marta-action-btn svg {
    width: 20px !important;
    height: 20px !important;
}

/* FINAL: Mismo estilo que botón redirigir (borde gris, fondo transparente) */
.marta-cart-group {
    display: inline-flex !important;
    align-items: center !important;
    background-color: transparent !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 0 8px !important;
    gap: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
}

.marta-cart-group:hover {
    border-color: #4b5563 !important;
}

.marta-cart-group .marta-qty-input {
    display: block !important;
    position: static !important;
    width: 24px !important;
    height: 20px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    border: none !important;
    border-right: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4b5563 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 0 !important;
    padding-right: 8px !important;
    margin-right: 8px !important;
    text-align: center !important;
    line-height: 20px !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
}

.marta-cart-group .marta-action-btn {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #4b5563 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.marta-cart-group .marta-action-btn:hover {
    background: transparent !important;
    border: none !important;
    color: #4b5563 !important;
}

.marta-cart-group .marta-action-btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* ============================================
   TIPOGRAFÍA CALIBRI - Todos los pesos
   ============================================ */

/* Variable base de tipografía - Calibri */
:root {
    --marta-font-family: Calibri, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Aplicar Calibri a todo el widget */
.marta-chat-modal,
.marta-chat-modal *,
.marta-chat-btn,
.marta-chat-floating-btn,
.marta-toast,
.marta-message-bubble,
.marta-message-bubble p,
.marta-message-bubble span,
.marta-message-bubble div,
.marta-message-bubble li,
.marta-message-bubble strong,
.marta-message-bubble em,
.marta-message-bubble a,
.marta-product-card,
.marta-product-name,
.marta-product-price,
.marta-chat-input,
.marta-chat-send-btn,
.marta-chat-header-title,
.marta-chat-header-title h3,
.marta-next-step,
.marta-variation-name,
.marta-variation-price,
.marta-qty-input,
.marta-action-btn {
    font-family: Calibri, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Regular (400) - Texto del cuerpo, mensajes */
.marta-message-bubble,
.marta-message-bubble p,
.marta-chat-input,
.marta-chat-send-btn,
.marta-chat-header-title,
.marta-chat-header-title h3,
.marta-product-name,
.marta-product-price {
    font-weight: 400 !important;
    font-style: normal !important;
}

/* Bold (700) - Títulos, negritas */
.marta-message-bubble strong,
.marta-message-bubble b {
    font-weight: 700 !important;
    font-style: normal !important;
}

/* Italic - Texto en cursiva */
.marta-message-bubble em,
.marta-message-bubble i {
    font-weight: 400 !important;
    font-style: italic !important;
}

/* Light (300) - Texto secundario, hints */
.marta-next-step {
    font-weight: 300 !important;
    font-style: italic !important;
}

/* Medium (500) - Botones, inputs */
.marta-qty-input,
.marta-variation-name {
    font-weight: 500 !important;
    font-style: normal !important;
}

/* Asegurar que los emojis se muestren correctamente */
.marta-message-bubble,
.marta-next-step,
.marta-product-name {
    font-variant-emoji: emoji !important;
}

/* Emojis inline */
.marta-message-bubble img.emoji,
.marta-message-bubble img.wp-smiley {
    display: inline !important;
    height: 1.1em !important;
    width: 1.1em !important;
    margin: 0 0.1em !important;
    vertical-align: -0.15em !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* ============================================
   RESTAURAR TIPOGRAFÍA AVENIR NEXT LT PRO
   ============================================ */

:root {
    --marta-font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.marta-chat-modal,
.marta-chat-modal *,
.marta-chat-btn,
.marta-chat-floating-btn,
.marta-toast,
.marta-message-bubble,
.marta-message-bubble p,
.marta-message-bubble span,
.marta-message-bubble div,
.marta-message-bubble li,
.marta-message-bubble strong,
.marta-message-bubble em,
.marta-message-bubble a,
.marta-product-card,
.marta-product-name,
.marta-product-price,
.marta-chat-input,
.marta-chat-send-btn,
.marta-chat-header-title,
.marta-chat-header-title h3,
.marta-next-step,
.marta-variation-name,
.marta-variation-price,
.marta-qty-input,
.marta-action-btn {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.marta-message-bubble,
.marta-message-bubble p,
.marta-chat-input,
.marta-variation-name {
    font-weight: 400 !important;
}

.marta-chat-send-btn,
.marta-chat-header-title,
.marta-chat-header-title h3 {
    font-weight: 400 !important;
}

.marta-product-name {
    font-weight: 400 !important;
}

.marta-product-price,
.marta-variation-price {
    font-weight: 400 !important;
}

.marta-chat-mic-btn,
.marta-variations-title,
.marta-qty-input,
.marta-action-btn {
    font-weight: 500 !important;
}

.marta-next-step {
    font-weight: 300 !important;
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ============================================
   CORREGIR: Precios y texto italic
   ============================================ */

/* Precios - sin emoji, tipografía normal */
.marta-product-price,
.marta-variation-price {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-variant-emoji: emoji !important;
    unicode-bidi: normal !important;
}

/* Italic con más spacing para mejor legibilidad */
.marta-message-bubble em,
.marta-message-bubble i,
.marta-next-step {
    font-style: italic !important;
    letter-spacing: 0.3px !important;
    word-spacing: 1px !important;
}

/* Asegurar que los números en precios se vean bien */
.marta-product-price::before,
.marta-variation-price::before {
    content: none !important;
}

/* ============================================
   CORREGIR: Unidades carrito y tipografía italic
   ============================================ */

/* Input de cantidad - sin emojis, tipografía normal */
.marta-qty-input,
.marta-cart-group .marta-qty-input {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 500 !important;
    font-style: normal !important;
    font-variant-emoji: emoji !important;
    -webkit-text-stroke: 0 !important;
}

/* Italic - usar tipografía del sistema para mejor renderizado */
.marta-message-bubble em,
.marta-message-bubble i,
.marta-next-step,
.marta-variation-item.disabled .marta-variation-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-style: italic !important;
    letter-spacing: 0.2px !important;
}

/* ============================================
   CORREGIR: Input cantidad 2 dígitos + Italic Arial
   ============================================ */

/* Input de cantidad - espacio para 2 dígitos (ej: 20) */
.marta-qty-input,
.marta-cart-group .marta-qty-input {
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 500 !important;
    font-style: normal !important;
    font-variant-emoji: emoji !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    font-size: 13px !important;
    padding-right: 8px !important;
    margin-right: 8px !important;
}

/* Italic - Arial para correcto renderizado */
.marta-message-bubble em,
.marta-message-bubble i,
.marta-next-step,
.marta-variation-item.disabled .marta-variation-name {
    font-family: Arial, Helvetica, sans-serif !important;
    font-style: italic !important;
    letter-spacing: 0.2px !important;
}

/* ============================================
   FIX GLOBAL: Números sin emojis + Italic correcto
   ============================================ */

/* Forzar que TODOS los números se muestren como texto, no emojis */
.marta-chat-modal,
.marta-chat-modal *,
.marta-message-bubble,
.marta-message-bubble *,
.marta-product-card,
.marta-product-card *,
.marta-product-name,
.marta-product-price,
.marta-variation-price,
.marta-qty-input,
.marta-cart-group .marta-qty-input {
    font-variant-emoji: emoji !important;
    font-variant-numeric: lining-nums !important;
    text-rendering: optimizeLegibility !important;
}

/* Input cantidad - misma tipografía general (Avenir) */
.marta-qty-input,
.marta-cart-group .marta-qty-input {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 500 !important;
    font-style: normal !important;
    font-size: 13px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
}

/* Italic - Solo Arial puro sin fallbacks que causen problemas */
.marta-message-bubble em,
.marta-message-bubble i,
.marta-next-step {
    font-family: Arial !important;
    font-style: italic !important;
    font-weight: 400 !important;
    letter-spacing: 0.3px !important;
    line-height: 1.5 !important;
}

/* Nombres de productos - sin emojis en números */
.marta-product-name {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-variant-emoji: emoji !important;
}

/* Precios - sin emojis */
.marta-product-price,
.marta-variation-price {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-variant-emoji: emoji !important;
}

/* ============================================
   AUMENTAR TAMAÑO DE FUENTES
   ============================================ */

/* Mensajes del chat */
.marta-message-bubble,
.marta-message-bubble p {
    font-size: 15px !important;
    line-height: 1.5 !important;
}

/* Nombre de productos */
.marta-product-name {
    font-size: 15px !important;
}

/* Precios */
.marta-product-price,
.marta-variation-price {
    font-size: 17px !important;
}

/* Input del chat */
.marta-chat-input {
    font-size: 15px !important;
}

/* Botón enviar */
.marta-chat-send-btn {
    font-size: 15px !important;
}

/* Next step / hints */
.marta-next-step {
    font-size: 14px !important;
}

/* Variaciones */
.marta-variation-name {
    font-size: 12px !important;
}

/* Input cantidad */
.marta-qty-input,
.marta-cart-group .marta-qty-input {
    font-size: 14px !important;
}

/* Header título */
.marta-chat-header-title h3 {
    font-size: 18px !important;
}

/* Listas dentro de mensajes */
.marta-message-bubble ul li {
    font-size: 15px !important;
}

/* Italic */
.marta-message-bubble em,
.marta-message-bubble i {
    font-size: 15px !important;
}

/* ============================================
   NOMBRES DE PRODUCTOS - Un poco más bold
   ============================================ */

/* Nombre de productos - semi-bold (500) */
.marta-product-name {
    font-weight: 500 !important;
}

/* Nombres de variaciones - semi-bold (500) */
.marta-variation-name {
    font-weight: 500 !important;
}

/* ============================================
   ICONOS: Gris por defecto, Azul en hover
   ============================================ */

/* Todos los botones de acción - gris por defecto */
.marta-action-btn,
.marta-action-btn.marta-view-btn,
.marta-action-btn.marta-add-to-cart-btn,
.marta-action-btn.marta-select-variation-btn,
.marta-action-btn.marta-commercial-contact-btn,
.marta-cart-group .marta-action-btn {
    color: #4b5563 !important;
    border-color: #e5e7eb !important;
    background: transparent !important;
}

.marta-action-btn svg,
.marta-cart-group .marta-action-btn svg {
    stroke: #4b5563 !important;
}

/* Todos los botones - azul en hover */
.marta-action-btn:hover,
.marta-action-btn.marta-view-btn:hover,
.marta-action-btn.marta-add-to-cart-btn:hover,
.marta-action-btn.marta-select-variation-btn:hover,
.marta-action-btn.marta-commercial-contact-btn:hover,
.marta-cart-group .marta-action-btn:hover {
    color: #159BDD !important;
    border-color: #159BDD !important;
    background: transparent !important;
}

.marta-action-btn:hover svg,
.marta-cart-group .marta-action-btn:hover svg {
    stroke: #159BDD !important;
}

/* Grupo carrito - borde azul en hover */
.marta-cart-group:hover {
    border-color: #159BDD !important;
}

.marta-cart-group:hover .marta-qty-input {
    border-right-color: #159BDD !important;
}

/* ============================================
   HEADER: Nombre más bold + indicador online
   ============================================ */

/* Nombre de Marta más bold */
.marta-chat-header-title h3 {
    font-weight: 600 !important;
}

/* Contenedor del icono con indicador online */
.marta-chat-header-icon {
    position: relative !important;
}

/* Círculo verde de "online" */
.marta-chat-header-icon::after {
    content: '' !important;
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    width: 12px !important;
    height: 12px !important;
    background-color: #00DF02 !important;
    border-radius: 50% !important;
    border: 2px solid #159BDD !important;
    box-shadow: 0 0 4px rgba(0, 223, 2, 0.5) !important;
}

/* ============================================
   FIX: Círculo online sin pixelado + Tipografía Open Sans
   ============================================ */

/* Círculo verde online - alta calidad sin pixelado */
.marta-chat-header-icon::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 10px !important;
    height: 10px !important;
    background-color: #00DF02 !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
    transform: translateZ(0) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    backface-visibility: hidden !important;
}

/* Tipografía Open Sans para título del header */
.marta-chat-header-title,
.marta-chat-header-title h3 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400 !important;
}

/* Tipografía Open Sans para el botón flotante (Pop Up) */
.marta-chat-floating-btn,
.marta-chat-btn-text {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400 !important;
}

/* Título y popup - un poco más bold (500) */
.marta-chat-header-title,
.marta-chat-header-title h3,
.marta-chat-floating-btn,
.marta-chat-btn-text {
    font-weight: 500 !important;
}

/* ============================================
   ELIMINAR: Círculo verde de online
   ============================================ */
.marta-chat-header-icon::after {
    display: none !important;
    content: none !important;
}

/* ============================================
   MEJORA DE CALIDAD VISUAL - Anti-aliasing
   ============================================ */

/* Suavizado de fuentes para todo el widget */
#marta-chat-widget,
.marta-chat-modal,
.marta-chat-floating-btn {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* SVG icons con mejor renderizado */
.marta-action-btn svg,
.marta-chat-close-btn svg,
.marta-chat-mic-btn svg {
    shape-rendering: geometricPrecision !important;
}

/* Scrollbar mejorado */
.marta-chat-messages::-webkit-scrollbar {
    width: 6px !important;
}

.marta-chat-messages::-webkit-scrollbar-track {
    background: transparent !important;
}

.marta-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 3px !important;
}

/* ============================================
   PROTECCIÓN: Números como texto (no emojis)
   ============================================ */
#marta-chat-widget,
#marta-chat-widget *,
.marta-chat-modal,
.marta-chat-modal *,
.marta-chat-floating-btn,
.marta-chat-floating-btn *,
.marta-product-price,
.marta-variation-price,
.marta-qty-input,
.marta-product-name {
    font-variant-emoji: emoji !important;
}

/* ============================================
   FOOTER: Disclaimer y Powered by
   ============================================ */
.marta-chat-footer {
    text-align: center !important;
    padding: 9px 16px 9px !important;
    background: #ffffff !important;
}

.marta-disclaimer {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

.marta-powered-by {
    margin: 0 !important;
    font-size: 11px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
}

.marta-powered-by strong {
    font-weight: 600 !important;
    color: #6b7280 !important;
}

/* ============================================
   TIPOGRAFÍA: Tamaños específicos
   ============================================ */

/* Bocadillos de respuesta y recomendaciones - 14px */
.marta-message-bubble,
.marta-message-bubble p,
.marta-product-name,
.marta-product-price,
.marta-variation-name,
.marta-variation-price {
    font-size: 14px !important;
}

/* Título del header - 18px */
.marta-chat-header-title h3 {
    font-size: 18px !important;
}

/* Popup "Preguntar a Marta" - 14px y más bold */
.marta-chat-btn-text {
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Header más compacto */
.marta-chat-header {
    padding: 8px 12px 8px 16px !important;
}

.marta-chat-header-icon {
    width: 32px !important;
    height: 32px !important;
}

.marta-chat-header-title h3 {
    font-size: 16px !important;
}

/* ============================================
   TOAST: Notificaciones dentro del chat
   ============================================ */
.marta-toast {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #6b7280 !important;
    background: transparent !important;
    padding: 8px 16px !important;
    margin: 4px 0 !important;
    text-align: center !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.7), 0 0 12px rgba(255, 255, 255, 0.5) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.marta-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Links dentro del toast */
.marta-toast a {
    color: #159BDD !important;
    text-decoration: underline !important;
}

/* ============================================
   TOAST: Override - Solo texto con sombra
   ============================================ */
.marta-toast,
.marta-toast.marta-toast-success,
.marta-toast.marta-toast-error {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #6b7280 !important;
    background: none !important;
    background-color: transparent !important;
    padding: 8px 16px !important;
    margin: 4px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
    text-shadow: 0 0 6px #fff, 0 0 10px #fff, 0 0 14px #fff !important;
    z-index: auto !important;
}

/* Toast: Solo fade in/out, sin movimiento */
.marta-toast {
    transform: none !important;
    transition: opacity 0.3s ease !important;
}

.marta-toast.show {
    transform: none !important;
}

/* ============================================
   CARRITO: Animación de carga (girando)
   ============================================ */
@keyframes marta-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.marta-cart-spinning {
    animation: marta-spin 1s linear infinite;
}

/* ============================================
   TICK: Añadido correctamente
   ============================================ */
.marta-added-tick {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    padding: 4px !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10 !important;
}

.marta-added-tick.show {
    opacity: 1;
}

.marta-added-tick svg {
    display: block;
}

/* ============================================
   LOADING: Override para quitar spinner naranja
   ============================================ */
.marta-action-btn.loading,
.marta-action-btn.loading:before,
.marta-action-btn.loading:after,
.marta-select-variation-btn.loading,
.marta-add-to-cart-btn.loading {
    background-image: none !important;
    background: transparent !important;
}

.marta-action-btn.loading svg {
    stroke: #159BDD !important;
    animation: marta-spin 1s linear infinite !important;
}

/* Ocultar cualquier pseudo-elemento de loading */
.marta-action-btn.loading::before,
.marta-action-btn.loading::after {
    display: none !important;
    content: none !important;
}

/* WooCommerce loader override */
.blockUI,
.woocommerce .loader,
.woocommerce .blockOverlay,
.marta-chat-modal .loader,
.marta-chat-modal .blockUI {
    display: none !important;
}

/* ============================================
   CURSOR: Quitar cursor naranja de loading
   ============================================ */
.marta-action-btn.loading,
.marta-select-variation-btn.loading,
.marta-add-to-cart-btn.loading,
.marta-chat-modal .loading,
.marta-chat-modal *[class*="loading"] {
    cursor: pointer !important;
}

/* Override global de cursor wait */
.marta-chat-modal,
.marta-chat-modal * {
    cursor: inherit !important;
}

.marta-chat-modal button,
.marta-chat-modal a,
.marta-chat-modal input,
.marta-chat-modal .marta-action-btn {
    cursor: pointer !important;
}

.marta-chat-modal input[type="text"],
.marta-chat-modal input[type="number"],
.marta-chat-modal .marta-chat-input,
.marta-chat-modal .marta-qty-input {
    cursor: text !important;
}

/* ============================================
   VARIACIONES: Header con botón cerrar
   ============================================ */
.marta-variations-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

.marta-variations-header .marta-variations-title {
    font-weight: 500 !important;
    font-size: 14px !important;
    color: #374151 !important;
}

.marta-variations-close {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: color 0.2s ease !important;
}

.marta-variations-close:hover {
    color: #159BDD !important;
}

.marta-variations-close svg {
    display: block !important;
}

/* ============================================
   SCROLL NATURAL (sin animaciones)
   ============================================ */
.marta-chat-messages {
    scroll-behavior: auto !important;
}
/* ============================================
   TEXTAREA EXPANDIBLE
   ============================================ */
#marta-chat-widget .marta-chat-input-wrapper.expanded {
    align-items: flex-end !important;
    padding-bottom: 6px !important;
}

#marta-chat-widget .marta-chat-input-wrapper #marta-chat-input {
    min-height: 20px;
    max-height: 100px;
    resize: none !important;
}

/* ============================================
   SCROLLBAR MODERNO PARA TEXTAREA
   ============================================ */
#marta-chat-widget #marta-chat-input {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0,0,0,0.2) transparent !important;
}

#marta-chat-widget #marta-chat-input::-webkit-scrollbar {
    width: 6px !important;
}

#marta-chat-widget #marta-chat-input::-webkit-scrollbar-track {
    background: transparent !important;
}

#marta-chat-widget #marta-chat-input::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2) !important;
    border-radius: 3px !important;
}

#marta-chat-widget #marta-chat-input::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3) !important;
}

/* Ocultar las flechas del scrollbar */
#marta-chat-widget #marta-chat-input::-webkit-scrollbar-button {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
}

/* ============================================
   BOTÓN NUEVA CONVERSACIÓN
   ============================================ */
.marta-chat-new-btn {
    margin-left: auto !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
    margin-right: 2px !important;
}

.marta-chat-new-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.marta-chat-new-btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* ============================================
   SPECIAL EQUIPMENT MESSAGE (PRO-310)
   ============================================ */
.marta-special-equipment-message {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.marta-special-equipment-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

.marta-special-equipment-cta {
    display: flex !important;
    justify-content: center !important;
    margin-top: 8px !important;
}

.marta-special-equipment-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, #159BDD 0%, #1178B0 100%) !important;
    color: #FFF !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(21, 155, 221, 0.3) !important;
    border: none !important;
}

.marta-special-equipment-btn:hover {
    background: linear-gradient(135deg, #1178B0 0%, #0D5F8A 100%) !important;
    color: #FFF !important;
    box-shadow: 0 6px 20px rgba(21, 155, 221, 0.4) !important;
    transform: translateY(-2px) !important;
}

.marta-special-equipment-btn:active {
    background: linear-gradient(135deg, #0D5F8A 0%, #0A4D6E 100%) !important;
    color: #FFF !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(21, 155, 221, 0.3) !important;
}

.marta-special-equipment-btn svg {
    flex-shrink: 0 !important;
}

/* ========================================
   CHECKOUT MESSAGE STYLES
   ======================================== */

.marta-checkout-message {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.marta-checkout-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

.marta-checkout-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    margin-top: 8px !important;
    flex-wrap: wrap !important;
}

.marta-checkout-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 20px !important;
    color: #FFF !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    flex: 1 !important;
    min-width: 140px !important;
}

/* Cart button (secondary) */
.marta-cart-btn {
    background: linear-gradient(135deg, #6C757D 0%, #5A6268 100%) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3) !important;
}

.marta-cart-btn:hover {
    background: linear-gradient(135deg, #5A6268 0%, #4E555B 100%) !important;
    color: #FFF !important;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4) !important;
    transform: translateY(-2px) !important;
}

.marta-cart-btn:active {
    background: linear-gradient(135deg, #4E555B 0%, #3E4347 100%) !important;
    color: #FFF !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3) !important;
}

/* Checkout button (primary) */
.marta-checkout-btn-primary {
    background: linear-gradient(135deg, #28A745 0%, #218838 100%) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.marta-checkout-btn-primary:hover {
    background: linear-gradient(135deg, #218838 0%, #1E7E34 100%) !important;
    color: #FFF !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
    transform: translateY(-2px) !important;
}

.marta-checkout-btn-primary:active {
    background: linear-gradient(135deg, #1E7E34 0%, #1C7430 100%) !important;
    color: #FFF !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
}

.marta-checkout-btn svg {
    flex-shrink: 0 !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .marta-checkout-actions {
        flex-direction: column !important;
    }

    .marta-checkout-btn {
        width: 100% !important;
        min-width: auto !important;
    }
}
