/**
 * U-Bot Chat Styles
 * Modern, responsive chat widget inspired by Maia design
 */

/* ========================================
   CSS CUSTOM PROPERTIES (Customizable)
   ======================================== */
:root {
    --ubot-primary-color: #1e3a5f;
    --ubot-secondary-color: #3b82f6;
    --ubot-button-color: #1e3a5f;
    --ubot-text-color: #ffffff;
    --ubot-bg-color: #ffffff;
    --ubot-user-message-bg: #1e3a5f;
    --ubot-user-message-text: #ffffff;
    --ubot-message-agent-bg: #f9fafb;
    --ubot-border-radius: 20px;
    --ubot-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --ubot-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ubot-bubble-size: 64px;
    --ubot-bubble-color: #ffffff;
    --ubot-bubble-color-base: #ffffff;  /* Base color (background) */
    --ubot-bubble-color-wave: #ffffff;  /* Wave effect color */
}

/* ========================================
   CHAT CONTAINER & POSITIONING
   ======================================== */
#ubot-chat-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

/* Remove tap highlights from ALL elements inside chat */
#ubot-chat-container *,
#ubot-chat-container *:focus,
#ubot-chat-container *:active,
#ubot-chat-container button,
#ubot-chat-container button:focus,
#ubot-chat-container button:active {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

#ubot-chat-container.ubot-chat-bottom-right {
    bottom: 20px;
    right: 20px;
}

#ubot-chat-container.ubot-chat-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* ========================================
   CHAT BUBBLE BUTTON - MEJORADO CON VIBRANT WAVES
   ======================================== */
.ubot-chat-bubble {
    width: var(--ubot-bubble-size);
    height: var(--ubot-bubble-size);
    border-radius: 50%;
    background: var(--ubot-bubble-color-base); /* Usa color base */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ubot-shadow);
    transition: var(--ubot-transition);
    position: relative;
    animation: ubot-elegant-pulse 3s ease-in-out infinite;
    overflow: hidden; /* Important for vibrant effect */
}

/* Vibrant waves effect - usa color wave para el efecto */
.ubot-chat-bubble.ubot-vibrant::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0%;
    height: 0%;
    background: var(--ubot-bubble-color-wave); /* Usa color wave */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ubot-vibrant-waves 3s ease-in-out infinite;
    z-index: 0;
    /* Forzar aceleración hardware en mobile */
    will-change: width, height, opacity;
    -webkit-transform: translate(-50%, -50%);
}

/* Hover state */
.ubot-chat-bubble:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
}

.ubot-chat-bubble:active {
    transform: scale(0.96);
}

/* Size variants */
.ubot-chat-bubble.ubot-size-small {
    --ubot-bubble-size: 56px;
}

.ubot-chat-bubble.ubot-size-medium {
    --ubot-bubble-size: 64px;
}

.ubot-chat-bubble.ubot-size-large {
    --ubot-bubble-size: 72px;
}

/* Robot Avatar in Bubble - CENTRADO */
.ubot-bubble-avatar {
    width: calc(var(--ubot-bubble-size) * 0.625);
    height: calc(var(--ubot-bubble-size) * 0.625);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1; /* Above the vibrant effect */
}

.ubot-robot-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 1; /* Above the vibrant effect */
}

/* Custom bubble icon - CENTRADO */
.ubot-bubble-custom-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1; /* Above the vibrant effect */
}

/* ========================================
   CHAT WINDOW
   ======================================== */
.ubot-chat-window {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--ubot-bg-color);
    border-radius: var(--ubot-border-radius);
    box-shadow: var(--ubot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ubot-slide-up 0.3s ease-out;
}

.ubot-chat-bottom-right .ubot-chat-window {
    right: 0;
}

.ubot-chat-bottom-left .ubot-chat-window {
    left: 0;
}

/* ========================================
   CHAT HEADER
   ======================================== */
.ubot-chat-header {
    background: linear-gradient(135deg, var(--ubot-primary-color) 0%, var(--ubot-secondary-color) 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ubot-text-color);
    border-radius: var(--ubot-border-radius) var(--ubot-border-radius) 0 0;
    min-height: auto;
}

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

.ubot-header-avatar {
    width: 60px !important;
    height: 60px !important;
    background: transparent;
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
}

.ubot-robot-icon-small {
    width: 100%;
    height: 100%;
}

.ubot-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.ubot-agent-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ubot-text-color);
}

.ubot-agent-title {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.3;
}

.ubot-contact-info {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
    margin-top: 2px;
    color: var(--ubot-text-color);
}

.ubot-contact-info span {
    display: block;
    margin-top: 1px;
}

.ubot-contact-info span:first-child {
    margin-top: 0;
}

/* Custom avatar image */
.ubot-custom-avatar {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 12px !important;
    display: block;
}

/* Header actions container (v0.4.2) */
.ubot-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* New chat button (v0.4.2) */
.ubot-new-chat-btn {
    background: transparent;
    border: none;
    color: var(--ubot-text-color);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--ubot-transition);
    opacity: 0.9;
    flex-shrink: 0;
    padding: 0;
}

.ubot-new-chat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

.ubot-new-chat-btn:active {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(0.95);
}

.ubot-new-chat-btn:focus {
    background: transparent !important;
    outline: none;
}

.ubot-new-chat-btn svg {
    width: 18px;
    height: 18px;
}

/* Close button */
.ubot-close-btn {
    background: transparent;
    border: none;
    color: var(--ubot-text-color);
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--ubot-transition);
    opacity: 0.9;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.ubot-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* ========================================
   CHAT MESSAGES AREA
   ======================================== */
.ubot-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f9fafb;
}

/* Custom scrollbar */
.ubot-chat-messages::-webkit-scrollbar {
    width: 6px;
}

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

.ubot-chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.ubot-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ========================================
   MESSAGE BUBBLES
   ======================================== */
.ubot-message {
    display: flex;
    flex-direction: column; /* Stack bubble and carousel vertically (v0.9.5) */
    max-width: 100%;
    animation: ubot-fade-in 0.3s ease-out;
}

.ubot-message-agent {
    justify-content: flex-start;
    align-items: flex-start;
}

.ubot-message-user {
    justify-content: flex-end;
    align-items: flex-end;
}

.ubot-message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.ubot-message-agent .ubot-message-bubble {
    background: var(--ubot-message-agent-bg);
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

/* Support for HTML in messages (v0.4.6 - Customizable oval button links) */
.ubot-message-bubble a {
    display: inline-block;
    background: var(--ubot-link-button-bg, #3b82f6);
    color: var(--ubot-link-button-text, #ffffff) !important;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.ubot-message-bubble a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: var(--ubot-link-button-text, #ffffff) !important;
}

.ubot-message-bubble a:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ubot-message-bubble strong {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.05em;
}

/* Better spacing for product listings */
.ubot-message-bubble br {
    display: block;
    content: "";
    margin: 6px 0;
}

.ubot-message-agent .ubot-message-bubble {
    line-height: 1.7;
}

.ubot-message-user .ubot-message-bubble {
    background: var(--ubot-user-message-bg);
    color: var(--ubot-user-message-text);
    border-bottom-right-radius: 4px;
}

/* ========================================
   COMPARISON TABLES (v2.5.8 - FULL WIDTH like product cards)
   ======================================== */

.ubot-message-bubble table {
    /* Escape from bubble padding and expand to full chat width */
    width: calc(100% + 32px); /* Compensate for bubble padding (16px * 2) */
    max-width: 500px; /* Limit maximum width */
    margin-left: -16px; /* Pull left to escape bubble padding */
    margin-right: -16px; /* Pull right to escape bubble padding */
    margin-top: 12px;
    margin-bottom: 12px;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    table-layout: fixed; /* Prevent overflow */
    display: table; /* Ensure proper table rendering */
    position: relative; /* Allow positioning */
}

.ubot-message-bubble table th {
    /* Usa el MISMO gradiente y color de texto que el header del chat */
    background: linear-gradient(135deg,
        var(--ubot-primary-color, #a855f7) 0%,
        var(--ubot-secondary-color, #ec4899) 100%) !important;
    color: var(--ubot-text-color, #ffffff) !important;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ubot-message-bubble table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.ubot-message-bubble table tr:last-child td {
    border-bottom: none;
}

.ubot-message-bubble table tr:nth-child(even) {
    background: #f9fafb;
}

.ubot-message-bubble table tr:hover {
    background: #f3f4f6;
    transition: background 0.2s ease;
}

/* Responsive tables for mobile */
@media (max-width: 480px) {
    .ubot-message-bubble table {
        font-size: 12px;
    }

    .ubot-message-bubble table th,
    .ubot-message-bubble table td {
        padding: 8px 6px;
    }

    .ubot-message-bubble table th {
        font-size: 11px;
    }
}

/* ========================================
   PRODUCT CARDS (v0.6.0 - Sales-First)
   ======================================== */

.ubot-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 350px;
}

.ubot-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Card Content Section (v0.7.2) */
.ubot-product-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
}

/* Card Image Section */
.ubot-product-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f9fafb;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    /* v1.6.30: Use flexbox to center image vertically */
    display: flex;
    align-items: center;
    justify-content: center;
}

.ubot-product-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    background: #f3f4f6;
    /* v1.6.30.2: Smooth transition for hover zoom */
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* v1.6.30.2: Zoom on hover (desktop only) */
@media (min-width: 769px) {
    .ubot-product-card-image img:hover {
        transform: scale(1.3);
        z-index: 10;
    }
}

/* Product Badges */
.ubot-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.ubot-badge-sale {
    background: #ef4444;
    color: #ffffff;
}

.ubot-badge-new {
    background: #10b981;
    color: #ffffff;
}

.ubot-badge-out-of-stock {
    background: #dc2626;
    color: #ffffff;
}

.ubot-badge-low-stock {
    background: #f59e0b;
    color: #ffffff;
}

.ubot-badge-bestseller {
    background: #8b5cf6;
    color: #ffffff;
}

/* Stock Status Display (v0.6.0) */
.ubot-stock-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.ubot-stock-status-in-stock {
    background: #d1fae5;
    color: #065f46;
}

.ubot-stock-status-low-stock {
    background: #fed7aa;
    color: #92400e;
}

.ubot-stock-status-out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.ubot-stock-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Product Rating (v0.6.0) */
.ubot-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ubot-rating-stars {
    display: flex;
    gap: 2px;
}

.ubot-star {
    width: 16px;
    height: 16px;
    color: #d1d5db; /* Gray for empty stars */
}

.ubot-star-filled {
    color: #fbbf24; /* Gold for filled stars */
}

.ubot-star-half {
    position: relative;
    color: #d1d5db;
}

.ubot-star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #fbbf24;
    overflow: hidden;
    width: 50%;
}

.ubot-rating-count {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Product Variations (v0.6.0) */
.ubot-product-variations {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ubot-variation-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ubot-variation-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: capitalize;
}

.ubot-variation-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ubot-variation-select:hover {
    border-color: #9ca3af;
}

.ubot-variation-select:focus {
    outline: none;
    border-color: var(--ubot-primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ubot-badge-best-seller {
    background: #f59e0b;
    color: #ffffff;
}

.ubot-badge-low-stock {
    background: #f97316;
    color: #ffffff;
}

/* Card Body (v0.7.3) */
.ubot-product-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
}

.ubot-product-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-transform: uppercase; /* Siempre en mayúsculas (v1.1.1) */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Máximo 2 líneas (v1.1.1) */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.3em * 2); /* Altura fija de 2 líneas (v1.1.1) */
    text-overflow: ellipsis;
}

/* v0.7.0: Product name link styling */
.ubot-product-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: color 0.2s ease;
}

.ubot-product-name-link:hover {
    color: var(--ubot-primary-color);
    cursor: pointer;
}

.ubot-product-name-link:hover .ubot-product-name {
    color: var(--ubot-primary-color);
}

/* Pricing */
.ubot-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap; /* Badge siempre en misma línea (v1.1.2) */
}

.ubot-price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--ubot-price-color, #1f2937);
}

.ubot-price-sale {
    font-size: 20px;
    font-weight: 700;
    color: var(--ubot-price-color, #1f2937);
}

.ubot-price-regular {
    font-size: 14px; /* 30% menor que precio sale (v1.1.3) */
    color: #9ca3af;
    text-decoration: line-through;
}

.ubot-discount-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap; /* No romper línea (v1.1.2) */
    flex-shrink: 0; /* No encogerse (v1.1.2) */
}

/* Stock Warning */
.ubot-stock-warning {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #991b1b;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    border-radius: 4px;
}

/* Action Buttons */
.ubot-product-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 12px;
    align-items: center !important;
    position: relative; /* Para posicionar mensaje de éxito (v0.6.0) */
    flex-wrap: nowrap !important; /* NUNCA saltar a nueva línea */
    width: 100% !important;
}

/* Quantity Selector (v0.6.0) - Responsive, siempre en misma línea */
.ubot-quantity-selector {
    display: flex !important;
    align-items: center !important;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    height: 42px;
    flex: 0 1 auto !important; /* No crece, puede encogerse */
    min-width: 70px !important; /* Mínimo ancho */
    max-width: 100px !important;
}

.ubot-qty-input {
    width: 100% !important; /* Ocupa todo el espacio del contenedor */
    height: 34px;
    padding: 0 8px !important; /* Menos padding para pantallas pequeñas */
    border: 1px solid #d1d5db;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box !important;
}

.ubot-qty-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ubot-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.ubot-btn-view {
    background: #ffffff;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.ubot-btn-view:hover {
    background: #2563eb;
    color: #ffffff;
}

.ubot-btn-cart {
    background: #2563eb;
    color: #ffffff;
}

.ubot-btn-cart:hover {
    /* No background change */
}

.ubot-btn-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ubot-btn-success {
    /* No background change - keep original color */
}

/* Icon-only Add to Cart button (v0.6.0 - Oval style matching links) */
.ubot-btn-cart-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--ubot-cart-button-bg, #2563eb) !important;
    color: var(--ubot-cart-icon-color, #ffffff) !important;
    padding: 10px 16px !important;
    border-radius: 50px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex: 1 1 auto !important; /* Crece para llenar espacio disponible */
    height: 42px !important;
    min-width: 42px !important;
    max-width: 200px !important; /* Límite máximo en pantallas grandes */
    opacity: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important; /* No mostrar texto fuera del botón (v0.9.9) */
    font-size: 0 !important; /* Ocultar cualquier texto (v0.9.9) */
    text-indent: -9999px !important; /* Esconder texto completamente (v0.9.9) */
}

.ubot-btn-cart-icon:hover {
    background: var(--ubot-cart-button-bg, #2563eb) !important;
    color: var(--ubot-cart-icon-color, #ffffff) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    opacity: 1 !important;
}

.ubot-btn-cart-icon:active {
    background: var(--ubot-cart-button-bg, #2563eb) !important;
    transform: translateY(0) !important;
}

.ubot-btn-cart-icon:disabled {
    /* Botón nunca se deshabilita, eliminar estilos */
}

.ubot-btn-cart-icon.ubot-btn-success {
    /* Clase nunca se usa, eliminar estilos */
}

.ubot-cart-icon {
    width: 22px;
    height: 22px;
    color: var(--ubot-cart-icon-color, #ffffff);
    flex-shrink: 0;
    position: relative !important; /* Asegurar que el icono se vea (v0.9.9) */
    z-index: 1 !important; /* Por encima de cualquier texto oculto (v0.9.9) */
}

/* Cart success feedback (v0.7.0 - MEJORADO SELLO/BADGE) */
.ubot-cart-success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 28px 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4);
    z-index: 999999;
    animation: ubot-badge-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 3px solid #ffffff;
    min-width: 200px;
    max-width: 280px;
    line-height: 1.4;
}

.ubot-cart-success-message::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #10b981;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Badge pop animation - MUY VISIBLE */
@keyframes ubot-badge-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Badge responsive - smaller on mobile */
@media (max-width: 768px) {
    .ubot-cart-success-message {
        padding: 20px 18px;
        min-width: 180px;
        max-width: 240px;
        font-size: 14px;
    }

    .ubot-cart-success-message::before {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Cart error feedback (v0.9.7 - RED THEME) */
.ubot-cart-error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 28px 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.4);
    z-index: 999999;
    animation: ubot-badge-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 3px solid #ffffff;
    min-width: 200px;
    max-width: 280px;
    line-height: 1.4;
}

.ubot-cart-error-message::before {
    content: '⚠';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #ef4444;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Error badge responsive - smaller on mobile */
@media (max-width: 768px) {
    .ubot-cart-error-message {
        padding: 20px 18px;
        min-width: 180px;
        max-width: 240px;
        font-size: 14px;
    }

    .ubot-cart-error-message::before {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Success animation for button */
@keyframes ubot-success-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Error shake animation for button */
@keyframes ubot-error-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
    }
}

@keyframes ubot-slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Cart counter pulse animation */
@keyframes ubot-cart-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.ubot-cart-count-pulse {
    animation: ubot-cart-pulse 0.5s ease-out;
}

/* Product loading spinner (v0.6.0) */
.ubot-product-loading {
    animation: ubot-pulse 1.5s ease-in-out infinite;
}

.ubot-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ubot-spin 0.8s linear infinite;
}

@keyframes ubot-spin {
    to { transform: rotate(360deg); }
}

@keyframes ubot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Product Card Actions Container (v0.7.0) */
.ubot-product-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

/* Hide all links in agent messages by default (v0.7.7) */
.ubot-message-agent a {
    display: none !important;
}

/* View Details Link Button (v0.7.9) - Only show links inside product cards - OVAL STYLE */
.ubot-product-card .ubot-btn-link,
.ubot-product-card-body .ubot-btn-link,
.ubot-product-card-content .ubot-btn-link {
    display: block !important;
    width: 100% !important;
    padding: 12px 20px !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    background: var(--ubot-link-button-bg, #3b82f6) !important;
    color: var(--ubot-link-button-text, #ffffff) !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.ubot-product-card .ubot-btn-link:hover,
.ubot-product-card-body .ubot-btn-link:hover,
.ubot-product-card-content .ubot-btn-link:hover {
    background: var(--ubot-link-button-bg, #3b82f6) !important;
    color: var(--ubot-link-button-text, #ffffff) !important;
    border: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    text-decoration: none !important;
}

.ubot-product-card .ubot-btn-link:active,
.ubot-product-card-body .ubot-btn-link:active,
.ubot-product-card-content .ubot-btn-link:active {
    background: var(--ubot-link-button-bg, #3b82f6) !important;
    color: var(--ubot-link-button-text, #ffffff) !important;
    border: none !important;
    transform: translateY(0) !important;
    text-decoration: none !important;
}

/* Quantity Selector in Actions (v0.7.0) */
.ubot-product-card-actions .ubot-quantity-selector {
    flex: 1;
    width: auto;
    min-width: 80px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
    color: #1f2937;
}

.ubot-product-card-actions .ubot-quantity-selector:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========================================
   PRODUCT CAROUSEL (v0.7.0)
   ======================================== */

/* Carousel Container - NO ARROWS */
.ubot-product-carousel {
    position: relative;
    margin: 4px 0; /* Reduced from 12px (v0.9.6) */
    padding: 0; /* No arrows, no padding */
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    animation: ubot-carousel-appear 0.5s ease-out;
}

/* Carousel when OUTSIDE bubble (v0.9.6) - ensure proper styling */
.ubot-message .ubot-product-carousel {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
    clear: both;
    display: block;
    margin-top: 0; /* Remove space between bubble and carousel */
}

/* Ensure bubble doesn't contain carousel */
.ubot-message-agent .ubot-message-bubble {
    display: block;
    overflow: visible;
}

/* REMOVE ALL TAP HIGHLIGHTS FROM CAROUSEL */
.ubot-product-carousel *,
.ubot-product-carousel *:focus,
.ubot-product-carousel *:active {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    outline: none !important;
}

@keyframes ubot-carousel-appear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carousel Wrapper - shows partial cards with fade + DRAG SCROLLING */
.ubot-product-carousel-wrapper {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    padding: 12px 20px; /* Padding to show partial cards */
    position: relative;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Fade effect on edges to show there are more cards */
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);

    /* Drag scrolling cursor */
    cursor: grab;
    user-select: none;
}

/* When dragging */
.ubot-product-carousel-wrapper.ubot-dragging {
    cursor: grabbing;
    scroll-behavior: auto; /* Disable smooth scroll while dragging for instant response */
}

/* Re-enable pointer events on interactive elements */
.ubot-product-carousel-wrapper button,
.ubot-product-carousel-wrapper input,
.ubot-product-carousel-wrapper a,
.ubot-product-carousel-wrapper select {
    cursor: pointer;
    user-select: auto;
}

.ubot-product-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

/* Product cards inside carousel - MUCH SMALLER */
.ubot-product-carousel .ubot-product-card {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: 200px;
    display: block;
    visibility: visible;
    opacity: 1;
    height: auto;
}

/* Adjust card image height in carousel */
.ubot-product-carousel .ubot-product-card-image {
    height: 150px;
}

/* Smaller text in carousel cards */
.ubot-product-carousel .ubot-product-name {
    font-size: 14px;
    line-height: 1.3;
}

.ubot-product-carousel .ubot-product-price {
    font-size: 16px;
}

/* Carousel Navigation Arrows - HIDDEN (using touch scroll instead) */
.ubot-carousel-arrow {
    display: none !important;
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    .ubot-product-carousel {
        padding: 0; /* No padding needed without arrows */
    }

    .ubot-product-carousel-wrapper {
        padding: 12px 16px; /* Smaller padding on mobile */
    }

    .ubot-product-carousel .ubot-product-card {
        flex: 0 0 180px;
        min-width: 180px;
        max-width: 180px;
    }

    .ubot-product-carousel .ubot-product-card-image {
        height: 130px;
    }
}

/* ========================================
   END PRODUCT CARDS
   ======================================== */

/* ========================================
   CHAT INPUT
   ======================================== */
.ubot-chat-input-container {
    padding: 16px 20px;
    background: var(--ubot-bg-color);
    border-top: 1px solid #e5e7eb;
}

.ubot-chat-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ubot-message-input {
    flex: 1;
    padding: 12px 20px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50px !important; /* Siempre ovalado */
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: var(--ubot-transition);
    background: #f9fafb;
}

.ubot-message-input:focus {
    border-color: var(--ubot-secondary-color);
    background: var(--ubot-bg-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ubot-send-btn {
    background: var(--ubot-button-color) !important;
    color: var(--ubot-send-icon-color, var(--ubot-text-color)) !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: var(--ubot-transition) !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

.ubot-send-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -11px;
    margin-left: -11px;
}

.ubot-send-btn:hover {
    background: var(--ubot-button-color) !important;
    color: var(--ubot-send-icon-color, var(--ubot-text-color)) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.ubot-send-btn:hover svg {
    transform: rotate(0deg) translateX(2px);
}

.ubot-send-btn:active {
    transform: translateY(0);
}

.ubot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   ANIMATIONS - MEJORADAS
   ======================================== */

/* Elegant pulse for bubble */
@keyframes ubot-elegant-pulse {
    0%, 100% {
        transform: scale(1);
        -webkit-transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.02);
        -webkit-transform: scale(1.02);
        box-shadow: 0 12px 48px rgba(59, 130, 246, 0.25);
    }
}

@-webkit-keyframes ubot-elegant-pulse {
    0%, 100% {
        -webkit-transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }
    50% {
        -webkit-transform: scale(1.02);
        box-shadow: 0 12px 48px rgba(59, 130, 246, 0.25);
    }
}

/* Vibrant waves animation - expanding from center to outside */
@keyframes ubot-vibrant-waves {
    0% {
        width: 0%;
        height: 0%;
        opacity: 0;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 0.8;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
    }
}

@-webkit-keyframes ubot-vibrant-waves {
    0% {
        width: 0%;
        height: 0%;
        opacity: 0;
        -webkit-transform: translate(-50%, -50%);
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 0.8;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
        -webkit-transform: translate(-50%, -50%);
    }
}

/* v1.6.32: Radar effect - scanning line with trailing gradient sweep */
.ubot-chat-bubble.ubot-radar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 150deg,
        color-mix(in srgb, var(--ubot-bubble-color-wave, #bababa) 5%, transparent) 180deg,
        color-mix(in srgb, var(--ubot-bubble-color-wave, #bababa) 10%, transparent) 210deg,
        color-mix(in srgb, var(--ubot-bubble-color-wave, #bababa) 20%, transparent) 240deg,
        color-mix(in srgb, var(--ubot-bubble-color-wave, #bababa) 40%, transparent) 270deg,
        color-mix(in srgb, var(--ubot-bubble-color-wave, #bababa) 60%, transparent) 300deg,
        color-mix(in srgb, var(--ubot-bubble-color-wave, #bababa) 80%, transparent) 330deg,
        var(--ubot-bubble-color-wave, #bababa) 360deg
    );
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: center center;
    animation: ubot-radar-sweep 3s linear infinite;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
}

.ubot-chat-bubble.ubot-radar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 50%;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--ubot-bubble-color-wave, #bababa) 100%
    );
    transform-origin: bottom center;
    animation: ubot-radar-line 3s linear infinite;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
    box-shadow: 0 0 10px var(--ubot-bubble-color-wave, #bababa);
}

@keyframes ubot-radar-sweep {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes ubot-radar-line {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes ubot-radar-sweep {
    from {
        -webkit-transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        -webkit-transform: translate(-50%, -50%) rotate(360deg);
    }
}

@-webkit-keyframes ubot-radar-line {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes ubot-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ubot-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN - MEJORADO
   ======================================== */
@media (max-width: 480px) {
    /* Mantener la posición configurada en móvil */
    #ubot-chat-container.ubot-chat-bottom-right {
        bottom: 15px;
        right: 15px;
        left: auto;
    }
    
    #ubot-chat-container.ubot-chat-bottom-left {
        bottom: 15px;
        left: 15px;
        right: auto;
    }
    
    /* Bubble más grande en móvil */
    .ubot-chat-bubble {
        width: 72px;
        height: 72px;
    }
    
    .ubot-chat-bubble.ubot-size-small {
        width: 64px;
        height: 64px;
    }
    
    .ubot-chat-bubble.ubot-size-medium {
        width: 72px;
        height: 72px;
    }
    
    .ubot-chat-bubble.ubot-size-large {
        width: 80px;
        height: 80px;
    }
    
    /* Avatar centrado y más grande */
    .ubot-bubble-avatar {
        width: 45px;
        height: 45px;
    }
    
    /* Chat window adaptado */
    .ubot-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 10px;
    }
    
    /* Posicionar chat window según la posición del bubble */
    #ubot-chat-container.ubot-chat-bottom-right .ubot-chat-window {
        right: 0;
        left: auto;
    }
    
    #ubot-chat-container.ubot-chat-bottom-left .ubot-chat-window {
        left: 0;
        right: auto;
    }
    
    .ubot-message-bubble {
        max-width: 85%;
        font-size: 14px;
    }
    
    .ubot-chat-header {
        padding: 12px;
    }
    
    .ubot-agent-name {
        font-size: 14px;
    }
    
    .ubot-contact-info {
        font-size: 12px;
    }

    /* Product Cards responsive (v0.6.0) */
    .ubot-product-card {
        max-width: 100%;
    }

    .ubot-product-card-image {
        height: 180px;
    }

    .ubot-product-actions {
        flex-direction: row !important; /* Siempre en fila, nunca columna */
        flex-wrap: nowrap !important;
        gap: 6px !important; /* Menos gap en móvil */
    }

    .ubot-quantity-selector {
        min-width: 60px !important; /* Más pequeño en móvil */
        max-width: 80px !important;
    }

    .ubot-qty-input {
        font-size: 14px !important;
        padding: 0 6px !important;
    }

    .ubot-btn-cart-icon {
        padding: 8px 12px !important;
        min-width: 40px !important;
    }

    .ubot-cart-icon {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ========================================
   VARIATION MODAL (v1.1.0)
   ======================================== */

/* Modal overlay */
.ubot-variation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ubot-fade-in 0.2s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal container */
.ubot-variation-modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: ubot-modal-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ubot-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header */
.ubot-variation-modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.ubot-variation-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ubot-variation-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.ubot-variation-modal-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}

.ubot-variation-modal-info {
    flex: 1;
}

.ubot-variation-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-transform: uppercase; /* Siempre en mayúsculas (v1.1.1) */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Máximo 2 líneas (v1.1.1) */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ubot-variation-modal-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--ubot-price-color, #1f2937);
    margin: 0;
}

/* Modal body */
.ubot-variation-modal-body {
    padding: 24px;
}

.ubot-variation-modal-variations {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.ubot-variation-modal-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ubot-variation-modal-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: capitalize;
}

.ubot-variation-modal-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px; /* Tamaño consistente con menú dropdown (v1.1.5) */
    color: #1f2937;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Opciones del select (v1.1.5) */
.ubot-variation-modal-select option {
    font-size: 16px;
    padding: 8px 12px;
}

.ubot-variation-modal-select:hover {
    border-color: #d1d5db;
}

.ubot-variation-modal-select:focus {
    outline: none;
    border-color: var(--ubot-primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ubot-variation-modal-quantity {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ubot-variation-modal-qty-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
    color: #1f2937;
}

.ubot-variation-modal-qty-input:focus {
    outline: none;
    border-color: var(--ubot-primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal actions */
.ubot-variation-modal-actions {
    display: flex;
    gap: 12px;
}

.ubot-variation-modal-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ubot-variation-modal-btn-primary {
    background: var(--ubot-cart-button-bg, #2563eb);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ubot-variation-modal-btn-primary:hover {
    background: var(--ubot-cart-button-bg, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.ubot-variation-modal-btn-primary:active {
    transform: translateY(0);
}

.ubot-variation-modal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ubot-variation-modal {
        max-width: calc(100vw - 40px);
        border-radius: 16px;
    }

    .ubot-variation-modal-header {
        padding: 20px 20px 16px 20px;
    }

    .ubot-variation-modal-body {
        padding: 20px;
    }

    .ubot-variation-modal-image {
        width: 60px;
        height: 60px;
    }

    .ubot-variation-modal-title {
        font-size: 16px;
    }

    .ubot-variation-modal-price {
        font-size: 18px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.ubot-hidden {
    display: none !important;
}

.ubot-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ========================================
   IMAGE ZOOM MODAL (v1.6.30.2)
   ======================================== */
.ubot-image-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: ubot-fade-in 0.3s ease;
}

.ubot-image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ubot-image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: ubot-zoom-in 0.3s ease;
}

.ubot-image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    transition: color 0.2s ease;
}

.ubot-image-modal-close:hover {
    color: #cccccc;
}

@keyframes ubot-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ubot-zoom-in {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}
