/*
|--------------------------------------------------------------------------
| CarHub Brand Single
|--------------------------------------------------------------------------
*/

.carhub-brand-body {
    background: #eef3f8;
    color: var(--ch-text, #0b1930);
}

.carhub-brand-body a {
    text-decoration: none;
}

.carhub-brand-page {
    width: 100%;
    min-height: 100vh;
    padding: 24px 0 64px;
}

.carhub-brand-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.carhub-brand-hero,
.carhub-brand-section {
    border: 1px solid #dbe4ef;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, .055);
}

.carhub-brand-hero {
    position: relative;
    overflow: hidden;
    padding: 30px;
    background:
        radial-gradient(circle at 88% 8%, rgba(37, 99, 235, .09), transparent 280px),
        linear-gradient(135deg, #fff 0%, #f9fbfe 62%, #f1f5fa 100%);
}

.carhub-brand-hero::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    border-radius: 50%;
    right: -235px;
    top: -285px;
    background: rgba(224, 235, 251, .72);
    pointer-events: none;
}

.carhub-brand-hero__top {
    position: relative;
    z-index: 1;
}

.carhub-brand-logo {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border: 1px solid #d9e5f3;
    border-radius: 23px;
    background: rgba(241, 246, 253, .82);
    overflow: hidden;
}

.carhub-brand-logo img {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    mix-blend-mode: multiply;
}

.carhub-brand-logo img {
    max-width: 72px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.carhub-brand-logo span {
    color: #1769ff;
    font-size: 26px;
    font-weight: 900;
}

.carhub-brand-kicker {
    display: block;
    margin-bottom: 9px;
    color: #2870f6;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.carhub-brand-hero h1 {
    max-width: 720px;
    margin: 0;
    color: #07172f;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.carhub-brand-hero p {
    max-width: 760px;
    margin: 17px 0 0;
    color: #71809a;
    font-size: 15px;
    line-height: 1.75;
}

.carhub-brand-hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-radius: 20px;
    background: #fff;
}

.carhub-brand-hero-stats > div {
    min-height: 112px;
    padding: 20px 22px;
    border-right: 1px solid #dce5f1;
}

.carhub-brand-hero-stats > div:last-child {
    border-right: 0;
}

.carhub-brand-hero-stats strong,
.carhub-brand-hero-stats span {
    display: block;
}

.carhub-brand-hero-stats strong {
    color: #0b1930;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -.04em;
}

.carhub-brand-hero-stats span {
    margin-top: 8px;
    color: #71809a;
    font-size: 12px;
    font-weight: 700;
}

.carhub-brand-section {
    margin-top: 20px;
    padding: 28px;
}

.carhub-brand-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.carhub-brand-heading > div > span,
.carhub-home-section-heading > span {
    display: block;
    color: #2870f6;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.carhub-brand-heading h2,
.carhub-home-section-heading h2 {
    margin: 8px 0 0;
    color: #0b1930;
    font-size: clamp(24px, 3.2vw, 31px);
    line-height: 1.15;
    letter-spacing: -.035em;
}

.carhub-brand-heading p,
.carhub-home-section-heading p {
    max-width: 720px;
    margin: 9px 0 0;
    color: #71809a;
    font-size: 14px;
    line-height: 1.65;
}

.carhub-brand-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: #71809a;
    font-size: 13px;
    font-weight: 800;
}

.carhub-brand-sort select {
    min-width: 170px;
    height: 44px;
    padding: 0 34px 0 13px;
    border: 1px solid #dce5f1;
    border-radius: 12px;
    background: #fff;
    color: #0b1930;
    font-weight: 650;
}

.carhub-brand-filters {
    display: grid;
    gap: 12px;
    margin-top: 6px;
}

.carhub-brand-filter-group {
    padding: 15px;
    border: 1px solid #e0e8f2;
    border-radius: 16px;
    background: #f7faff;
}

.carhub-brand-filter-group > strong {
    display: block;
    margin-bottom: 10px;
    color: #0b1930;
    font-size: 13px;
}

.carhub-brand-filter-group > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.carhub-brand-filter-group button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #d8e3f1;
    border-radius: 10px;
    background: #fff;
    color: #41506a;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.carhub-brand-filter-group button:hover,
.carhub-brand-filter-group button.is-active,
.carhub-brand-filter-group button[aria-pressed="true"] {
    border-color: #2870f6;
    background: #2870f6;
    color: #fff;
}

.carhub-brand-filter-group button small {
    margin-left: 4px;
    opacity: .72;
    font-size: 10px;
}

.carhub-brand-budget {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #dce5f1;
    border-radius: 18px;
    background: #f8fbff;
}

.carhub-brand-budget__head,
.carhub-brand-budget__limits {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.carhub-brand-budget__head strong {
    color: #0b1930;
    font-size: 13px;
}

.carhub-brand-budget input[type="range"] {
    width: 100%;
    margin: 18px 0 7px;
    accent-color: #2870f6;
}

.carhub-brand-budget__limits {
    color: #91a0b6;
    font-size: 11px;
}

.carhub-brand-model-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
}

.carhub-brand-model-list .carhub-body-type-card {
    width: 100%;
}

.carhub-brand-model-list .carhub-body-type-card__image {
    aspect-ratio: 16 / 7;
}

.carhub-brand-model-list .carhub-body-type-card__image img {
    object-fit: contain;
}

.carhub-brand-empty-results {
    margin: 18px 0 0;
    padding: 26px;
    border: 1px dashed #cbd8e8;
    border-radius: 16px;
    color: #71809a;
    text-align: center;
    font-size: 14px;
}

.carhub-brand-load-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.carhub-brand-load {
    min-width: 170px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid #2870f6;
    border-radius: 11px;
    background: #fff;
    color: #2870f6;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.carhub-brand-load:hover {
    background: #2870f6;
    color: #fff;
}

.carhub-brand-load[hidden] {
    display: none;
}

.carhub-brand-review-scroller {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 5px;
    scroll-snap-type: x mandatory;
}

.carhub-brand-review-scroller::-webkit-scrollbar,
.carhub-home-comparison-scroller::-webkit-scrollbar {
    height: 5px;
}

.carhub-brand-review-card {
    flex: 0 0 330px;
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-radius: 19px;
    background: #fff;
    scroll-snap-align: start;
}

.carhub-brand-review-card__image {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #f5f8fc;
}

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

.carhub-brand-review-card__image > span {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #4b5563;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.carhub-brand-review-card__body {
    padding: 17px;
}

.carhub-brand-review-card__body h3 {
    margin: 0;
    color: #0b1930;
    font-size: 17px;
}

.carhub-brand-review-card__body p {
    min-height: 58px;
    margin: 9px 0 14px;
    color: #71809a;
    font-size: 13px;
    line-height: 1.55;
}

.carhub-brand-review-card__body a {
    color: #2870f6;
    font-size: 12px;
    font-weight: 900;
}

.carhub-brand-comparisons .carhub-home-section-heading {
    margin-bottom: 20px;
}

.carhub-brand-comparisons .carhub-home-comparison-scroller {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.carhub-brand-comparisons .carhub-home-comparison-card {
    flex: 0 0 360px;
}

.carhub-brand-compare-any {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: #2870f6;
    font-size: 13px;
    font-weight: 900;
}

.carhub-brand-compare-any span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #2870f6;
    color: #fff;
}

.carhub-brand-nearby .carhub-home-city-grid {
    margin-top: 0;
}

.carhub-brand-nearby .carhub-home-city-card {
    min-height: 150px;
}

.carhub-brand-nearby .carhub-home-city-card strong {
    text-decoration: none;
}

.carhub-brand-city-summary {
    background: linear-gradient(145deg, #fff, #f7faff);
}

.carhub-brand-faq-list {
    border-top: 1px solid #dce5f1;
}

.carhub-brand-faq-list details {
    border-bottom: 1px solid #dce5f1;
}

.carhub-brand-faq-list summary {
    display: grid;
    grid-template-columns: 34px 1fr 24px;
    align-items: center;
    gap: 12px;
    padding: 18px 0;
    cursor: pointer;
    list-style: none;
}

.carhub-brand-faq-list summary::-webkit-details-marker {
    display: none;
}

.carhub-brand-faq-list summary span {
    color: #2870f6;
    font-size: 11px;
    font-weight: 900;
}

.carhub-brand-faq-list summary strong {
    color: #0b1930;
    font-size: 14px;
}

.carhub-brand-faq-list summary b {
    color: #2870f6;
    font-size: 18px;
}

.carhub-brand-faq-list details[open] summary b {
    transform: rotate(45deg);
}

.carhub-brand-faq-list details > div {
    padding: 0 36px 18px 46px;
    color: #71809a;
    font-size: 13px;
    line-height: 1.7;
}

.carhub-brand-empty {
    padding: 50px 28px;
    border-radius: 24px;
    background: #fff;
    text-align: center;
}

@media (max-width: 760px) {
    .carhub-brand-page {
        padding-top: 18px;
    }

    .carhub-brand-shell {
        width: min(100% - 20px, 680px);
    }

    .carhub-brand-hero,
    .carhub-brand-section {
        border-radius: 22px;
    }

    .carhub-brand-hero,
    .carhub-brand-section {
        padding: 20px;
    }

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

    .carhub-brand-hero-stats {
        grid-template-columns: 1fr;
    }

    .carhub-brand-hero-stats > div {
        min-height: 82px;
        border-right: 0;
        border-bottom: 1px solid #dce5f1;
    }

    .carhub-brand-hero-stats > div:last-child {
        border-bottom: 0;
    }

    .carhub-brand-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .carhub-brand-sort {
        width: 100%;
        justify-content: space-between;
    }

    .carhub-brand-sort select {
        flex: 1;
    }

    .carhub-brand-model-list .carhub-body-type-card__image {
        aspect-ratio: 16 / 9;
    }

    .carhub-brand-review-card {
        flex-basis: 82vw;
    }

    .carhub-brand-comparisons .carhub-home-comparison-card {
        flex-basis: 88vw;
    }
}


/* ==========================================================================
   BRAND PAGE — FINAL INTEGRATION FIXES
   --------------------------------------------------------------------------
   The Brand route uses the exact homepage wrapper and Shared/Header.php.
   Keep Brand-specific styling limited to the Brand content itself.
   ========================================================================== */

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

body.carhub-brand-body .carhub-home {
    width: 100%;
    min-height: 100vh;
    min-width: 0;
}

/* Keep the Brand content below the exact shared homepage header. */
body.carhub-brand-body .carhub-brand-page {
    padding-top: 24px;
}

/* Prevent grid/flex intrinsic widths from pushing filter panels outside
   the Brand section. Each filter row remains horizontally scrollable. */
.carhub-brand-filters,
.carhub-brand-filter-group,
.carhub-brand-filter-group > div {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.carhub-brand-filter-group {
    overflow: hidden;
}

.carhub-brand-filter-group > div {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.carhub-brand-filter-group > div::-webkit-scrollbar {
    display: none;
}

.carhub-brand-filter-group button {
    flex: 0 0 auto;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.carhub-brand-filter-group button small {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    opacity: 1;
}

/* Keep the three statistics centered inside their cells. */
.carhub-brand-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.carhub-brand-hero-stats > div {
    min-width: 0;
    text-align: center;
}

/* Sort applies to the currently filtered catalogue, so it stays below
   the budget control. */
.carhub-brand-sort--below-budget {
    width: 100%;
    margin-top: 14px;
    justify-content: space-between;
}

.carhub-brand-sort--below-budget select {
    min-width: 220px;
}

/* Match the budget reference typography. */
.carhub-brand-budget__head strong {
    font-size: 14px;
    font-weight: 800;
}

/* Review cards remain 15% narrower than the original 330px width. */
.carhub-brand-review-card {
    flex-basis: 280px;
}

.carhub-brand-review-card__image {
    background: #fff;
}

.carhub-brand-review-card__image img {
    object-fit: cover;
    background: #fff;
}

/* Comparison cards are now another 10% narrower than the previous 288px
   Brand-page width. */
.carhub-brand-comparisons .carhub-home-comparison-card {
    flex-basis: 260px;
}

@media (max-width: 760px) {
    body.carhub-brand-body .carhub-brand-page {
        padding-top: 24px;
    }

    .carhub-brand-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .carhub-brand-hero-stats > div {
        min-height: 104px;
        padding: 17px 10px;
        border-right: 1px solid #dce5f1;
        border-bottom: 0;
    }

    .carhub-brand-hero-stats > div:last-child {
        border-right: 0;
    }

    .carhub-brand-hero-stats strong {
        font-size: 24px;
    }

    .carhub-brand-hero-stats span {
        font-size: 10px;
        line-height: 1.25;
    }

    .carhub-brand-sort--below-budget {
        width: 100%;
        justify-content: space-between;
    }

    .carhub-brand-sort--below-budget select {
        min-width: 0;
        flex: 1;
    }

    .carhub-brand-review-card {
        flex-basis: 70vw;
    }

    .carhub-brand-comparisons .carhub-home-comparison-card {
        flex-basis: 64vw;
    }
}


/* ==========================================================================
   BRAND CATALOGUE — COMPACT FILTER CONTROLS
   ========================================================================== */

.carhub-brand-filter-group {
    padding: 10px 12px;
    border-radius: 14px;
}

.carhub-brand-filter-group > strong {
    margin-bottom: 6px;
    font-size: 11px;
    line-height: 1.2;
}

.carhub-brand-filter-group > div {
    gap: 6px;
}

.carhub-brand-filter-group button {
    min-height: 36px;
    padding: 0 11px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

@media (max-width: 760px) {
    .carhub-brand-filter-group {
        padding: 10px 11px;
    }

    .carhub-brand-filter-group button {
        min-height: 35px;
        padding: 0 10px;
        font-size: 12px;
    }
}


/* Inline SEO price guide: reuse the existing brand hero. */
.carhub-brand-hero .carhub-seo-inline {
    max-width: 820px;
}
.carhub-brand-hero .carhub-seo-inline__short,
.carhub-brand-hero .carhub-seo-inline__full {
    color: var(--ch-muted);
    font-size: 15px;
    line-height: 1.75;
}
