/* Professional Classima Listing Card Styles */
.classima-listing-card.modern-design {
    background: #ffffff;
    border: 1px solid #e8f1f8;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.classima-listing-card.modern-design::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.classima-listing-card.modern-design:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: #d1e3f8;
}

.classima-listing-card.modern-design:hover::before {
    opacity: 1;
}

/* Header Section */
.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

.category-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.category-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.category-badge:hover::before {
    left: 100%;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.negotiable-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    letter-spacing: 0.5px;
}

.love-btn {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 2px solid #fed7d7;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.love-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.love-btn:hover::before {
    width: 100%;
    height: 100%;
}

.love-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
}

.love-btn.loved {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    border-color: #f87171;
}

.love-btn.loved .heart-icon {
    fill: #dc2626;
    transform: scale(1.1);
}

.heart-icon {
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
}

.love-count {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Main Content */
.listing-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    color: #1a202c;
    letter-spacing: -0.02em;
}

.listing-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.listing-title a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.listing-excerpt {
    margin: 0;
    font-size: 15px;
    color: #718096;
    line-height: 1.6;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-price {
    font-size: 28px;
    font-weight: 900;
    color: #10b981;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.listing-price::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #10b981, #059669);
    transition: width 0.4s ease;
}

.classima-listing-card:hover .listing-price::after {
    width: 100%;
}

/* Meta Grid */
.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.meta-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e0, transparent);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.meta-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #cbd5e0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.meta-item:hover::before {
    opacity: 1;
}

.meta-item svg {
    opacity: 0.8;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.meta-item:hover svg {
    transform: scale(1.1);
}

.meta-item.views {
    color: #805ad5;
}

.meta-item.views svg {
    color: #805ad5;
}

.meta-item.condition {
    color: #d69e2e;
}

.meta-item.condition svg {
    color: #d69e2e;
}

.meta-item.location {
    color: #3182ce;
}

.meta-item.location svg {
    color: #3182ce;
}

.meta-item.date {
    color: #718096;
}

.meta-item.date svg {
    color: #718096;
}

/* Footer Section */
.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 12px;
    position: relative;
}

.listing-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.author-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.author-info:hover .author-avatar {
    transform: scale(1.05);
}

.author-info:hover .author-avatar::before {
    opacity: 1;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    transition: color 0.3s ease;
}

.author-info:hover .author-name {
    color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    background: linear-gradient(135deg, #ffffff, #f7fafc);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.action-btn.share-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff, #e6f0ff);
}

.action-btn.share-btn:hover svg {
    color: #667eea;
}

.action-btn.report-btn:hover {
    border-color: #e53e3e;
    background: linear-gradient(135deg, #fef0f0, #ffe6e6);
}

.action-btn.report-btn:hover svg {
    color: #e53e3e;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* No Listing State */
.no-listing {
    padding: 60px 40px;
    text-align: center;
    color: #a0aec0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
}

.no-listing p {
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .classima-listing-card.modern-design {
        padding: 20px;
    }
    
    .listing-title {
        font-size: 20px;
    }
    
    .listing-price {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .classima-listing-card.modern-design {
        padding: 18px;
        border-radius: 16px;
    }
    
    .listing-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .listing-title {
        font-size: 18px;
    }
    
    .listing-price {
        font-size: 22px;
    }
    
    .listing-excerpt {
        font-size: 14px;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px;
        margin: 16px 0;
    }
    
    .listing-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        padding-top: 16px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .action-btn {
        flex: 1;
        padding: 12px;
    }
    
    .author-info {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .classima-listing-card.modern-design {
        padding: 16px;
        border-radius: 14px;
    }
    
    .listing-title {
        font-size: 17px;
    }
    
    .listing-price {
        font-size: 20px;
    }
    
    .meta-item {
        font-size: 13px;
        gap: 10px;
    }
    
    .category-badge,
    .negotiable-badge {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .love-btn {
        width: 40px;
        height: 40px;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .action-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 360px) {
    .classima-listing-card.modern-design {
        padding: 14px;
    }
    
    .meta-grid {
        padding: 14px;
        gap: 12px;
    }
    
    .listing-title {
        font-size: 16px;
    }
    
    .listing-price {
        font-size: 18px;
    }
}

/* Focus styles for accessibility */
.action-btn:focus,
.love-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

/* Animation for love button */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.love-btn.loved .heart-icon {
    animation: heartBeat 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Loading state */
.classima-listing-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.classima-listing-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #f7fafc;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .classima-listing-card.modern-design {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .listing-title a {
        background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .listing-title a:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .listing-excerpt {
        color: #a0aec0;
    }
    
    .meta-grid {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }
    
    .meta-item {
        color: #cbd5e0;
    }
    
    .love-btn {
        background: linear-gradient(135deg, #2d3748, #4a5568);
        border-color: #4a5568;
    }
    
    .action-btn {
        background: linear-gradient(135deg, #2d3748, #4a5568);
        border-color: #4a5568;
    }
    
    .author-name {
        color: #e2e8f0;
    }
    
    .author-avatar {
        border-color: #4a5568;
    }
}

/* Print styles */
@media print {
    .classima-listing-card.modern-design {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .love-btn,
    .action-buttons {
        display: none;
    }
}