/*
2.16.37 — Catalog Page-Container Width Authority & Full Centered Reflow

This build attacks the page/theme wrappers OUTSIDE #slc21617-rehost.
It does not replace catalog content, move media, or alter model assignments.
*/

html,
body.slc-hc-21637-page {
    overflow-x: hidden !important;
}

@media (min-width: 1200px) {

    /*
     * Release common WordPress/Twenty Twenty-Five constrained-layout wrappers
     * only on Home Catalog.
     */
    body.slc-hc-21637-page main,
    body.slc-hc-21637-page .wp-site-blocks,
    body.slc-hc-21637-page .wp-block-post-content,
    body.slc-hc-21637-page .entry-content,
    body.slc-hc-21637-page .is-layout-constrained,
    body.slc-hc-21637-page .is-layout-flow,
    body.slc-hc-21637-page .wp-block-group,
    body.slc-hc-21637-page .wp-block-group__inner-container,
    body.slc-hc-21637-page article,
    body.slc-hc-21637-page .wp-block-post,
    body.slc-hc-21637-page .wp-block-post-content > * {
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Marked page ancestors become full viewport-safe width. */
    body.slc-hc-21637-page .slc21637-page-authority {
        width: min(1760px, calc(100vw - 80px)) !important;
        max-width: min(1760px, calc(100vw - 80px)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /*
     * The captured catalog itself now gets a large but safe width and remains
     * conventionally centered. No transform-based repositioning.
     */
    body.slc-hc-21637-page #slc21617-rehost {
        width: min(1600px, calc(100vw - 120px)) !important;
        max-width: min(1600px, calc(100vw - 120px)) !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        position: relative !important;
        box-sizing: border-box !important;
    }

    body.slc-hc-21637-page #slc21617-rehost > *,
    body.slc-hc-21637-page #slc21617-rehost .slc21617-live-root {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Preserve established model row proportions on the released page width. */
    body.slc-hc-21637-page #slc21617-rehost .slc21621-authoritative-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr) !important;
        gap: clamp(24px, 2vw, 36px) !important;
    }

    /* Protect all recovered media. */
    body.slc-hc-21637-page #slc21617-rehost img {
        max-width: 100% !important;
        height: auto !important;
    }

    body.slc-hc-21637-page #slc21617-rehost .slc21621-primary-img,
    body.slc-hc-21637-page #slc21617-rehost .slc21621-support-img,
    body.slc-hc-21637-page #slc21617-rehost .slc21622-linden-primary {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
    }

    body.slc-hc-21637-page #slc21617-rehost .slc21626-gallery {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        transform: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    }

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

@media (max-width: 1199px) {
    body.slc-hc-21637-page #slc21617-rehost {
        transform: none !important;
    }
}
