/*
 * BestPropertyPlug Homepage Property Types Center V26.4
 * Scope: homepage phone + narrow tablet only.
 * Purpose: force the Property Types row to use the full centered container.
 * This supersedes V26.3 and also resets old flex/fixed-card geometry.
 */
@media (max-width: 991.98px) {
    html body .rpgx-home .rpgx-types-section > .rpgx-container {
        box-sizing: border-box !important;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin-inline: auto !important;
        padding-inline: 0 !important;
    }

    html body .rpgx-home .rpgx-types-section .rpgx-section-head {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
    }

    /* Kill legacy horizontal/fixed-card rules and rebuild as a true 2-column grid. */
    html body .rpgx-home .rpgx-types-section .rpgx-type-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-rows: none !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
        box-sizing: border-box !important;
        inline-size: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 14px 0 0 !important;
        padding: 0 !important;
        gap: 8px !important;
        column-gap: 8px !important;
        row-gap: 8px !important;
        justify-content: stretch !important;
        justify-items: stretch !important;
        align-items: stretch !important;
        overflow: visible !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        transform: none !important;
    }

    html body .rpgx-home .rpgx-types-section .rpgx-type-row > .rpgx-type-card {
        box-sizing: border-box !important;
        inline-size: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: none !important;
        flex-basis: auto !important;
        flex-grow: 0 !important;
        flex-shrink: 1 !important;
        margin: 0 !important;
        justify-self: stretch !important;
        align-self: stretch !important;
        transform: none !important;
        scroll-snap-align: none !important;
    }

    html body .rpgx-home .rpgx-types-section .rpgx-type-card > div {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html body .rpgx-home .rpgx-types-section .rpgx-type-card strong,
    html body .rpgx-home .rpgx-types-section .rpgx-type-card span {
        max-width: 100% !important;
    }
}

/* Very narrow phones: preserve the same two-column centered geometry. */
@media (max-width: 390px) {
    html body .rpgx-home .rpgx-types-section .rpgx-type-row {
        gap: 7px !important;
    }
}
