

.viewed-card {
    filter: grayscale(100%);
    opacity: 0.7; /* Adjust transparency as needed */
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #f8f9fa;
}

.image-container .listing-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.listing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-container.broken-image {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
}

.image-container.broken-image .listing-link {
    position: static; /* Unset absolute positioning */
    width: auto;
    height: auto;
    color: #6c757d;
}

.image-container.broken-image i {
    font-size: 3rem;
}

/* Make sure offline banner is still visible */
.offline-banner {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1;
}

.scroll-to-top-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    z-index: 1000;
    display: none; /* Initially hidden */
    transition: background-color 0.3s;
}

.scroll-to-top-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.notification-shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

.text-danger {
    color: #dc3545 !important;
}
