/**
 * VIP Featured Ads Cards Fix
 * Fixes image display and clickability issues
 */

/* VIP Card Container */
.vip-car-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vip-car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* VIP Badge */
.vip-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.vip-badge i {
    font-size: 14px;
}

/* Image Container */
.vip-car-image {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.vip-car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vip-car-card:hover .vip-car-image img {
    transform: scale(1.05);
}

/* Placeholder Image */
.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image i {
    font-size: 60px;
    color: rgba(255,255,255,0.9);
}

/* Content Area */
.vip-car-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Title */
.vip-car-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 3em;
}

/* Price */
.vip-car-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 15px;
}

/* Details */
.vip-car-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.vip-car-details span {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
}

.vip-car-details i {
    color: #999;
    margin-right: 5px;
}

/* Action Buttons */
.vip-car-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Primary Button */
.btn-vip {
    flex: 1;
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-vip:hover {
    background: linear-gradient(135deg, #0056CC 0%, #004099 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
    text-decoration: none !important;
}

/* Secondary Button */
.btn-outline-vip {
    flex: 0.8;
    background: white !important;
    color: #007AFF !important;
    border: 2px solid #007AFF !important;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.btn-outline-vip:hover {
    background: #007AFF !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    border-color: #007AFF !important;
}

/* Promotion Info */
.promotion-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.promotion-info i {
    margin-right: 5px;
    color: #FFD700;
}

/* Loading States */
.photo-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Error State */
.photo-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vip-car-image {
        height: 250px;
    }
    
    .vip-car-title {
        font-size: 1.1rem;
    }
    
    .vip-car-price {
        font-size: 1.5rem;
    }
    
    .vip-car-actions {
        flex-direction: column;
    }
    
    .btn-vip,
    .btn-outline-vip {
        width: 100%;
        flex: unset;
    }
}

/* Section Background */
.vip-featured-section {
    position: relative;
    overflow: hidden;
}

.vip-featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 8s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Fix for clickable entire card */
.vip-car-card {
    cursor: default;
}

/* Ensure links are above other elements */
.vip-car-actions {
    position: relative;
    z-index: 20;
}

.vip-car-actions a {
    position: relative;
    z-index: 25;
    pointer-events: auto !important;
}

/* Debug - Make sure buttons are visible and clickable */
.btn-vip,
.btn-outline-vip {
    min-height: 44px;
    font-size: 14px;
    display: inline-flex !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Make sure nothing blocks the buttons */
.vip-car-content {
    position: relative;
    z-index: 15;
}

/* Ensure badge doesn't block content */
.vip-badge {
    pointer-events: none;
}
