/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo h1 {
    color: #2c5aa0;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2c5aa0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background: #e55a2b;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #2c5aa0;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.feature h3 {
    color: #2c5aa0;
    margin-bottom: 10px;
}

/* Location Section */
.location {
    padding: 80px 0;
    background: #f8f9fa;
}

.location h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #2c5aa0;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.location-info h3 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.location-info p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.map-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.map-container iframe {
    border-radius: 8px;
}

/* Inventory Styles */
.inventory-header {
    background: #2c5aa0;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.inventory-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.filters {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-bar {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-bar select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.filter-bar button {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.filter-bar button:hover {
    background: #5a6268;
}

.inventory-grid {
    padding: 50px 0;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.car-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.car-content {
    display: flex;
    min-height: 200px;
}

.car-image {
    position: relative;
    cursor: pointer;
    width: 250px;
    min-width: 250px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.1rem;
}

.car-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.car-image:hover img {
    transform: scale(1.02);
}

.car-details {
    padding: 20px;
    flex: 1;
}

.car-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c5aa0;
}

.car-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.car-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 15px;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #1e3d72;
}

/* Contact Styles */
.contact-header {
    background: #2c5aa0;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.contact-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.contact-content {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.info-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-box h3 {
    color: #2c5aa0;
    margin-bottom: 10px;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

/* Reviews Section */
.reviews-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.reviews-section h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c5aa0;
}

.reviews-note {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-style: italic;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.review-header h3 {
    color: #2c5aa0;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-rating {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.cart-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.cart-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

#clear-cart {
    background: #6c757d;
    color: white;
}

#clear-cart:hover {
    background: #5a6268;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

#cancel-inquiry {
    background: #6c757d;
    color: white;
}

#cancel-inquiry:hover {
    background: #5a6268;
}

.contact-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cart-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info h4 {
    color: #2c5aa0;
    margin-bottom: 5px;
}

.cart-item-price {
    font-weight: 600;
    color: #ff6b35;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-item:hover {
    background: #c82333;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

footer a {
    color: #2c5aa0;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }
    
    .logo img {
        width: 120px;
        height: 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .about-grid,
    .location-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-bar select,
    .filter-bar button {
        width: 100%;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .cart-actions,
    .form-actions {
        flex-direction: column;
    }
}
/* Inventory Page - Smaller Thumbnail Images */
.car-image {
    position: relative;
    cursor: pointer;
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.car-image img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.car-image:hover img {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.image-placeholder {
    height: 200px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Gallery Modal - Optimized for 13-inch screens */
#image-gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.gallery-modal-content {
    position: relative;
    margin: 3% auto;
    width: 85%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.95);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

.gallery-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    min-height: 400px;
    max-height: 500px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

#gallery-main-image {
    max-width: 90%;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 20px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 2001;
    color: #333;
}

.gallery-nav:hover {
    background: rgba(255,255,255,1);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.gallery-counter {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-height: 100px;
    overflow-y: auto;
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.gallery-thumbnail:hover {
    border-color: #2c5aa0;
}

.gallery-thumbnail.active {
    border-color: #ff6b35;
}

.gallery-modal-content .close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.gallery-modal-content .close:hover {
    color: #ff6b35;
}

/* Responsive Gallery - Mobile Optimized */
@media (max-width: 768px) {
    /* Mobile Inventory Thumbnails */
    .car-content {
        flex-direction: column;
    }
    
    .car-image {
        width: 100%;
        height: 180px;
    }
    
    .car-image img {
        height: 180px;
    }
    
    /* Mobile Gallery Modal */
    .gallery-modal-content {
        width: 95%;
        height: 90vh;
        margin: 5% auto;
        padding: 15px;
    }
    
    .gallery-container {
        min-height: 250px;
        max-height: 350px;
        margin-bottom: 10px;
    }
    
    #gallery-main-image {
        max-width: 95%;
        max-height: 300px;
        box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    }
    
    .gallery-nav {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .gallery-nav.prev {
        left: 5px;
    }
    
    .gallery-nav.next {
        right: 5px;
    }
    
    .gallery-counter {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .gallery-thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .gallery-thumbnails {
        max-height: 60px;
        gap: 8px;
    }
    
    .gallery-modal-content .close {
        font-size: 28px;
        right: 15px;
        top: 10px;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .gallery-modal-content {
        width: 98%;
        height: 95vh;
        margin: 2.5% auto;
        padding: 10px;
    }
    
    .gallery-container {
        min-height: 200px;
        max-height: 280px;
    }
    
    #gallery-main-image {
        max-width: 98%;
        max-height: 250px;
    }
    
    .gallery-nav {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .gallery-thumbnail {
        width: 45px;
        height: 34px;
    }
    
    .gallery-thumbnails {
        max-height: 50px;
        gap: 5px;
    }
}