/* ==========================================================================
   VENTABLE — Ficha de inmueble (páginas generadas en /propiedad/<slug>)
   Estos estilos vivían en línea dentro de propiedad-detalle.html; ahora son
   un fichero cacheable que comparten las 11 fichas generadas.
   ========================================================================== */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.whisper-shadow {
    box-shadow: 0 30px 60px -12px rgba(2, 31, 69, 0.06);
}

/* El gris era un efecto "hasta que pasas el ratón", pero en un móvil nunca hay
   ratón: cada foto de cada ficha salía un 20 % apagada para siempre. Ahora el
   filtro es solo de escritorio. La transición se limita a opacidad y escala
   para no pisar la entrada de #mainPropertyImage (clase is-loaded). */
.property-image-main {
    transition: opacity 0.55s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
    .property-image-main {
        filter: grayscale(0.2);
        transition: filter 0.7s ease, opacity 0.55s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .property-image-main:hover {
        filter: grayscale(0);
    }
}

.thumbnail-container {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    cursor: pointer;
}
.thumbnail-container.active-thumb {
    border-color: #a29a6c;
}
.thumbnail-img {
    transition: opacity 0.3s ease;
}
.thumbnail-container:hover .thumbnail-img {
    opacity: 0.8;
}

.sticky-contact {
    position: sticky;
    top: 120px;
}
.property-contact-input {
    border: none;
    border-bottom: 2px solid var(--primary);
    border-radius: 0;
    padding: 0.5rem 0;
    background: transparent;
}
.property-contact-input:focus {
    box-shadow: none;
    border-color: #a29a6c;
}

.property-location-map {
    filter: grayscale(0.8);
    opacity: 0.9;
    transition: all 1s ease;
}
.property-location-map:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Descripción: clamp + toggle (sólo móvil) */
.descripcion-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.descripcion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    /* Objetivo tactil de 44 px (medido: se quedaba en 36). */
    min-height: 44px;
    background: transparent;
    border: 1px solid rgba(162, 154, 108, 0.6);
    color: #a29a6c;
    padding: 0.5rem 1.1rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.descripcion-toggle:hover {
    background: #a29a6c;
    color: #021f45;
}
.descripcion-toggle:active {
    transform: scale(0.97);
}
.descripcion-toggle .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.25s ease;
}
.descripcion-toggle[aria-expanded="true"] .material-symbols-outlined {
    transform: rotate(180deg);
}

/* Hero Gallery */
.property-hero-gallery {
    aspect-ratio: 4/3;
    height: auto;
}

/* Ficha: extras (estado, garaje, piscina, terraza) */
.vt-ficha-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.vt-ficha-extras li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}
.vt-ficha-extras .material-symbols-outlined {
    font-size: 20px;
    color: #a29a6c;
}

/* Ficha: migas de pan */
.vt-ficha-migas {
    font-family: 'Manrope', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 1.5rem;
}
.vt-ficha-migas a {
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
}
.vt-ficha-migas a:hover {
    color: #a29a6c;
}
.vt-ficha-migas span[aria-hidden] {
    margin: 0 0.6rem;
    color: rgba(162, 154, 108, 0.7);
}

/* Ficha: otras propiedades */
.vt-ficha-otras-title {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
}
.vt-ficha-otras-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a29a6c;
    text-decoration: none;
    border-bottom: 1px solid rgba(162, 154, 108, 0.5);
    padding-bottom: 0.35rem;
    /* Objetivo tactil de 44 px sin mover el subrayado (medido: 31 px):
       el area de toque se agranda con un pseudo-elemento invisible. */
    position: relative;
}
.vt-ficha-otras-cta::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -7px;
    bottom: -9px;
}
.vt-ficha-otras-cta:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* Ficha retirada (ya no disponible) */
.vt-ficha-retirada {
    border: 1px solid rgba(196, 198, 207, 0.3);
    padding: 2.5rem;
    background: rgba(2, 31, 69, 0.35);
}

@media (max-width: 991px) {
    .property-hero-gallery {
        aspect-ratio: 4/3;
    }
    .property-hero-side {
        display: none;
    }
    .sticky-contact {
        position: relative;
        top: 0;
    }
    .property-detail-title {
        font-size: 36px !important;
    }
    .property-detail-heading {
        font-size: 28px !important;
    }
    .vt-ficha-otras-title {
        font-size: 28px;
    }
}

@media (max-width: 575px) {
    .property-hero-gallery {
        aspect-ratio: 4/3;
    }
    .property-detail-title {
        font-size: 28px !important;
    }
    .property-stat-value {
        /* 24px: el precio gana presencia en móvil sin desbordar
           la col-6 (verificado con hasta 12 caracteres: 1.500.000 €) */
        font-size: 24px !important;
        line-height: 1.2;
    }
}

/* Móvil: la foto a 4:3 en vez de 58vh (con tope de 480 px) para que el precio
   entre en el primer pantallazo. Medido antes del cambio: el precio salía a
   987-1016 px de alto con una pantalla de 844. El `min-height: 0` es necesario:
   mobile-enhancements.css:801 pone min-height: 300px y, con 342 px de ancho, la
   proporción 4:3 daría 256 de alto, así que el mínimo ganaría y el precio se
   quedaría fuera otra vez. */
@media (max-width: 767.98px) {
    .vt-detail-media #mainPropertyImage {
        height: auto !important;
        aspect-ratio: 4 / 3;
        min-height: 0;
        max-height: none;
    }
}
