﻿/* listing-card.css - Styles for listing cards */

.listing-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.listing-image {
    position: relative;
    aspect-ratio: 4/3;
    background: #f8f8f8;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.875rem;
}

.listing-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.listing-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7rem;
}

.listing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.listing-category {
    font-size: 0.875rem;
    color: #6474b8;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.listing-description {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0.5rem 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.listing-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.listing-meta-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.listing-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* For my listings special styles */
.unread-messages-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4d4f;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.unread-messages-badge:hover {
    transform: scale(1.1);
    background-color: #ff7875;
}

.listing-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.listing-status.expired {
    background-color: #ff4d4f;
    color: white;
}

.expired-listing {
    opacity: 0.7;
}

.expired-listing:hover {
    opacity: 0.9;
}

@media (max-width: 640px) {
    .listing-title {
        font-size: 0.9rem;
        min-height: 2.2rem;
        -webkit-line-clamp: 2;
    }

    .listing-price {
        font-size: 1rem;
    }
    
    .listing-info {
        padding: 8px;
    }

    .listing-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
    
    .listing-category {
        font-size: 0.75rem;
    }
    
    .listing-meta {
        font-size: 0.7rem;
    }
    
    .meta-icon {
        width: 12px;
        height: 12px;
    }
}