/* ========================================
   SISTEMA DE VOTACIÓN DE CHOLLOS
   ======================================== */

/* Contenedor de votación */
.chollo-voting {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    background: #1E1E1E;
    border: 1px solid #444;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chollo-voting-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Botones de voto */
.vote-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

/* Voto positivo */
.vote-up {
    color: #888;
}

.vote-up:hover {
    color: #E30613;
}

.vote-up.active {
    color: #E30613;
    background: rgba(227, 6, 19, 0.15);
}

/* Voto negativo */
.vote-down {
    color: #888;
}

.vote-down:hover {
    color: #64b5f6;
}

.vote-down.active {
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.15);
}

/* Indicador de temperatura */
.temperature {
    font-size: 15px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    padding: 0 4px;
    color: #888;
    transition: all 0.3s ease;
}

.temperature.hot,
.temperature.very-hot {
    color: #E30613;
}

.temperature.cold {
    color: #64b5f6;
}


/* Widget de chollos más calientes */
.hot-deals-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.hot-deals-widget h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hot-deals-widget h3 i {
    color: #E30613;
    font-size: 1.2em;
}

.hot-deal-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.hot-deal-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.hot-deal-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

.hot-deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-deal-content {
    flex: 1;
    min-width: 0;
}

.hot-deal-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.hot-deal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hot-deal-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #E30613;
}

.hot-deal-temperature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #E30613, #C40510);
    color: white;
    font-size: 0.85em;
    font-weight: 700;
}

/* Versión compacta para cards */
/* Versión compacta para cards */
.chollo-card .chollo-voting {
    position: relative;
    top: auto;
    left: auto;
    z-index: 1;
    padding: 5px 0;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    justify-content: flex-start;
}

.chollo-card .vote-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    background: #f5f5f5;
    /* Fondo ligero para visibilidad */
    border: 1px solid #eee;
}



.vote-btn i {
    /* Forzar familia de fuentes correcta para FA 6 y 5, y peso 900 obligatorio para iconos sólidos */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "Font Awesome 5 Pro", FontAwesome, sans-serif !important;
    font-weight: 900 !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    font-size: inherit;
    display: inline-block;
}

.chollo-card .temperature {
    font-size: 15px;
    min-width: 40px;
    padding: 2px 8px;
    background: transparent;
    box-shadow: none;
}

/* Ajustes para temperatura hot/cold en listado */
.chollo-card .temperature.hot,
.chollo-card .temperature.very-hot {
    color: #E30613;
    background: rgba(227, 6, 19, 0.1);
}

.chollo-card .temperature.cold {
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.1);
}

/* Versión para detalle de chollo */
.chollo-detail-voting {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.05), rgba(227, 6, 19, 0.02));
    border-radius: 12px;
    margin: 20px 0;
}

.chollo-detail-voting .vote-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.chollo-detail-voting .temperature {
    font-size: 32px;
    font-weight: 800;
    min-width: 80px;
    padding: 8px 16px;
}

.voting-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
    color: #666;
}

.voting-stats-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.voting-stats-item i {
    width: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .chollo-detail-voting {
        padding: 15px;
        gap: 10px;
    }

    .chollo-detail-voting .vote-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .chollo-detail-voting .temperature {
        font-size: 24px;
        min-width: 60px;
        padding: 6px 12px;
    }

    .hot-deals-widget {
        padding: 15px;
    }

    .hot-deal-image {
        width: 60px;
        height: 60px;
    }

    .hot-deal-title {
        font-size: 0.9em;
    }
}

/* Estados de carga */
.vote-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.vote-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Tooltip para usuarios no autenticados */
.vote-btn[data-tooltip] {
    position: relative;
}

.vote-btn[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    margin-bottom: 5px;
    z-index: 1000;
}

/* Nuevos estilos para botones de votación en detalle (Es buena / Es mala) */
.chollo-voting-detail-custom {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 4px;
    color: white;
    margin-top: 20px;
    flex-wrap: wrap;
}

.chollo-voting-detail-custom .voting-label {
    flex-grow: 1;
    font-size: 1.1em;
    font-weight: 600;
}

.chollo-voting-detail-custom .voting-label span {
    display: block;
    font-size: 0.8em;
    font-weight: 400;
    color: #aaa;
    margin-top: 4px;
}

.chollo-voting-detail-custom .vote-buttons-container {
    display: flex;
    gap: 15px;
}

.chollo-voting-detail-custom .vote-btn-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    background: transparent;
    border: 1px solid #444;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-decoration: none;
}

.chollo-voting-detail-custom .vote-btn-custom:hover {
    border-color: #666;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.chollo-voting-detail-custom .vote-btn-custom.active.up {
    border-color: #E30613;
    color: #E30613;
    background: rgba(227, 6, 19, 0.1);
}

.chollo-voting-detail-custom .vote-btn-custom.active.down {
    border-color: #64b5f6;
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.1);
}

.chollo-voting-detail-custom .vote-btn-custom i {
    font-size: 1.1em;
}

/* ========================================
   ESTILOS PREMIUM (Píldora oscura)
   Usado en detalle y listados
   ======================================== */

.chollo-voting-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reducido ligeramente para más compacidad */
    background: #1a1a1a;
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.vote-btn-premium {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    /* Color defecto */
}

/* Colores específicos para hover y activo */
.vote-btn-premium:hover.vote-down-premium,
.vote-btn-premium.active.vote-down-premium {
    color: #81d4fa;
}

.vote-btn-premium:hover.vote-up-premium,
.vote-btn-premium.active.vote-up-premium {
    color: #ff5252;
}

.vote-btn-premium:hover {
    transform: scale(1.1);
}

.vote-btn-premium.active {
    opacity: 1;
    filter: drop-shadow(0 0 5px currentColor);
}

/* Estados de carga */
.vote-btn-premium.loading {
    opacity: 0.5;
    pointer-events: none;
    animation: pulse 1s infinite;
}

.temp-premium {
    font-size: 1.1rem;
    font-weight: 800;
    min-width: 30px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: #fff;
    /* Por defecto blanco/gris claro si es 0 */
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.5;
    }
}