/* Modern Search Overlay */
.hero-search-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    transform: translateY(-5%);
    padding: 0 15px;
}

.search-container {
    max-width: 300px;
    margin: 0px 0px 0px 50px;
}

.search-box {
    background: rgb(255 255 255 / 22%);
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: flex-end;
}

.form-group {
    margin: 0;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #ffffff;
    font-size: 0.85rem;
    padding-left: 12px;
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 12px 15px;
    border: none;
    border-bottom: 2px solid #eee;
    border-radius: 0;
    font-size: 0.95rem;
    background: transparent;
    transition: all 0.3s ease;
    box-shadow: none;
}

.form-control:focus {
    border-color: #ff4d4d;
    outline: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.5);
}

.btn-search {
    width: 100%;
    height: 52px;
    background: #ff4d4d;
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.btn-search:hover {
    background: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 77, 77, 0.4);
}

/* Adjust slider container to accommodate the search overlay */
.home-slider {
    position: relative;
    padding-bottom: 10px; /* Space for search form */
}

/* Modern Vehicle Card Styles */
.vehicle-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
    height: auto;
    display: flex;
    flex-direction: column;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.vehicle-image {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: #f9f9f9;
}

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

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

.vehicle-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-badge.new {
    background: #4CAF50;
}

.vehicle-badge.discount {
    background: #FF5722;
}

.vehicle-badge.reserved {
    background: #9C27B0;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #eee;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wishlist-btn:hover, .wishlist-btn.active {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
}

.vehicle-details {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vehicle-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.3;
}

.vehicle-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.vehicle-price {
    font-size: 16px;
    font-weight: 700;
    color: #ff4d4d;
    margin: 0;
}

.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0 16px;
    padding: 0;
    list-style: none;
}

.vehicle-specs li {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
    background: #f7f7f7;
    padding: 4px 10px;
    border-radius: 12px;
    line-height: 1.2;
}

.vehicle-specs i {
    margin-right: 4px;
    color: #888;
    font-size: 10px;
}

.vehicle-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.view-details-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: #ff4d4d;
    color: white;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.view-details-btn:hover {
    background: #e63939;
    transform: translateY(-1px);
}

.vehicle-price .location i {
    margin-right: 5px;
    color: #ff4d4d;
}

/* Car Showcase Slider */
.brand-showcase {
    padding: 5px 0 5px;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.brand-showcase .container {
    position: relative;
    padding: 0 15px;
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    position: relative;
    display: inline-block;
}

.section-header h2 span {
    color: #ff4d4d;
    font-weight: 700;
}

.slider-nav {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 15px;
    top: 0;
}

.slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.slider-nav-btn:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.slider-nav-btn.slick-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
    transform: none;
    box-shadow: none;
}

/* Car Showcase Slider */
.car-showcase-slider {
    margin: 0 auto;
    padding: 20px 0 40px;
    position: relative;
    opacity: 1;
    visibility: visible !important;
    width: 100%;
    max-width: 1400px;
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease-out;
    will-change: transform;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for all browsers */
.car-showcase-slider {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.car-showcase-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Ensure the slider container takes full width */
.brand-showcase .container {
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

/* Slider navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    border: none;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.slider-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.slider-nav-btn:focus {
    outline: 2px solid rgba(0, 0, 0, 0.2);
    outline-offset: 2px;
}

.slider-nav-btn:hover {
    background: #f5f5f5;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav-btn.prev {
    left: 20px;
}

.slider-nav-btn.next {
    right: 20px;
}

.slider-nav-btn i {
    font-size: 16px;
    color: #333;
    pointer-events: none;
}

/* Fallback grid when slider fails */
.car-showcase-slider.slider-failed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 15px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Car showcase slide styles */
.car-showcase-slide {
    padding: 0 10px;
    margin: 0;
    outline: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    min-width: 250px;
    width: 250px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    box-sizing: border-box;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.car-showcase-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 100%;
    border: 1px solid #eee;
}

.car-showcase-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.car-showcase-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.car-showcase-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    width: 100%;
}

/* Ensure images are visible */
.car-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

.car-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.car-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-showcase-link:hover .car-overlay {
    opacity: 1;
}

.view-more {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-logo {
    position: absolute;
    bottom: -25px;
    right: 20px;
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 2;
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) contrast(0.8);
    transition: all 0.3s ease;
}

.car-showcase-link:hover .brand-logo img {
    filter: none;
}

.car-showcase-details {
    padding: 30px 20px 20px;
    text-align: left;
}

.car-showcase-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #222;
}

.car-count {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
}

.car-count:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #ff4d4d;
    margin-right: 10px;
}

.brand-slide:hover .brand-slide-inner {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.brand-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px 15px;
    text-align: center;
    height: 100%;
}

.brand-slide-img {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.brand-slide-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.9);
    transition: all 0.3s ease;
}

.brand-slide:hover .brand-slide-img img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.05);
}

.brand-slide-info {
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.brand-slide-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-slide-info p {
    font-size: 12px;
    color: #777;
    margin: 0;
}

/* Slick Dots */
.slick-dots {
    position: relative;
    bottom: 0;
    margin-top: 20px;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slick-dots li {
    margin: 0;
}

.slick-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ddd;
    text-indent: -9999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slick-dots li.slick-active button {
    background: #ff4d4d;
    width: 24px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .brand-slide {
        width: calc(20% - 16px);
    }
}

@media (max-width: 991px) {
    .brand-slide {
        width: calc(25% - 15px);
    }
}

@media (max-width: 1199px) {
    .car-showcase-slider {
        margin: 0 -10px;
    }
    
    .car-showcase-slide {
        padding: 0 10px;
    }
    
    .car-showcase-image {
        height: 180px;
    }
    .brand-logo {
        width: 60px;
        height: 60px;
        bottom: -20px;
    }
    .car-showcase-details h3 {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .brand-slide {
        width: calc(25% - 15px);
    }
    .car-showcase-slider {
        padding: 10px 20px 30px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .car-showcase-slider::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .car-showcase-slide {
        width: 280px;
        scroll-snap-align: start;
    }
    
    .car-showcase-image {
        height: 180px;
    }
    
    .slider-nav {
        display: none;
    }
}
    
    .brand-logo {
        width: 50px;
        height: 50px;
        bottom: -15px;
    }
    
    .car-showcase-details {
        padding: 25px 15px 15px;
    }
}

@media (max-width: 767px) {
    .car-showcase-slider {
        padding: 10px 15px 25px;
    }
    
    .car-showcase-slide {
        width: 85%;
    }
    
    .car-showcase-image {
        height: 160px;
    }
    
    .brand-logo {
        width: 50px;
        height: 50px;
        padding: 8px;
    }
    
    .car-showcase-details h3 {
        font-size: 15px;
    }
    
    .car-showcase-details {
        padding: 20px 12px 12px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 575px) {
    .car-showcase-slider {
        padding: 5px 0 20px;
    }
    
    .car-showcase-image {
        height: 120px;
    }
    
    .car-showcase-details {
        padding: 20px 12px 12px;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
        bottom: -12px;
    }
    
    .car-showcase-details h3 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .car-count {
        font-size: 11px;
    }
    
    .car-count:before {
        width: 15px;
        margin-right: 8px;
    }
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .vehicle-specs {
        gap: 8px;
    }
    
    .vehicle-specs span {
        font-size: 12px;
    }
    
    .vehicle-price .price {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .vehicle-card {
        margin-bottom: 20px;
    }
    
    .vehicle-image {
        height: 180px;
    }
    
    .vehicle-details {
        padding: 15px;
    }
    
    .vehicle-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .vehicle-specs {
        gap: 6px;
    }
    
    .vehicle-price .price {
        font-size: 16px;
    }
}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 10px;
    font-size: 0.9rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    margin-top: 15px;
}

.product-meta span {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.product-meta i {
    margin-right: 5px;
    color: #ff4d4d;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .search-header h1 {
        font-size: 2rem;
    }
    
    .hero-search-section {
        padding: 40px 0;
    }
    
    .product-cart-wrap {
        margin-bottom: 20px;
    }
}
