/* Vehicle Brands Widget Styles */

.vehicle-brands-title {
    margin-bottom: 30px;
    text-align: center;
}

.vehicle-brands-grid {
    display: grid;
    gap: 20px;
}

.brand-item {
    position: relative;
    transition: all 0.3s ease;
}

.brand-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.brand-image {
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.brand-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

/* Placeholder for missing images */
.brand-image.placeholder {
    background: #f0f0f0;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.no-image {
    font-size: 48px;
    font-weight: bold;
    color: #ccc;
}

.brand-name {
    font-size: 18px;
    margin: 10px 0 5px;
    font-weight: 600;
}

.brand-count {
    font-size: 14px;
    color: #666;
    display: block;
}

/* Hover Effects */
.scale-hover:hover .brand-image img {
    transform: scale(1.1);
}

.opacity-hover:hover .brand-image img {
    opacity: 0.7;
}

.grayscale-hover .brand-image img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.grayscale-hover:hover .brand-image img {
    filter: grayscale(0%);
}

/* Slider Styles */
.vehicle-brands-slider {
    position: relative;
    padding: 0 50px;
}

.vehicle-brands-slider .swiper-slide {
    height: auto;
}

.vehicle-brands-slider .brand-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vehicle-brands-slider .swiper-button-next,
.vehicle-brands-slider .swiper-button-prev {
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.vehicle-brands-slider .swiper-button-next:after,
.vehicle-brands-slider .swiper-button-prev:after {
    font-size: 20px;
}

.vehicle-brands-slider .swiper-pagination-bullet {
    background: #333;
    opacity: 0.3;
}

.vehicle-brands-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

/* RTL Support for slider */
.rtl .vehicle-brands-slider .swiper-button-next {
    left: 10px;
    right: auto;
}

.rtl .vehicle-brands-slider .swiper-button-prev {
    right: 10px;
    left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .vehicle-brands-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .vehicle-brands-slider {
        padding: 0 30px;
    }
}

@media (max-width: 480px) {
    .vehicle-brands-grid {
        grid-template-columns: 1fr !important;
    }
    
    .vehicle-brands-slider {
        padding: 0;
    }
    
    .vehicle-brands-slider .swiper-button-next,
    .vehicle-brands-slider .swiper-button-prev {
        display: none;
    }
}

/* Animation on load */
.brand-item {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.brand-item:nth-child(1) { animation-delay: 0.1s; }
.brand-item:nth-child(2) { animation-delay: 0.2s; }
.brand-item:nth-child(3) { animation-delay: 0.3s; }
.brand-item:nth-child(4) { animation-delay: 0.4s; }
.brand-item:nth-child(5) { animation-delay: 0.5s; }
.brand-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional styling for the vehicles grid (shortcode) */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.vehicle-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.vehicle-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-item h3 {
    padding: 15px 20px 10px;
    margin: 0;
    font-size: 20px;
}

.vehicle-categories {
    padding: 0 20px;
}

.category-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 5px;
}

.vehicle-excerpt {
    padding: 10px 20px;
    color: #666;
    font-size: 14px;
}

.read-more {
    display: inline-block;
    margin: 0 20px 20px;
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}-hover .brand-image img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.grayscale-hover:hover .brand-image img {
    filter: grayscale(0%);
}

/* Responsive */
@media (max-width: 768px) {
    .vehicle-brands-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .vehicle-brands-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Animation on load */
.brand-item {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.brand-item:nth-child(1) { animation-delay: 0.1s; }
.brand-item:nth-child(2) { animation-delay: 0.2s; }
.brand-item:nth-child(3) { animation-delay: 0.3s; }
.brand-item:nth-child(4) { animation-delay: 0.4s; }
.brand-item:nth-child(5) { animation-delay: 0.5s; }
.brand-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional styling for the vehicles grid (shortcode) */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.vehicle-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.vehicle-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-item h3 {
    padding: 15px 20px 10px;
    margin: 0;
    font-size: 20px;
}

.vehicle-categories {
    padding: 0 20px;
}

.category-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 5px;
}

.vehicle-excerpt {
    padding: 10px 20px;
    color: #666;
    font-size: 14px;
}

.read-more {
    display: inline-block;
    margin: 0 20px 20px;
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}