/* Estilos para el botón de favoritos en los tiles de autos */

.favorite-btn {
    position: absolute;
    bottom: 16px;  /* 16px desde el bottom del tile */
    right: 12px;   /* 12px desde el derecho del tile */
    width: 40px;   /* Doble del tamaño original (20px * 2) */
    height: 34px;  /* Doble del tamaño original (17px * 2) */
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10; /* Z-index menor que el header (1000) para no superponerse */
    padding: 0;
    pointer-events: auto; /* Asegurar que el botón capture los clicks */
}

.favorite-btn:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.favorite-btn:active {
    transform: scale(0.95);
}

.favorite-btn img {
    width: 40px;   /* Doble del tamaño original (20px * 2) */
    height: 34px;  /* Doble del tamaño original (17px * 2) */
    display: block;
    transition: transform 0.2s ease;
}

.favorite-btn.is-favorite {
    width: 20px;   /* Tamaño original cuando está activo */
    height: 17px;
}

.favorite-btn.is-favorite img {
    width: 20px;   /* Tamaño original cuando está activo */
    height: 17px;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* Efecto de hover específico para el icono */
.favorite-btn:hover img {
    transform: scale(1.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .favorite-btn {
        width: 36px;   /* Doble del tamaño original (18px * 2) */
        height: 30px;  /* Doble del tamaño original (15px * 2) */
        bottom: 32px;
        right: 1px;
    }
    
    .favorite-btn img {
        width: 36px;   /* Doble del tamaño original (18px * 2) */
        height: 30px;  /* Doble del tamaño original (15px * 2) */
    }
    
    .favorite-btn.is-favorite {
        width: 18px;   /* Tamaño original cuando está activo */
        height: 15px;
    }
    
    .favorite-btn.is-favorite img {
        width: 18px;   /* Tamaño original cuando está activo */
        height: 15px;
    }
}

/* Estilos para el overlay de favoritos (cuando el usuario no está logueado) */
.favorite-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.favorite-login-overlay.show {
    opacity: 1;
    visibility: visible;
}

.favorite-login-box {
    background: white;
    padding: 32px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.favorite-login-box h3 {
    margin-bottom: 16px;
    color: #02081C;
    font-size: 24px;
    font-weight: 700;
}

.favorite-login-box p {
    margin-bottom: 24px;
    color: #666;
    font-size: 16px;
}

.favorite-login-box .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.favorite-login-box button {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.favorite-login-box .btn-login {
    background: #02081C;
    color: white;
}

.favorite-login-box .btn-login:hover {
    background: #030D2B;
}

.favorite-login-box .btn-cancel {
    background: #f0f0f0;
    color: #02081C;
}

.favorite-login-box .btn-cancel:hover {
    background: #e0e0e0;
}
