@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

/*variable*/
:root {
    --main-color: #d90429;
    --text-color: #020102;
    --bg-color: #e2e2e2;
}

section {
    padding: 4rem 0 2rem;
}

img {
    width: 100%;
}

body {
    color: var(--text-color);
}

.container {
    max-width: 1068px;
    margin-left: auto;
    margin-right: auto;
}

header {
    display: block;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

header.shadow {
    background: var(--bg-color);
    box-shadow: 4px 4px 20px rgb(15 54 55 / 10%);
    transition: 0.5s ease;
}

header.shadow #search-icon {
    color: var(--text-color);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 35px;
}

#menu-icon {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    display: none;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo span {
    color: var(--main-color);
}

#navbar {
    margin-top: 0.5rem;
}

/* nav bar phần xe */
#navbar:hover {
    cursor: pointer;
}

.navbar {
    display: flex;
    column-gap: 2rem;
}

.navbar a {
    color: var(--text-color);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 500;
}

.navbar a:hover,
.navbar .active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}


#navbar1 {
    margin-top: 0.5rem;
}

/* nav bar phần xe */
#navbar1:hover {
    cursor: pointer;
}

.navbar1 {
    display: flex;
    column-gap: 2rem;
}

.navbar1 a {
    color: var(--text-color);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 500;
}

.navbar1 a:hover,
.navbar1 .active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

#search-icon {
    font-size: 24px;
    cursor: pointer;
    color: var(--bg-color);
}

.search-box {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-color);
    box-shadow: 4px 4px 20px rgb(15 54 55 / 10%);
    border: 1px solid var(--main-color);
    border-radius: 0.5rem;
    clip-path: circle(0% at 100% 0%);
}

.search-box.active {
    clip-path: circle(144% at 100% 0%);
    transition: 0.4s;
}

.search-box input {
    width: 100%;
    padding: 20px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
}

.home {
    margin-top: auto;
    width: 100%;
    min-height: 640px;
    display: flex;
    align-items: center;
    background: url("../img/Background-home.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center left;
}

.home-text {
    padding-left: 130px;
}

.home-text h1 {
    font-size: 2.4rem;
}

.home-text span {
    color: var(--main-color);
}

.home-text p {
    font-size: 0.938rem;
    font-weight: 300;
    margin: 0.5rem 0 1.2rem;
}

.btn {
    padding: 10px 22px;
    background: var(--main-color);
    color: var(--bg-color);
    font-weight: 400;
}

.btn:hover {
    background: #fd052f;
}

.heading {
    text-align: center;
    margin-bottom: 30px;
}

.heading span {
    font-weight: 500;
    color: var(--main-color);
}

.heading p {
    font-size: 0.938rem;
    font-weight: 300;
}

/* responsive đoạn này */
.cars-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.info {
    gap: 2rem;
}

/* box là nội dung trong hộp  */
.box {
    flex: 1 1 17rem;
    position: relative;
    padding: 20px 25px 20px 25px;
    display: flex;
    background: #f6f6f6;
    border-radius: 0.5rem;
    max-width: 330px;
    max-height: 360px;
}

.box img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
    margin-bottom: 1rem;
}

.box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.box span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--main-color);
}

.box .bx {
    color: var(--main-color);
    margin: 0.8rem 0;
}

.box .btn {
    max-width: 120px;
}

.box .details {
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 1.3rem;
    right: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.box .details:hover {
    color: var(--main-color);
    text-decoration: underline;
}

.footer {
    background: var(--text-color);
    color: #f6f6f6;
    border-top: 2px solid var(--main-color);
    padding: 3rem 15rem 5rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.footer-container .logo {
    color: var(--bg-color);
    margin-bottom: 1rem;
}

.footer-container .footer-box {
    display: flex;
    flex-direction: column;
}

.social {
    display: flex;
    align-items: center;
}

.social a {
    font-size: 24px;
    color: var(--bg-color);
    margin-right: 1rem;
}

.social a:hover {
    color: var(--main-color);
}

.footer-box h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.footer-box a {
    color: #818181;
    margin-bottom: 10px;
}

.footer-box a:hover {
    color: var(--bg-color);
}


.input-elevated {
    font-size: 16px;
    line-height: 1.5;
    border: none;
    background: #FFFFFF;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path fill='%23838D99' d='M13.22 14.63a8 8 0 1 1 1.41-1.41l4.29 4.29a1 1 0 1 1-1.41 1.41l-4.29-4.29zm-.66-2.07a6 6 0 1 0-8.49-8.49 6 6 0 0 0 8.49 8.49z'></path></svg>");
    background-repeat: no-repeat;
    background-position: 10px 10px;
    background-size: 20px 20px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    border-radius: 5px;
    width: 300px;
    padding: .5em 1em .5em 2.5em;
}

.input-elevated::placeholder {
    color: #838D99;
}

.input-elevated:focus {
    outline: none;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.16);
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination button {
    margin: 0 5px;
    padding: 10px 15px;
    border: 1px solid #170808;
    background-color: #fff;
    cursor: pointer;
}

.pagination button.active {
    background-color: #fb0404;
    color: rgb(0, 0, 0);
}

/* Responsive */
@media (max-width:1080px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width:991px) {
    .nav {
        padding: 15px 20px;
    }

    section {
        padding: 3rem 0 1rem;
    }

    .home-text {
        padding-left: 2rem;
    }

    .home-text h1 {
        font-size: 2.1rem;
    }

    .cars-container {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        margin-top: 2rem;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width:850px) {
    #menu-icon {
        display: initial !important;
    }

    .logo {
        text-align: center;
    }

    .nav {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        padding: 10px;
    }

    #menu-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

    .logo {
        font-size: 1.5rem;
        font-weight: bold;
        text-align: center;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        row-gap: 0.5rem;
        text-align: center;
        box-shadow: 4px 4px 20px rgb(15 54 55 / 20%);
        background-color: var(--bg-color);
        clip-path: circle(0% at 0% 0%);
        transition: 0.6s;
    }

    .navbar a {
        display: block;
        padding: 15px;
    }

    .navbar a:hover,
    .navbar .active {
        border-bottom: none;
        background: var(--main-color);
        color: var(--bg-color);
    }

    .navbar.active {
        clip-path: circle(144% at 0% 0%);
    }

    /* Stack navbar items vertically */
    .navbar1 {
        flex-direction: column;
        align-items: center;
        row-gap: 1rem;
        column-gap: 0;
    }

    .navbar1 a {
        font-size: 0.9rem;
        /* Adjust font size */
    }
    .footer {
        padding: 2rem 2rem; /* Further reduce padding */
    }

    .footer-box {
        flex: 1 1 100%; /* Full-width boxes */
    }

    .social {
        justify-content: center; /* Center social links */
    }
}