
/*
 * 2.16.68 — Outer-Wrapper Viewport Recenter & Right-Edge Recovery
 *
 * CSS only.
 * No model-row reconstruction.
 * No image resizing beyond normal max-width safety.
 * No DOM movement or JavaScript.
 *
 * This layer targets the WordPress/theme wrappers ABOVE #slc21617-rehost.
 */

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

/* Release theme content-column offsets on the Home Catalog page only. */
body.slc-hc-21668-page main,
body.slc-hc-21668-page .wp-site-blocks,
body.slc-hc-21668-page .wp-block-post-content,
body.slc-hc-21668-page .entry-content,
body.slc-hc-21668-page .site-main,
body.slc-hc-21668-page article,
body.slc-hc-21668-page .wp-block-group.is-layout-constrained,
body.slc-hc-21668-page .is-layout-constrained {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/*
 * Direct ancestors that contain the catalog are allowed to span the viewport,
 * so their own margins/paddings cannot push the catalog rightward.
 */
body.slc-hc-21668-page main:has(#slc21617-rehost),
body.slc-hc-21668-page article:has(#slc21617-rehost),
body.slc-hc-21668-page .entry-content:has(#slc21617-rehost),
body.slc-hc-21668-page .wp-block-post-content:has(#slc21617-rehost),
body.slc-hc-21668-page .wp-block-group:has(#slc21617-rehost),
body.slc-hc-21668-page .is-layout-constrained:has(#slc21617-rehost) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/*
 * Preserve current catalog scale. Only center the complete existing canvas
 * in the visible viewport with a symmetric safety margin.
 */
body.slc-hc-21668-page #slc21617-rehost {
    width: min(1320px, calc(100vw - 72px)) !important;
    max-width: calc(100vw - 72px) !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;
}

/* Do not alter the established recovered internal geometry. */
body.slc-hc-21668-page #slc21617-rehost > *,
body.slc-hc-21668-page #slc21617-rehost .slc21617-live-root {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Safety only; keep natural proportions. */
body.slc-hc-21668-page #slc21617-rehost img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Preserve Linden gallery and existing recovered layout. */
body.slc-hc-21668-page #slc21617-rehost .slc21626-gallery {
    max-width: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
}

/* Mid-size desktop */
@media (max-width: 1180px) {
    body.slc-hc-21668-page #slc21617-rehost {
        width: calc(100vw - 48px) !important;
        max-width: calc(100vw - 48px) !important;
    }
}

/* Tablet/mobile */
@media (max-width: 820px) {
    body.slc-hc-21668-page #slc21617-rehost {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }
}

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