:root,
[data-theme="dark"] {
    --dot-alquilado: #1a5c37;
    --dot-alquiler: #2e8b57;
    --dot-alquiler-venta: #20b2aa;
    --dot-libre: #3388ff;
    --dot-ocupado: #b00000;
    --dot-pendiente-de-determinar: #ffa500;
    --dot-reservado: #ff8c00;
    --dot-vendido: #7b2d8b;
}


#layoutSidenav_content {
    margin-left: 0 !important;
}

.view-localizaciones {
    padding: 0 0 2rem 0;
}

.view-localizaciones .view-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 100%;
    margin: 0;
}

.view-localizaciones .view-content .leaflet-container {
    width: 100% !important;
    max-width: 962px !important;
    height: 600px !important;
}

.view-content .leaflet-container a {
    color: var(--ds-laseme-primary-color);
}

.view-localizaciones .view-filters {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.view-localizaciones .views-exposed-form {
    width: 100%;
    max-width: none !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.view-localizaciones .views-exposed-form .d-flex.flex-wrap {
    gap: 0 !important;
}

.view-localizaciones .views-exposed-form .js-form-item {
    flex: none !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
}

.view-localizaciones .views-exposed-form .form-actions {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}


/**
 * WRAPPER
 */
.view-localizaciones .laseme-exposed-filters-wrapper {
    background: var(--ds-laseme-card-background-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    width: 100%;
}

.view-localizaciones .laseme-exposed-filters-wrapper:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

/**
 * HEADER
 */
.view-localizaciones .laseme-filters-header {
    background-color: var(--ds-laseme-primary-color-soft);
    padding: 0.25rem 0.75rem;
    border-bottom: 1px solid var(--ds-laseme-primary-color-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: var(--ds-laseme-main-font-family);
}

.view-localizaciones.laseme-filters-header h3 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ds-laseme-primary-heading-color);
    display: flex;
    align-items: center;
}

.view-localizaciones .laseme-filters-header h3 i {
    color: var(--ds-laseme-primary-color);
}

.view-localizaciones .laseme-filters-title-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.view-localizaciones .laseme-filters-toggle-icon {
    font-size: 1rem;
    color: var(--ds-laseme-primary-color);
    transition: transform 0.3s ease;
}

.view-localizaciones .laseme-exposed-filters-wrapper.filters-open .laseme-filters-toggle-icon {
    transform: rotate(180deg);
}

/**
 * VIEW TOGGLE
 */
.view-localizaciones .laseme-view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--ds-laseme-pure-color);
    padding: 0.25rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-localizaciones .laseme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--ds-laseme-primary-heading-color);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-localizaciones .laseme-toggle-btn i {
    font-size: 1rem;
}

.view-localizaciones .laseme-toggle-btn:hover {
    background: var(--ds-laseme-primary-color-soft);
    color: var(--ds-laseme-primary-heading-color);
}

.view-localizaciones .laseme-toggle-btn.active {
    background: var(--ds-laseme-tertiary-color);
    color: var(--ds-laseme-white);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.view-localizaciones .laseme-toggle-btn.active:hover {
    background: var(--ds-laseme-tertiary-color-hover);
}

/**
 * BODY
 */
.view-localizaciones .laseme-filters-body {
    padding: 1.5rem;
}

/**
 * Filters
 */
.view-localizaciones .laseme-filters {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.view-localizaciones .laseme-filter-item fieldset,
fieldset.laseme-filter-item {
    border: none;
    padding: 0;
    margin: 0;
}

.view-localizaciones .laseme-filter-item legend {
    padding: 0;
    margin-bottom: 0.5rem;
    border: none;
    width: 100%;
}

.view-localizaciones .fieldset-wrapper {
    display: flex;
    flex-direction: column;
}

.view-localizaciones .bef-slider {
    order: -1;
}

/* Min/Max inputs en fila para filtros de rango con slider */
#edit-field-superficie-parcela-value-wrapper .fieldset-wrapper,
#edit-field-superficie-nave-value-wrapper .fieldset-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem;
}

#edit-field-superficie-parcela-value-wrapper .fieldset-wrapper .bef-slider,
#edit-field-superficie-nave-value-wrapper .fieldset-wrapper .bef-slider {
    grid-column: 1 / -1;
    grid-row: 1;
    order: unset;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    width: auto;
}

#edit-field-superficie-parcela-value-wrapper .fieldset-wrapper>.form-item,
#edit-field-superficie-nave-value-wrapper .fieldset-wrapper>.form-item {
    grid-row: 2;
    margin-bottom: 0 !important;
}

#edit-field-superficie-parcela-value-wrapper .fieldset-wrapper .js-form-wrapper,
#edit-field-superficie-nave-value-wrapper .fieldset-wrapper .js-form-wrapper {
    display: none;
}

/* Superficie nave: slider + inputs en grid (slider ya es primero en el DOM) */
#edit-superficie-nave-wrapper #edit-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

#edit-superficie-nave-wrapper #edit-wrapper .bef-slider {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    width: auto;
}

#edit-superficie-nave-wrapper #edit-wrapper>.form-item {
    grid-row: 2;
    margin-bottom: 0 !important;
}

.laseme-filter-item .fieldset-legend {
    font-family: var(--ds-laseme-title-font-family), 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ds-laseme-primary-heading-color, #111827);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

/**
 * ITEM
 */
.view-localizaciones .laseme-filters>.js-form-item,
.view-localizaciones .laseme-filters>.form-wrapper {
    padding: 0.2rem 0.4rem;
    font-size: 0.95rem;
    margin-bottom: 0.25rem !important;
}

.view-localizaciones .laseme-filters .js-form-item input[type="text"],
.view-localizaciones .laseme-filters .js-form-item input[type="search"],
.view-localizaciones .laseme-filters .js-form-item input[type="email"],
.view-localizaciones .laseme-filters .js-form-item input[type="tel"],
.view-localizaciones .laseme-filters .js-form-item input[type="url"],
.view-localizaciones .laseme-filters .js-form-item input[type="number"],
.view-localizaciones .laseme-filters .js-form-item input[type="date"],
.view-localizaciones .laseme-filters .js-form-item input[type="datetime-local"],
.view-localizaciones .laseme-filters .js-form-item input[type="month"],
.view-localizaciones .laseme-filters .js-form-item input[type="week"],
.view-localizaciones .laseme-filters .js-form-item textarea,
.view-localizaciones .laseme-filters .js-form-item select {
    width: 100% !important;
    height: 2.5rem;
}

.view-localizaciones .laseme-filters .js-form-item select {
    padding-right: 2.25rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 0.65rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.view-localizaciones .laseme-filters .js-form-item input[type="checkbox"],
.view-localizaciones .laseme-filters .js-form-item input[type="radio"] {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    min-height: 1rem !important;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.view-localizaciones .laseme-filters .checkbox {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}

.view-localizaciones .laseme-filters .form-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem 0.5rem;
}

.view-localizaciones .laseme-filters .form-checkboxes .form-item,
.view-localizaciones .laseme-filters .form-checkboxes .form-check {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    width: auto;
    padding-left: 0 !important;
}

.view-localizaciones .laseme-filters .form-checkboxes .form-check-input,
.view-localizaciones .laseme-filters .form-checkboxes .form-checkbox {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    min-height: 1rem !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
    vertical-align: middle;
}

.view-localizaciones .laseme-filters .form-checkboxes .form-check-label {
    margin-bottom: 0;
    text-transform: none;
    font-weight: 600;
    letter-spacing: normal;
    color: var(--ds-laseme-primary-text-color);
    font-family: var(--ds-laseme-main-font-family);
    font-size: .9em;
}

@media screen and (max-width: 767px) {
    .view-localizaciones .laseme-filters .form-checkboxes {
        grid-template-columns: 1fr;
    }
}

/**
 * LABEL
 */
.view-localizaciones .laseme-filters label,
.view-localizaciones .laseme-filters legend span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ds-laseme-primary-color);
    font-weight: 600;
    margin-bottom: 0rem;
}

.view-localizaciones .laseme-filters .fieldset-legend,
.view-localizaciones .laseme-filters select,
.view-localizaciones .laseme-filters input[type="text"],
.view-localizaciones .laseme-filters input[type="number"],
.view-localizaciones .laseme-filters .form-check-label,
.view-localizaciones .laseme-filters .chosen-single,
.view-localizaciones .laseme-filters .chosen-single span,
.view-localizaciones .laseme-filters .chosen-results li,
.view-localizaciones .laseme-filters .chosen-drop {
    color: var(--ds--primary-text-color);
}

/**
 * ACTIONS
 */

.view-localizaciones .laseme-filter-actions {
    padding-top: 0.75rem;
    border-top: 1px solid var(--ds-laseme-almost-white);
}

.view-localizaciones .laseme-filter-actions #edit-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.view-localizaciones .laseme-filter-actions .form-submit {
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    min-width: 120px;
}

.view-localizaciones #edit_field_poligono_industrial_target_id_chosen .chosen-choices {
    border: none !important;
    padding: 0 !important;
}


/* Primary Button (Use specific selector if needed, assuming default .button or .btn) */
.view-localizaciones .laseme-filter-actions input[id^="edit-submit-localizaciones"] {
    --bs-btn-bg: var(--ds-laseme-primary-color) !important;
    --bs-btn-border-color: var(--ds-laseme-primary-color) !important;
    --bs-btn-color: var(--ds-laseme-pure-color) !important;
    --bs-btn-hover-border-color: var(--ds-laseme-primary-color-hover) !important;
    --bs-btn-hover-bg: var(--ds-laseme-primary-color-hover) !important;
    background-image: none !important;
}

.view-localizaciones .laseme-filter-actions input[id^="edit-submit-localizaciones"]:hover {
    transform: translateY(-1px) !important;
}

.view-localizaciones .laseme-filter-actions input[id^="edit-reset"] {
    --bs-btn-bg: transparent !important;
    --bs-btn-border-color: var(--ds-laseme-almost-white) !important;
    --bs-btn-color: var(--ds-laseme-primary-text-color) !important;
    --bs-btn-hover-bg: var(--ds-laseme-almost-white) !important;
    --bs-btn-hover-color: var(--ds-laseme-primary-color) !important;
    --bs-btn-hover-border-color: var(--ds-laseme-primary-color) !important;
    background-image: none !important;
}

.view-localizaciones .laseme-filter-actions input[id^="edit-reset"]:hover {
    transform: translateY(-1px) !important;
}

.laseme-filters .chosen-container {
    width: 100% !important;
    height: auto !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.laseme-filters .chosen-container-single .chosen-single {
    display: flex;
    align-items: center;
    background: var(--ds-laseme-pure-color, #ffffff);
    color: var(--ds-laseme-primary-text-color, #374151);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    height: 2.5rem;
    line-height: 1;
    padding: 0 2.25rem 0 0.875rem;
    font-size: 0.9rem;
    box-shadow: none;
}

[data-theme="dark"] .laseme-filters .chosen-container-single .chosen-single,
[data-theme="dark"] .laseme-filters .chosen-container .chosen-drop {
    border-color: #111111;
}

.laseme-filters .chosen-container-single .chosen-single span {
    color: var(--ds-laseme-primary-text-color, #374151);
}

.laseme-filters .chosen-container .chosen-drop {
    background: var(--ds-laseme-pure-color, #ffffff);
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.laseme-filters .chosen-container .chosen-results li {
    background: var(--ds-laseme-pure-color, #ffffff);
    color: var(--ds-laseme-primary-text-color, #374151);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.laseme-filters .chosen-container .chosen-results li.highlighted {
    background: var(--ds-laseme-primary-color-soft, rgba(120, 38, 52, 0.08));
    color: var(--ds-laseme-primary-text-color, #374151);
}

.laseme-filters .chosen-container .chosen-choices {
    background-color: var(--ds-laseme-pure-color, #ffffff);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: var(--ds-laseme-primary-text-color, #374151);
}

.laseme-filters .chosen-container li.search-choice {
    background-color: var(--ds-laseme-pure-color, #ffffff);
    color: var(--ds-laseme-primary-text-color, #374151);
}


/**
 * LEAFLET
 */
/* .leaflet-control-attribution.leaflet-control {
    display: none;
} */
.leaflet-top {
    z-index: 1000;
}

.leaflet-control-layers .leaflet-control-layers-list {
    padding: 0.5rem;
}

.leaflet-bottom {
    display: none;
}

.leaflet-marker-icon:not(.marker-cluster) {
    filter: hue-rotate(140deg) brightness(80%) saturate(80%);
    transition: all 0.3s ease;
}

.leaflet-marker-icon:not(.marker-cluster):hover,
.leaflet-marker-icon:not(.marker-cluster):focus,
.leaflet-marker-icon:not(.marker-cluster):active {
    filter: hue-rotate(140deg) brightness(120%) saturate(120%);
}

.marker-cluster {
    width: 48px !important;
    height: 48px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.marker-cluster div {
    background-color: transparent !important;
    margin: 0;
    padding: 0;
}

.marker-cluster span {
    font-size: 150%;
}

.marker-cluster {
    border-radius: 0 !important;
    border: none !important;
    background-color: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    color: var(--ds-laseme-black);
    background-color: transparent;
    width: 64px;
    height: 64px;
}

.marker-cluster-small,
.marker-cluster-medium {
    background-image: url('/themes/custom/laseme/assets/img/icons/marker-cluster-medium.svg');
    color: var(--ds-laseme-white);
}

.marker-cluster-large {
    background-image: url('/themes/custom/laseme/assets/img/icons/marker-cluster-large.svg');
    color: var(--ds-laseme-white)
}

/**
 * LEYENDA
 */

.map-legend {
    display: flex;
    flex-direction: column;
    background: var(--ds-laseme-card-background-color);
    border: 1px solid var(--ds-laseme-card-border-color);
    border-radius: 16px;
    padding: 1.25rem 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 962px;
    box-sizing: border-box;
}

.map-legend-header {
    border-bottom: 1px solid var(--ds-laseme-secondary-pure-color);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-family: var(--ds-laseme-title-font-family), 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.map-legend-body {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ds-laseme-primary-text-color);
    white-space: nowrap;
}

.map-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--ds-laseme-pure-color), 0 0 0 3px rgba(0, 0, 0, 0.05);
}


.dot-alquilado {
    background-color: var(--dot-alquilado);
}

.dot-alquiler {
    background-color: var(--dot-alquiler);
}

.dot-alquiler-venta {
    background-color: var(--dot-alquiler-venta);
}

.dot-libre {
    background-color: var(--dot-libre);
}

.dot-ocupado {
    background-color: var(--dot-ocupado);
}

.dot-pendiente-de-determinar {
    background-color: var(--dot-pendiente-de-determinar);
}

.dot-reservado {
    background-color: var(--dot-reservado);
}

.dot-vendido {
    background-color: var(--dot-vendido);
}

.dot.dot-lineas-indicador {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 18px;
    height: 0;
    border-top: 2px dashed var(--ds-laseme-primary-text-color, currentColor);
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

.view-id-localizaciones {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

@media screen and (min-width: 992px) {
    .view-id-localizaciones {
        display: grid;
        grid-template-columns: 340px 1fr;
        grid-template-areas:
            "sidebar content";
        gap: 2rem;
        align-items: start;
    }

    .view-id-localizaciones .view-filters {
        grid-area: sidebar;
        margin-bottom: 0;
        position: sticky;
        top: 2rem;
    }

    .view-id-localizaciones .view-content {
        grid-area: content;
        width: 100%;
    }

    .view-id-localizaciones.view-display-id-embed_1 {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        grid-area: auto !important;
    }

    /* Por defecto, ocultamos el listado (modo mapa) */
    .view-id-localizaciones.view-display-id-page_1>.view-footer {
        display: none !important;
    }

    /* En modo listado, ocultamos el mapa */
    .view-id-localizaciones.view-display-id-page_1.view-mode-listado>.view-content {
        display: none !important;
    }

    /* En modo listado, mostramos el listado (que vive en el footer) */
    .view-id-localizaciones.view-display-id-page_1.view-mode-listado>.view-footer {
        display: block !important;
    }

    .view-localizaciones .view-content.row,
    .view-localizaciones .view-content.row .leaflet-container {
        max-width: none !important;
        width: 100% !important;
    }

    .view-localizaciones .laseme-filters-title-trigger {
        width: auto;
        cursor: default;
        pointer-events: none;
    }

    .view-localizaciones .laseme-filters-toggle-icon {
        display: none !important;
    }

    .view-localizaciones .laseme-filters-body {
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
        padding: 1.5rem !important;
    }
}

/**
 * MAPA
*/
#leaflet-map-view-localizaciones-page-1 {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e5ec;
    transition: all 0.3s ease;
    width: 100%;
}

/* Oculta el mapa cuando no hay resultados sin destruir la instancia Leaflet. */
#leaflet-map-view-localizaciones-page-1.leaflet-hidden {
    display: none !important;
}

#leaflet-map-view-localizaciones-page-1:empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    background-color: var(--ds-laseme-pure-color);
    border-radius: 12px;
    gap: 1.5rem;
}

#leaflet-map-view-localizaciones-page-1:empty::before {
    content: "Cargando mapa...";
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ds-laseme-secondary-text-color);
}

#leaflet-map-view-localizaciones-page-1:empty::after {
    content: "";
    width: 48px;
    height: 48px;
    border: 4px solid var(--ds-laseme-primary-color-soft);
    border-top-color: var(--ds-laseme-tertiary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/**
 * LISTA DE LOCALIZACIONES - Estilo Card
 */

.view-id-localizaciones .item-list {
    width: 100%;
}

/* Card container */
.view-id-localizaciones .item-list .row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.view-id-localizaciones .item-list .row li {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    margin: 0 !important;
    list-style: none;
}

/* ============================
   LOC-CARD - Tarjeta horizontal
   ============================ */
.loc-card {
    position: relative;
    display: flex;
    flex-direction: row;
    background: var(--ds-laseme-card-background-color);
    border: 1px solid var(--ds-laseme-card-border-color);
    border-radius: 12px;
    overflow: hidden;
    height: 220px;
    min-height: 170px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.loc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Imagen (lado izquierdo) */
.loc-card__image {
    flex: 0 0 40%;
    max-width: 40%;
    position: relative;
    overflow: hidden;
    /* background: var(--ds-laseme-secondary-pure-color-background); */
}

.loc-card .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

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

.loc-card:hover .loc-card__image img {
    transform: scale(1.05);
}

.loc-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ds-laseme-primary-color-soft), var(--ds-laseme-secondary-pure-color-background));
    color: var(--ds-laseme-primary-color);
    font-size: 2.5rem;
}

.loc-card__image-placeholder:not(:has(.leaflet-container)) {
    opacity: 0.5;
}

/* Contenido (lado derecho) */
.loc-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.5rem;
    min-width: 0;
}

/* Header: Tipo + Superficie */
.loc-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.loc-card__tipo {
    font-family: var(--ds-laseme-title-font-family), 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ds-laseme-primary-heading-color);
    line-height: 1.3;
}

.loc-card__superficie {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ds-laseme-primary-color-hover);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Badge de estado */
.loc-card__status {
    display: inline-block;
    align-self: flex-start;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ds-laseme-white);
    font-family: var(--ds-laseme-main-font-family);
    background-color: var(--ds-laseme-primary-color);
    /* Fallback */
}

/* Colores dinámicos basados en la clase color-[hex] */
.color-1a5c37 {
    background-color: #1a5c37 !important;
}

.color-2e8b57 {
    background-color: #2e8b57 !important;
}

.color-20b2aa {
    background-color: #20b2aa !important;
}

.color-3388ff {
    background-color: #3388ff !important;
}

.color-b00000 {
    background-color: #b00000 !important;
}

.color-ffa500 {
    background-color: #ffa500 !important;
}

.color-ff8c00 {
    background-color: #ff8c00 !important;
}

.color-7b2d8b {
    background-color: #7b2d8b !important;
}

/* Ubicación (parte inferior) */
.loc-card__location {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    color: var(--ds-laseme-primary-text-color);
}

.loc-card__location>i {
    color: var(--ds-laseme-primary-color);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.loc-card__location-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    height: 100%;
    justify-content: center;
}

.loc-card__municipio {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--ds-laseme-primary-heading-color);
    line-height: 1.3;
}

.loc-card__poligono {
    font-size: 0.78rem;
    color: var(--ds-laseme-primary-text-color);
    font-style: italic;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Enlace que cubre toda la tarjeta (stretched link) */
.loc-card__title-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    text-indent: -9999px;
    font-size: 0;
}

.loc-card__title-link a {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 1;
}

/* Responsive: tarjeta vertical en pantallas pequeñas */
@media screen and (max-width: 520px) {
    .view-id-localizaciones .item-list .row {
        grid-template-columns: 1fr;
    }

    .loc-card {
        flex-direction: column;
        min-height: auto;
        height: auto;
    }

    .loc-card__image {
        flex: 0 0 160px;
        max-width: 100%;
        height: 160px;
    }
}

@media screen and (max-width: 991px) {
    .laseme-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.6rem;
    }

    .laseme-view-toggle {
        width: 100%;
    }

    .laseme-toggle-btn {
        flex: 1;
        justify-content: center;
    }

    .view-localizaciones .laseme-filters-title-trigger {
        padding: 0.6rem 0.85rem;
        background-color: var(--ds-laseme-pure-color);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
    }

    .view-localizaciones .laseme-filters-title-trigger:hover,
    .view-localizaciones .laseme-filters-title-trigger:active {
        background-color: var(--ds-laseme-primary-color-soft);
        border-color: rgba(120, 38, 52, 0.25);
    }

    .view-localizaciones .laseme-filters-toggle-icon {
        background-color: var(--ds-laseme-primary-color);
        color: var(--ds-laseme-white) !important;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(120, 38, 52, 0.2);
        font-size: 0.8rem;
    }

    .view-localizaciones .laseme-filters-body {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    }

    .view-localizaciones .laseme-exposed-filters-wrapper.filters-open .laseme-filters-body {
        max-height: 2000px;
        opacity: 1;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}


@media screen and (max-width: 767px) {
    .view-id-localizaciones {
        display: block;
        padding: 0.5em;
    }

    .view-id-localizaciones .view-filters {
        max-width: 100%;
    }

    .map-legend {
        justify-content: flex-start;
        gap: 12px 16px;
    }
}

.view-id-localizaciones h3 {
    font-size: 1rem;
}

/**
 * NO RESULTS NOTIFICATION
 */

/* Estado vacío nativo de Drupal (page_2) */
.view-localizaciones .view-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    background-color: var(--ds-laseme-pure-color);
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
    width: 100%;
}

/* Notificación mostrada via JS dentro de .view-content (page_1) */
.view-localizaciones .view-content .js-view-empty-notification {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    background-color: var(--ds-laseme-pure-color);
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
    width: 100%;
}

.view-empty-notification {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 450px;
    animation: fadeInUp 0.5s ease-out;
}

.view-empty-icon {
    width: 80px;
    height: 80px;
    background-color: var(--ds-laseme-primary-color-soft);
    color: var(--ds-laseme-primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    font-size: 2.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.view-empty-text {
    color: var(--ds-laseme-primary-text-color);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
}

.view-empty-text p {
    margin-bottom: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/**
 * RADIO BUTTONS COMO TOGGLE - Uso de Suelo
 */
#edit-field-uso-suelo-value .form-radios {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
}

#edit-field-uso-suelo-value .form-check {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ocultar el input radio nativo */
#edit-field-uso-suelo-value .form-check-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    pointer-events: none;
    margin: 0 !important;
}

/* Label como botón */
#edit-field-uso-suelo-value .form-check-label {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border: 1.5px solid var(--ds-laseme-primary-color);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ds-laseme-primary-color);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
    margin-bottom: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    user-select: none;
    line-height: 1.5;
}

/* Primer botón: esquinas izquierdas redondeadas */
#edit-field-uso-suelo-value .form-check:first-child .form-check-label {
    border-radius: 6px 0 0 6px;
}

/* Último botón: esquinas derechas redondeadas, sin borde izquierdo duplicado */
#edit-field-uso-suelo-value .form-check:last-child .form-check-label {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

/* Estado seleccionado */
#edit-field-uso-suelo-value .form-check-input:checked+.form-check-label {
    background-color: var(--ds-laseme-primary-color);
    color: var(--ds-laseme-white);
}

/* Hover cuando NO está seleccionado */
#edit-field-uso-suelo-value .form-check-input:not(:checked)+.form-check-label:hover {
    background-color: var(--ds-laseme-primary-color-soft);
}