* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #dbdbdb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    box-shadow: -2px 1px 3px 0px #00000030;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-left, .nav-right {
    width: 60px;
    display: flex;
    justify-content: center;
}

.nav-center {
    flex: 1;
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.logo-img {
    height: auto;
    width: 155px;
    object-fit: contain;
}

.burger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.burger-menu span {
    width: 20px;
    height: 3px;
    background-color: #333;
    transition: 0.3s;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #333;
}

.search-container {
    display: none;
    padding: 12px 16px;
    border-top: 1px solid #dbdbdb;
    background-color: #fafafa;
    position: relative;
}

.search-container.active {
    display: block;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 16px;
    background-color: #ffffff;
}

.close-search {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Main Content */
.main-content { /* 60px navbar + 400px slideshow */
    padding: 20px 5px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Slideshow */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-top: 60px; /* Space for fixed navbar */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 60px 40px 60px;
    color: white;
    
    line-height: normal;
}

.hero-text {
    max-width: 90%;
    margin: 0 auto;
    text-align: center;
}

.hero-text h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: -2px 2px 4px rgba(0,0,0,0.5);
}

.hero-text p {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.95;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgb(0 0 0 / 73%);
}

.btn-hero {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 7px 8px;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
        margin-top: 10px;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
    background: linear-gradient(135deg, #0056b3, #003d82);
}

/* Hero Navigation Dots */
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: white;
    transform: scale(1.2);
}

.hero-dot:hover {
    background: rgba(255,255,255,0.8);
}

/* Hero Navigation Arrows */
.hero-prev, .hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.hero-prev {
    left: 0px;
    border-radius: 0 5px 5px 0;
}

.hero-next {
    right: 0px;
    border-radius: 5px 0 0 5px;
}

.hero-prev:hover, .hero-next:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 767px) {
    .hero-text h2 {
        font-size: 24px;
    }
    
    .hero-text p {
        font-size: 16px;
    }
    
    .btn-hero {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .hero-prev, .hero-next {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .main-content {
        margin-top: 470px; /* Adjusted for mobile */
    }
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

@media (min-width: 768px) {
    .car-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-content {
        padding: 20px 10px;
    }
}

.car-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.car-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.car-item:hover .car-image img {
    transform: scale(1.05);
}

.car-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px 12px 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.car-item:hover .car-overlay {
    transform: translateY(0);
}

/* Basic info always visible */
.car-basic-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: white;
    padding: 15px 12px 8px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.car-item:hover .car-basic-info {
    opacity: 0;
}

.car-basic-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.car-basic-info .year {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.car-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.car-info .price {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 2px;
}

.car-info .details {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.car-actions {
    display: flex;
    gap: 8px;
}

.btn-primary, .btn-secondary {
    font-family: 'Poppins', sans-serif;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Admin Styles */
.admin-container {
    max-width: 800px;
    margin: 80px auto 20px;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.admin-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.file-upload-area {
    border: 2px dashed #dbdbdb;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

/* Car Detail Styles */
.car-detail-container {
    max-width: 1200px;
    margin: 80px auto 20px;
    padding: 20px;
}

.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    margin-bottom: 30px;
}

.slide {
    display: none;
    width: 100%;
    height: 400px;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
    border: none;
    user-select: none;
    transition: background 0.3s ease;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background: rgba(0,0,0,0.8);
}

.car-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .car-details {
        grid-template-columns: 2fr 1fr;
    }
}

.car-info-detail {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.car-info-detail h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.car-info-detail .price {
    font-size: 28px;
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 20px;
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.spec-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.spec-item .spec-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.spec-item .spec-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-appointment-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.book-appointment-section h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Responsive */
@media (max-width: 767px) {
    .nav-container {
        padding: 12px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo-img {
        width: 140px;
    }
    
    .main-content {
        margin-top: 70px;
        padding: 15px 3px;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 16px;
    }
    
    .car-overlay {
        padding: 15px 8px 8px;
    }
    
    .car-basic-info {
        padding: 12px 8px 6px;
    }
    
    .car-basic-info h3 {
        font-size: 12px;
    }
    
    .car-basic-info .year {
        font-size: 11px;
    }
    
    .car-info h3 {
        font-size: 14px;
    }
    
    .car-info .price {
        font-size: 16px;
    }
    
    .car-info .details {
        font-size: 11px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 6px 8px;
        font-size: 11px;
    }
}