/**
 * Vehicle Listing Widget Styles
 *
 * @package AutomotiveSEO
 * @since 1.0.0
 */

/* ========================================
   Container & Layout
   ======================================== */

.automotive-seo-vehicles {
    width: 100%;
    margin: 0 auto;
}

.vehicles-total {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding: 15px 0;
}

.vehicles-total strong {
    color: #333;
}

.vehicles-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* ========================================
   Grid View
   ======================================== */

.vehicles-grid.vehicles-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ========================================
   List View
   ======================================== */

.vehicles-grid.vehicles-list {
    grid-template-columns: 1fr;
}

.vehicles-list .vehicle-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

.vehicles-list .vehicle-image {
    height: 240px;
    border-radius: 8px;
}

.vehicles-list .vehicle-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
}

/* ========================================
   Vehicle Card
   ======================================== */

.vehicle-card {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

/*.vehicle-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}*/

/* ========================================
   Vehicle Image
   ======================================== */

.vehicle-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
}

.vehicle-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

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

.vehicle-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 14px;
}

/* Premium Badge */
.badge-premium {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #fbbf24;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}

/* Favorite Button */
.btn-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.btn-favorite:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-favorite svg {
    color: #6b7280;
}

.btn-favorite:hover svg {
    fill: #ef4444;
    color: #ef4444;
}

/* ========================================
   Vehicle Content
   ======================================== */

.vehicle-content {
    padding: 16px;
}

.vehicle-price {
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}

.vehicle-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.vehicle-title {
    margin-bottom: 12px;
}

.vehicle-title a {
    font-size: 14px;
    color: #4b5563;
    text-decoration: none;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vehicle-title a:hover {
    color: #2563eb;
}

/* ========================================
   Vehicle Specs
   ======================================== */

.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.spec-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
}

.spec-item svg {
    flex-shrink: 0;
}

/* .spec-location svg {
    color: #ef4444;
} */

/* .spec-origin svg {
    color: #10b981;
} */

/* .spec-steering svg {
    color: #8b5cf6;
} */

/* .spec-mileage svg {
    color: #f59e0b;
} */

/* ========================================
   Brand Logo
   ======================================== */

.vehicle-brand-logo {
    /* margin: 12px 0;
    min-height: 40px; */
    display: flex;
    align-items: center;
}

.vehicle-brand-logo img {
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
}

/* ========================================
   Vehicle Actions
   ======================================== */

.vehicle-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.vehicle-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-call {
    background: #fff;
    color: #448efb;
    border: 1px solid #448efb;
}

.btn-call:hover {
    background: #448efb;
    color: #fff!important;
}

.btn-whatsapp {
    background: #25d366!important;
    color: #fff;
    border: 1px solid #25d366;
}

.btn-whatsapp:hover {
    background: #00c144!important;
    color: #fff;
}

/* ========================================
   No Vehicles Found
   ======================================== */

.no-vehicles-found {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .vehicles-list .vehicle-card {
        grid-template-columns: 300px 1fr;
    }

    .vehicles-list .vehicle-image {
        height: 220px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .vehicles-grid.vehicles-grid {
        grid-template-columns: 1fr;
    }

    .vehicles-list .vehicle-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .vehicles-list .vehicle-image {
        height: 200px;
    }

    .vehicle-price {
        font-size: 20px;
    }

    .vehicle-name {
        font-size: 15px;
    }

    .vehicle-specs {
        gap: 8px;
    }

    .spec-item {
        font-size: 12px;
    }

    .vehicle-actions {
        grid-template-columns: 1fr;
    }

    .vehicles-total {
        font-size: 18px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .vehicle-content {
        padding: 12px;
    }

    .vehicle-price {
        font-size: 18px;
    }

    .vehicle-name {
        font-size: 14px;
    }

    .vehicle-title a {
        font-size: 13px;
        -webkit-line-clamp: 1;
    }

    .spec-item {
        font-size: 11px;
    }

    .vehicle-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .badge-premium {
        font-size: 11px;
        padding: 4px 8px;
    }

    .btn-favorite {
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   Pagination
   ======================================== */

.automotive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-btn,
.pagination-number {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: #f3f4f6;
    border-color: #2563eb;
    color: #2563eb;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-number.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.pagination-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile Pagination */
@media (max-width: 768px) {
    .automotive-pagination {
        gap: 6px;
    }

    .pagination-btn,
    .pagination-number {
        padding: 8px 12px;
        font-size: 13px;
    }

    .pagination-numbers {
        gap: 4px;
    }

    /* Hide middle page numbers on mobile, show only first, current, and last */
    .pagination-number:not(.active):not(:first-child):not(:last-child) {
        display: none;
    }
}
