/* Brand directory (/marcas/carros) and brand hubs (/marcas/carros/audi). Loaded after vehicle-seo-landing.css. */

.brand-pages [hidden] {
    display: none !important;
}

.brand-pages .vehicle-seo-lead {
    font-size: 1.15rem;
}

/* Same CTA type size as avaliacao-carro-pro (.pro-cta-btn); the pill shape comes from autoexpo.css. */
.brand-pages .btn-lg {
    font-size: 1.1rem;
}

/* Hero */
.brand-hero {
    padding: 2.5rem 0 3.25rem;
}

.brand-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    color: #6c7a89;
    font-size: 0.88rem;
}

.brand-crumbs li + li::before {
    margin-right: 0.35rem;
    color: #a3b1bd;
    content: "›";
}

.brand-crumbs a {
    color: var(--ae-primary);
    font-weight: 600;
}

.brand-crumbs [aria-current] {
    color: #465563;
}

.brand-hero-logo {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    padding: 8px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(26, 37, 47, 0.1);
    object-fit: contain;
}

/* Toolbar: heading + filter + sort */
.brand-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1.75rem;
}

.brand-toolbar-text {
    flex: 1 1 420px;
}

.brand-toolbar-text h2 {
    margin-bottom: 0.5rem;
    color: var(--ae-primary-dark);
    font-size: 1.6rem;
    font-weight: 700;
}

.brand-toolbar-text p {
    margin: 0;
    color: #596773;
    line-height: 1.6;
}

.brand-toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.brand-filter {
    position: relative;
}

.brand-filter i {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    color: #8a99a8;
    pointer-events: none;
    transform: translateY(-50%);
}

.brand-filter .form-control {
    width: 240px;
    height: 44px;
    padding-left: 2.4rem;
    border: 2px solid #d6e0e8;
    border-radius: 999px;
}

.brand-filter .form-control:focus {
    border-color: var(--ae-accent);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.18);
}

.brand-sort {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #d6e0e8;
    border-radius: 999px;
    background: #f4f7fa;
}

.brand-sort-btn {
    padding: 0.45rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #596773;
    font-size: 0.88rem;
    font-weight: 600;
}

.brand-sort-btn.is-active {
    background: #fff;
    color: var(--ae-primary-dark);
    box-shadow: 0 1px 4px rgba(26, 37, 47, 0.12);
}

.brand-sort-btn:focus-visible {
    outline: 2px solid var(--ae-accent);
    outline-offset: 2px;
}

/* Model cards */
.brand-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.brand-model-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.75rem;
    height: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #e3e9ee;
    border-radius: var(--ae-radius);
    background: #fff;
    box-shadow: 0 2px 8px rgba(26, 37, 47, 0.05);
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.brand-model-card:hover,
.brand-model-card:focus-visible {
    border-color: var(--ae-accent);
    box-shadow: 0 6px 18px rgba(26, 37, 47, 0.1);
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}

.brand-model-name {
    overflow: hidden;
    color: var(--ae-primary-dark);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-model-count {
    grid-row: 2;
    color: #6c7a89;
    font-size: 0.85rem;
}

.brand-model-card i {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: #a3b1bd;
    font-size: 0.85rem;
}

.brand-model-card:hover i {
    color: var(--ae-accent);
}

/* Pills: models with few adverts, brands without adverts */
.brand-others {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid #e3e9ee;
}

.brand-others h3 {
    margin-bottom: 0.35rem;
    color: var(--ae-primary-dark);
    font-size: 1.1rem;
    font-weight: 700;
}

.brand-others p {
    margin-bottom: 1rem;
    color: #6c7a89;
    font-size: 0.92rem;
}

.brand-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid #dfe6ec;
    border-radius: 999px;
    background: #fff;
    color: var(--ae-primary-dark);
    font-size: 0.88rem;
    font-weight: 600;
}

.brand-pill span {
    color: #8a99a8;
    font-size: 0.8rem;
    font-weight: 500;
}

.brand-pill:hover,
.brand-pill:focus-visible {
    border-color: var(--ae-accent);
    color: var(--ae-accent-dark);
    text-decoration: none;
}

.brand-pill--muted {
    color: #596773;
    font-weight: 500;
}

.brand-empty {
    margin: 1.5rem 0 0;
    color: #596773;
    text-align: center;
}

.brand-related {
    justify-content: center;
}

/* Directory: featured logos */
.brand-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.brand-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    height: 100%;
    padding: 1rem 0.75rem;
    border: 1px solid #e3e9ee;
    border-radius: var(--ae-radius);
    background: #fff;
    color: inherit;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brand-logo-card:hover,
.brand-logo-card:focus-visible {
    border-color: var(--ae-accent);
    box-shadow: 0 6px 18px rgba(26, 37, 47, 0.1);
    color: inherit;
    text-decoration: none;
}

.brand-logo-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-logo-name {
    color: var(--ae-primary-dark);
    font-weight: 700;
}

.brand-logo-count {
    color: #6c7a89;
    font-size: 0.82rem;
}

/* Directory: A–Z */
.brand-letters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.brand-letters a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6e0e8;
    border-radius: 8px;
    background: #fff;
    color: var(--ae-primary-dark);
    font-weight: 700;
}

.brand-letters a:hover,
.brand-letters a:focus-visible {
    border-color: var(--ae-accent);
    color: var(--ae-accent-dark);
    text-decoration: none;
}

.brand-az {
    columns: 4 220px;
    column-gap: 1.5rem;
}

.brand-az-group {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e3e9ee;
    border-radius: var(--ae-radius);
    background: #fff;
    scroll-margin-top: 90px;
}

.brand-az-group h3 {
    margin-bottom: 0.5rem;
    color: var(--ae-accent-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.brand-az-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.brand-az-group li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border-top: 1px solid #f0f3f6;
}

.brand-az-group li:first-child {
    border-top: 0;
}

.brand-az-group a {
    color: var(--ae-primary-dark);
    font-weight: 600;
}

.brand-az-group span {
    color: #8a99a8;
    font-size: 0.85rem;
    white-space: nowrap;
}

.brand-others--directory {
    margin-top: 1.5rem;
}

@media (max-width: 767.98px) {
    .brand-hero {
        padding: 1.75rem 0 2.5rem;
    }

    .brand-toolbar-controls,
    .brand-filter,
    .brand-filter .form-control {
        width: 100%;
    }

    .brand-model-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .brand-model-card {
        padding: 0.75rem 0.8rem;
    }

    .brand-model-card i {
        display: none;
    }

    .brand-logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }
}
