/* ============================================================
CATÁLOGO LIIV — Estilos
============================================================ */

body *{
    font-family: "Geologica", sans-serif;
}
.page-template-catalogo-virtual-liiv footer,
.page-template-catalogo-virtual-liiv nav,
.page-template-catalogo-locales-virtual-liiv footer,
.page-template-catalogo-locales-virtual-liiv nav{
    display: none;
}
.catalogo-liiv .container{
    max-width: 92%;
    margin: 0 auto;
}
.catalogo-liiv .section0 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
}
.catalogo-liiv .section0 .info-content {

}
.catalogo-liiv .section0 .info-content svg {

}
.catalogo-liiv .section0 .info-content h3 {
    font-weight: 600;
    font-size: 3rem;
    line-height: 6.2rem;
    display: flex;
    align-items: center;
    text-align: center;
    color: #013A53;
}
.catalogo-liiv .section0 .info-content a {
    font-family: 'Geologica';
    font-style: normal;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 3.1rem;
    display: flex;
    align-items: center;
    text-align: right;
    color: #013A53;
    text-decoration: underline;
    cursor: pointer;
}
.catalogo-liiv .section0 .info-content a:hover,
.catalogo-liiv .section0 .info-content a:active,
.catalogo-liiv .section0 .info-content a:focus {
    text-decoration: none;
    outline: none;
}

/* ── Sección wrapper ── */
.catalogo-liiv .section1 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 0 7rem;
}

/* ── Container: columna imágenes + columna ficha ── */
.catalogo-liiv .section1 .container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
}

/* ── Columna izquierda: stack de view-blocks ── */
.catalogo-liiv .section1 .building-views {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 0 0 46%;
    max-width: 46%;
}

/* ── Cada bloque: label + imagen ── */
.catalogo-liiv .section1 .view-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-bottom: 3rem;
}

/* Label sobre la imagen — acepta uno o varios <span> hijos */
.catalogo-liiv .section1 .view-label {
    font-family: 'Geologica', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #013a53;
    margin: 0;
    line-height: 1.3;
    display: flex;
    justify-content: space-around;
}
.catalogo-liiv .section1 .view-label span{
    text-align: center;
}
/* ── Imagen con SVG superpuesto ── */
.catalogo-liiv .section1 .interactive-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 2.5rem 5rem -1.2rem rgba(0,0,0,0.35);
    background: #0f0f0f;
    line-height: 0;
    transition: box-shadow 0.4s ease;
}
.catalogo-liiv .section1 .interactive-container:hover {
    box-shadow: 0 3rem 6rem -1.2rem rgba(0,0,0,0.5);
}
.catalogo-liiv .section1 .interactive-container img {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(0.92);
    transition: filter 0.4s ease;
}
.catalogo-liiv .section1 .interactive-container:hover img {
    filter: brightness(1);
}

/* SVG superpuesto */
.catalogo-liiv .section1 .interactive-container .building-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: block;
    pointer-events: auto;
    z-index: 10;
}

/* ══════════════════════════════
    POLÍGONOS DE UNIDADES
    ══════════════════════════════ */
.unit-shape {
    opacity: 0.9;
    stroke-width: 1.5;
    cursor: pointer !important;
    transition: opacity 0.25s ease, stroke-width 0.25s ease, fill 0.25s ease, filter 0.25s ease;
}
.unit-shape.unit-disponible { fill: rgb(52 211 153 / 30%);  stroke: #53aa00; }
.unit-shape.unit-vendido    { fill: rgb(248 113 113 / 30%); stroke: #c5232a; }
.unit-shape.unit-apartado   { fill: rgb(246 176 59 / 30%);  stroke: #f6b03b; }
.unit-shape.unit-default    { fill: rgba(156,163,175,0.50); stroke: #9ca3af; }

@media (hover: hover) and (pointer: fine) {
    .unit-shape:hover                 { opacity: 1; stroke-width: 2.5; filter: drop-shadow(0 0 0.6rem currentColor); }
    .unit-shape.unit-disponible:hover { fill: rgb(52 211 153 / 80%); }
    .unit-shape.unit-vendido:hover    { fill: rgb(248 113 113 / 80%); }
    .unit-shape.unit-apartado:hover   { fill: rgb(246 176 59 / 80%); }
}

.unit-shape.is-active {
    fill: rgba(30, 100, 220, 0.55) !important;
    stroke: #1a5fd4 !important;
    opacity: 1 !important;
    stroke-width: 2.5 !important;
    filter: drop-shadow(0 0 0.8rem #1a5fd4) !important;
}
.unit-shape.is-dimmed { opacity: 0.35 !important; }

/* ══════════════════════════════
    FICHA DE UNIDAD
    ══════════════════════════════ */
.unit-ficha {
    flex: 1 1 0;
    min-width: 260px;
    align-self: flex-start;

    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    background: #eef4f8;
    border-radius: 1.2rem;
    padding: 1.6rem 1.8rem 1.4rem;
    font-family: 'Geologica', sans-serif;
    /* SIN transform inicial para que margin-top funcione correctamente */
}

@keyframes fichaIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.unit-ficha.is-visible {
    display: block !important;
    visibility: visible;
    pointer-events: auto;
    animation: fichaIn 0.25s ease forwards;
}

/* Cabecera */
.unit-ficha__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
.unit-ficha__nombre {
    font-size: 2.7rem;
    font-weight: 700;
    color: #013A53;
    margin: 0;
    line-height: 1.1;
}

/* Badge */
.unit-ficha__badge {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 1.2rem;
    border-radius: 9rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 2.5rem;
    display: flex;
    align-items: center;
    color: #FFFFFF;
}
.unit-ficha__badge--disponible { background: #36B416; color: #fff; }
.unit-ficha__badge--vendido    { background: #c5232a; color: #fff; }
.unit-ficha__badge--apartado   { background: #f6b03b; color: #1a1a1a; }

/* Cuerpo */
.unit-ficha__body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Datos textuales */
.unit-ficha__datos {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.unit-ficha__datos p {
    margin: 0 0 0.3rem;
    font-weight: 400;
    font-size: 1.3rem;
    line-height: 1.7rem;
    color: #013A53;
}
.unit-ficha__precio {
    margin-top: 0.9rem !important;
    font-weight: 700 !important;
    font-size: 1.8rem !important;
    line-height: 2.5rem !important;
    color: #B88C2D !important;
}

/* Foto de planta */
.unit-ficha__foto {
    flex: 0 0 auto;
    width: 50%;
    border-radius: 0.75rem;
    overflow: hidden;
    line-height: 0;
}
.unit-ficha__foto img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

/* Botón cerrar */
.unit-ficha__cerrar {
    display: block;
    margin-top: 1.1rem;
    text-align: right;
    font-size: 1.2rem;
    color: #7a9ab0;
    cursor: pointer !important;
    transition: color 0.2s;
    user-select: none;
}
.unit-ficha__cerrar:hover { color: #0f2d40; }

/* ══════════════════════════════
    RESPONSIVE
    ══════════════════════════════ */
@media (max-width: 960px) {
    .catalogo-liiv .section1 .container {
        flex-direction: column;
        width: 96%;
    }
    .catalogo-liiv .section1 .building-views {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .catalogo-liiv .section1 .view-label span {
        font-size: 2rem;
    }
    .catalogo-liiv .section0 .info-content h3 {
        font-size: 1.8rem;
        line-height: 2.2rem;
    }
    .unit-ficha {
        width: 100%;
        margin-top: 0 !important;
    }
}

@media (max-width: 560px) {
    .unit-ficha__body   { flex-direction: column; }
    .unit-ficha__foto   { width: 100%; }
    .unit-ficha__nombre { font-size: 1rem; }
    .catalogo-liiv .section0 .info-content{
        flex-wrap: wrap;
    }
    .catalogo-liiv .section0 .info-content svg{
        order: 1;
    }
    .catalogo-liiv .section0 .info-content h3{
        order: 3;
        width: 100%;
        text-align: center;
        justify-content: center;
        font-size: 1.5rem;
    }
    .catalogo-liiv .section0 .info-content a{
        order: 2;
    }
    .catalogo-liiv .section1 .view-label {
        text-align: center;
        font-size: 1.4rem;
    }
    .catalogo-liiv .section1 .view-label span {
        font-size: 1.2rem;
    }
    .unit-ficha__badge {
        padding: 0rem 1rem;
        font-size: 0.6rem;
    }
    .unit-ficha__datos p {
        font-size: 1.1rem;
        line-height: 1.3rem;
    }
    .unit-ficha__precio {
        font-size: 1.4rem !important;
        line-height: 2.5rem !important;
    }
}

/* ══════════════════════════════
    TEXTO "Vendido" en polígonos SVG
    ══════════════════════════════ */
.unit-label-vendido.is-dimmed-text { opacity: 0.15 !important; }

.unit-label-vendido {
    font-family: 'Geologica', sans-serif;
    font-size: 56px;
    font-weight: 700;
    fill: #c5232a;
    opacity: 0.85;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: opacity 0.25s ease;
}
.unit-shape.is-dimmed ~ .unit-label-vendido,
.building-svg .is-dimmed + .unit-label-vendido {
    opacity: 0.2;
}