/* =========================================================
   PROPIEDAD DETALLE
   VARIABLES Y CONFIGURACIÓN GENERAL
========================================================= */

.property-detail-page {
    --property-color-primary: #233b32;
    --property-color-accent: #879873;
    --property-color-text: #1f2937;
    --property-color-muted: #6b7280;
    --property-color-border: #e8ece9;
    --property-color-background: #f7f8f6;
    --property-color-surface: #ffffff;

    padding-top: var(--navbar-height, 82px);

    background: var(--property-color-background);
    color: var(--property-color-text);
}

.property-detail-page .section-container {
    width: min(1320px, calc(100% - 80px));
    margin-inline: auto;
}


/* =========================================================
   RUTA DE NAVEGACIÓN
========================================================= */

.property-detail-breadcrumb {
    padding-top: 28px;
}

.property-detail-breadcrumb__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    color: var(--property-color-muted);

    font-size: 13px;
    line-height: 1.5;
}

.property-detail-breadcrumb__nav a {
    color: var(--property-color-primary);

    font-weight: 600;
    text-decoration: none;

    transition: color 0.2s ease;
}

.property-detail-breadcrumb__nav a:hover {
    color: var(--property-color-accent);
}

.property-detail-breadcrumb__nav strong {
    color: var(--property-color-text);

    font-weight: 600;
}


/* =========================================================
   ENCABEZADO DE LA PROPIEDAD
========================================================= */

.property-detail-heading {
    padding: 34px 0 28px;
}

.property-detail-heading__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 40px;
}

.property-detail-heading__information {
    min-width: 0;
}

.property-detail-heading__badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;

    margin-bottom: 16px;
}

.property-detail-heading h1 {
    max-width: 850px;
    margin: 0;

    color: var(--property-color-primary);

    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.16;
    letter-spacing: -0.04em;

    overflow-wrap: anywhere;
}

.property-detail-heading__location {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 14px 0 0;

    color: var(--property-color-muted);

    font-size: 15px;
}

.property-detail-heading__location svg {
    width: 19px;
    height: 19px;

    flex-shrink: 0;

    stroke: var(--property-color-accent);
    stroke-width: 1.7;
}


/* =========================================================
   ETIQUETAS
========================================================= */

.property-detail-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;
    padding: 0 12px;

    background: var(--property-color-primary);
    color: #ffffff;

    font-size: 11px;
    font-weight: 600;
}

.property-detail-badge--category {
    background: #e9ede8;
    color: var(--property-color-primary);
}

.property-detail-badge--featured {
    background: var(--property-color-accent);
    color: #ffffff;
}


/* =========================================================
   PRECIO PRINCIPAL
========================================================= */

.property-detail-heading__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;

    min-width: 200px;
}

.property-detail-heading__price > span {
    color: var(--property-color-muted);

    font-size: 13px;
}

.property-detail-heading__price strong {
    color: var(--property-color-primary);

    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
    font-weight: 700;
}

.property-detail-heading__price small {
    color: var(--property-color-muted);

    font-size: 14px;
}


/* =========================================================
   GALERÍA PRINCIPAL
========================================================= */

.property-detail-gallery {
    padding-bottom: 34px;
}

.property-detail-gallery__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 12px;

    height: 520px;
}

/* Si no hay imágenes secundarias, la imagen principal ocupa todo el ancho. */

.property-detail-gallery__grid:not(
    :has(.property-detail-gallery__secondary)
) {
    grid-template-columns: 1fr;
}

.property-detail-gallery__main {
    width: 100%;
    height: 100%;
    min-height: 0;

    overflow: hidden;

    background: #e9ede8;
}

.property-detail-gallery__main img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.property-detail-gallery__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: var(--property-color-muted);
}

.property-detail-gallery__secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;

    min-width: 0;
    min-height: 0;
}

.property-detail-gallery__item {
    min-width: 0;
    min-height: 0;

    overflow: hidden;

    background: #e9ede8;
}

.property-detail-gallery__item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.35s ease;
}

.property-detail-gallery__item:hover img {
    transform: scale(1.035);
}


/* =========================================================
   CONTENIDO PRINCIPAL
========================================================= */

.property-detail-content {
    padding-bottom: 96px;
}

.property-detail-content__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 28px;
}

.property-detail-content__main {
    display: grid;
    gap: 24px;

    min-width: 0;
}


/* =========================================================
   TARJETAS DE CONTENIDO
========================================================= */

.property-detail-card {
    padding: 30px;

    border: 1px solid var(--property-color-border);

    background: var(--property-color-surface);
}

.property-detail-card__heading {
    margin-bottom: 26px;
}

.property-detail-card__heading > span {
    display: block;

    margin-bottom: 8px;

    color: var(--property-color-accent);

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.property-detail-card__heading h2 {
    margin: 0;

    color: var(--property-color-primary);

    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}


/* =========================================================
   CARACTERÍSTICAS DE LA PROPIEDAD
========================================================= */

.property-detail-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.property-detail-feature {
    display: flex;
    align-items: center;
    gap: 11px;

    min-width: 0;
}

.property-detail-feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    flex-shrink: 0;

    background: #f1f4ef;
}

.property-detail-feature__icon svg {
    width: 22px;
    height: 22px;

    stroke: var(--property-color-primary);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.property-detail-feature > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
}

.property-detail-feature strong {
    color: var(--property-color-primary);

    font-size: 15px;
    line-height: 1.1;
}

.property-detail-feature span {
    color: var(--property-color-muted);

    font-size: 11px;
}


/* =========================================================
   DESCRIPCIÓN
========================================================= */

.property-detail-description__text {
    color: #526059;

    font-size: 15px;
    line-height: 1.85;
}

.property-detail-description__text p {
    margin: 0 0 14px;
}

.property-detail-description__text p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   GALERÍA COMPLETA
========================================================= */

.property-detail-full-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.property-detail-full-gallery__item {
    min-width: 0;
    margin: 0;
}

.property-detail-full-gallery__item img {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    object-fit: cover;
}

.property-detail-full-gallery__item figcaption {
    margin-top: 8px;

    color: var(--property-color-muted);

    font-size: 12px;
}


/* =========================================================
   TARJETA DE CONTACTO
========================================================= */

.property-detail-contact {
    position: sticky;
    top: calc(var(--navbar-height, 82px) + 20px);

    min-width: 0;
}

.property-detail-contact__card {
    padding: 28px;

    border: 1px solid var(--property-color-border);

    background: var(--property-color-surface);
}

.property-detail-contact__eyebrow {
    color: var(--property-color-accent);

    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.property-detail-contact__card h2 {
    margin: 12px 0 10px;

    color: var(--property-color-primary);

    font-size: 25px;
    line-height: 1.2;
}

.property-detail-contact__card p {
    margin: 0;

    color: var(--property-color-muted);

    font-size: 14px;
    line-height: 1.7;
}

.property-detail-contact__button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    padding: 0 16px;

    box-sizing: border-box;

    background: var(--property-color-primary);
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

    transition: background-color 0.2s ease;
}

.property-detail-contact__button:hover {
    background: var(--property-color-accent);
}

.property-detail-contact__email {
    display: block;

    margin-top: 14px;

    color: var(--property-color-primary);

    font-size: 13px;
    text-align: center;
    text-decoration: none;

    transition: color 0.2s ease;
}

.property-detail-contact__email:hover {
    color: var(--property-color-accent);
}


/* =========================================================
   RESUMEN DE LA PROPIEDAD
========================================================= */

.property-detail-contact__summary {
    display: grid;
    gap: 14px;

    margin-top: 26px;
    padding-top: 22px;

    border-top: 1px solid var(--property-color-border);
}

.property-detail-contact__summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.property-detail-contact__summary span {
    color: var(--property-color-muted);

    font-size: 12px;
}

.property-detail-contact__summary strong {
    color: var(--property-color-primary);

    font-size: 12px;
    text-align: right;
}


/* =========================================================
   RESPONSIVE - NOTEBOOK / TABLET
   HASTA 1100 PX
========================================================= */

@media (max-width: 1100px) {

    .property-detail-page .section-container {
        width: calc(100% - 56px);
    }

    .property-detail-heading__content {
        gap: 28px;
    }

    .property-detail-gallery__grid {
        height: 440px;
    }

    .property-detail-content__layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 20px;
    }

    .property-detail-card,
    .property-detail-contact__card {
        padding: 24px;
    }

    .property-detail-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}


/* =========================================================
   RESPONSIVE - TABLET VERTICAL
   HASTA 780 PX
========================================================= */

@media (max-width: 780px) {

    .property-detail-page .section-container {
        width: calc(100% - 36px);
    }

    .property-detail-breadcrumb {
        padding-top: 22px;
    }

    .property-detail-heading {
        padding: 26px 0 22px;
    }

    .property-detail-heading__content {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 20px;
    }

    .property-detail-heading__price {
        min-width: 0;

        align-items: flex-start;
    }

    .property-detail-gallery {
        padding-bottom: 28px;
    }

    .property-detail-gallery__grid {
        grid-template-columns: 1fr;
        gap: 10px;

        height: auto;
    }

    .property-detail-gallery__main {
        height: 380px;
    }

    .property-detail-gallery__secondary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: 1fr;
        gap: 10px;
    }

    .property-detail-gallery__item {
        aspect-ratio: 1 / 1;
    }

    .property-detail-content__layout {
        grid-template-columns: 1fr;
    }

    .property-detail-contact {
        position: static;
    }

    .property-detail-content {
        padding-bottom: 70px;
    }
}


/* =========================================================
   RESPONSIVE - MÓVIL
   HASTA 480 PX
========================================================= */

@media (max-width: 480px) {

    .property-detail-page .section-container {
        width: calc(100% - 28px);
    }

    .property-detail-breadcrumb__nav {
        gap: 7px;

        font-size: 12px;
    }

    .property-detail-heading {
        padding: 22px 0 20px;
    }

    .property-detail-heading h1 {
        font-size: 30px;
    }

    .property-detail-heading__price strong {
        font-size: 27px;
    }

    .property-detail-gallery__main {
        height: 290px;
    }

    .property-detail-gallery__secondary {
        gap: 7px;
    }

    .property-detail-card,
    .property-detail-contact__card {
        padding: 20px;
    }

    .property-detail-card__heading {
        margin-bottom: 20px;
    }

    .property-detail-card__heading h2 {
        font-size: 21px;
    }

    .property-detail-features {
        gap: 18px 12px;
    }

    .property-detail-feature {
        align-items: flex-start;
        gap: 9px;
    }

    .property-detail-feature__icon {
        width: 38px;
        height: 38px;
    }

    .property-detail-feature strong {
        font-size: 13px;
    }

    .property-detail-feature span {
        font-size: 10px;
    }

    .property-detail-full-gallery__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .property-detail-contact__card h2 {
        font-size: 22px;
    }

    .property-detail-content {
        padding-bottom: 56px;
    }
}