/* --- ORDEN PERFECTO PARA ACCIONES DE TARJETA --- */
.card-actions-row {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 20px !important;
}

/* El botón de comprar toma el espacio principal */
.card-actions-row .btn-add-ultra {
    flex: 1 !important;
    width: auto !important;
    margin: 0 !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
    padding: 0 15px !important;
}

/* Los botones de iconos (ojo y corazón) son cuadrados perfectos */
.btn-view-ultra,
.wishlist-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #8b949e !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

/* Efectos Hover */
.btn-view-ultra:hover {
    background: rgba(0, 242, 254, 0.1) !important;
    border-color: #00f2fe !important;
    color: #00f2fe !important;
    transform: translateY(-3px) !important;
}

.wishlist-btn:hover {
    background: rgba(255, 71, 87, 0.1) !important;
    border-color: #ff4757 !important;
    color: #ff4757 !important;
    transform: translateY(-3px) !important;
}

/* Iconos */
.btn-view-ultra i,
.wishlist-btn i {
    font-size: 1.1rem !important;
}

/* --- CORRECCIÓN DE LEGIBILIDAD EN INPUTS --- */
input,
select,
textarea {
    color: var(--text-pure) !important;
    font-family: inherit;
}

/* Forzar texto oscuro en placeholders y escritura si el fondo es muy claro */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    color: #000000 !important;
}

/* Estilo para los inputs con fondo semi-transparente */
input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

input:focus {
    border-color: var(--accent-1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    outline: none;
}

[data-theme="light"] input:focus {
    background: #ffffff !important;
    border-color: var(--accent-1) !important;
}

/* --- INNOVACIÓN 2026: AI ASSISTANT WIDGET --- */
.ai-assistant-widget {
    position: fixed;
    bottom: 125px;
    /* Posicionado arriba de WhatsApp (40px + 65px + 20px gap) */
    right: 40px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.ai-bubble {
    width: 65px;
    height: 65px;
    background: var(--gradient-primary);
    border-radius: 20px;
    /* Cambiado a 20px para hacer match con WhatsApp */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.4);
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.ai-bubble:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 15px 50px rgba(0, 255, 136, 0.6);
}

.ai-window {
    width: 350px;
    height: 500px;
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 85px;
    /* Espacio para que no tape la burbuja */
    right: 0;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-status {
    width: 10px;
    height: 10px;
    background: var(--accent-1);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-1);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.ai-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-msg {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
}

.ai-msg.bot {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ai-msg.user {
    background: var(--gradient-primary);
    color: var(--bg-base);
    font-weight: 600;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.ai-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 18px;
    color: white;
    font-size: 0.85rem;
}

/* --- GAMIFICACIÓN: INSIGNIAS DE RANGO --- */
.user-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    border-radius: 50px;
    color: black;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    margin-left: 8px;
    /* Espacio extra para no chocar con el texto */
    vertical-align: middle;
}

.rank-legendary {
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    color: white;
}

.rank-pro {
    background: linear-gradient(90deg, #f093fb, #f5576c);
    color: white;
}

/* --- STOCK PREDICTIVO & SOCIAL PROOF --- */
.stock-urgency-tag {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    animation: blinkTag 1.5s infinite;
}

@keyframes blinkTag {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.social-proof-live {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent-1);
    color: var(--accent-1);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    /* Evita que se rompa en dos líneas */
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.social-proof-live-card {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: #00ffcc;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    border: 1px solid rgba(0, 255, 204, 0.2);
}

.social-proof-live i {
    font-size: 0.5rem;
    color: #ef4444;
    animation: pulseGlow 1s infinite;
}

/* --- LIMPIEZA HEADER 2026 --- */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    /* Espacio uniforme entre elementos */
}

.search-form-premium {
    height: 48px !important;
    /* Altura fija para alinear con otros botones */
    padding: 0 20px !important;
}

.search-form-premium input {
    height: 100% !important;
}

.login-link-premium,
.btn-outline-premium {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
}

/* --- CRIPTO PAY SUPPORT VISUAL --- */
.crypto-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    /* Reducido de 15px */
    padding: 4px 0;
    /* Más compacto */
    background: transparent;
    border: none;
    font-size: 0.7rem;
    /* Un poco más pequeño */
    color: var(--text-muted);
}

.crypto-icons {
    display: flex;
    gap: 5px;
    color: #f7931a;
    /* Bitcoin Color */
}

@media (max-width: 768px) {
    .ai-assistant-widget {
        bottom: 175px;
        /* Justo arriba de WhatsApp en móvil */
        right: 20px;
        left: auto;
        align-items: flex-end;
    }

    .ai-window {
        width: calc(100vw - 40px);
        max-width: none;
        height: 65vh;
        right: 0;
        left: auto;
        bottom: 75px;
        border-radius: 24px;
    }

    .ai-bubble {
        width: 55px;
        height: 55px;
    }
}

/* --- PERSISTENT DROPDOWN PC --- */
.dropdown-premium {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none !important;
    position: absolute;
    right: 0;
    background: var(--bg-surface);
    min-width: 200px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    z-index: 3000;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 10px 0;
    margin-top: 10px;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dropdown-premium.active .dropdown-content {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Anular el hover de style.css para evitar conflictos */
.dropdown-premium:hover .dropdown-content {
    display: none !important;
}

.dropdown-premium.active:hover .dropdown-content {
    display: block !important;
}

/* --- WISHLIST PREMIUM PROFILE STYLES --- */
.wishlist-premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.wishlist-card-glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(10px);
}

.wishlist-card-glass:hover {
    transform: translateY(-10px);
    border-color: var(--accent-1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.1);
}

.wishlist-img-box {
    height: 180px;
    background: white;
    padding: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: 0.5s;
}

.wishlist-card-glass:hover .wishlist-img-box img {
    transform: scale(1.1);
}

.wishlist-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: 0.3s;
}

.wishlist-card-glass:hover .wishlist-overlay {
    opacity: 1;
}

.btn-wishlist-remove {
    background: #ff4757;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
    transition: 0.3s;
}

.btn-wishlist-remove:hover {
    transform: rotate(90deg) scale(1.1);
    background: #ff6b81;
}

.wishlist-info-box {
    padding: 20px;
}

.wishlist-info-box h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--text-pure);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wishlist-price {
    margin-bottom: 20px;
}

.wishlist-price .currency { color: var(--accent-1); font-weight: 800; font-size: 0.8rem; }
.wishlist-price .amount { color: var(--text-pure); font-weight: 800; font-size: 1.4rem; }

.wishlist-actions {
    display: flex;
    gap: 10px;
}

.btn-wishlist-view {
    flex-grow: 1;
    background: rgba(255,255,255,0.05);
    color: var(--text-pure);
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.btn-wishlist-view:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-muted);
}

.btn-wishlist-cart {
    background: var(--accent-1);
    color: black;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-wishlist-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

@media (max-width: 576px) {
    .wishlist-premium-grid {
        grid-template-columns: 1fr;
    }
}