/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
    --primary: #000000;
    --primary-light: #333333;
    --accent: #0070f3;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eaeaea;
    --gray-300: #e1e1e1;
    --gray-400: #cacaca;
    --gray-500: #a0a0a0;
    --gray-600: #666666;
    --gray-700: #444444;
    --gray-800: #333333;
    --gray-900: #111111;
    --radius: 4px;
}

body {
    background-color: white;
    color: var(--gray-900);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header and Navigation */
header {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}


.logo {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.logo-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: black;
}
.nav-links {
    display: none;
}

.nav-links a {
    margin-left: 32px;
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    align-items: center;
}

.sign-in-btn {
    background-color: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.sign-in-btn:hover {
    background-color: var(--primary-light);
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    margin-right: 15px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--gray-800);
}

/* Mobile Navigation */
.mobile-nav {
    background-color: white;
    padding: 12px 0;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-nav::-webkit-scrollbar {
    display: none;
}

.mobile-nav a {
    white-space: nowrap;
    margin-right: 24px;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-nav a.active {
    color: var(--primary);
}

/* Search Bar */
.search-section {
    background-color: var(--gray-50);
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
}

.search-container {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.search-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0 12px;
}

.search-input i {
    color: var(--gray-500);
    margin-right: 8px;
    font-size: 1rem;
}

.search-input select, .search-input input {
    width: 100%;
    padding: 12px 0;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.search-button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 12px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
}

.search-button:hover {
    background-color: var(--primary-light);
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    padding: 40px 0;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
}

.sidebar.mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    overflow-y: auto;
    border-radius: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-800);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    margin-right: 12px;
    accent-color: var(--primary);
}

.price-range {
    margin-top: 16px;
}

.price-range input[type="range"] {
    width: 100%;
    margin-bottom: 12px;
    accent-color: var(--primary);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.reset-button {
    width: 100%;
    padding: 12px;
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-800);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
}

.reset-button:hover {
    background-color: var(--gray-100);
}

/* Car Listings */
.car-listings {
    flex: 1;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.listings-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-options span {
    color: var(--gray-600);
    margin-right: 8px;
    font-size: 0.85rem;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.85rem;
    outline: none;
    color: var(--gray-800);
}

.car-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.car-card {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.car-image {
    position: relative;
    height: 200px;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: white;
    color: var(--gray-900);
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.car-details {
    padding: 20px;
}

.car-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.car-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.car-rating {
    display: flex;
    align-items: center;
    color: var(--gray-800);
}

.car-rating i {
    color: var(--gray-900);
    margin-right: 4px;
}

.car-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.car-feature {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.car-feature i {
    margin-right: 8px;
    color: var(--gray-500);
}

.car-feature.fuel {
    grid-column: span 2;
}

.fuel-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    margin-right: 8px;
}

.car-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.car-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.car-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-500);
}

.rent-button {
    background-color: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.rent-button:hover {
    background-color: var(--primary-light);
}

.no-cars {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
}

.no-cars p {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 16px;
}

.no-cars button {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
}

.no-cars button:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--gray-100);
    color: var(--gray-800);
    padding: 48px 0 24px;
    margin-top: 48px;
    border-top: 1px solid var(--gray-200);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.footer-section p {
    color: var(--gray-600);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gray-900);
}

.newsletter-form {
    display: flex;
    margin-top: 16px;
}

.newsletter-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
    font-size: 0.9rem;
}

.newsletter-button {
    background-color: var(--primary);
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.newsletter-button:hover {
    background-color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    margin-top: 32px;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Media Queries */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .mobile-nav {
        display: none;
    }

    .search-form {
        grid-template-columns: repeat(4, 1fr);
    }

    .main-content {
        flex-direction: row;
        gap: 32px;
    }

    .sidebar {
        width: 280px;
        margin-bottom: 0;
        position: sticky;
        top: 90px;
        height: fit-content;
    }

    .sidebar-header {
        display: none;
    }

    .car-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .car-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Navigation for Mobile */
.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .mobile-nav.active {
        display: flex;
        flex-direction: column;
    }
}

@media screen and (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
    
    .menu-toggle {
        display: none !important;
    }
}
/* Login Popup Styles */
.login-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.popup-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-popup {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-popup:hover {
    color: #000;
}

.login-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 15px 0;
    width: 100%;
    font-size: 16px;
}

.login-btn:hover {
    background-color: #0056b3;
}

.register-text {
    margin-top: 15px;
    color: #666;
}

.register-text a {
    color: #007bff;
    text-decoration: none;
}

.register-text a:hover {
    text-decoration: underline;
}