/**
 * Menu mobile — drawer lateral esquerdo (estilo santoconceito.com.br).
 * Apenas max-width: 768px.
 */

@media (min-width: 769px) {
    .mobile-drawer-backdrop,
    .mobile-drawer {
        display: none !important;
    }

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

@media (max-width: 768px) {
    .mobile-menu-dropdown {
        display: none !important;
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 22000;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    body.mobile-drawer-open .mobile-drawer-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 22010;
        width: min(88vw, 320px);
        max-width: 320px;
        height: 100%;
        height: 100dvh;
        background: #fff;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    body.mobile-drawer-open .mobile-drawer {
        transform: translateX(0);
    }

    body.mobile-drawer-open {
        overflow: hidden;
        touch-action: none;
    }

    .mobile-drawer-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 52px;
        padding: 12px 48px;
        background: #000;
        color: #fff;
        border-bottom: 1px solid #000;
        flex-shrink: 0;
    }

    .mobile-drawer-title {
        margin: 0;
        flex: 0 0 auto;
        width: 100%;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.2;
        color: #fff;
        text-align: center;
    }

    .mobile-drawer-account-card {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 12px 16px 8px;
        padding: 14px 14px;
        background: #fff;
        border: 1px solid #e0e6ef;
        border-radius: 10px;
        text-decoration: none;
        color: inherit;
        box-shadow: 0 1px 4px rgba(16, 48, 112, 0.06);
        flex-shrink: 0;
    }

    .mobile-drawer-account-card:hover {
        background: #f5f8fc;
        border-color: #c5d4eb;
    }

    .mobile-drawer-account-card__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #103070;
        color: #fff;
        flex-shrink: 0;
        font-size: 18px;
    }

    .mobile-drawer-account-card__text {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        flex: 1 1 auto;
    }

    .mobile-drawer-account-card__title {
        font-size: 15px;
        font-weight: 700;
        color: #103070;
        line-height: 1.2;
    }

    .mobile-drawer-account-card__title span {
        font-weight: 700;
        color: #103070;
    }

    .mobile-drawer-account-card__sub {
        font-size: 12px;
        font-weight: 400;
        color: #666;
        line-height: 1.35;
    }

    .mobile-drawer-account-card__chev {
        flex-shrink: 0;
        font-size: 12px;
        color: #888;
    }

    .mobile-drawer-nav--account {
        border-top: none;
    }

    .mobile-drawer-link--logout {
        color: #c62828;
        font-weight: 600;
    }

    .mobile-drawer-link--logout:hover {
        color: #b71c1c;
        background: rgba(198, 40, 40, 0.06);
    }

    /* Logado: conta só no drawer; esconde login/avatar no header mobile */
    body.store-mobile-logged-header-minimal .mobile-compact-header__account--guest,
    body.store-mobile-logged-header-minimal #headerMobileAccountGuest,
    body.store-mobile-logged-header-minimal .header-mobile-account,
    body.store-mobile-logged-header-minimal #headerMobileAccount,
    body.store-mobile-logged-header-minimal #mobileCompactUser,
    body.store-mobile-logged-header-minimal .mobile-compact-header__account-wrap,
    body.store-mobile-logged-header-minimal .mobile-compact-header__user-menu-trigger,
    body.store-mobile-logged-header-minimal .mobile-compact-header__user-avatar {
        display: none !important;
    }

    body:not(.store-mobile-logged-header-minimal) .mobile-compact-header__user-menu-trigger {
        display: none !important;
    }

    .mobile-drawer-close {
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-drawer-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0 0 24px;
    }

    .mobile-drawer-nav {
        display: flex;
        flex-direction: column;
    }

    .mobile-drawer-link,
    .mobile-drawer-accordion-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 16px 20px;
        border: none;
        background: transparent;
        color: #333;
        font-size: 15px;
        font-weight: 400;
        text-align: left;
        text-decoration: none;
        font-family: inherit;
        cursor: pointer;
        box-sizing: border-box;
        line-height: 1.35;
    }

    .mobile-drawer-link:hover,
    .mobile-drawer-accordion-trigger:hover {
        background: #f5f5f5;
    }

    .mobile-drawer-chevron {
        font-size: 11px;
        color: #888;
        transition: transform 0.25s ease;
        flex-shrink: 0;
    }

    .mobile-drawer-accordion.is-open .mobile-drawer-chevron {
        transform: rotate(180deg);
    }

    .mobile-drawer-accordion-panel {
        display: none;
        padding: 0 0 8px;
        background: #fafafa;
    }

    .mobile-drawer-accordion.is-open .mobile-drawer-accordion-panel {
        display: block;
    }

    .mobile-drawer-sublink {
        display: block;
        padding: 11px 20px 11px 28px;
        color: #555;
        font-size: 14px;
        text-decoration: none;
        line-height: 1.35;
    }

    .mobile-drawer-sublink--cat {
        font-weight: 600;
        color: #1a1a1a;
        padding-top: 12px;
    }

    .mobile-drawer-sublink--all {
        font-weight: 600;
        color: #103070;
        padding: 12px 20px 10px 28px;
    }

    .mobile-drawer-sublink--all:hover {
        color: #103070;
    }

    .mobile-drawer-sublink:hover {
        background: #f0f0f0;
        color: #103070;
    }

    .mobile-drawer-link--all {
        display: none !important;
    }

    .mobile-drawer-sep {
        border: none;
        border-top: 1px solid #e8e8e8;
        margin: 8px 20px 16px;
    }

    .mobile-drawer-contact {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0 20px;
    }

    .mobile-drawer-contact-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 0;
        color: #555;
        font-size: 13px;
        line-height: 1.4;
        text-decoration: none;
    }

    .mobile-drawer-contact-item i {
        width: 18px;
        text-align: center;
        flex-shrink: 0;
        margin-top: 2px;
        color: #333;
        font-size: 15px;
    }

    .mobile-drawer-contact-item .fab.fa-whatsapp {
        color: #25d366;
    }

    .mobile-drawer-contact-item:hover {
        color: #103070;
    }

    .mobile-drawer-social {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px 8px;
    }

    .mobile-drawer-social a {
        display: flex;
        align-items: center;
        justify-content: center;
        color: #1a1a1a;
        text-decoration: none;
        opacity: 0.85;
        transition: opacity 0.2s;
    }

    .mobile-drawer-social a:hover {
        opacity: 1;
    }

    .mobile-drawer-social svg {
        display: block;
        width: 20px;
        height: 20px;
    }

    .mobile-drawer-social-ra {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        flex-shrink: 0;
        opacity: 1;
        margin-left: 2px;
    }

    .mobile-drawer-social-ra:hover {
        opacity: 0.88;
    }

    .mobile-drawer-ra-seal {
        width: 24px;
        height: 24px;
        object-fit: contain;
        display: block;
        flex-shrink: 0;
    }

    .mobile-drawer-ra-logo {
        height: 14px;
        width: auto;
        max-width: 72px;
        object-fit: contain;
        display: block;
    }

    .mobile-drawer-link .cart-badge {
        position: static;
        margin-left: auto;
        background: #ef4444;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
    }
}
