/* ============================================
   GIGI AI - Asistente La Tienda Sexy GT
   Paleta: Rosa #E8A1B2 → Rosa Claro #F5E6E0
   ============================================ */

/* Botón Flotante */
.gigi-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(232, 161, 178, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: all 0.3s ease;
    overflow: hidden;
}

.gigi-fab img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.gigi-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(232, 161, 178, 0.6);
}

/* Widget */
.gigi-widget {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    height: 600px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    z-index: 99998;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.gigi-widget.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.gigi-header {
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.gigi-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.gigi-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gigi-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.gigi-title span {
    font-size: 12px;
    opacity: 0.9;
}

.gigi-header-actions {
    display: flex;
    gap: 8px;
}

.gigi-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.gigi-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Body */
.gigi-body {
    flex: 1;
    overflow: hidden;
    background: linear-gradient(180deg, #FAFAFA, #F5E6E0);
}

.gigi-chat-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Messages */
.gigi-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.gigi-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
}

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

/* Mensaje Usuario */
.gigi-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: msgIn 0.3s ease;
}

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

.gigi-msg.user {
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.gigi-msg.bot {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Typing */
.typing {
    display: flex;
    gap: 4px;
    padding: 14px 16px;
}

.typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: bounce 1.2s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Quick Actions */
.gigi-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #F5E6E0, #E8D5CC);
    border-top: 1px solid #D48A9A;
    flex-shrink: 0;
}

.gigi-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    color: #2B2B2B;
    border: 2px solid #E8A1B2;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gigi-action-btn i {
    font-size: 14px;
    color: #E8A1B2;
}

.gigi-action-btn:hover {
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(232, 161, 178, 0.4);
}

.gigi-action-btn:hover i {
    color: #fff;
}

/* Productos Grid */
.gigi-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px 0;
}

.gigi-product-card {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #F5E6E0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.gigi-product-card:hover {
    box-shadow: 0 6px 20px rgba(232, 161, 178, 0.3);
    border-color: #E8A1B2;
    transform: translateY(-3px);
}

.gigi-product-img {
    width: 100%;
    height: 110px;
    background: linear-gradient(135deg, #F5E6E0, #E8D5CC);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gigi-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gigi-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-size: 32px;
}

.gigi-product-info {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gigi-product-cat {
    font-size: 10px;
    color: #D48A9A;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #F5E6E0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.gigi-product-name {
    font-size: 13px;
    font-weight: 700;
    color: #2B2B2B;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.gigi-product-price {
    font-size: 17px;
    font-weight: 800;
    color: #E8A1B2;
    margin-top: auto;
    text-shadow: 1px 1px 2px rgba(232, 161, 178, 0.2);
}

.gigi-product-stock {
    font-size: 11px;
    color: #28a745;
    font-weight: 600;
    background: #e8f5e9;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.gigi-product-stock i {
    margin-right: 3px;
}

.gigi-product-actions {
    display: flex;
    border-top: 2px solid #F5E6E0;
    background: linear-gradient(135deg, #FAFAFA, #F5E6E0);
}

.gigi-product-actions button {
    flex: 1;
    padding: 11px 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2B2B2B;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.gigi-product-actions .btn-cart:hover {
    color: #fff;
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.gigi-product-actions .btn-cart.success {
    color: #fff;
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.gigi-product-actions .btn-buy {
    color: #E8A1B2 !important;
    font-weight: 700;
}

.gigi-product-actions .btn-buy:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #E8A1B2, #D48A9A) !important;
    box-shadow: 0 2px 8px rgba(232, 161, 178, 0.4);
}

.gigi-product-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Category Buttons */
.gigi-category-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.gigi-cat-btn {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gigi-cat-btn i {
    color: #E8A1B2;
    font-size: 16px;
}

.gigi-cat-btn:hover {
    background: #F5E6E0;
    border-color: #D48A9A;
    transform: translateX(4px);
}

/* Botones especiales */
.gigi-btn-wsp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #25D366;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}

.gigi-btn-wsp:hover {
    background: #128C7E;
    transform: scale(1.02);
}

.gigi-btn-fb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1877F2;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}

.gigi-btn-fb:hover {
    background: #0d65d9;
    transform: scale(1.02);
}

.gigi-btn-ig {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}

.gigi-btn-ig:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.gigi-btn-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #EA4335;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}

.gigi-btn-email:hover {
    background: #d33b2c;
    transform: scale(1.02);
}

.gigi-btn-pay {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    margin-top: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(232, 161, 178, 0.4);
}

.gigi-btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 161, 178, 0.6);
}

/* Audio Player */
.gigi-audio-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #F5E6E0;
    border-radius: 20px;
    align-self: flex-start;
    margin-top: 4px;
}

.gigi-audio-play {
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.gigi-audio-play:hover {
    transform: scale(1.05);
}

/* Input Area */
.gigi-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.gigi-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.gigi-input-area input:focus {
    border-color: #E8A1B2;
}

#gigi-voice {
    background: #f5f5f5;
    color: #666;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

#gigi-voice:hover {
    background: #e0e0e0;
}

#gigi-voice.recording {
    background: #dc3545;
    color: #fff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

#gigi-send {
    background: linear-gradient(135deg, #E8A1B2, #D48A9A);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

#gigi-send:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 480px) {
    .gigi-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .gigi-fab {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .gigi-products-grid {
        grid-template-columns: 1fr;
    }
}
