﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f7f8fa;
    color: #172033;
}

a {
    text-decoration: none;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    height: 76px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7%;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    cursor: default;
}

    .logo img {
        width: 65px;
        height: 65px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
        border: 2px solid #e63946;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: black;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

    .nav-links a {
        color: #394150;
        font-size: 15px;
        font-weight: 600;
    }

        .nav-links a:hover {
            color: #e63946;
        }

.login-btn {
    background: #e63946;
    color: #fff !important;
    padding: 11px 21px;
    border-radius: 8px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 600px;
    background: linear-gradient( 90deg, rgba(9, 16, 29, .90), rgba(9, 16, 29, .60), rgba(9, 16, 29, .20) ), url("https://images.unsplash.com/photo-1542282088-72c9c27ed0cd?auto=format&fit=crop&w=1900&q=85");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-content {
    width: 86%;
    max-width: 1250px;
    margin: auto;
    color: #fff;
}

.hero-label {
    display: inline-block;
    background: rgba(230, 57, 70, .15);
    border: 1px solid rgba(255,255,255,.25);
    color: #ffccd1;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 55px;
    line-height: 1.1;
    max-width: 700px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    max-width: 600px;
    font-size: 17px;
    line-height: 1.7;
    color: #e4e7ec;
    margin-bottom: 30px;
}

.hero-btn {
    display: inline-block;
    padding: 14px 27px;
    background: #e63946;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    transition: .25s;
}

    .hero-btn:hover {
        background: #c92d3a;
        color: #fff;
        transform: translateY(-1px);
    }


/* =========================================================
   SEARCH BOX
========================================================= */

.search-wrapper {
    width: 86%;
    max-width: 1120px;
    margin: -65px auto 0;
    position: relative;
    z-index: 20;
}

.search-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 28px;
    border-radius: 15px;
    box-shadow: 0 15px 45px rgba(0,0,0,.13);
}

.search-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}

.search-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
    gap: 12px;
}

.search-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 11px 14px;
}

    .search-item label {
        display: block;
        color: #89909d;
        font-size: 11px;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .search-item select,
    .search-item input {
        width: 100%;
        border: 0;
        outline: none;
        font-family: inherit;
        font-size: 14px;
        background: transparent;
    }

.search-btn {
    border: 0;
    background: #e63946;
    color: #fff;
    padding: 0 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

    .search-btn:hover {
        background: #c92d3a;
    }


/* =========================================================
   GENERAL SECTION
========================================================= */

.section {
    width: 86%;
    max-width: 1250px;
    margin: 85px auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 30px;
}

    .section-header h2 {
        font-size: 31px;
        font-weight: 800;
        margin-bottom: 7px;
    }

    .section-header p {
        color: #747c89;
    }

.view-all {
    color: #e63946;
    font-weight: 700;
    font-size: 14px;
}

    .view-all:hover {
        color: #c92d3a;
    }


/* =========================================================
   CATEGORIES
========================================================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.category {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: .25s;
}

    .category:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(0,0,0,.08);
    }

.category-icon {
    width: 65px;
    height: 65px;
    margin: auto auto 15px;
    border-radius: 50%;
    background: #fff0f1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
}

.category h3 {
    font-size: 17px;
    margin-bottom: 7px;
}

.category p {
    color: #8b929d;
    font-size: 13px;
}


/* =========================================================
   CARS
========================================================= */

.car-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.car-card {
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: .25s;
}

    .car-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 35px rgba(0,0,0,.10);
    }

.car-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

    .car-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: .4s;
    }

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

.car-tag {
    position: absolute;
    left: 15px;
    top: 15px;
    background: #e63946;
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.car-content {
    padding: 20px;
}

.car-brand {
    color: #89909d;
    font-size: 13px;
    margin-bottom: 5px;
}

.car-content h3 {
    font-size: 20px;
    margin-bottom: 14px;
}

.car-info {
    display: flex;
    gap: 12px;
    color: #777f8d;
    font-size: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.car-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
}

.price {
    color: #e63946;
    font-size: 19px;
    font-weight: 800;
}

    .price small {
        color: #888;
        font-size: 12px;
        font-weight: 400;
    }

.rent-btn {
    background: #e63946;
    color: #fff;
    padding: 9px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    transition: .25s;
}

    .rent-btn:hover {
        color: #fff;
        background: #c92d3a;
    }


/* =========================================================
   WHY US
========================================================= */

.why-us {
    background: #fff;
    padding: 75px 7%;
}

.why-grid {
    max-width: 1250px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.why-card {
    text-align: center;
    padding: 25px;
}

.why-icon {
    font-size: 35px;
    margin-bottom: 15px;
}

.why-card h3 {
    margin-bottom: 8px;
    font-size: 17px;
}

.why-card p {
    color: #777f8d;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   REVIEWS
========================================================= */

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.review {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #eee;
    transition: .25s;
}

    .review:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,0,0,.06);
    }


/* STARS */

.stars {
    color: #f5b301;
    margin-bottom: 15px;
    font-size: 15px;
}

    .stars .empty-star {
        color: #ddd;
    }


/* REVIEW CONTENT */

.review p {
    color: #5f6672;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}


/* REVIEW USER */

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* =========================================================
   REVIEW AVATAR
   ĐỒNG BỘ AVATAR TÀI KHOẢN
   KÍCH THƯỚC NHỎ 42x42
========================================================= */

.avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    max-width: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 50%;
    background: #e63946;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
}

    .avatar img {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        max-width: 42px;
        max-height: 42px;
        display: block;
        object-fit: cover;
        border-radius: 50%;
    }


/* REVIEW USER NAME */

.review-user strong {
    display: block;
    font-size: 14px;
    color: #172033;
    margin-bottom: 3px;
}

.review-user span {
    display: block;
    font-size: 12px;
    color: #999;
}


/* =========================================================
   REVIEW FORM
========================================================= */

.review-form-wrapper {
    max-width: 850px;
    margin: 55px auto 0;
    padding: 38px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #eee;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);
}


/* FORM HEADER */

.review-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.review-form-label {
    display: inline-block;
    color: #e63946;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.review-form-header h3 {
    margin: 0 0 8px;
    font-size: 26px;
    color: #222;
}

.review-form-header p {
    margin: 0;
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   CURRENT USER
========================================================= */

.review-current-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 22px;
    background: #f8f9fb;
    border: 1px solid #eee;
    border-radius: 10px;
}


/* AVATAR HIỆN TẠI */

.review-current-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    max-width: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: #e63946;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
}

    .review-current-avatar img {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        max-width: 42px;
        max-height: 42px;
        object-fit: cover;
        border-radius: 50%;
        display: block;
    }


/* CURRENT USER TEXT */

.review-current-user strong {
    display: block;
    font-size: 14px;
    color: #222;
    margin-bottom: 3px;
}

.review-current-user span {
    display: block;
    font-size: 12px;
    color: #999;
}


/* =========================================================
   FORM GROUP
========================================================= */

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

    .review-form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #333;
    }


    /* TEXTAREA */

    .review-form-group textarea {
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 9px;
        padding: 13px 14px;
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        outline: none;
        resize: vertical;
        min-height: 120px;
        transition: .25s;
    }

        .review-form-group textarea:focus {
            border-color: #e63946;
            box-shadow: 0 0 0 3px rgba(230, 57, 70, .08);
        }


/* =========================================================
   STAR RATING INPUT
========================================================= */

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    height: 46px;
}

    .rating-input input {
        display: none;
    }

    .rating-input label {
        margin: 0 !important;
        font-size: 28px;
        color: #d8d8d8;
        cursor: pointer;
        transition: .2s;
    }

        .rating-input label:hover,
        .rating-input label:hover ~ label {
            color: #f4b400;
        }

    .rating-input input:checked ~ label {
        color: #f4b400;
    }


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.review-submit-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 9px;
    background: #e63946;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

    .review-submit-btn span {
        margin-left: 8px;
        font-size: 18px;
    }

    .review-submit-btn:hover {
        background: #c92835;
        transform: translateY(-1px);
        box-shadow: 0 7px 18px rgba(230, 57, 70, 0.22);
    }


/* =========================================================
   REVIEW MESSAGE
========================================================= */

.review-message {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 600;
}

    .review-message.success {
        background: #eaf8ee;
        color: #237a3b;
        border: 1px solid #c9ecd3;
    }

    .review-message.error {
        background: #fff0f1;
        color: #c92835;
        border: 1px solid #ffd0d4;
    }


/* =========================================================
   NO REVIEW
========================================================= */

.no-review {
    grid-column: 1 / -1;
    text-align: center;
    padding: 45px 20px;
    background: #fff;
    border-radius: 15px;
    border: 1px dashed #ddd;
}

.no-review-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.no-review h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.no-review p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


/* =========================================================
   LOGIN REVIEW
========================================================= */

.review-login-box {
    text-align: center;
    padding: 35px 20px;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 12px;
}

.review-login-icon {
    font-size: 34px;
    margin-bottom: 10px;
}

.review-login-box h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.review-login-box p {
    color: #777;
    font-size: 14px;
    margin-bottom: 20px;
}

.review-login-btn {
    display: inline-block;
    padding: 10px 22px;
    background: #e63946;
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    transition: .25s;
}

    .review-login-btn:hover {
        background: #c92d3a;
        color: #fff;
    }


/* =========================================================
   CTA
========================================================= */

.cta {
    width: 86%;
    max-width: 1250px;
    margin: 80px auto;
    padding: 65px;
    border-radius: 18px;
    background: linear-gradient( 90deg, rgba(15,23,42,.90), rgba(15,23,42,.55) ), url("https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
    color: #fff;
}

    .cta h2 {
        font-size: 34px;
        margin-bottom: 12px;
    }

    .cta p {
        color: #d7dbe1;
        margin-bottom: 25px;
    }


/* =========================================================
   FOOTER
========================================================= */

footer {
    background: #111827;
    color: #fff;
    padding: 55px 7% 25px;
}

.footer-grid {
    max-width: 1250px;
    margin: auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

footer h3 {
    margin-bottom: 17px;
}

footer p,
footer a {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.8;
}

footer a {
    display: block;
    margin-bottom: 8px;
}

    footer a:hover {
        color: #fff;
    }

.copyright {
    max-width: fit-content;
    margin: 70px auto 0;
    padding-top: 10px;
    border-top: 1px solid #303847;
    text-align: center;
    color: #737b89;
    font-size: 12px;
}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 1000px) {

    .search-grid {
        grid-template-columns: 1fr 1fr;
    }

    .category-grid,
    .why-grid {
        grid-template-columns: 1fr 1fr;
    }

    .car-grid,
    .review-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 650px) {

    .navbar {
        padding: 0 5%;
    }

    .nav-links {
        gap: 12px;
    }

        .nav-links a:not(.login-btn) {
            display: none;
        }

    .hero {
        min-height: 520px;
    }

        .hero h1 {
            font-size: 38px;
        }

    .hero-content {
        width: 90%;
    }

    .search-grid,
    .category-grid,
    .car-grid,
    .why-grid,
    .review-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-btn {
        height: 48px;
    }

    .section {
        width: 90%;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .cta {
        width: 90%;
        padding: 40px 25px;
    }

        .cta h2 {
            font-size: 27px;
        }

    /* REVIEW FORM MOBILE */

    .review-form-wrapper {
        margin-top: 40px;
        padding: 25px 20px;
        border-radius: 14px;
    }

    .review-form-header h3 {
        font-size: 23px;
    }

    .review-form-header p {
        font-size: 13px;
    }

    .rating-input {
        justify-content: flex-start;
    }

        .rating-input label {
            font-size: 27px;
        }

    /* AVATAR VẪN NHỎ */

    .avatar,
    .review-current-avatar {
        width: 42px;
        height: 42px;
        min-width: 42px;
        max-width: 42px;
        min-height: 42px;
        max-height: 42px;
    }

        .avatar img,
        .review-current-avatar img {
            width: 42px;
            height: 42px;
            min-width: 42px;
            min-height: 42px;
            max-width: 42px;
            max-height: 42px;
        }
}


/* Customer contact / clickable car cards */
.car-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.car-card-link:hover {
    color: inherit;
    text-decoration: none;
}
.car-click-hint {
    font-size: 13px;
    font-weight: 600;
    color: #e63946;
    white-space: nowrap;
}
.car-contact-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.contact-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #e5e7eb;
    transition: .2s ease;
}
.contact-action:hover { transform: translateY(-1px); }
.contact-action.phone { color: #fff; background: #e63946; }
.contact-action.zalo { color: #fff; background: #0068ff; }
.contact-action.facebook { color: #fff; background: #1877f2; }
.footer-social-links { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.footer-social-links a { text-decoration:none; }
@media (max-width: 600px) {
  .car-contact-actions { grid-template-columns: 1fr; }
  .car-click-hint { white-space: normal; }
}
