
/*
 * SmallLake.City Home Catalog 2.16.66
 * Recovered-Structure Freeze & CSS-Only Exact Viewport Containment
 *
 * Rules:
 * - no JavaScript
 * - no DOM movement
 * - no image reassignment
 * - no model-row reconstruction
 * - 2.16.65 recovered structure remains authoritative
 */

body.slc-hc-21666-page {
    overflow-x: hidden !important;
}

/* Exact viewport-safe catalog boundary. */
body.slc-hc-21666-page #slc21617-rehost {
    display: block !important;
    position: relative !important;
    width: min(1160px, calc(100vw - 96px)) !important;
    max-width: calc(100vw - 96px) !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* The recovered catalog root and all direct model containers must respect that boundary. */
body.slc-hc-21666-page #slc21617-rehost,
body.slc-hc-21666-page #slc21617-rehost > *,
body.slc-hc-21666-page #slc21617-rehost .slc21617-live-root,
body.slc-hc-21666-page #slc21617-rehost .slc21621-model {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/*
 * Preserve the pre-2.16.61 two-column model structure,
 * but cap the support side so it remains fully visible.
 */
body.slc-hc-21666-page #slc21617-rehost .slc21621-authoritative-grid,
body.slc-hc-21666-page #slc21617-rehost .slc21620-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 270px) !important;
    gap: 22px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-items: start !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* Freeze primary/support ownership. */
body.slc-hc-21666-page #slc21617-rehost .slc21620-primary-owner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-column: 1 !important;
    justify-self: stretch !important;
}

body.slc-hc-21666-page #slc21617-rehost .slc21620-support-owner {
    width: 100% !important;
    max-width: 270px !important;
    min-width: 0 !important;
    grid-column: 2 !important;
    justify-self: end !important;
}

/* Natural image proportions only. */
body.slc-hc-21666-page #slc21617-rehost .slc21620-primary-img,
body.slc-hc-21666-page #slc21617-rehost .slc21621-primary-img,
body.slc-hc-21666-page #slc21617-rehost .slc21620-support-img,
body.slc-hc-21666-page #slc21617-rehost .slc21621-support-img,
body.slc-hc-21666-page #slc21617-rehost img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

body.slc-hc-21666-page #slc21617-rehost .slc21620-primary-img,
body.slc-hc-21666-page #slc21617-rehost .slc21621-primary-img {
    display: block !important;
    width: 100% !important;
    object-fit: contain !important;
    transform: none !important;
}

body.slc-hc-21666-page #slc21617-rehost .slc21620-support-img,
body.slc-hc-21666-page #slc21617-rehost .slc21621-support-img {
    display: block !important;
    width: 100% !important;
    object-fit: contain !important;
    transform: none !important;
}

/* Prevent any legacy figure/wrapper width from escaping the support track. */
body.slc-hc-21666-page #slc21617-rehost figure,
body.slc-hc-21666-page #slc21617-rehost picture,
body.slc-hc-21666-page #slc21617-rehost .wp-block-image {
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Preserve Linden's recovered six-image gallery. */
body.slc-hc-21666-page #slc21617-rehost .slc21626-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    transform: none !important;
}

body.slc-hc-21666-page #slc21617-rehost .slc21626-gallery img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
}

/* Slightly tighter boundary on mid-size desktop. */
@media (max-width: 1180px) {
    body.slc-hc-21666-page #slc21617-rehost {
        width: calc(100vw - 48px) !important;
        max-width: calc(100vw - 48px) !important;
    }

    body.slc-hc-21666-page #slc21617-rehost .slc21621-authoritative-grid,
    body.slc-hc-21666-page #slc21617-rehost .slc21620-row {
        grid-template-columns: minmax(0, 1fr) minmax(210px, 240px) !important;
        gap: 20px !important;
    }

    body.slc-hc-21666-page #slc21617-rehost .slc21620-support-owner {
        max-width: 240px !important;
    }
}

/* Tablet/mobile returns to a clean single column. */
@media (max-width: 820px) {
    body.slc-hc-21666-page #slc21617-rehost {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }

    body.slc-hc-21666-page #slc21617-rehost .slc21621-authoritative-grid,
    body.slc-hc-21666-page #slc21617-rehost .slc21620-row {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    body.slc-hc-21666-page #slc21617-rehost .slc21620-primary-owner,
    body.slc-hc-21666-page #slc21617-rehost .slc21620-support-owner {
        grid-column: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-self: stretch !important;
    }

    body.slc-hc-21666-page #slc21617-rehost .slc21626-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    body.slc-hc-21666-page #slc21617-rehost {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }

    body.slc-hc-21666-page #slc21617-rehost .slc21626-gallery {
        grid-template-columns: 1fr !important;
    }
}
