/* Custom styles for car listings */

.card-image {
    position: relative;
    overflow: hidden;
}

.car-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.tag-green {
    background-color: #60c631;
    color: white;
}

.tag-dark {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding-right: 15px;
}

.tag i {
    margin-right: 5px;
}

.discount-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 0;
    z-index: 2;
}

.discount-icon {
    background-color: #ffde59;
    color: #000;
    padding: 5px 10px;
    border-radius: 4px 0 0 4px;
    font-weight: 600;
    font-size: 12px;
}

.discount-percentage {
    background-color: #ff3a3a;
    color: white;
    padding: 5px 10px;
    border-radius: 0 4px 4px 0;
    font-weight: 600;
    font-size: 12px;
}

/* Ensure images have consistent aspect ratio */
.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Enhanced pricing section */
.pricing {
    display: flex;
    flex-direction: column;
}

.original-price {
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
}

.card-price p {
    margin-bottom: 0;
}

.card-price .car-price-text {
    color: #e74c3c;
    font-weight: 700;
    font-size: 18px;
}

.total-price {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

/* Enhanced car facilities */
.card-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.card-facilities p {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.card-facilities .card-miles::before,
.card-facilities .card-gear::before,
.card-facilities .card-fuel::before,
.card-facilities .card-seat::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}

.card-facilities .card-miles::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpath d='M12 6v6l4 2'%3E%3C/path%3E%3C/svg%3E");
}

.card-facilities .card-gear::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E");
}

.card-facilities .card-fuel::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 22h12'%3E%3C/path%3E%3Cpath d='M5 18h8'%3E%3C/path%3E%3Cpath d='M17 22v-5'%3E%3C/path%3E%3Cpath d='M9 2h6v4h-6z'%3E%3C/path%3E%3Cpath d='M5 6l4-4'%3E%3C/path%3E%3Cpath d='M15 6l4-4'%3E%3C/path%3E%3Cpath d='M5 14h14'%3E%3C/path%3E%3Cpath d='M5 10h14'%3E%3C/path%3E%3Cpath d='M5 6h14'%3E%3C/path%3E%3Cpath d='M10 14v8'%3E%3C/path%3E%3C/svg%3E");
}

.card-facilities .card-seat::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 9v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9'%3E%3C/path%3E%3Cpath d='M9 22V12h6v10M2 10.6L12 2l10 8.6'%3E%3C/path%3E%3C/svg%3E");
}

/* Deal button */
.view-deal-button .btn {
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 4px;
    background-color: #ff5a5f;
    border-color: #ff5a5f;
    color: white;
    transition: all 0.3s ease;
}

.view-deal-button .btn:hover {
    background-color: #e74c3c;
    border-color: #e74c3c;
}
