*{
    font-family: 'Roboto', sans-serif;
}
html {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
}
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;
}

.sideBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    background-color: #333;
    color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
}

.brand-list {
    list-style: none;
    padding: 20px 0 0 0;
    margin: 0;
    width: 100%;
    height: fit-content;
    overflow-y: scroll;
    overflow-x: hidden;
    direction: rtl;
}
.brand-list > * {
    direction: ltr;
}
.brand-list::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}
.brand-list::-webkit-scrollbar-thumb {
    background-color: white;
}
.brand-list::-webkit-scrollbar-track {
    background-color: transparent
}

.brand-item {
    width: 100%;
    margin: 10px 0;
    text-align: center;
}

.brand-link {
    padding: 10px 0;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.brand-link:hover {
    background-color: #555;
    transform: scale(1.1);
}

.brand-icon {
    height: 50px;
    margin-bottom: 5px;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.7));
}

.brand-name {
    font-size: 17px;
    letter-spacing: 0.5px;
}



.sortItems {
    position: fixed;
    top: 10vh;
    right: 80px;
    width: 80px; /* Adjusted width */
    height: 80vh; /* Adjusted height */
    overflow: hidden;
    padding: 10px; /* Added padding for spacing */
}

.display-price, .sort-price {
    height: auto; /* Let the height adjust based on content */
    margin-bottom: 10px; /* Spacing between sections */
}

.sortItems button {
    width: 100%;
    height: 30px; /* Reduced height */
    margin-bottom: 10px; /* Spacing between buttons */
    border-radius: 10px; /* Added rounded corners */
    font-size: 14px; /* Reduced font size */
    padding: 0 8px; /* Adjusted padding */
    border: none;
    color: white;
    background: linear-gradient(145deg, #333, #555); /* Darker gradient for a modern touch */
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.sortItems button:hover {
    background: linear-gradient(145deg, #444, #666); /* Slightly lighter gradient on hover */
    transform: scale(1.05); /* Slight zoom effect on hover */
}


#container {
    position: absolute;
    top: 0;
    left: 0;
    right: 180px;
    bottom: 0;
    height: fit-content;
    width: auto;
    background: white;
    margin: 15vh 10px 0 250px;
    display: flex;
    justify-content: center;
}

.content {
    flex: 1;
    padding: 20px;
}

.car-gallery {
    display: flex;
    flex-wrap: wrap;
    height: fit-content;
    padding: 0 0 100px 0;
    gap: 10px;
    justify-content: center;
}

.car-item {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 300px;
    max-width: 400px;
    width: 25vw;
    color: black;
    text-decoration: none;
    position: relative;
    display: flex; /* Enable flexbox layout */
    flex-direction: column; /* Stack children vertically */
}

.video-container {
    max-width: 400px;
    min-width: 300px;
    width: inherit;
    height: fit-content;
    position: relative;
    display: flex;
}

.car-img {
    max-width: 400px;
    min-width: 300px;
    object-fit: cover;
    width: inherit;
    position: relative;
}

.car-video {
    max-width: 400px;
    min-width: 300px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: -webkit-fill-available;
    opacity: 0;
    transition: opacity 0.3s ease;
    object-fit: cover;
}

.car-item:hover .car-video {
    opacity: 1;
}

.car-video:hover {
    opacity: 1;
    pointer-events: auto;
}

.car-item h3 {
    margin: 10px;
    font-size: 1.1em;
    color: black;
    text-decoration: none;
    width: 15vw;
}

.car-item p {
    margin: 0;
    color: #555;
    white-space: nowrap;
}

.Car-Trext {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 10px 10px 10px;
    margin-top: auto; /* Pushes .Car-Trext to the bottom */
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {

    .search input{
        width: 40vw !important;
        height: auto !important;
        left: 30vw !important;
        font-size: 10px !important;
        padding: 5px !important;
        margin: 0 !important;

    }
    .search button{
        width: auto !important;
        height: auto !important;
        left: 80vw !important;
        font-size: 10px !important;
        padding: 5px !important;
        margin: 0 !important;

    }

    .sortItems {
        display: none;
    }
    .sideBar {
        width: 25vw;
    }
    .brand-name{
        width: 20vw;
        text-align: center;
        direction: ltr;
        font-size: 10px;
    }

    .brand-list::-webkit-scrollbar {
        width: 5px;
    }


    #container {
        width: 65vw;
        margin: 15vh 5vw 0 30vw;
    }
    #container a, #container img{
        width: 65vw;
        min-width: 65vw;
    }
    #container h3{
        width: 60vw;
        min-width: 60vw;
    }

}

/* Responsive adjustments */
@media only screen and (max-width: 1100px) and (orientation: landscape) {

    .search input{

        width: 40vw !important;
        height: auto !important;
        left: 30vw !important;
        font-size: 18px !important;
        padding: 5px 20px !important;
        margin: 0 !important;

    }
    .search button{
        width: auto !important;
        height: auto !important;
        left: 80vw !important;
        font-size: 18px !important;
        padding: 5px 20px !important;
        margin: 0 !important;

    }

    .sortItems {
        right: 20px;
    }
    .display-price, .display-price form, .display-price button {
        height: auto;
    }
    .sort-price, .sort-price form, .sort-price button {
        height: auto;
    }

    #container {
        width: 50vw;
        margin: 15vh 20vw 0 30vw;
    }
    #container a, #container img{
        width: 50vw;
        min-width: 50vw;
    }
    #container h3{
        width: 45vw;
        min-width: 45vw;
    }

}
