.twd-car-sales-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.twd-car-card {
    position: relative;
    overflow: hidden;
    background: #000;
}

.twd-car-card a {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.twd-car-image img {
    display: block;
    width: 100%;
    height: 300px !important;
    object-fit: cover;
    transition: transform .5s ease;
}

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

/* Overlay */
.twd-car-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0);
    transition: background .35s ease;
}

/* Ẩn toàn bộ content */
.twd-car-content {
    display: none;
    text-align: center;
    width: 100%;
    padding: 30px;
}

/* Hover */
.twd-car-card:hover .twd-car-overlay {
    background: rgba(0, 0, 0, .85);
}

.twd-car-card:hover .twd-car-content {
    display: block;
}

/* Title */
.twd-car-content h3 {
    margin: 0 0 15px;
    color: #fff;
    font-family: inherit;
    font-size: 25px !important;
    ;
    line-height: 1.2 !important;
    ;
    text-transform: uppercase;
}

/* Meta */
.twd-car-meta {
    color: #fff;
    font-family: inherit;
    font-size: 16px !important;
    ;
    margin-bottom: 10px !important;
    ;
}

/* Price */
.twd-car-price {
    color: #fff;
    font-family: inherit;
    font-size: 22px !important;
    ;
    font-weight: 700;
    margin-bottom: 25px !important;
    ;
}

/* Button */
.twd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 180px;
    height: 45px;

    padding: 0 30px;

    background: #772583;
    border: 1px solid #fff;

    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;

    cursor: pointer;

    transition: all .3s ease;
}

.twd-btn:hover {
    background: #000;
    border-color: #000;
    color: #fff;
    border: 1px solid #fff;
}

.twd-btn:focus {
    outline: none;
    box-shadow: none;
}

/************ contact form *****************/

.cf7-contact {
    margin: auto;
    background: #772583;
    padding: 50px 60px;
}

/* Row */
.cf7-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 12px;
}

.cf7-col {
    flex: 1;
}

.cf7-full {
    margin-bottom: 25px;
}

/* Input */

.cf7-contact input:not([type=submit]),
.cf7-contact textarea {
    width: 100%;
    background: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 17px;
    box-sizing: border-box;
}

.cf7-contact textarea {
    height: 180px;
    resize: none;
}

/* Button */

.cf7-contact .wpcf7-submit {
    display: block;
    width: 260px;
    /* nhỏ lại */
    height: 58px;
    margin: 15px auto 0;
    /* căn giữa */
    background: #fff;
    color: #772583;
    border: 2px solid #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: .3s;
}

.cf7-contact .wpcf7-submit:hover {
    background: transparent;
    color: #fff;
}

/* Validation */

.cf7-not-valid-tip {
    font-size: 13px;
    margin-top: 5px;
}

.wpcf7-spinner {
    display: none;
}

/* Mobile */

@media(max-width:768px) {

    .cf7-row {
        flex-direction: column;
        gap: 18px;
    }

}

/****************detail *************/

.twd-car-single {

    max-width: 1400px;
    margin: 80px auto;
    padding: 0 20px;

}

.twd-gallery {

    margin-bottom: 60px;

}

.twd-header {

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;

    margin-bottom: 60px;

}

.twd-header-left {

    flex: 1;

}

.twd-header-right {

    width: 260px;

}

.twd-header h1 {

    margin: 0;
    color: #fff;
    font-size: 52px;
    line-height: 1.15;
    text-transform: uppercase;

}

.twd-price {

    margin-top: 15px;
    color: #fff;
    font-size: 40px;
    font-weight: 700;

}

.twd-price-note {

    color: #b7b7b7;
    margin-top: 5px;

}

.twd-content {

    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 80px;

    margin-bottom: 80px;

}

.twd-specs {

    border-top: 1px solid rgba(255, 255, 255, .15);

}

.spec-row {

    display: flex;
    justify-content: space-between;

    padding: 18px 0;

    border-bottom: 1px solid rgba(255, 255, 255, .12);

}

.spec-row span {

    color: #c7c7c7;

}

.spec-row strong {

    color: #fff;

}

.twd-description {

    color: #d9d9d9;
    line-height: 1.9;

}

.twd-contact {

    margin: 100px 0;

}

.twd-contact h2 {

    margin-bottom: 30px;
    text-transform: uppercase;

}

.twd-related {

    margin-top: 100px;

}

.twd-related h2 {

    margin-bottom: 40px;
    text-transform: uppercase;

}

.twd-related-grid {

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;

}

@media(max-width:991px) {

    .twd-header {

        flex-direction: column;

    }

    .twd-header-right {

        width: 100%;

    }

    .twd-content {

        grid-template-columns: 1fr;

    }

    .twd-related-grid {

        grid-template-columns: 1fr;

    }

}

.twd-related {
    margin-top: 100px;
}

.twd-related h2 {
    margin-bottom: 40px;
    text-transform: uppercase;
    text-align: center;
}

@media(max-width:768px) {

    .twd-car-sales-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px;
    }
}


@media(max-width:600px) {
    .cf7-contact {
        padding: 50px 20px;
    }

    .twd-car-sales-grid {
        display: grid;
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 20px;
        padding: 0 20px;
    }

    .car-related .twd-car-sales-grid {
        padding: 0px;
    }

    .twd-gallery-main img {
        height: auto !important;
    }

    .gallery-item img {
        height: auto !important;
        object-fit: contain !important;
    }

    .twd-car-image img {
        height: auto !important;
    }

    .contact-wrap {
        padding: 30px 10px !important;

    }

    .twd-gallery-wrap {
        margin-bottom: 0px !important;
    }

    .car-related,
    .car-gallery-section {
        padding: 40px 0 !important;
    }

    .cf7-contact .wpcf7-submit {
        width: 185px !important;
    }
}

/******************************detail page*******************************/
.twd-gallery-wrap {

    position: relative;

    margin-bottom: 70px;

}

.twd-gallery-main {

    border-radius: 8px;
    overflow: hidden;

}

.twd-gallery-main img {

    width: 100%;
    height: 680px;
    object-fit: cover;
    display: block;

}

/* thumbnail */

.twd-gallery-thumb {

    position: absolute;

    left: 50%;

    bottom: -45px;

    transform: translateX(-50%);

    width: 92%;

    background: #fff;

    border-radius: 8px;

    padding: 12px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, .15);

}

.twd-gallery-thumb .swiper-slide {

    cursor: pointer;

    border: 2px solid transparent;

    border-radius: 6px;

    overflow: hidden;

    transition: .25s;

}

.twd-gallery-thumb .swiper-slide-thumb-active {

    border-color: #fff;

    box-shadow: 0 0 0 2px #111;

}

.twd-gallery-thumb img {

    width: 100%;

    height: 95px;

    object-fit: cover;

    display: block;

}

/* arrows */

.twd-gallery-main .swiper-button-next,
.twd-gallery-main .swiper-button-prev {

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: rgba(0, 0, 0, .45);

    color: #fff;

}

.twd-gallery-main .swiper-button-next:after,
.twd-gallery-main .swiper-button-prev:after {

    font-size: 18px;

}

.twd-gallery-main .swiper-button-next:hover,
.twd-gallery-main .swiper-button-prev:hover {

    background: #000;

}

@media(max-width:991px) {

    .twd-gallery-main img {

        height: 450px;

    }

    .twd-gallery-thumb {

        position: relative;

        left: auto;

        bottom: auto;

        transform: none;

        width: 100%;

        margin-top: 15px;

        box-shadow: none;

        padding: 0;

        background: none;

    }

    .twd-gallery-thumb img {

        height: 70px;

    }

}

/******************* */

#car-gallery-grid {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 20px;

    margin-top: 25px;

}

.gallery-item {

    display: block;

    overflow: hidden;

    border-radius: 8px;

}

.gallery-item img {

    width: 100%;

    height: 260px;

    object-fit: cover;

    transition: .35s;

    display: block;

}

.gallery-item:hover img {

    transform: scale(1.05);

}

@media(max-width:991px) {

    #car-gallery-grid {

        grid-template-columns: repeat(2, 1fr);

    }

}

@media(max-width:640px) {

    #car-gallery-grid {

        grid-template-columns: 1fr;

    }

}




/* =========================================================
GLOBAL
========================================================= */

.container {

    max-width: 1400px;
    margin: auto;
    padding: 0 25px;

}

section {

    width: 100%;

}

.section-title {

    margin-bottom: 45px;

}

.section-title h2 {

    font-size: 38px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;

}

.section-title p {

    color: #bdbdbd;

}


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

.car-hero {

    background: #000;

}


/* =========================================================
OVERVIEW
========================================================= */

.car-overview {

    background: #111;
    padding: 90px 0;
    position: relative;

}

.car-heading {

    margin-bottom: 60px;

}

.car-heading h1 {

    font-size: 52px;
    color: #fff;
    margin-bottom: 15px;

}

.car-price {

    color: #772583;
    font-size: 30px;
    font-weight: 700;

}

.car-overview-grid {

    display: grid;

    grid-template-columns: 380px 1fr;

    gap: 80px;

    align-items: start;

}


/* =========================================================
SPECIFICATIONS
========================================================= */

.car-specs {

    background: #191919;

    border: 1px solid #2c2c2c;

    border-radius: 12px;

    padding: 30px;

}

.car-spec {

    display: flex;

    justify-content: space-between;

    padding: 16px 0;

    border-bottom: 1px solid #2c2c2c;

}

.car-spec:last-child {

    border: none;

}

.car-spec strong {

    color: #fff;

}

.car-spec span {

    color: #cfcfcf;

}


/* =========================================================
DESCRIPTION
========================================================= */

.car-description {

    color: #d5d5d5;

    line-height: 1.9;

}

.car-description p {

    margin-bottom: 22px;

}


/* =========================================================
PHOTO GALLERY
========================================================= */

.car-gallery-section {

    background: #181818;

    padding: 90px 0;

}


/* =========================================================
RELATED
========================================================= */

.car-related {

    background: #111;

    padding: 90px 0;

}


/* =========================================================
CONTACT
========================================================= */

.car-contact {

    background: #000;

    padding: 90px 0;

}

.contact-wrap {

    /* max-width: 900px; */

    margin: auto;

    background: #171717;

    padding: 55px;

    border-radius: 14px;

    border: 1px solid #2d2d2d;

}


/* =========================================================
RESPONSIVE
========================================================= */

@media(max-width:991px) {

    .car-overview-grid {

        grid-template-columns: 1fr;

        gap: 50px;

    }

    .car-heading h1 {

        font-size: 38px;

    }

    .section-title h2 {

        font-size: 30px;

    }

    .contact-wrap {

        padding: 35px;

    }

}

.back-list {
    position: absolute;
    top: 30px;
}

.car-back-link {
    font-weight: bold;
}

.car-heading {

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 60px;

}

.car-heading-left {

    flex: 1;

}

.car-heading-right {

    display: flex;
    gap: 15px;
    flex-shrink: 0;

}

.car-btn {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 190px;
    height: 56px;

    border: 2px solid #7A2BBE;
    background: #7A2BBE;
    color: #fff !important;

    text-decoration: none;

    font-weight: 600;

    transition: .3s;

}

.car-btn:hover {

    background: #000;
    color: #fff;

}

@media(max-width:991px) {

    .car-heading {

        flex-direction: column;

    }

    .car-heading-right {

        width: 100%;
        flex-wrap: wrap;

    }

    .car-btn {

        flex: 1;

    }

}


/***popup*********** */
#finance-modal {

    display: none;

    position: fixed;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, .8);

    z-index: 999999;

    justify-content: center;
    align-items: center;

}

#finance-modal.active {

    display: flex;

}

.finance-wrapper {

    width: min(1200px, 95vw);

    height: 90vh;

    background: #fff;

    border-radius: 12px;

    overflow: hidden;

    position: relative;

}

.finance-wrapper iframe {

    width: 100%;

    height: 100%;

    border: 0;

}

.finance-close {

    position: absolute;

    right: 15px;

    top: 10px;

    font-size: 36px;

    cursor: pointer;

    z-index: 10;
    color: #000;

}


/**************form hubspot*********/
.twd-carsale-hubspot-form {
    background: #792583;
    padding: 50px 40px;
}

/* Hide labels */
.twd-carsale-hubspot-form .hsfc-FieldLabel,
.twd-carsale-hubspot-form .hs-form-field label {
    display: none !important;
}

/* Field spacing */
.twd-carsale-hubspot-form .hs-form-field {
    margin-bottom: 26px;
}

/* Inputs */
.twd-carsale-hubspot-form .hs-input {
    width: 100% !important;
    max-width: none !important;
    height: 45px;
    padding: 0 14px;
    border: 0;
    border-radius: 2px;
    background: #fff;
    box-sizing: border-box;
    font-size: 16px;
}

/* Textarea */
.twd-carsale-hubspot-form textarea.hs-input {
    width: 100% !important;
    max-width: none !important;
    min-height: 220px;
    height: 220px;
    padding: 14px;
    resize: vertical;
    box-sizing: border-box;
}

/* Make form wider */
.twd-carsale-hubspot-form .hs-form {
    max-width: none !important;
}

/* Submit button */
.twd-carsale-hubspot-form .hs-submit {
    margin-top: 25px;
    text-align: center;
}

.twd-carsale-hubspot-form .hs-button {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    padding: 0 0 18px !important;
    width: 260px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
}

.twd-carsale-hubspot-form .hs-button::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
}

.twd-carsale-hubspot-form .hsfc-TextareaInput {
    height: 110px;
}

.twd-carsale-hubspot-form .hsfc-Row {
    padding-bottom: 10px;
}


/* Submit area */
.twd-carsale-hubspot-form .hsfc-NavigationRow,
.twd-carsale-hubspot-form .hs-submit {
    width: 100% !important;
    margin-top: 0 !important;
    padding-top: 10px !important;
}

/* Center button */
.twd-carsale-hubspot-form .hsfc-NavigationRow__Buttons {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Button */
.twd-carsale-hubspot-form .hsfc-Button,
.twd-carsale-hubspot-form .hs-button {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    color: #fff !important;
    padding: 0 0 18px !important;
    margin: 0 !important;

    width: 260px !important;
    min-width: 260px !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;

    position: relative;
    cursor: pointer;
}

/* White line */
.twd-carsale-hubspot-form .hsfc-Button::after,
.twd-carsale-hubspot-form .hs-button::after {
    content: "";
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 1px;

    background: #fff;
}