/* MC2 DELIVERY — PADRONIZAÇÃO GLOBAL / FASE 2 */

/* =========================================================
   RESPONSIVE
   ESTRUTURA GERAL DO SITE
========================================================= */


/* =========================================================
   DESKTOP
========================================================= */

@media screen and (min-width: 769px) {

    /* -----------------------------------------------------
       CARRINHO FLUTUANTE
    ----------------------------------------------------- */

    .cart-floating {
        display: none;
    }


    /* -----------------------------------------------------
       SIDEBAR
    ----------------------------------------------------- */

    .sidebar {
        display: none !important;
    }


    .mobile-menu-button {
        display: none !important;
    }


    .sidebar-overlay {
        display: none !important;
    }


    /* -----------------------------------------------------
       APP
    ----------------------------------------------------- */

    .app-layout {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }


    /* -----------------------------------------------------
       CONTEÚDO
    ----------------------------------------------------- */

    .content-area {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 50px;
    }


    .site-content {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 768px) {

    /* -----------------------------------------------------
       CARRINHO FLUTUANTE
    ----------------------------------------------------- */

    .cart-floating {
        position: fixed;
        right: 7px;
        bottom: 75px;
        z-index: 1000;
    }


    .cart-floating a {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--mc2-primary, #EA1D2C);
        color: var(--mc2-surface, #FFFFFF);
        text-decoration: none;
        padding: 13px 15px 13px 11px;
        border-radius: var(--mc2-radius-pill, 999px);
        font-weight: 700;
        box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.3);
    }


    /* -----------------------------------------------------
       SIDEBAR
    ----------------------------------------------------- */

    .sidebar {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        box-sizing: border-box !important;
        padding: 25px 20px !important;
        margin: 0 !important;
        background: var(--mc2-surface, #FFFFFF) !important;
        z-index: 100000 !important;
        overflow-y: auto !important;
        transform: translateX(-110%) !important;
        transition: transform .25s ease !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, .25) !important;
    }


    /* -----------------------------------------------------
       SIDEBAR ABERTA
    ----------------------------------------------------- */

    body.menu-open .sidebar {
        transform: translateX(0) !important;
    }


    /* -----------------------------------------------------
       TÍTULO DO SIDEBAR
    ----------------------------------------------------- */

    .sidebar-title {
        display: block !important;
        font-size: 22px !important;
        font-weight: bold !important;
        color: var(--mc2-primary, #EA1D2C) !important;
        margin-bottom: 25px !important;
    }


    /* -----------------------------------------------------
       MENU SIDEBAR
    ----------------------------------------------------- */

    .sidebar-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }


    .sidebar-menu a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 13px 12px !important;
        color: var(--mc2-text, #111827) !important;
        background: transparent !important;
        text-decoration: none !important;
        border-radius: var(--mc2-radius-sm, 8px) !important;
    }


    .sidebar-menu a:hover {
        background: var(--mc2-surface-soft, #F3F4F6) !important;
        color: var(--mc2-primary, #EA1D2C) !important;
    }


    .sidebar-menu hr {
        width: 100% !important;
        border: 0 !important;
        border-top: 1px solid var(--mc2-border-strong, #D1D5DB) !important;
        margin: 15px 0 !important;
    }


    /* -----------------------------------------------------
       APP
    ----------------------------------------------------- */

    .app-layout {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }


    /* -----------------------------------------------------
       CONTEÚDO
    ----------------------------------------------------- */

    .content-area {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 30px !important;
    }


    .site-content {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

}


/* =========================================================
   CELULARES PEQUENOS
========================================================= */

@media screen and (max-width: 480px) {

    .content-area {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }


    .cart-floating {
        position: fixed;
        right: 7px;
        bottom: 75px;
        z-index: 1000;
    }


    .cart-floating a {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--mc2-primary, #EA1D2C);
        color: var(--mc2-surface, #FFFFFF);
        text-decoration: none;
        padding: 13px 15px 13px 11px;
        border-radius: var(--mc2-radius-pill, 999px);
        font-weight: 700;
        box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.3);
    }

}


/* =========================================================
   HOME DO CLIENTE
   FULL WIDTH
========================================================= */

/*
|--------------------------------------------------------------------------
| REGRA EXCLUSIVA DA HOME LOGADA
|--------------------------------------------------------------------------
|
| A view /cliente usa:
|
|     .content-area
|         > .mc2ch-root
|
| Portanto removemos o padding externo apenas nessa página.
|
| Outras páginas que também usam .content-area continuam com:
|
| Desktop: 50px
| Mobile:  30px
| <=480px: 12px laterais
|
*/

.content-area:has(> .mc2ch-root) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}


/*
|--------------------------------------------------------------------------
| GARANTIA DE LARGURA DO LAYOUT DA HOME CLIENTE
|--------------------------------------------------------------------------
*/

.app-layout:has(> .content-area > .mc2ch-root) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/*
|--------------------------------------------------------------------------
| RAIZ DA HOME CLIENTE
|--------------------------------------------------------------------------
*/

.content-area > .mc2ch-root {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
