/*
|--------------------------------------------------------------------------
| CarHub Homepage
|--------------------------------------------------------------------------
*/

:root {
    --ch-blue: #2563eb;
    --ch-blue-dark: #1d4ed8;
    --ch-blue-soft: #eff6ff;
    --ch-text: #0f172a;
    --ch-muted: #64748b;
    --ch-border: #e2e8f0;
    --ch-surface: #ffffff;
    --ch-background: #f5f8fc;
    --ch-radius: 18px;
}

.carhub-home-body {
    margin: 0;
    background: var(--ch-background);
    color: var(--ch-text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.carhub-home,
.carhub-home * {
    box-sizing: border-box;
}

.carhub-home button,
.carhub-home input,
.carhub-home select {
    font: inherit;
}

.carhub-home a {
    color: inherit;
    text-decoration: none;
}

.carhub-home {
    min-height: 100vh;
    background:
        linear-gradient(
            180deg,
            #ffffff 0,
            #f5f8fc 30%,
            #f5f8fc 100%
        );
}


/* ================================================================
HEADER
================================================================ */

:root {
    --carhub-home-header-height: 64px;
    --carhub-home-adminbar-height: 0px;
}

.carhub-home {
    padding-top:
        calc(
            var(--carhub-home-adminbar-height)
            + var(--carhub-home-header-height)
        );
}

/*
 * The shared global header occupies normal document space on every
 * route while its actual header remains fixed.
 *
 * The homepage already reserves its own header space, so the shared
 * wrapper nested inside #carhub-home must not add another offset.
 */
.carhub-global-header {
    height:
        calc(
            var(--carhub-home-adminbar-height)
            + var(--carhub-home-header-height)
        );
    min-height:
        calc(
            var(--carhub-home-adminbar-height)
            + var(--carhub-home-header-height)
        );
    padding-top: 0;
    background: transparent;
}

.carhub-home > .carhub-global-header {
    height: 0;
    min-height: 0;
}

.carhub-home-header {
    position: fixed;
    top: var(--carhub-home-adminbar-height);
    left: 0;
    right: 0;
    z-index: 1200;
    width: 100%;
    height: var(--carhub-home-header-height);
    min-height: var(--carhub-home-header-height);
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--ch-border);
    transform: translate3d(0, 0, 0);
    transition: transform .24s ease;
    will-change: transform;
}

.carhub-home-header.is-header-hidden {
    transform: translate3d(0, -100vh, 0);
}

.carhub-home-header__menu {
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.carhub-home-header__menu span {
    width: 28px;
    height: 3px;
    border-radius: 99px;
    background: var(--ch-text);
}

.carhub-home-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-height: 24px;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -1.4px;
    font-style: italic;
}

.carhub-home-logo img {
    display: block;
    width: auto;
    max-width: 120px;
    height: auto;
    max-height: 19px;
    object-fit: contain;
}

.carhub-home-logo__mark {
    color: #fbbf24;
    font-weight: 1000;
    font-style: italic;
}

.carhub-home-logo__text {
    color: #111827;
}

.carhub-home-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.carhub-home-header__search {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
}

.carhub-icon-search {
    width: 19px;
    height: 19px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.carhub-icon-search::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: currentColor;
    right: -6px;
    bottom: -3px;
    transform: rotate(45deg);
    border-radius: 99px;
}

.carhub-home-header__signin {
    font-size: 12px;
    font-weight: 800;
}


/* ================================================================
DRAWER
================================================================ */

.carhub-home-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(15, 23, 42, .55);
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
}

.carhub-home-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1301;
    width: min(360px, 82vw);
    background: #ffffff;
    box-shadow: 18px 0 60px rgba(15, 23, 42, .18);
    transform: translateX(-105%);
    transition: transform .28s ease;
    overflow-y: auto;
}

.carhub-home.menu-open .carhub-home-menu-overlay {
    opacity: 1;
    visibility: visible;
}

.carhub-home.menu-open .carhub-home-drawer {
    transform: translateX(0);
}

/*
 * The shared homepage header is also rendered directly on public
 * templates that do not have a .carhub-home root. In those templates
 * the shared header wrapper owns the menu state.
 */
.carhub-global-header.menu-open .carhub-home-menu-overlay {
    opacity: 1;
    visibility: visible;
}

.carhub-global-header.menu-open .carhub-home-drawer {
    transform: translateX(0);
}

.carhub-global-header.menu-open .carhub-home-header {
    transform: translate3d(0, -100vh, 0) !important;
}

.carhub-home-drawer__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--ch-border);
    align-items: start;
}

.carhub-home-drawer__top
.carhub-home-drawer__search {
    min-width: 0;
}

.carhub-home-drawer__top
.carhub-home-drawer__search-panel,
.carhub-home-drawer__top
.carhub-home-drawer__search-suggestions {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.carhub-home-drawer__search {
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--ch-border);
    border-radius: 12px;
}

.carhub-home-drawer__search input {
    width: 100%;
    border: 0;
    outline: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
}

.carhub-home-drawer__search input::-webkit-search-decoration,
.carhub-home-drawer__search input::-webkit-search-cancel-button,
.carhub-home-main-search input::-webkit-search-decoration,
.carhub-home-main-search input::-webkit-search-cancel-button {
    display: none;
}

.carhub-home-drawer__search-panel,
.carhub-home-drawer__search-suggestions {
    margin: 0 16px 12px;
    padding: 14px;
    border: 1px solid var(--ch-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

.carhub-home-drawer__search-section + .carhub-home-drawer__search-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.carhub-home-drawer__search-heading {
    margin-bottom: 8px;
    color: #111827;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.carhub-home-drawer__search-list {
    display: grid;
}

.carhub-home-drawer__search-list a,
.carhub-home-drawer__search-suggestion {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 4px;
    color: #172033;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.carhub-home-drawer__search-list a:last-child {
    border-bottom: 0;
}

.carhub-home-drawer__search-list a > span:first-child,
.carhub-home-drawer__search-suggestion > span:first-child {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    border-radius: 50%;
    background: var(--ch-blue-soft);
    color: var(--ch-blue);
    font-size: 11px;
    font-weight: 800;
}

.carhub-home-drawer__search-suggestion-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--ch-blue);
    font-size: 11px;
    font-weight: 800;
}

.carhub-home-drawer__search-suggestion-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.carhub-home-drawer__search-list p {
    margin: 0;
    color: var(--ch-muted);
    font-size: 12px;
    line-height: 1.45;
}

.carhub-home-drawer__search-suggestions-group + .carhub-home-drawer__search-suggestions-group {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.carhub-home-drawer__search-suggestion {
    width: 100%;
}



.carhub-home-drawer__close {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--ch-blue-soft);
    color: var(--ch-blue);
    border-radius: 12px;
    font-size: 27px;
    cursor: pointer;
}

.carhub-home-drawer__nav {
    padding: 10px 16px 30px;
}

.carhub-home-drawer__nav > a,
.carhub-home-drawer__nav summary {
    display: block;
    padding: 14px 4px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
    cursor: pointer;
}

.carhub-home-drawer__nav details {
    border-bottom: 1px solid #f1f5f9;
}

.carhub-home-drawer__nav summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 52px;
    padding-right: 48px;
    list-style: none;
}

.carhub-home-drawer__nav summary::-webkit-details-marker {
    display: none;
}

.carhub-home-drawer__nav summary::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -6px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transform-origin: center;
}

.carhub-home-drawer__submenu {
    padding: 2px 0 12px 14px;
}

.carhub-home-drawer__submenu a {
    display: block;
    padding: 10px 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    text-decoration: none;
}

.carhub-home-drawer__submenu a:hover {
    color: #2563eb;
}

.carhub-home-drawer__nav details[open] > summary::after {
    margin-top: -6px;
    transform: rotate(225deg);
}


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

.carhub-home-hero {
    position: relative;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 0 18px 0;
}

.carhub-home-hero__slider {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    border-radius: 15px;
    background: #dbeafe;
}

.carhub-home-hero__slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity .55s ease;
}

.carhub-home-hero__slide.is-active {
    opacity: 1;
}

.carhub-home-hero__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carhub-home-hero__slide.is-active {
    opacity: 1;
}

.carhub-home-hero__shade {
    display: none;
}

.carhub-home-hero__content {
    position: absolute;
    left: 36px;
    bottom: 46px;
    max-width: 470px;
    color: #ffffff;
}

.carhub-home-hero__content span {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 3px;
}

.carhub-home-hero__content strong {
    display: block;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.04;
    letter-spacing: -1.8px;
}

.carhub-home-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
}

.carhub-home-hero__dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.55);
    cursor: pointer;
}

.carhub-home-hero__dots button.is-active {
    width: 24px;
    background: #ffffff;
}


/* ================================================================
SEARCH CARD
================================================================ */

.carhub-home-search-card {
    position: relative;
    z-index: 5;
    width: min(94%, 1080px);
    margin: -76px auto 0;
    padding: 22px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 20px 60px rgba(15, 23, 42, .13);
}

.carhub-home-search-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.carhub-home-search-card h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -.7px;
}

.carhub-home-city-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.carhub-home-city-button > span:first-child {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    color: #111827;
}

.carhub-home-city-button > span:first-child::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    border-bottom: 1px dashed #6b7280;
}

.carhub-home-location-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: #111827;
    line-height: 1;
}

.carhub-home-location-dot svg {
    display: block;
    width: 17px;
    height: 17px;
}

.carhub-home-location-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #4b4b4b;
    line-height: 1;
}

.carhub-home-location-dot svg {
    display: block;
    width: 18px;
    height: 18px;
}

.carhub-home-condition-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 17px;
}

.carhub-home-condition-row button {
    border: 0;
    background: #f1f5f9;
    color: #64748b;
    padding: 8px 15px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.carhub-home-condition-row button.is-active {
    color: #ffffff;
    background: var(--ch-blue);
}

.carhub-home-main-search {
    height: 52px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
}

.carhub-home-main-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    color: var(--ch-text);
}

.carhub-home-main-search button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: var(--ch-blue);
    cursor: pointer;
}

.carhub-home-search-quick,
.carhub-home-search-suggestions {
    position: relative;
    z-index: 20;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #e1e7f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .10);
}

.carhub-home-search-quick__section,
.carhub-home-search-suggestions__group {
    padding: 12px 14px;
}

.carhub-home-search-quick__section + .carhub-home-search-quick__section,
.carhub-home-search-suggestions__group + .carhub-home-search-suggestions__group {
    border-top: 1px solid #edf1f6;
}

.carhub-home-search-quick__heading,
.carhub-home-search-suggestions__title {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.carhub-home-search-quick__list {
    display: grid;
    gap: 2px;
}

.carhub-home-search-quick__item,
.carhub-home-search-suggestions__item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 9px;
    color: #172033;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.carhub-home-search-quick__item:hover,
.carhub-home-search-suggestions__item:hover {
    background: #f6f9ff;
}

.carhub-home-search-quick__item > span:first-child {
    color: #64748b;
    font-size: 12px;
}

.carhub-home-search-quick__empty {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
}

.carhub-home-search-suggestions__item {
    border-radius: 10px;
}

.carhub-home-search-suggestions__icon {
    width: 25px;
    height: 25px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 25px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--ch-blue);
    font-size: 10px;
    font-weight: 800;
}

.carhub-home-search-suggestions__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.carhub-home-search-suggestions__item {
    min-height: 44px;
}

.carhub-home-drawer__search-suggestions-group + .carhub-home-drawer__search-suggestions-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.carhub-home-drawer__search-suggestions-title {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.carhub-home-drawer__search-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 7px 4px;
    border-bottom: 1px solid #f1f5f9;
    color: #172033;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.carhub-home-drawer__search-suggestion:last-child {
    border-bottom: 0;
}

.carhub-home-drawer__search-suggestion-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    overflow: hidden;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--ch-blue);
    font-size: 11px;
    font-weight: 800;
}

.carhub-home-drawer__search-suggestion-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.carhub-home-drawer__search-list-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 4px;
    border-bottom: 1px solid #f1f5f9;
    color: #172033;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.carhub-home-drawer__search-list-item:last-child {
    border-bottom: 0;
}

.carhub-home-filter-row {
    display: flex;
    gap: 9px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.carhub-home-filter-row::-webkit-scrollbar {
    display: none;
}

.home-filter-trigger {
    min-width: 118px;
    height: 46px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    border: 1px solid #dbe3ee;
    border-radius: 13px;
    background: #ffffff;
    color: #172033;
    text-align: left;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.home-filter-trigger:hover {
    border-color: #93b4f7;
    box-shadow: 0 7px 20px rgba(37,99,235,.08);
    transform: translateY(-1px);
}

.home-filter-trigger > span:last-child {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.home-filter-trigger__icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #eff6ff;
    color: var(--ch-blue);
}

.home-filter-trigger__icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-filter-trigger.is-disabled {
    opacity: .52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.home-filter-trigger.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}


/* ================================================================
SECTIONS
================================================================ */

.carhub-home-section {
    max-width: 1180px;
    margin: 22px auto 0;
    padding: 0 18px;
}

.carhub-home-panel {
    padding-top: 26px;
    padding-bottom: 26px;
    background: #ffffff;
    border: 1px solid var(--ch-border);
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(15,23,42,.035);
}

.carhub-home-section-heading {
    margin-bottom: 16px;
}

.carhub-home-section-heading > span {
    color: var(--ch-blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.carhub-home-section-heading h2 {
    margin: 4px 0 0;
    font-size: 23px;
    line-height: 1.12;
    letter-spacing: -.65px;
}

.carhub-home-section-heading p {
    margin: 7px 0 0;
    color: var(--ch-muted);
}


.carhub-home-hero + .carhub-home-section {
    margin-top: 38px;
}

/* ================================================================
QUICK GRID
================================================================ */

.carhub-home-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, 150px);
    gap: 12px;
}

.carhub-home-quick-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 0;
    border-radius: 20px;
    color: #172033;
    isolation: isolate;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.carhub-home-quick-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 14px 30px rgba(15, 23, 42, .10);
}

.carhub-home-quick-card__content {
    position: relative;
    z-index: 3;
}

.carhub-home-quick-card strong {
    display: block;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.3px;
}

.carhub-home-quick-card small {
    display: block;
    margin-top: 5px;
    color: #374151;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 500;
}

.carhub-home-quick-card__vehicle {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    width: 92%;
    max-width: 92%;
    height: 110px;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
}

.carhub-home-quick-card__symbol {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 16px;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,.65);
    color: #2563eb;
    font-size: 24px;
    font-weight: 700;
}

.carhub-home-quick-card--new {
    background:
        linear-gradient(
            135deg,
            #ffe3ae,
            #ffd28b
        );
}

.carhub-home-quick-card--reconditioned {
    background:
        linear-gradient(
            135deg,
            #dceef0,
            #cce3e5
        );
}

.carhub-home-quick-card--used {
    background:
        linear-gradient(
            135deg,
            #dceff0,
            #cde5e7
        );
}

.carhub-home-quick-card--sell {
    background:
        linear-gradient(
            135deg,
            #d8eafb,
            #c4dcf3
        );
}

.carhub-home-quick-card--compare {
    background:
        linear-gradient(
            135deg,
            #ffe998,
            #ffdf6d
        );
}

.carhub-home-quick-card--videos {
    background:
        linear-gradient(
            135deg,
            #e4d0fa,
            #d2b7f0
        );
}

.carhub-home-quick-card--news {
    background:
        linear-gradient(
            135deg,
            #cbdafe,
            #b9ccfa
        );
}


/* ================================================================
TABS
================================================================ */

.carhub-home-tabs {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    border-bottom: 1px solid var(--ch-border);
    scrollbar-width: none;
}

.carhub-home-tabs::-webkit-scrollbar {
    display: none;
}

.carhub-home-tabs button {
    position: relative;
    flex: 0 0 auto;
    padding: 10px 0 13px;
    border: 0;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.1px;
}

.carhub-home-tabs button.is-active {
    color: #111827;
}

.carhub-home-tabs button.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 99px;
    background: var(--ch-blue);
}

.carhub-home-tab-panel {
    display: none;
    padding-top: 18px;
}

.carhub-home-tab-panel.is-active {
    display: block;
}


/* ================================================================
VEHICLE CARDS
================================================================ */

.carhub-home-vehicle-scroller {
    display: grid;
    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );
    gap: 14px;
}

.carhub-home-vehicle-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e1e7ef;
    border-radius: 17px;
    background: #ffffff;
    box-shadow:
        0 5px 18px rgba(15,23,42,.035);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.carhub-home-vehicle-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow:
        0 18px 40px rgba(15,23,42,.09);
}

.carhub-home-vehicle-card__image {
    height: 165px;
    display: block;
    overflow: hidden;
    background: #ffffff;
}

.carhub-home-vehicle-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    background: #ffffff;
    transition: transform .25s ease;
}

.carhub-home-vehicle-card:hover
.carhub-home-vehicle-card__image img {
    transform: none;
}

.carhub-home-vehicle-card__body {
    min-height: 148px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.carhub-home-vehicle-card__body strong {
    display: block;
    color: #1f2937;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        sans-serif;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -.15px;
}

.carhub-home-vehicle-card__body > span:not(
    .carhub-home-vehicle-card__button
) {
    display: block;
    margin-top: 5px;
    color: #111827;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        sans-serif;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -.15px;
}

.carhub-home-vehicle-card__body small {
    display: block;
    margin-top: 8px;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
}

.carhub-home-vehicle-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-top: auto;
    padding: 0 12px;
    border: 1px solid #2563eb;
    border-radius: 10px;
    background: #ffffff;
    color: #2563eb !important;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        sans-serif;
    font-size: 14px;
    font-weight: 550;
    letter-spacing: -.1px;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    transition:
        background .2s ease,
        color .2s ease;
}

.carhub-home-vehicle-card:hover
.carhub-home-vehicle-card__button {
    background: #ffffff;
    color: #2563eb;
}

.carhub-home-section-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: #2563eb !important;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        sans-serif;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -.1px;
}

.carhub-home-section-link > span:first-child {
    color: #2563eb !important;
}

.carhub-home-section-link__arrow {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    padding: 0;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff !important;
    font-family:
        Arial,
        sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
}




/* ================================================================
BRANDS
================================================================ */

.carhub-home-brand-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border: 1px solid var(--ch-border);
    border-radius: 16px;
    overflow: hidden;
}

.carhub-home-brand-card {
    min-height: 120px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-right: 1px solid var(--ch-border);
    border-bottom: 1px solid var(--ch-border);
}

.carhub-home-brand-card img {
    width: 70px;
    height: 48px;
    object-fit: contain;
}

.carhub-home-brand-card strong {
    font-size: 13px;
}

.carhub-home-brand-card__fallback {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ch-blue-soft);
    color: var(--ch-blue);
    font-weight: 900;
}

.carhub-home-brand-card.is-extra {
    display: none;
}

.carhub-home-brand-grid.show-all
.carhub-home-brand-card.is-extra {
    display: flex;
}

.carhub-home-brand-toggle {
    appearance: none;
    -webkit-appearance: none;
    margin: 18px auto 0;
    min-height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ch-blue);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: none;
    transition:
        color 180ms ease,
        opacity 180ms ease;
}

.carhub-home-brand-toggle:hover {
    background: transparent;
    border-color: transparent;
    color: var(--ch-blue-dark);
    box-shadow: none;
    transform: none;
}

.carhub-home-brand-toggle:active {
    transform: none;
    box-shadow: none;
}

.carhub-home-brand-toggle:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    outline-offset: 4px;
    border-radius: 4px;
}

.carhub-home-brand-toggle__icon {
    width: 6px;
    height: 6px;
    display: block;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
}

.carhub-home-brand-toggle[aria-expanded="true"]
.carhub-home-brand-toggle__icon {
    transform: rotate(225deg) translate(-1px, -1px);
}


/* ================================================================
CITY
================================================================ */

.carhub-home-city-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--ch-border);
    border-radius: 18px;
    background: #ffffff;
}

.carhub-home-city-card {
    min-height: 142px;
    padding: 17px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid var(--ch-border);
    border-bottom: 1px solid var(--ch-border);
    background: #ffffff;
    transition:
        background .2s ease,
        transform .2s ease;
}

.carhub-home-city-card:hover {
    background: #f8fbff;
}

.carhub-home-city-card__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 50% 35%,
            #ffffff 0,
            #f3f9ff 58%,
            #e5f2ff 100%
        );
    color: #5fa9e8;
    box-shadow:
        0 6px 18px rgba(37, 99, 235, .06);
}

.carhub-home-city-card__icon img {
    width: 48px;
    height: 48px;
    display: block;
    object-fit: contain;
    border-radius: 12px;
}

.carhub-home-city-card__icon svg {
    width: 48px;
    height: 48px;
    display: block;
    fill: none;
    stroke: currentColor;
}

.carhub-home-city-card strong,
.carhub-home-city-card small {
    display: block;
}

.carhub-home-city-card strong {
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
}

.carhub-home-city-card small {
    margin-top: 4px;
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
}


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

.carhub-home-review-scroller {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 14px;
}

.carhub-home-review-card {
    min-height: 230px;
    padding: 19px;
    border: 1px solid #e1e7ef;
    border-radius: 18px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfdff 100%
        );
    box-shadow:
        0 8px 24px rgba(15,23,42,.045);
}

.carhub-home-review-card__vehicle {
    display: flex;
    align-items: center;
    gap: 11px;
}

.carhub-home-review-card__avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--ch-blue);
    font-weight: 900;
}

.carhub-home-review-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carhub-home-review-card__vehicle strong {
    display: block;
    color: #172033;
    font-size: 14px;
    font-weight: 750;
}

.carhub-home-review-card__vehicle small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 10px;
}

.carhub-home-review-card__rating {
    margin-top: 14px;
    color: #f59e0b;
    font-size: 14px;
    font-weight: 850;
}

.carhub-home-review-card h3 {
    margin: 8px 0 0;
    color: #172033;
    font-size: 15px;
    line-height: 1.35;
}

.carhub-home-review-card p {
    margin: 8px 0 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
}

.carhub-home-review-card > a {
    display: inline-flex;
    color: var(--ch-blue);
    font-size: 13px;
    font-weight: 800;
}


/* ================================================================
MODALS
================================================================ */

.carhub-home-modal,
.carhub-home-filter-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
}

.carhub-home-modal.is-open,
.carhub-home-filter-modal.is-open {
    display: block;
}

.carhub-home-modal__backdrop,
.carhub-home-filter-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.58);
}

.carhub-home-modal__dialog,
.carhub-home-city-dialog,
.carhub-home-filter-dialog {
    position: relative;
    z-index: 2;
    width: min(94%, 720px);
    margin: 7vh auto 0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(15,23,42,.25);
}

.carhub-home-modal__dialog {
    padding: 28px;
}

.carhub-home-modal__dialog > span,
.carhub-home-city-dialog > span,
.carhub-home-filter-dialog__header span {
    color: var(--ch-blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.carhub-home-modal__dialog h2,
.carhub-home-city-dialog h2,
.carhub-home-filter-dialog h2 {
    margin: 5px 0 18px;
}

.carhub-home-modal__close,
.carhub-home-filter-dialog__header button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 22px;
}

.carhub-home-modal__dialog label {
    display: block;
    margin-top: 13px;
    color: var(--ch-muted);
    font-size: 12px;
    font-weight: 700;
}

.carhub-home-modal__dialog input,
.carhub-home-modal__dialog select {
    width: 100%;
    height: 44px;
    margin-top: 5px;
    padding: 0 12px;
    border: 1px solid var(--ch-border);
    border-radius: 10px;
    background: #ffffff;
}

.carhub-home-emi-result {
    margin-top: 20px;
    padding: 18px;
    border-radius: 15px;
    background: var(--ch-blue-soft);
}

.carhub-home-emi-result small,
.carhub-home-emi-result strong {
    display: block;
}

.carhub-home-emi-result strong {
    margin-top: 5px;
    color: var(--ch-blue);
    font-size: 26px;
}


.carhub-home-city-card__icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #ffffff 0, #eef6ff 68%, #e5f0ff 100%);
}

.carhub-home-city-card__icon svg {
    width: 48px;
    height: 48px;
    display: block;
    fill: none;
    stroke: #4b9bf0;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================================================================
CITY DIALOG
================================================================ */

.carhub-home-city-dialog {
    padding: 28px;
}

.carhub-home-detect-location {
    width: 100%;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: var(--ch-blue-soft);
    color: var(--ch-blue);
    font-weight: 800;
    cursor: pointer;
}

.carhub-home-city-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.carhub-home-city-options button {
    padding: 13px 8px;
    border: 1px solid var(--ch-border);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.carhub-home-city-options button:hover {
    border-color: var(--ch-blue);
    color: var(--ch-blue);
}

.carhub-home-city-dialog {
    max-height: 86vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.carhub-home-city-options {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 10px;
    margin-top: 18px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.carhub-home-city-options button {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: #172033;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color .2s ease,
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.carhub-home-city-options button:hover {
    border-color: #93b4f7;
    background: #f8fbff;
    color: #2563eb;
    transform: translateY(-1px);
}

@media (max-width: 640px) {

    .carhub-home-city-dialog {
        width: min(
            calc(100% - 28px),
            520px
        );
        margin: 5vh auto 0;
        max-height: 90vh;
    }

    .carhub-home-city-options {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
        max-height: 360px;
    }
}


/* ================================================================
FILTER DIALOG
================================================================ */

.carhub-home-filter-dialog {
    width: min(94%, 900px);
    overflow: hidden;
}

.carhub-home-filter-dialog__header {
    position: relative;
    padding: 22px;
    border-bottom: 1px solid var(--ch-border);
}

.carhub-home-filter-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    min-height: 460px;
}

.carhub-home-filter-nav {
    padding: 12px;
    border-right: 1px solid var(--ch-border);
    background: #f8fafc;
}

.carhub-home-filter-nav button {
    width: 100%;
    min-height: 42px;
    padding: 11px 12px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    text-align: left;
    color: #475569;
    cursor: pointer;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease;
}

.carhub-home-filter-nav button.is-active {
    border-left-color: var(--ch-blue);
    background: var(--ch-blue-soft);
    color: var(--ch-blue);
    font-weight: 800;
}

.carhub-home-filter-content {
    padding: 22px;
}

.home-filter-panel {
    display: none;
}

.home-filter-panel.is-active {
    display: block;
}

.home-filter-panel__heading strong,
.home-filter-panel__heading small {
    display: block;
}

.home-filter-panel__heading strong {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.25;
}

.home-filter-panel__heading small {
    margin-top: 3px;
    color: var(--ch-muted);
}

.home-filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 18px;
    max-height: 330px;
    overflow-y: auto;
}

.home-filter-options--grid {
    grid-template-columns: repeat(2, 1fr);
}

.home-filter-options button {
    min-height: 44px;
    padding: 9px 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--ch-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ch-text);
    text-align: left;
    font-weight: 350;
    cursor: pointer;
}

.home-filter-options button:hover {
    border-color: #cbd5e1;
    color: var(--ch-text);
}

/*
 * A cleared filter must immediately look unselected even while the
 * pointer remains over the button. Hover is intentionally neutral;
 * blue is reserved for the actual .is-selected state.
 */
.home-filter-options button:focus {
    outline: none;
}

.home-filter-options button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.home-filter-options button small {
    color: var(--ch-muted);
}

.home-budget-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.home-budget-inputs label,
.home-all-filter-grid label {
    display: block;
    color: var(--ch-muted);
    font-size: 12px;
    font-weight: 700;
}

.home-budget-inputs input,
.home-all-filter-grid input,
.home-all-filter-grid select {
    width: 100%;
    height: 44px;
    margin-top: 5px;
    padding: 0 10px;
    border: 1px solid var(--ch-border);
    border-radius: 10px;
    background: #ffffff;
}

.home-budget-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.home-budget-presets button {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #e4eaf2;
    border-radius: 13px;
    background: #ffffff;
    color: #1e293b;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.home-budget-presets button:hover,
.home-budget-presets button.is-active {
    border-color: #93b4f7;
    background: #f6f9ff;
    color: #2563eb;
    transform: translateY(-1px);
}


.home-budget-slider-card {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #e7edf5;
    border-radius: 18px;
    background: #f8fafc;
}

.home-budget-slider-card__top,
.home-budget-slider-card__range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-budget-slider-card__top > span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.home-budget-slider-card__top > strong {
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.home-budget-slider {
    width: 100%;
    height: 6px;
    margin: 20px 0 12px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        #2563EB 0%,
        #2563EB 100%,
        #E5E7EB 100%,
        #E5E7EB 100%
    );
    outline: none;
    cursor: pointer;
}

.home-budget-slider::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #2563EB;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}

.home-budget-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #2563EB;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}

.home-budget-slider-card__range {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}



.home-all-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
}

.carhub-home-filter-dialog__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--ch-border);
}

.carhub-home-filter-dialog__footer button {
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.carhub-home-filter-dialog__footer button:first-child {
    background: transparent;
    color: var(--ch-muted);
}

.carhub-home-filter-apply {
    min-width: 170px;
    background: var(--ch-blue);
    color: #ffffff;
    font-weight: 800;
}


/* ================================================================
PREMIUM HOMEPAGE TYPOGRAPHY
================================================================ */

.carhub-home {
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

.carhub-home-section-heading h2 {
    color: #111827;
    font-size: 21px;
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: -0.45px;
}

.carhub-home-section-heading > span {
    color: #2563eb;
    font-weight: 800;
}

.carhub-home-tabs button {
    font-size: 16px;
    font-weight: 500;
}

.carhub-home-section-link {
    font-weight: 700;
}


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

@media (max-width: 900px) {

    .carhub-home-quick-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 132px);
    grid-auto-columns: 152px;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.carhub-home-city-grid {
    grid-template-columns: repeat(3, 1fr);
}

.carhub-home-quick-grid::-webkit-scrollbar {
    display: none;
}

    .carhub-home-vehicle-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.carhub-home-vehicle-scroller::-webkit-scrollbar {
    display: none;
}

.carhub-home-vehicle-card {
    min-width: 228px;
    flex: 0 0 228px;
    scroll-snap-align: start;
}

.carhub-home-vehicle-card__image {
    height: 142px;
}

.carhub-home-vehicle-card__body {
    min-height: 142px;
    padding: 14px;
}

.carhub-home-vehicle-card__body strong {
    font-size: 16px;
    font-weight: 600;
}

.carhub-home-vehicle-card__body > span:not(
    .carhub-home-vehicle-card__button
) {
    margin-top: 5px;
    font-size: 16px;
    font-weight: 650;
}

.carhub-home-vehicle-card__button {
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    font-size: 14px;
    font-weight: 550;
    color: #2563eb !important;
    text-align: center;
}

    .carhub-home-brand-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .carhub-home-city-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}


@media (max-width: 640px) {
.carhub-home-city-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 320px;
    overflow-y: auto;
}

.carhub-home-filter-dialog {
    border-radius: 24px;
}


    .carhub-home-drawer {
        width: min(360px, 82vw);
    }

    .home-budget-slider-card {
        padding: 16px;
    }
}

@media (max-width: 640px) {

    .home-budget-presets {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .home-budget-presets button {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 12px;
    }


    .carhub-home-hero {
    width: 100%;
    padding: 10px 10px 0;
}

.carhub-home-hero__slider {
    width: 100%;
    height: 260px;
    border-radius: 10px;
}

.carhub-home-hero__content {
    left: 20px;
    bottom: 48px;
    max-width: 285px;
}

.carhub-home-hero__content span {
    font-size: 9px;
    letter-spacing: 2.5px;
}

.carhub-home-hero__content strong {
    font-size: 27px;
    letter-spacing: -1px;
}

.carhub-home-search-card {
    position: relative;
    z-index: 5;
    width: calc(100% - 24px);
    margin: -44px auto 0;
    padding: 17px;
    border-radius: 18px;
}

    

    .carhub-home-search-card h1 {
        font-size: 21px;
    }

    .carhub-home-city-button {
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.carhub-home-city-button > span:first-child {
    padding-bottom: 2px;
}

.carhub-home-location-dot,
.carhub-home-location-dot svg {
    width: 17px;
    height: 17px;
}

    .carhub-home-condition-row {
        overflow-x: auto;
    }

    .carhub-home-condition-row button {
        flex: 0 0 auto;
        font-size: 12px;
    }

    .carhub-home-filter-row {
        margin-right: -17px;
    }

    .home-filter-trigger {
    min-width: 108px;
    height: 44px;
    padding: 0 10px;
    gap: 7px;
}

.home-filter-trigger > span:last-child {
    font-size: 12px;
}

.home-filter-trigger__icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
}

    .carhub-home-section {
        padding: 0 10px;
        margin-top: 14px;
    }

    .carhub-home-panel {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .carhub-home-section-heading h2 {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.35px;
}

    .carhub-home-quick-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-template-rows: repeat(2, 118px);
    grid-auto-columns: 143px;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.carhub-home-quick-grid::-webkit-scrollbar {
    display: none;
}

.carhub-home-tabs {
    gap: 20px;
}

.carhub-home-tabs button {
    padding: 9px 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

.carhub-home-tabs button.is-active {
    color: #111827;
}

    .carhub-home-quick-card {
    min-height: 118px;
    padding: 14px;
    border-radius: 17px;
}

.carhub-home-quick-card strong {
    font-size: 15px;
}

.carhub-home-quick-card small {
    font-size: 10px;
}

.carhub-home-quick-card__vehicle {
    position: absolute;
    z-index: 1;
    right: -1px;
    bottom: 0;
    width: 92%;
    max-width: 92%;
    height: 102px;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
}

.carhub-home-quick-card__symbol {
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    font-size: 19px;
}

    .carhub-home-brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .carhub-home-brand-card {
        min-height: 100px;
        padding: 10px;
    }

    .carhub-home-brand-card img {
        width: 54px;
        height: 38px;
    }

    .carhub-home-city-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .carhub-home-city-card {
    min-height: 142px;
    padding: 12px 5px;
}

.carhub-home-city-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
}

.carhub-home-city-card__icon svg {
    width: 42px;
    height: 42px;
}

.carhub-home-city-card strong {
    font-size: 11px;
}

.carhub-home-city-card small {
    font-size: 12px;
}

    .carhub-home-city-grid {
    grid-template-columns: repeat(3, 1fr);
    }

    .carhub-home-review-scroller {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.carhub-home-review-scroller::-webkit-scrollbar {
    display: none;
}

.carhub-home-review-card {
    min-width: 285px;
    flex: 0 0 285px;
}

    .carhub-home-city-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .carhub-home-filter-layout {
        grid-template-columns: 125px 1fr;
    }

    .carhub-home-filter-nav {
        padding: 7px;
    }

    .carhub-home-filter-nav button {
        font-size: 11px;
        padding: 11px 8px;
    }

    .carhub-home-filter-content {
        padding: 15px;
    }

    .home-filter-options,
    .home-filter-options--grid,
    .home-all-filter-grid {
        grid-template-columns: 1fr;
    }

    .home-budget-inputs {
        grid-template-columns: 1fr 1fr;
    }

    .carhub-home-filter-dialog {
        width: calc(100% - 20px);
        margin-top: 5vh;
    }

    .carhub-home-modal__dialog,
    .carhub-home-city-dialog {
        width: calc(100% - 24px);
        margin-top: 8vh;
    }

}


/* ==========================================================================
   Latest Updates / Reviews / Tips
   ========================================================================== */

.carhub-home-editorial {
    overflow: hidden;
}

.carhub-home-editorial__tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e6ebf3;
    overflow-x: auto;
    scrollbar-width: none;
}

.carhub-home-editorial__tabs::-webkit-scrollbar {
    display: none;
}

.carhub-home-editorial__tabs > button {
    flex: 0 0 auto;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #667085;
    padding: 7px 4px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.carhub-home-editorial__tabs > button.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.carhub-home-editorial__panel {
    display: none;
}

.carhub-home-editorial__panel.is-active {
    display: block;
}

.carhub-home-editorial__scroller {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carhub-home-editorial__scroller::-webkit-scrollbar {
    display: none;
}

.carhub-home-editorial-card {
    flex: 0 0 286px;
    min-width: 286px;
    overflow: hidden;
    border: 1px solid #e4e9f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    scroll-snap-align: start;
}

.carhub-home-editorial-card__image {
    display: block;
    height: 168px;
    overflow: hidden;
    background: #eef3f9;
}

.carhub-home-editorial-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.carhub-home-editorial-card:hover
.carhub-home-editorial-card__image img {
    transform: scale(1.035);
}

.carhub-home-editorial-card__image span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.carhub-home-editorial-card__body {
    padding: 16px;
}

.carhub-home-editorial-card__body time {
    display: block;
    margin-bottom: 7px;
    color: #7b8798;
    font-size: 11px;
    font-weight: 600;
}

.carhub-home-editorial-card__body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.carhub-home-editorial-card__body h3 a {
    color: #111827;
    text-decoration: none;
}

.carhub-home-editorial-card__body p {
    margin: 0 0 13px;
    color: #68758a;
    font-size: 13px;
    line-height: 1.55;
}

.carhub-home-editorial-card__read {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.carhub-home-editorial__footer {
    margin-top: 12px;
}

.carhub-home-editorial__empty {
    padding: 30px 20px;
    border: 1px dashed #d8e0eb;
    border-radius: 16px;
    color: #758195;
    text-align: center;
}


/* ==========================================================================
   Popular Comparisons
   ========================================================================== */

.carhub-home-popular-comparisons {
    overflow: hidden;
}

.carhub-home-comparison-scroller {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carhub-home-comparison-scroller::-webkit-scrollbar {
    display: none;
}

.carhub-home-comparison-card {
    position: relative;
    flex: 0 0 318px;
    min-width: 318px;
    overflow: hidden;
    border: 1px solid #e4e9f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    scroll-snap-align: start;
}

.carhub-home-comparison-card__vehicles {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 242px;
}

.carhub-home-comparison-card__vehicle {
    min-width: 0;
    padding: 12px;
    color: #111827;
    text-decoration: none;
}

.carhub-home-comparison-card__vehicle:first-child {
    border-right: 1px solid #edf1f6;
}

.carhub-home-comparison-card__image {
    height: 108px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carhub-home-comparison-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.carhub-home-comparison-card__vehicle small {
    display: block;
    margin-bottom: 4px;
    color: #8491a5;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 500;
}

.carhub-home-comparison-card__vehicle strong {
    display: block;
    min-height: 36px;
    color: #182235;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 500;
}

.carhub-home-comparison-card__vehicle span {
    display: block;
    margin-top: 8px;
    color: #2563eb;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
}

.carhub-home-comparison-card__vs {
    position: absolute;
    left: 50%;
    top: 108px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.18);
}

.carhub-home-comparison-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 0 15px;
    border-top: 1px solid #edf1f6;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.carhub-home-comparison-card__link > span:first-child {
    min-width: 0;
}

.carhub-home-comparison-footer {
    margin-top: 12px;
}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 640px) {

    .carhub-home-editorial-card {
        flex-basis: 272px;
        min-width: 272px;
    }

    .carhub-home-editorial-card__image {
        height: 154px;
    }

    .carhub-home-comparison-card {
        flex-basis: 292px;
        min-width: 292px;
    }

    .carhub-home-comparison-card__vehicles {
        min-height: 226px;
    }

    .carhub-home-comparison-card__image {
        height: 98px;
    }

    .carhub-home-comparison-card__vs {
        top: 98px;
    }

    .carhub-home-comparison-card__vehicle {
        padding: 11px;
    }

    .carhub-home-comparison-card__vehicle strong {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 500;
}

.carhub-home-comparison-card__vehicle span {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}

}

/* ================================================================
   ADVANCED EMI CALCULATOR
================================================================ */

.carhub-home-emi-modal {
    display: none;
}

.carhub-home-emi-modal.is-open {
    display: block;
}

.carhub-home-emi-dialog {
    position: relative;
    z-index: 2;
    width: min(
        calc(100% - 28px),
        620px
    );
    max-height: 90vh;
    margin: 5vh auto 0;
    overflow-y: auto;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow:
        0 30px 90px
        rgba(15,23,42,.25);
    box-sizing: border-box;
}

.carhub-home-emi-header {
    display: grid;
    grid-template-columns:
        48px
        minmax(0, 1fr)
        38px;
    gap: 12px;
    align-items: center;
}

.carhub-home-emi-header__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #eff6ff;
    font-size: 22px;
}

.carhub-home-emi-header span {
    display: block;
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.carhub-home-emi-header h2 {
    margin: 4px 0 0;
    color: #172033;
    font-size: 25px;
    line-height: 1.15;
}

.carhub-home-emi-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    cursor: pointer;
}

.carhub-home-emi-description {
    margin: 14px 0 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.carhub-home-emi-field {
    margin-top: 18px;
}

.carhub-home-emi-field__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

.carhub-home-emi-field__header label {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.carhub-home-emi-field__header strong {
    color: #172033;
    font-size: 14px;
    font-weight: 800;
}

.carhub-home-emi-field input[type="range"] {
    width: 100%;
    height: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background:
        linear-gradient(
            to right,
            #2563EB 0%,
            #2563EB 50%,
            #E5E7EB 50%,
            #E5E7EB 100%
        );
}

.carhub-home-emi-field
input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    appearance: none;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #2563eb;
    box-shadow:
        0 2px 8px
        rgba(37,99,235,.28);
    cursor: pointer;
}

.carhub-home-emi-field
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #2563eb;
    box-shadow:
        0 2px 8px
        rgba(37,99,235,.28);
    cursor: pointer;
}

.carhub-home-emi-limits {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    color: #94a3b8;
    font-size: 11px;
}

.carhub-home-emi-result {
    margin-top: 24px;
    padding: 20px;
    border-radius: 18px;
    background: #eff6ff;
}

.carhub-home-emi-result span,
.carhub-home-emi-result small {
    display: block;
    color: #64748b;
}

.carhub-home-emi-result strong {
    display: block;
    margin: 5px 0;
    color: #2563eb;
    font-size: 30px;
    line-height: 1.15;
}

.carhub-home-emi-summary {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.carhub-home-emi-summary > div {
    padding: 13px;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    background: #ffffff;
}

.carhub-home-emi-summary span {
    display: block;
    color: #64748b;
    font-size: 11px;
}

.carhub-home-emi-summary strong {
    display: block;
    margin-top: 5px;
    color: #172033;
    font-size: 13px;
}

.carhub-home-emi-apply {
    width: 100%;
    min-height: 46px;
    margin-top: 16px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

@media (max-width: 640px) {

    .carhub-home-emi-dialog {
        width: calc(100% - 18px);
        max-height: 92vh;
        margin-top: 4vh;
        padding: 20px;
        border-radius: 22px;
    }

    .carhub-home-emi-summary {
        grid-template-columns: 1fr;
    }

    .carhub-home-emi-header h2 {
        font-size: 22px;
    }
}

/* 3-dot menu: medium-weight headings. */
.carhub-home-drawer__nav > a,
.carhub-home-drawer__nav > details > summary {
    font-weight: 500 !important;
}

/* Larger grey V chevrons, vertically centered on the heading line. */
.carhub-home-drawer__nav summary::after {
    right: 8px !important;
    top: 50% !important;
    width: 12px !important;
    height: 12px !important;
    margin-top: -7px !important;
    border-right: 2.5px solid #64748b !important;
    border-bottom: 2.5px solid #64748b !important;
    transform: rotate(45deg) !important;
}

.carhub-home-drawer__nav details[open] > summary::after {
    margin-top: -3px !important;
    transform: rotate(225deg) !important;
}

/* ==========================================================================
   ADVANCED EMI — fit the complete calculator into one mobile viewport
   ========================================================================== */

.carhub-home-emi-modal {
    z-index: 900 !important;
}

.carhub-home-emi-dialog {
    width: min(calc(100% - 24px), 520px) !important;
    max-height: calc(100dvh - 24px) !important;
    margin: 12px auto !important;
    overflow: hidden !important;
    padding: 16px !important;
    border-radius: 22px !important;
    display: flex;
    flex-direction: column;
}

.carhub-home-emi-header {
    flex: 0 0 auto;
    grid-template-columns: 40px minmax(0, 1fr) 32px !important;
    gap: 9px !important;
}

.carhub-home-emi-header__icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
}

.carhub-home-emi-header h2 {
    font-size: 18px !important;
}

.carhub-home-emi-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
}

.carhub-home-emi-description {
    flex: 0 0 auto;
    margin: 8px 0 8px !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
}

.carhub-home-emi-calculator {
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    min-height: 0;
    overflow: hidden;
}

.carhub-home-emi-field {
    margin-top: 0 !important;
}

.carhub-home-emi-field__header {
    margin-bottom: 5px !important;
}

.carhub-home-emi-field__header label {
    font-size: 10px !important;
}

.carhub-home-emi-field__header strong {
    font-size: 11px !important;
}

.carhub-home-emi-field input[type="range"] {
    height: 4px !important;
}

.carhub-home-emi-field input[type="range"]::-webkit-slider-thumb {
    width: 16px !important;
    height: 16px !important;
}

.carhub-home-emi-field input[type="range"]::-moz-range-thumb {
    width: 14px !important;
    height: 14px !important;
}

.carhub-home-emi-limits {
    margin-top: 3px !important;
    font-size: 8px !important;
}

.carhub-home-emi-result {
    margin-top: 4px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
}

.carhub-home-emi-result span {
    font-size: 10px !important;
}

.carhub-home-emi-result strong {
    margin: 2px 0 !important;
    font-size: 25px !important;
}

.carhub-home-emi-result small {
    font-size: 9px !important;
}

.carhub-home-emi-summary {
    gap: 6px !important;
    margin-top: 0 !important;
}

.carhub-home-emi-summary > div {
    padding: 7px 8px !important;
    border-radius: 10px !important;
}

.carhub-home-emi-summary span {
    font-size: 8px !important;
}

.carhub-home-emi-summary strong {
    margin-top: 2px !important;
    font-size: 10px !important;
}

.carhub-home-emi-apply {
    min-height: 38px !important;
    height: 38px !important;
    margin-top: 0 !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    flex: 0 0 auto;
}

@media (max-width: 640px) {

    .carhub-home-emi-dialog {
        width: calc(100% - 18px) !important;
        max-height: calc(100dvh - 12px) !important;
        margin: 6px auto !important;
        padding: 13px !important;
        border-radius: 20px !important;
    }

    .carhub-home-emi-header {
        grid-template-columns: 34px minmax(0, 1fr) 30px !important;
        gap: 7px !important;
    }

    .carhub-home-emi-header__icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    .carhub-home-emi-header h2 {
        font-size: 16px !important;
    }

    .carhub-home-emi-description {
        font-size: 9px !important;
        margin: 5px 0 6px !important;
    }

    .carhub-home-emi-calculator {
        gap: 6px !important;
    }

    .carhub-home-emi-result strong {
        font-size: 23px !important;
    }

    .carhub-home-emi-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

}

/* ==========================================================================
   TRENDING VIDEOS
   ========================================================================== */

.carhub-home-trending-videos {
    overflow: hidden;
}

.carhub-home-video-scroller {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carhub-home-video-scroller::-webkit-scrollbar {
    display: none;
}

.carhub-home-video-card {
    position: relative;
    flex: 0 0 250px;
    min-width: 250px;
    overflow: hidden;
    border: 1px solid #e4e9f1;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
    scroll-snap-align: start;
}

.carhub-home-video-card__media {
    position: relative;
    display: block;
    height: 164px;
    overflow: hidden;
    background: #e8eef6;
}

.carhub-home-video-card__media img,
.carhub-home-video-card__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
    transition: transform .25s ease;
}

.carhub-home-video-card:hover .carhub-home-video-card__media img {
    transform: none;
}

.carhub-home-video-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
}

.carhub-home-video-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(15,23,42,.78);
    box-shadow: 0 8px 24px rgba(15,23,42,.22);
}

.carhub-home-video-card__play span {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #ffffff;
}

.carhub-home-video-card__body {
    padding: 13px 14px 15px;
}

.carhub-home-video-card__body h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
}

.carhub-home-video-card__body h3 a {
    color: #111827;
    text-decoration: none;
}

.carhub-home-video-card__body time {
    display: block;
    margin-top: 8px;
    color: #8792a5;
    font-size: 10px;
    font-weight: 600;
}

@media (max-width: 640px) {

    .carhub-home-video-card {
        flex-basis: 235px;
        min-width: 235px;
    }

    .carhub-home-video-card__media {
        height: 154px;
    }

}


.carhub-home-emi-modal {
    position: fixed !important;
    inset: 0 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    overflow: hidden !important;
}

.carhub-home-emi-modal.is-open {
    display: flex !important;
}

.carhub-home-emi-dialog {
    margin: 0 !important;
    max-height: calc(100dvh - 24px) !important;
}

@media (max-width: 640px) {
    .carhub-home-emi-modal {
        padding: 6px !important;
    }

    .carhub-home-emi-dialog {
        margin: 0 !important;
        max-height: calc(100dvh - 12px) !important;
    }
}


/*
 * Advanced EMI modal: use more of the available mobile height so values
 * remain comfortably readable while the entire calculator still fits.
 */
.carhub-home-emi-dialog {
    width: min(calc(100% - 24px), 520px) !important;
    max-height: calc(100dvh - 40px) !important;
    padding: 18px !important;
}

.carhub-home-emi-calculator {
    gap: 10px !important;
}

.carhub-home-emi-description {
    margin: 9px 0 10px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

.carhub-home-emi-field__header {
    margin-bottom: 6px !important;
}

.carhub-home-emi-field__header label {
    font-size: 11px !important;
}

.carhub-home-emi-field__header strong {
    font-size: 12px !important;
}

.carhub-home-emi-field input[type="range"] {
    height: 5px !important;
}

.carhub-home-emi-field input[type="range"]::-webkit-slider-thumb {
    width: 17px !important;
    height: 17px !important;
}

.carhub-home-emi-field input[type="range"]::-moz-range-thumb {
    width: 17px !important;
    height: 17px !important;
}

.carhub-home-emi-limits {
    margin-top: 4px !important;
    font-size: 9px !important;
}

.carhub-home-emi-result {
    margin-top: 5px !important;
    padding: 12px 14px !important;
    min-height: 70px;
}

.carhub-home-emi-result span {
    font-size: 11px !important;
}

.carhub-home-emi-result strong {
    margin: 3px 0 !important;
    font-size: 27px !important;
}

.carhub-home-emi-result small {
    font-size: 9px !important;
}

.carhub-home-emi-summary {
    gap: 7px !important;
}

.carhub-home-emi-summary > div {
    padding: 8px 9px !important;
    min-height: 48px;
}

.carhub-home-emi-summary span {
    font-size: 8px !important;
}

.carhub-home-emi-summary strong {
    font-size: 10px !important;
}

.carhub-home-emi-apply {
    min-height: 42px !important;
    height: 42px !important;
    font-size: 12px !important;
}

@media (max-width: 640px) {
    .carhub-home-emi-dialog {
        width: calc(100% - 18px) !important;
        max-height: calc(100dvh - 24px) !important;
        padding: 16px !important;
    }

    .carhub-home-emi-header h2 {
        font-size: 17px !important;
    }

    .carhub-home-emi-description {
        font-size: 10px !important;
        margin: 7px 0 8px !important;
    }

    .carhub-home-emi-calculator {
        gap: 8px !important;
    }

    .carhub-home-emi-result {
        min-height: 66px;
        padding: 10px 12px !important;
    }

    .carhub-home-emi-result strong {
        font-size: 25px !important;
    }

    .carhub-home-emi-summary > div {
        min-height: 46px;
    }
}

/*
 * Uploaded short videos are real video elements. Use a portrait media
 * area so vertical/short-form content fills the card instead of being
 * letterboxed inside a shallow landscape box.
 */
.carhub-home-video-card {
    flex-basis: 180px;
    min-width: 180px;
}

.carhub-home-video-card__media {
    height: 250px;
    aspect-ratio: 9 / 12.5;
}

.carhub-home-video-card__media img,
.carhub-home-video-card__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.carhub-home-video-card__media video {
    background: #ffffff;
}

.carhub-home-video-card__body {
    min-height: 62px;
    padding: 12px 13px 14px;
}

.carhub-home-video-card__body h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 2.7em;
    font-size: 14px;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .carhub-home-video-card {
        flex-basis: 165px;
        min-width: 165px;
    }

    .carhub-home-video-card__media {
        height: 235px;
    }
}

/*
 * Expert review gallery.
 * Exterior media is supplied first by HomePage.php; thumbnails allow the
 * user to browse the remaining vehicle gallery without using the featured
 * image.
 */
.carhub-home-editorial-card__gallery {
    overflow: hidden;
    background: #f8fafc;
}

.carhub-home-editorial-card__gallery-main {
    height: 185px;
}

.carhub-home-editorial-card__gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carhub-home-editorial-card__gallery-thumbs {
    display: flex;
    gap: 5px;
    padding: 7px 8px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.carhub-home-editorial-card__gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.carhub-home-editorial-card__gallery-thumbs button {
    flex: 0 0 46px;
    width: 46px;
    height: 34px;
    padding: 0;
    border: 1px solid #dce3ed;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    opacity: .72;
}

.carhub-home-editorial-card__gallery-thumbs button.is-active {
    border-color: #2563eb;
    opacity: 1;
}

.carhub-home-editorial-card__gallery-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 640px) {
    .carhub-home-editorial-card__gallery-main {
        height: 175px;
    }
}


/*
 * Review gallery: horizontal finger movement belongs to the gallery,
 * while vertical movement remains normal page scrolling.
 */
.carhub-home-editorial-card__gallery-main {
    touch-action: pan-y !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    cursor: grab;
}

.carhub-home-editorial-card__gallery-main:active {
    cursor: grabbing;
}

.carhub-home-editorial-card__gallery-main img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}



/* ==========================================================================
   CARHUB HOMEPAGE — SINGLE AUTHORITATIVE HEADER CONTRACT
   --------------------------------------------------------------------------
   Behavior:
   - Page top: header visible at the top of the viewport.
   - Scroll down: header hides completely above the viewport.
   - Scroll up: header returns from the top edge.
   - Local WordPress admin bar: header starts directly below the visible bar.
   - Live site: no admin bar, so header starts at 0px.
   - The drawer is above the website header while open.
   ========================================================================== */

html,
body.carhub-home-body {
    margin: 0 !important;
}

body.carhub-home-body {
    padding: 0 !important;
}

/*
 * The shared header is also rendered outside the homepage wrapper.
 * Keep its links identical to the homepage presentation and prevent
 * theme-level anchor styles from adding underlines.
 */
body.carhub-home-body .carhub-global-header a,
body.carhub-home-body .carhub-global-header a:hover,
body.carhub-home-body .carhub-global-header a:focus,
body.carhub-home-body .carhub-global-header a:visited {
    text-decoration: none !important;
}

body.carhub-home-body .carhub-home {
    margin: 0 !important;
    padding-top:
        calc(
            var(--carhub-home-adminbar-height, 0px)
            + var(--carhub-home-header-height, 64px)
        ) !important;
}

body.carhub-home-body .carhub-home-header {
    position: fixed !important;
    top: var(--carhub-home-adminbar-height, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--carhub-home-header-height, 64px) !important;
    min-height: var(--carhub-home-header-height, 64px) !important;
    margin: 0 !important;
    z-index: 1200 !important;
    transform: translate3d(0, 0, 0) !important;
    transition: transform .24s ease !important;
    will-change: transform;
}

body.carhub-home-body .carhub-home-header.is-header-hidden {
    transform: translate3d(0, -100vh, 0) !important;
}

/* Never let the drawer expose the fixed website header underneath it. */
body.carhub-home-body .carhub-home-menu-overlay {
    z-index: 1290 !important;
}

body.carhub-home-body .carhub-home-drawer {
    z-index: 1300 !important;
    top: 0 !important;
}

body.carhub-home-body .carhub-home.menu-open .carhub-home-header {
    transform: translate3d(0, -100vh, 0) !important;
}

/* Header controls — compact mobile presentation. */
@media (max-width: 640px) {
    :root {
        --carhub-home-header-height: 62px;
    }

    body.carhub-home-body .carhub-home {
        padding-top:
            calc(
                var(--carhub-home-adminbar-height, 0px)
                + var(--carhub-home-header-height, 62px)
            ) !important;
    }

    body.carhub-home-body .carhub-home-header {
        height: var(--carhub-home-header-height, 62px) !important;
        min-height: var(--carhub-home-header-height, 62px) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.carhub-home-body .carhub-home-logo img {
        width: 112px !important;
        max-width: 112px !important;
        max-height: 18px !important;
    }

    body.carhub-home-body .carhub-home-header__actions {
        gap: 10px !important;
    }

    body.carhub-home-body .carhub-home-header__signin {
        font-size: 10px !important;
    }
}


/*
 * Search/filter modal centering hardening.
 *
 * These dialogs must be centered against the viewport itself rather than
 * positioned from the document flow. This also keeps them centered when
 * opened from the homepage drawer/header.
 */
.carhub-home-filter-modal.is-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}

.carhub-home-filter-modal .carhub-home-filter-dialog {
    margin: 0 !important;
    max-height: calc(100dvh - 24px) !important;
    width: min(94vw, 900px) !important;
}

.carhub-home-emi-modal {
    position: fixed !important;
    inset: 0 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.carhub-home-emi-modal.is-open {
    display: flex !important;
}

.carhub-home-emi-modal .carhub-home-emi-dialog {
    margin: 0 !important;
    max-height: calc(100dvh - 24px) !important;
}

@media (max-width: 640px) {
    .carhub-home-filter-modal.is-open {
        padding: 6px !important;
    }

    .carhub-home-filter-modal .carhub-home-filter-dialog {
        width: calc(100vw - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
    }

    .carhub-home-emi-modal {
        padding: 6px !important;
    }

    .carhub-home-emi-modal .carhub-home-emi-dialog {
        max-height: calc(100dvh - 12px) !important;
    }

    
}


/* ================================================================
   PREMIUM FILTER MODAL — FINAL CENTERING / READABILITY
================================================================ */

.carhub-home-filter-modal.is-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}

.carhub-home-filter-modal.is-open .carhub-home-filter-dialog {
    margin: 0 !important;
    max-height: calc(100dvh - 24px) !important;
}

.carhub-home-filter-nav button {
    color: #64748b !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
}

.carhub-home-filter-nav button.is-active {
    color: #2563eb !important;
    font-weight: 800 !important;
}

@media (max-width: 640px) {

    .carhub-home-filter-modal.is-open .carhub-home-filter-dialog {
        width: calc(100vw - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
    }

    .carhub-home-filter-nav button {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #475569 !important;
        padding: 11px 8px !important;
    }

    .carhub-home-filter-nav button.is-active {
        color: #2563eb !important;
        font-weight: 800 !important;
    }
}

/* ================================================================
   VEHICLE CONDITION BADGE
================================================================ */

.carhub-home-vehicle-card__image,
.carhub-search-card__image {
    position: relative;
}

.carhub-vehicle-condition-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 999px;
    background: rgba(17,24,39,.78);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .2px;
    box-shadow: 0 4px 12px rgba(15,23,42,.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ================================================================
   PREMIUM DIALOG POSITION / HEIGHT HARDENING
================================================================ */

.carhub-home-city-modal.is-open,
#carhub-city-modal.is-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}

.carhub-home-city-modal.is-open .carhub-home-city-dialog,
#carhub-city-modal.is-open .carhub-home-city-dialog {
    margin: 0 !important;
    max-height: calc((100dvh - 24px) * .90) !important;
    overflow-y: auto !important;
}

.carhub-home-filter-modal.is-open .carhub-home-filter-dialog {
    margin: 0 !important;
    max-height: calc((100dvh - 24px) * .90) !important;
    overflow: hidden !important;
}


/* ================================================================
   FILTER OPTIONS + MODAL SIZE — FINAL
================================================================ */

/*
 * Keep the premium filter selection state visible. Every option can
 * now be toggled on and off, so the visual state must follow the
 * actual hidden filter value.
 */
.home-filter-options button.is-selected {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    box-shadow: 0 0 0 1px rgba(37,99,235,.08);
}

/*
 * Reduce the premium filter dialog height by approximately 10%
 * without changing its centered positioning or width.
 */
.carhub-home-filter-modal.is-open .carhub-home-filter-dialog {
    max-height: calc((100dvh - 24px) * .81) !important;
}

.carhub-home-filter-layout {
    min-height: 414px !important;
}

@media (max-width: 640px) {
    .carhub-home-filter-modal.is-open .carhub-home-filter-dialog {
        max-height: calc((100dvh - 12px) * .81) !important;
    }
}


/* Editorial categories are native WordPress categories. These rules only
 * style nested levels; the base drawer spacing remains unchanged. */
.carhub-home-drawer__editorial-categories > details {
    border-bottom: 1px solid #f1f5f9;
}

.carhub-home-drawer__editorial-categories > details > summary {
    min-height: 52px;
}

.carhub-home-drawer__editorial-categories .carhub-home-drawer__submenu {
    padding-left: 14px;
}

.carhub-home-drawer__editorial-categories .carhub-home-drawer__category-level .carhub-home-drawer__submenu {
    padding-left: 12px;
}

/* ========================================================================== 
   SHARED DRAWER — DYNAMIC POPULAR/CITY SUBMENUS
   These nested controls use the same spacing rhythm as the homepage drawer.
   ========================================================================== */
.carhub-home-drawer__nav .carhub-home-drawer__submenu .carhub-home-drawer__nested {
    margin: 0;
    padding: 0;
    border-bottom: 0;
}

.carhub-home-drawer__nav .carhub-home-drawer__submenu .carhub-home-drawer__nested > summary {
    min-height: 46px;
    padding: 12px 0;
    padding-right: 36px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}

.carhub-home-drawer__nav .carhub-home-drawer__summary--plus::after {
    content: "+" !important;
    right: 8px;
    top: 50%;
    width: auto;
    height: auto;
    margin-top: -10px;
    border: 0 !important;
    transform: none !important;
    color: #64748b;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.carhub-home-drawer__nav .carhub-home-drawer__nested[open] > .carhub-home-drawer__summary--plus::after {
    content: "−" !important;
    margin-top: -10px;
    transform: none !important;
}

.carhub-home-drawer__nav .carhub-home-drawer__submenu--nested {
    padding: 0 0 8px 0;
}

.carhub-home-drawer__nav .carhub-home-drawer__submenu--nested a {
    padding: 9px 0;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
}

/* ============================================================================
   GLOBAL HEADER CONTRACT
   The homepage header is the only public CarHub header.  It must render with
   the same geometry even when Header.php is mounted directly on a route that
   does not have a .carhub-home wrapper (Compare/Search/etc.).
   ============================================================================ */
body.carhub-home-body .carhub-global-header {
    display: block !important;
    width: 100% !important;
    height: calc(
        var(--carhub-home-adminbar-height, 0px)
        + var(--carhub-home-header-height, 64px)
    ) !important;
    min-height: calc(
        var(--carhub-home-adminbar-height, 0px)
        + var(--carhub-home-header-height, 64px)
    ) !important;
    max-height: calc(
        var(--carhub-home-adminbar-height, 0px)
        + var(--carhub-home-header-height, 64px)
    ) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

body.carhub-home-body .carhub-global-header,
body.carhub-home-body .carhub-global-header *,
body.carhub-home-body .carhub-global-header *::before,
body.carhub-home-body .carhub-global-header *::after {
    box-sizing: border-box;
}

/* The shared header wrapper is fixed and must not consume a second
 * header-height slot when it is mounted inside the .carhub-home root.
 * The root already reserves the fixed header height via padding-top.
 */
body.carhub-home-body .carhub-home > .carhub-global-header {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.carhub-home-body .carhub-home-header {
    position: fixed !important;
    top: var(--carhub-home-adminbar-height, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--carhub-home-header-height, 64px) !important;
    min-height: var(--carhub-home-header-height, 64px) !important;
    max-height: var(--carhub-home-header-height, 64px) !important;
    margin: 0 !important;
    padding: 0 24px !important;
    overflow: hidden !important;
}

@media (max-width: 640px) {
    body.carhub-home-body .carhub-home-header {
        height: var(--carhub-home-header-height, 62px) !important;
        min-height: var(--carhub-home-header-height, 62px) !important;
        max-height: var(--carhub-home-header-height, 62px) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}


/* ==========================================================
   VEHICLE CARD MEDIA — GLOBAL FIT
   Keep every vehicle-card image filling its media box.
   This intentionally targets vehicle cards only; logos and
   editorial/media assets keep their existing presentation.
   ========================================================== */
.carhub-home-vehicle-card__image img,
.carhub-body-type-card__image img,
.carhub-condition-car__media img,
.carhub-budget-card__media img,
.carhub-location-car__media img,
.carhub-search-card__image img,
.carhub-fuel-featured-card__media img,
.carhub-fuel-vehicle-card__media img,
.carhub-compare__empty-popular-vehicle img,
.carhub-compare__similar-vehicle img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
}


/* Vehicle-card media: show the complete source image without cropping. */
.carhub-home-vehicle-card__image img,
.carhub-body-type-card__image img,
.carhub-condition-car__media img,
.carhub-budget-card__media img,
.carhub-location-car__media img,
.carhub-search-card__image img,
.carhub-fuel-featured-card__media img,
.carhub-fuel-vehicle-card__media img,
.carhub-compare__empty-popular-vehicle img,
.carhub-compare__similar-vehicle img {
    width:100% !important;
    height:100% !important;
    display:block !important;
    object-fit:contain !important;
    object-position:center center !important;
    padding:0 !important;
    background:#fff !important;
    transform:none !important;
}

.carhub-home-vehicle-card:hover .carhub-home-vehicle-card__image img {
    transform:none !important;
}

/* ================================================================
   HOME TRENDING VIDEOS — FULL MEDIA FILL
   Uploaded videos and external-video thumbnails must use the entire
   media box. Do not letterbox the media with object-fit: contain.
================================================================ */
.carhub-home-video-card__media img,
.carhub-home-video-card__media video {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ================================================================
   HOME USED-CAR BUDGET CARDS — FULL IMAGE WIDTH
   The used budget cards intentionally fill the complete media box.
   Brand-new and reconditioned home budget cards are untouched.
================================================================ */
.carhub-home-budget-section--used .carhub-home-vehicle-card__image img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}


/* CarHub shared city artwork — uploaded images fill the circular artwork frame. */
.carhub-home-city-card__icon {
    overflow: hidden;
}

.carhub-home-city-card__icon img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
}
