/* ReplicaMade.io layout hotfix v3
 * Purpose: restore the legacy Magento two-column layout deterministically.
 * This file is intentionally loaded after styles.css.
 */

/* Desktop: use the theme's original float model, but make it explicit. */
.col2-left-layout .main {
    display: block !important;
    overflow: visible !important;
}
.col2-left-layout .main:before,
.col2-left-layout .main:after {
    content: "" !important;
    display: table !important;
}
.col2-left-layout .main:after {
    clear: both !important;
}
.col2-left-layout .col-left.sidebar {
    display: block !important;
    float: left !important;
    clear: none !important;
    position: relative !important;
    width: 231px !important;
    min-width: 231px !important;
    max-width: 231px !important;
    margin: 0 !important;
    box-sizing: content-box !important;
}
.col2-left-layout .col-main {
    display: block !important;
    float: right !important;
    clear: none !important;
    position: relative !important;
    width: 710px !important;
    min-width: 0 !important;
    max-width: 710px !important;
    margin: 0 !important;
    box-sizing: content-box !important;
}

/* Fluid tablet layout. Keep the real sidebar on the left and allow the
   content column to consume the remaining width. */
@media only screen and (max-width: 1040px) and (min-width: 761px) {
    .col2-left-layout .main {
        display: block !important;
    }
    .col2-left-layout .col-left.sidebar {
        float: left !important;
        width: 231px !important;
        min-width: 231px !important;
        max-width: 231px !important;
        box-sizing: border-box !important;
    }
    .col2-left-layout .col-main {
        float: right !important;
        width: calc(100% - 245px) !important;
        max-width: calc(100% - 245px) !important;
        box-sizing: border-box !important;
    }
}

/* Phone layout: navigation first, content second, both full width. */
@media only screen and (max-width: 760px) {
    .col2-left-layout .main {
        display: block !important;
    }
    .col2-left-layout .col-left.sidebar,
    .col2-left-layout .col-main {
        display: block !important;
        float: none !important;
        clear: both !important;
        position: relative !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    .col2-left-layout .col-left.sidebar {
        margin-bottom: 15px !important;
    }
}

/* Header brand navigation: keep the legacy 998px sprite intact on desktop,
   and make it scroll rather than wrap/misalign on narrower screens. */
@media only screen and (max-width: 1040px) {
    .logo-brands {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
    .logo-brands .cont {
        width: 998px !important;
        min-width: 998px !important;
        max-width: none !important;
    }
}
