/* Desktop-fixed-mobile: keep desktop layout on small screens by enforcing minimum widths and allowing horizontal scroll.
   Use carefully — this overrides responsive stacking and preserves grid/flex layout.
*/
html, body {
    min-width: 1366px;
    overflow-x: auto;
}

.site-wrapper,
.main-wrapper,
.page-wrapper,
.container,
.container-fluid {
    min-width: 1366px;
}

/* Prevent common mobile stacking rules by forcing normal flow when overridden by narrow media queries */
@media (max-width: 1365px) {
    .row,
    .d-flex,
    .grid,
    .card,
    .container,
    .container-fluid {
        /* keep original display and allow overflow */
        display: revert;
    }
    /* Avoid forcing column direction for flex containers */
    .d-flex { flex-direction: row !important; }
    /* Avoid collapsing grid columns to single column */
    [class*="col-"] { width: auto !important; }
}

/* Force left-aligned start on narrow viewports: prevent wrappers being centered with margin:auto */
html, body, .site-wrapper, .main-wrapper, .page-wrapper, .container, .container-fluid {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Override any inline or stylesheet rules that attempt to center by margin:auto */
[style*="margin-left: auto"] { margin-left: 0 !important; }
[style*="margin-right: auto"] { margin-right: 0 !important; }
[style*="margin: 0 auto"] { margin: 0 !important; }

/* Ensure initial scroll position shows left edge */
body { scroll-behavior: auto; }

/* FINAL FIX 2: disable full-bleed calc/100vw offsets inside desktop locked frontend */

@media (max-width: 1366px) {
    body.frontend-site.desktop-locked .premium-home-hero,
    body.frontend-site.desktop-locked .hero-section,
    body.frontend-site.desktop-locked .home-hero,
    body.frontend-site.desktop-locked .main-slider,
    body.frontend-site.desktop-locked .slider-section,
    body.frontend-site.desktop-locked .full-width-section,
    body.frontend-site.desktop-locked .section-full,
    body.frontend-site.desktop-locked [class*="full-width"],
    body.frontend-site.desktop-locked [class*="fullwidth"] {
        width: 1366px !important;
        max-width: 1366px !important;
        min-width: 1366px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-inline: 0 !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }

    body.frontend-site.desktop-locked .premium-home-hero,
    body.frontend-site.desktop-locked .premium-home-hero *,
    body.frontend-site.desktop-locked .home-hero,
    body.frontend-site.desktop-locked .home-hero *,
    body.frontend-site.desktop-locked .main-slider,
    body.frontend-site.desktop-locked .main-slider * {
        box-sizing: border-box !important;
    }

    body.frontend-site.desktop-locked .premium-home-hero {
        overflow: hidden !important;
    }

    body.frontend-site.desktop-locked .premium-home-hero .container,
    body.frontend-site.desktop-locked .home-hero .container,
    body.frontend-site.desktop-locked .main-slider .container {
        width: 1320px !important;
        max-width: 1320px !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.frontend-site.desktop-locked [style*="calc(50% - 50vw)"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }

    body.frontend-site.desktop-locked [style*="100vw"] {
        width: 1366px !important;
        max-width: 1366px !important;
    }
}
