/* Mapa interativo — /leiloes (Leaflet + OpenStreetMap) */

.leiloes-map-section {
    background: #fff;
}

.leiloes-map-section__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.leiloes-map-section__title {
    font-family: inherit;
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 800;
    color: #71130d;
}

.leiloes-map-section__lead {
    margin: 0.75rem auto 0;
    max-width: 42rem;
    color: #5f5e5e;
    font-size: 0.95rem;
    line-height: 1.5;
}

.leiloes-map-section__info {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #71130d;
}

.leiloes-map-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    margin: 1.25rem auto 0;
    max-width: 28rem;
}

.leiloes-map-filters__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5f5e5e;
}

.leiloes-map-filters__select {
    flex: 1 1 14rem;
    min-width: 12rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    color: #18181b;
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.leiloes-map-filters__select:focus {
    outline: none;
    border-color: #71130d;
    box-shadow: 0 0 0 3px rgb(113 19 13 / 12%);
}

.leiloes-map-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    min-height: min(32rem, 70vh);
}

@media (min-width: 1024px) {
    .leiloes-map-layout {
        grid-template-columns: minmax(280px, 34%) 1fr;
        gap: 1.25rem;
        min-height: 34rem;
    }
}

.leiloes-map-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 14rem;
    max-height: min(32rem, 70vh);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    background: #fafafa;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .leiloes-map-list-panel {
        max-height: 34rem;
    }
}

.leiloes-map-list-panel__head {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5f5e5e;
}

.leiloes-map-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.leiloes-map-list__item {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.625rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.leiloes-map-list__item:hover,
.leiloes-map-list__item.is-active {
    border-color: rgba(113, 19, 13, 0.35);
    box-shadow: 0 4px 14px rgba(113, 19, 13, 0.08);
}

.leiloes-map-list__item.is-active {
    background: #fff8f7;
}

.leiloes-map-list__thumb {
    flex-shrink: 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 0.625rem;
    background-color: #e8e8e8;
    background-size: cover;
    background-position: center;
}

.leiloes-map-list__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.leiloes-map-list__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.leiloes-map-list__loc {
    font-size: 0.75rem;
    color: #5f5e5e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leiloes-map-list__bid {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #71130d;
}

.leiloes-map-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #5f5e5e;
}

.leiloes-map-canvas-wrap {
    position: relative;
    height: min(32rem, 70vh);
    min-height: 24rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

@media (min-width: 1024px) {
    .leiloes-map-canvas-wrap {
        height: 34rem;
        min-height: 34rem;
    }
}

#leiloes-map-canvas {
    width: 100%;
    height: 100%;
    min-height: inherit;
    background: #e8edf2;
    z-index: 0;
}

/* Pins estilo preço */
.leiloes-map-pin-wrap {
    background: transparent;
    border: 0;
}

.leiloes-map-pin {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #71130d;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -100%);
    border: 2px solid #fff;
}

.leiloes-map-pin-wrap:hover .leiloes-map-pin,
.leiloes-map-pin-wrap.leaflet-marker-icon:focus .leiloes-map-pin {
    background: #5a0f0a;
    transform: translate(-50%, -100%) scale(1.05);
}

/* Popup */
.leiloes-map-popup-shell .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.leiloes-map-popup-shell .leaflet-popup-content {
    margin: 0;
    width: 15.5rem !important;
}

.leiloes-map-popup-shell .leaflet-popup-tip {
    background: #fff;
}

.leiloes-map-popup__img {
    display: block;
    width: 100%;
    height: 7rem;
    object-fit: cover;
    background: #e8e8e8;
}

.leiloes-map-popup__img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.leiloes-map-popup__body {
    padding: 0.75rem 0.875rem 0.875rem;
}

.leiloes-map-popup__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
}

.leiloes-map-popup__loc {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #5f5e5e;
}

.leiloes-map-popup__bid {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #71130d;
    font-weight: 700;
}

.leiloes-map-popup__link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #71130d;
    text-decoration: none;
}

.leiloes-map-popup__link:hover {
    text-decoration: underline;
}

/* Cluster */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(113, 19, 13, 0.18);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: #71130d;
    color: #fff;
    font-weight: 800;
}

.leiloes-map-attribution {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.6875rem;
    color: #9ca3af;
}

.leiloes-map-attribution a {
    color: #71130d;
}
