.branches-list .branch-details .wrap {
	padding: 0.5rem;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.branches-list .branch-image {
	aspect-ratio:16 / 9;
	background-size: cover;
	background-position: center;
	position: relative;
	border-radius: .5rem;
}

.branches-list .branch-image .branch-name {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding:1rem;
}

.branches-list .branch-image .branch-name h5 {
	color: #fff;
	background-color: rgba(0,0,0,0.25);
	padding: 0.25em 0.5em;
	border: 1px solid rgba(255,255,255,0.5);
	backdrop-filter: blur(8px);
	margin: 0;
	border-radius: .25rem;
}

.branches-list .contact-detail {
	display: grid;
	grid-template-columns: 30px 1fr;
	font-size: 0.875rem;
	margin: 0 0 0.25rem 0;
}

.branches-list .contact-detail span{
	font-weight:500;
}

.branches-list .contact-detail span,
.branches-list .contact-detail a,
.branches-list .contact-detail p
{
	line-height:1.75em;
}

.branches-list .contact-detail p{
	margin:0;
}

.branches-list .info {
	padding: 1rem 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.branch-details .buttons{
	display:flex;
	flex-direction:column;
	align-items:stretch;
	gap:0.5rem;
}
/* Leaflet map templates */
.branches-map {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    background: #f7f7f5;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: .35rem;
    overflow: hidden;
}

.branches-map-edit-placeholder {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Keep the map itself very quiet so the branch markers do the visual work. */
.branches-map .leaflet-tile-pane {
    filter: grayscale(1) saturate(0) brightness(1.12) contrast(.82);
}

/* Minimal white Leaflet controls. */
.branches-map .leaflet-bar {
    border: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.branches-map .leaflet-bar a,
.branches-map .leaflet-bar a:hover {
    width: 34px;
    height: 34px;
    line-height: 34px;
    background: #fff;
    color: #333;
    border-color: rgba(0, 0, 0, .08);
}

.branches-map .leaflet-control-attribution {
    padding: .2rem .4rem;
    background: rgba(255, 255, 255, .9);
    font-size: 10px;
    line-height: 1.35;
}

/* Popup shell. */
.branches-map .leaflet-popup-content-wrapper {
    padding: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .25rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .10);
    overflow: hidden;
}

.branches-map .leaflet-popup-content {
    width: 260px !important;
    margin: 0;
}

.branches-map .leaflet-popup-tip {
    background: #fff;
    box-shadow: none;
}

.branches-map .leaflet-popup-close-button {
    top: .5rem;
    right: .5rem;
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 28px;
    color: #333;
    background: rgba(255, 255, 255, .94);
    border-radius: 50%;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
}

.branches-map .leaflet-popup-close-button:hover,
.branches-map .leaflet-popup-close-button:focus {
    color: #000;
    background: #fff;
}

.branch-map-popup {
    width: 100%;
}

.branch-map-popup__image {
    display: block;
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin: 0;
}

.branch-map-popup__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
    padding: .9rem 1rem 1rem;
}

.branch-map-popup__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
}

.branch-map-popup__link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    color: var(--copper-color)!important;
    font-weight: 600;
    text-decoration: none;
}

.branch-map-popup__link::after {
    content: '\2192';
    transition: transform .2s ease;
}

.branch-map-popup__link:hover,
.branch-map-popup__link:focus {
    color: var(--copper-color-darker)!important;
    text-decoration: none;
}

.branch-map-popup__link:hover::after,
.branch-map-popup__link:focus::after {
    transform: translateX(.2rem);
}

@media screen and (max-width: 540px) {
    .branches-map {
        height: 60vh;
        min-height: 360px;
    }

    .branches-map .leaflet-popup-content {
        width: 220px !important;
    }
}

/* Map + floating branch details — third custom template only. */
.branches-map-with-details {
    position: relative;
    isolation: isolate;
}

.branches-map-with-details .branches-map-with-details__map {
    min-height: 580px;
    height: 74vh;
    max-height: 760px;
    border-radius: .5rem;
}

.branches-map-with-details__panel {
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    width: min(390px, 40%);
    min-width: 300px;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: .5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .12);
}

.branches-map-with-details__cards {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.branches-map-with-details__card[hidden] {
    display: none !important;
}

.branches-map-with-details__photo {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f1ef;
}

.branches-map-with-details__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.branches-map-with-details__body {
    padding: 1.45rem 1.5rem 1.6rem;
}

.branches-map-with-details__name {
    margin: 0 0 1.25rem;
    font-size: clamp(1.25rem, 1.6vw, 1.55rem);
    line-height: 1.2;
    font-weight: 500;
}

.branches-map-with-details__contacts {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    font-size: .9rem;
}

.branches-map-with-details__contact {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: .6rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.branches-map-with-details__contact > i {
    margin-top: .3rem;
    color: var(--copper-color, #9e7457);
    text-align: center;
}

.branches-map-with-details__contact a {
    color: inherit;
    text-decoration: none;
}

.branches-map-with-details__contact a:hover,
.branches-map-with-details__contact a:focus-visible {
    color: var(--copper-color, #9e7457);
    text-decoration: underline;
}

.branches-map-with-details__address span {
    display: block;
}

.branches-map-with-details__hours > :last-child {
    margin-bottom: 0;
}

.branches-map-with-details__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    margin-top: 1.25rem;
}

.branches-map-with-details__navigation {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .9rem 1rem;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, .09);
}

.branches-map-with-details__nav-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .35rem;
    border: 0;
    background: transparent;
    color: #333;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s ease;
}

.branches-map-with-details__nav-button:hover,
.branches-map-with-details__nav-button:focus-visible {
    color: var(--copper-color, #9e7457);
}

.branches-map-with-details__nav-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.branches-map-with-details__nav-button:disabled {
    opacity: .35;
    cursor: default;
}

.branches-map-with-details__counter {
    font-size: .78rem;
    white-space: nowrap;
    color: #777;
    font-variant-numeric: tabular-nums;
}

.branches-map-with-details__empty {
    padding: 2rem 1.5rem;
}

.branches-map-with-details__empty h3 {
    font-size: 1.3rem;
}

.branches-map-with-details__marker.is-active {
    filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px rgba(130, 86, 52, .85));
}

@media screen and (max-width: 767px) {
    .branches-map-with-details {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .branches-map-with-details .branches-map-with-details__map {
        height: 48vh;
        min-height: 340px;
        max-height: 540px;
    }

    .branches-map-with-details__panel {
        position: relative;
        inset: auto;
        width: 100%;
        min-width: 0;
        min-height: 0;
        overflow: visible;
        box-shadow: 0 4px 22px rgba(0, 0, 0, .07);
    }

    .branches-map-with-details__cards {
        overflow: visible;
    }

    .branches-map-with-details__photo {
        aspect-ratio: 16 / 8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .branches-map-with-details__nav-button {
        transition: none;
    }
}
