/* BestAutoSales.In - Custom Styles */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Prevent layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Carousel images fixed height */
.carousel-item img {
    height: 400px;
    object-fit: cover;
    width: 100%;
}

#carGallery .carousel-item img {
    height: 500px;
    object-fit: cover;
}

/* Hero Carousel */
.hero-slide {
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

/* Overlay removed - text directly on image with shadow */

.hero-slide > .container {
    position: relative;
    z-index: 1;
}

.hero-slide-1 {
    background-image: url('../images/hero/hero-1.jpg');
}

.hero-slide-2 {
    background-image: url('../images/hero/hero-2.jpg');
}

.hero-slide-3 {
    background-image: url('../images/hero/hero-3.jpg');
}

/* Car Cards */
.car-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    overflow: hidden;
}

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

.car-card img {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

/* Feature Icons */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feature-icon-sm {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Cards */
.card {
    border-radius: 10px;
    border: none;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 6px;
}

/* Top Bar */
.top-bar {
    background-color: #212529;
    font-size: 14px;
}

.top-bar a {
    transition: color 0.3s;
}

.top-bar a:hover {
    color: var(--primary-color) !important;
}

/* Navbar */
.navbar {
    padding: 15px 0;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 8px 16px !important;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Footer */
footer {
    background-color: #212529;
}

footer a {
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Spec Box */
.spec-box {
    text-align: center;
    transition: all 0.3s;
}

.spec-box:hover {
    background-color: #e9ecef !important;
    transform: translateY(-3px);
}

.spec-box i {
    font-size: 24px;
    display: block;
}

/* Image Preview */
#imagePreview img {
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

/* Price Range Slider */
.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 400px;
    }
    
    .car-card img {
        height: 180px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Prevent horizontal scroll */
.container-fluid,
.row {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Placeholder Image */
img[src*="placeholder"] {
    background-color: #e9ecef;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}
