.agm-wrapper,
.agm-wrapper *,
.agm-wrapper *::before,
.agm-wrapper *::after {
    box-sizing: border-box;
}

.agm-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #fff;
    font-family: Inter, Arial, sans-serif;
}


/*
 * Map
 */

.agm-map-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 0 !important;
    outline: 0 !important;
}

.agm-map {
    width: 100%;
    height: 520px;
    border: 0 !important;
    outline: 0 !important;
    background: #eee;
}

.agm-wrapper .leaflet-container {
    border: 0 !important;
    outline: 0 !important;
    font-family: Inter, Arial, sans-serif;
}


/*
 * Location
 */

.agm-location-btn {
    position: absolute;
    z-index: 700;
    top: 15px;
    right: 15px;
    padding: 9px 14px;
    appearance: none;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px;
    background: #fff;
    color: #111;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14);
    font-family: Inter, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}


/*
 * Filters
 */

.agm-filters {
    display: flex;
    gap: 8px;
    width: 100%;
    padding: 13px 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0 !important;
    background: #fff;
    scrollbar-width: none;
}

.agm-filters::-webkit-scrollbar {
    display: none;
}

.agm-chip {
    flex: 0 0 auto;
    padding: 8px 13px;
    appearance: none;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px;
    background: #f0f0f0;
    color: #333;
    font-family: Inter, Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.agm-chip.active {
    background: #111;
    color: #fff !important;
}


/*
 * Directory
 */

.agm-directory {
    position: relative;
    width: 100%;
    padding: 0 42px;
    border: 0 !important;
    background: #fff;
}

.agm-directory:has(.agm-list:empty) {
    display: none;
}

.agm-list {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    padding: 14px 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0 !important;
    outline: 0 !important;
    background: #fff;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-overflow-scrolling: touch;
}

.agm-list::-webkit-scrollbar {
    display: none;
}

.agm-list.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.agm-list.is-dragging * {
    pointer-events: none;
}


/*
 * Five cards on desktop
 */

.agm-item {
    flex: 0 0 calc((100% - 72px) / 5);
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border: 0 !important;
    outline: 0 !important;
    background: #fff;
    box-shadow: none !important;
    cursor: pointer;
    scroll-snap-align: start;
}

.agm-item,
.agm-item:hover,
.agm-item:focus,
.agm-item:focus-visible,
.agm-item.active,
.agm-item-body,
.agm-item-image,
.agm-item-placeholder,
.agm-item-cat,
.agm-title,
.agm-item-dist {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.agm-item-image,
.agm-item-placeholder {
    display: block;
    width: 100%;
    height: 145px;
    margin: 0;
    border: 0 !important;
    pointer-events: none;
}

.agm-item-image {
    object-fit: cover;
}

.agm-item-placeholder {
    background: #ededed;
}

.agm-item-body {
    padding: 12px 0 4px;
    pointer-events: none;
}

.agm-item-cat {
    margin: 0 0 6px;
    color: #888;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.agm-title {
    margin: 0;
    padding: 0;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.agm-item.active .agm-title {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.agm-item-dist {
    margin-top: 7px;
    color: #2e86de;
    font-size: 11px;
    font-weight: 600;
}


/*
 * Arrows
 */

.agm-directory-arrow {
    position: absolute;
    z-index: 20;
    top: 50%;
    width: 32px;
    height: 50px;
    padding: 0;
    transform: translateY(-50%);
    appearance: none;
    border: 0 !important;
    outline: 0 !important;
    background: transparent;
    color: #111;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
}

.agm-directory-arrow:disabled {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.agm-directory-prev {
    left: 0;
}

.agm-directory-next {
    right: 0;
}


/*
 * Markers
 */

.agm-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.agm-marker-anchor {
    width: 42px;
    height: 42px;
    border: 4px solid #fff;
    background: #111;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.34);
}

.agm-marker-user {
    display: block;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #111;
}


/*
 * Popup
 */

.agm-popup-title {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.35;
}

.agm-popup-view-btn {
    display: inline-block;
    padding: 6px 11px;
    border: 0 !important;
    background: #111;
    color: #fff !important;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: uppercase;
}


@media (max-width: 1199px) {
    .agm-item {
        flex-basis: calc((100% - 54px) / 4);
    }
}

@media (max-width: 950px) {
    .agm-item {
        flex-basis: calc((100% - 36px) / 3);
    }
}

@media (max-width: 768px) {
    .agm-map {
        height: 360px;
    }

    .agm-directory {
        padding: 0;
    }

    .agm-directory-arrow {
        display: none;
    }

    .agm-list {
        gap: 14px;
        cursor: auto;
        user-select: auto;
        -webkit-user-select: auto;
    }

    .agm-item {
        flex-basis: 220px;
        width: 220px;
    }

    .agm-item-image,
    .agm-item-placeholder {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .agm-map {
        height: 330px;
    }

    .agm-item {
        flex-basis: 78%;
        width: 78%;
    }
}