.establishments-page {
    padding: 3rem 0 4.5rem;
    background: #f7f8fa;
}

.establishments-heading {
    max-width: 780px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.establishments-heading__eyebrow {
    display: inline-block;
    margin-bottom: .55rem;
    color: #e45f38;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.establishments-heading h1 {
    margin: 0 0 .75rem;
    color: #0a326f;
    font-size: 2.2rem;
    font-weight: 800;
}

.establishments-heading p {
    margin: 0;
    color: #596574;
    font-size: 1.08rem;
    line-height: 1.6;
}

.establishments-filters {
    margin-bottom: 2.6rem;
    padding: 1.6rem 1.8rem;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 45, 61, .06);
}

.establishments-filters__heading,
.establishments-results__toolbar,
.establishments-view-controls,
.establishments-sort,
.establishments-view-toggle,
.establishments-map__toolbar {
    display: flex;
    align-items: center;
}

.establishments-filters__heading {
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.establishments-filters__heading h2,
.establishments-results__toolbar h2 {
    margin: 0;
    color: #26384d;
    font-size: 1.2rem;
    font-weight: 700;
}

.establishments-filters__heading span {
    color: #74808c;
    font-size: .9rem;
}

.establishments-filters__fields {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1.15fr auto;
    align-items: end;
    gap: 1rem;
}

.establishments-filters .form-group {
    min-width: 0;
    margin: 0;
}

.establishments-filters label {
    margin-bottom: .4rem;
    color: #3d4b5a;
    font-size: .92rem;
    font-weight: 600;
}

.establishments-filters .form-control {
    height: 44px;
    border-color: #d7dee6;
    border-radius: 7px;
}

.establishments-filters__actions {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding-bottom: 1px;
    white-space: nowrap;
}

.establishments-filters__actions .btn {
    min-height: 44px;
    padding: .6rem 1.25rem;
}

.establishments-clear {
    color: #4a5663;
    font-weight: 600;
    text-decoration: underline;
}

.establishments-results__toolbar {
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}

.establishments-results__toolbar p {
    margin: .35rem 0 0;
    color: #6d7782;
}

.establishments-view-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.2rem;
}

.establishments-sort {
    gap: .45rem;
    color: #66717d;
    font-size: .9rem;
}

.establishments-sort a {
    display: inline-flex;
    min-width: 38px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9dfe5;
    border-radius: 7px;
    color: #3d4b5a;
    font-weight: 700;
}

.establishments-sort a.is-active {
    border-color: #0a326f;
    background: #0a326f;
    color: #fff;
}

.establishments-view-toggle {
    overflow: hidden;
    border: 1px solid #d9dfe5;
    border-radius: 8px;
    background: #fff;
}

.establishments-view-toggle button,
.establishments-map__toolbar button {
    min-height: 36px;
    padding: .45rem .8rem;
    border: 0;
    background: #fff;
    color: #465361;
    font: inherit;
    cursor: pointer;
}

.establishments-view-toggle button + button {
    border-left: 1px solid #d9dfe5;
}

.establishments-view-toggle button.is-active {
    background: #0a326f;
    color: #fff;
}

.establishments-view-toggle i,
.establishments-map__toolbar i {
    margin-right: .3rem;
}

.establishments-grid {
    margin-right: -.75rem;
    margin-left: -.75rem;
}

.establishments-grid__column {
    display: flex;
    padding-right: .75rem;
    padding-left: .75rem;
    margin-bottom: 1.5rem;
}

.establishment-card {
    display: flex;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 45, 61, .08);
    transition: box-shadow .2s ease, transform .2s ease;
}

.establishment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 13px 30px rgba(31, 45, 61, .13);
}

.establishment-card__image {
    position: relative;
    display: block;
    height: 215px;
    overflow: hidden;
    background: #e9edf1;
}

.establishment-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.establishment-card:hover .establishment-card__image img {
    transform: scale(1.035);
}

.establishment-card__category {
    position: absolute;
    bottom: .85rem;
    left: .9rem;
    max-width: calc(100% - 1.8rem);
    overflow: hidden;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: #fff;
    color: #26384d;
    font-size: .78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.establishment-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.25rem 1.35rem 1.35rem;
}

.establishment-card__body h3 {
    margin: 0 0 1rem;
    font-size: 1.24rem;
    font-weight: 700;
    line-height: 1.35;
}

.establishment-card__body h3 a {
    color: #222;
}

.establishment-card__detail {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: .75rem;
    color: #515e6b;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.establishment-card__detail > .fa {
    flex: 0 0 18px;
    margin-top: .15rem;
    color: #e45f38;
    text-align: center;
}

.establishment-card__detail a {
    color: #3e4e60;
}

.establishment-card__detail a:hover {
    color: #0a326f;
    text-decoration: underline;
}

.establishment-card__notice {
    margin: .25rem 0 .9rem;
    padding: .75rem;
    border-radius: 8px;
    background: #fff7e6;
    color: #775514;
    font-size: .88rem;
}

.establishment-card__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    color: #0a326f;
    font-weight: 700;
}

.establishment-card__action .fa {
    transition: transform .2s ease;
}

.establishment-card__action:hover .fa {
    transform: translateX(4px);
}

.establishments-pagination {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0;
}

.establishments-pagination .pagination {
    margin-bottom: 0;
}

.establishments-empty {
    max-width: 680px;
    margin: 1rem auto 0;
    padding: 3rem 2rem;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.establishments-empty > .fa {
    margin-bottom: .9rem;
    color: #e45f38;
    font-size: 2rem;
}

.establishments-empty h3 {
    margin: 0 0 .5rem;
    color: #26384d;
    font-size: 1.25rem;
    font-weight: 700;
}

.establishments-empty p {
    margin: 0 0 1rem;
    color: #687481;
}

.establishments-map[hidden] {
    display: none !important;
}

/* bons.css hides the legacy #mapa element globally; re-enable this page's map. */
#mapa.establishments-map:not([hidden]) {
    display: block !important;
}

.establishments-map__toolbar {
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
}

.establishments-map__toolbar p {
    margin: 0;
    color: #66717d;
}

.establishments-map__toolbar button {
    border: 1px solid #d9dfe5;
    border-radius: 7px;
}

.establishments-map__canvas {
    width: 100%;
    height: min(65vh, 620px);
    min-height: 360px;
    border-radius: 14px;
    background: #e9edf1;
}

.establishments-map-popup {
    width: 220px;
    padding: .25rem;
}

.establishments-map-popup img {
    width: 100%;
    height: 100px;
    margin-bottom: .6rem;
    border-radius: 6px;
    object-fit: cover;
}

.establishments-map-popup strong,
.establishments-map-popup p {
    display: block;
    margin-bottom: .35rem;
}

.establishments-cta__box {
    max-width: 620px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    color: #26384d;
    text-align: center;
}

.establishments-cta__box h2 {
    margin-bottom: .8rem;
    color: var(--primary, #0a326f);
    font-size: 1.5rem;
    font-weight: 700;
}

.establishments-cta__box p {
    margin-bottom: 1.25rem;
}

@media (max-width: 991px) {
    .establishments-filters__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .establishments-filters__actions {
        min-height: 44px;
    }
}

@media (max-width: 767px) {
    .establishments-page {
        padding: 2.2rem 0 3.25rem;
    }

    .establishments-heading {
        margin-bottom: 1.75rem;
    }

    .establishments-heading h1 {
        font-size: 1.8rem;
    }

    .establishments-filters {
        margin-bottom: 2rem;
        padding: 1.2rem;
    }

    .establishments-filters__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .3rem;
    }

    .establishments-filters__fields {
        grid-template-columns: 1fr;
        gap: .85rem;
    }

    .establishments-results__toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .establishments-view-controls {
        width: 100%;
        justify-content: space-between;
        gap: .7rem;
    }

    .establishments-sort {
        flex-wrap: wrap;
    }

    .establishment-card__image {
        height: 225px;
    }

    .establishments-map__canvas {
        height: 55vh;
        min-height: 320px;
    }
}
