/* Container Principal do Menu */
#side-menu {
    position: fixed;
    top: 0;
    left: -300px; /* Começa fora da tela */
    width: 280px;
    height: 100%;
    background: #0f172a !important; /* Fundo azul escuro */
    z-index: 10000 !important;
    transition: left 0.3s ease-in-out; /* Animação de deslize */
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    display: block !important; /* Mantém no DOM para a animação funcionar */
}

/* Estado Ativo (Aberto) */
#side-menu.active {
    left: 0; /* Desliza para dentro */
}

/* Links dentro do Menu */
.drawer-link {
    display: block;
    padding: 15px 20px;
    color: #ffffff !important;
    text-decoration: none;
    border-bottom: 1px solid #1e293b;
    font-family: sans-serif;
}

.drawer-link:hover {
    background: #1e293b;
}

/* Overlay (Fundo escuro atrás do menu) */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
}

/* Smooth slide-in sidebar (compatible with .sidebar-menu) */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #1a1d23;
    z-index: 10000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}
.sidebar-menu.active { left: 0; }

.menu-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); display:none; z-index:9999; }
.menu-overlay.active { display:block; }

/* Header alignment helpers */
.header-container { display:flex; align-items:center; justify-content:space-between; height:60px; padding:0 15px; }
#btn-hamburguer { order:-1; font-size:24px; padding:10px; cursor:pointer; }

/* Ensure sidebar-menu class triggers the slide-in animation */
.sidebar-menu { transform: translateX(-110%); transition: transform 260ms ease-in-out; position:fixed; top:0; left:0; z-index:2000; }
.sidebar-menu.open { transform: translateX(0%); }
.menu-overlay { position:fixed; inset:0; background: rgba(0,0,0,0.45); z-index:1999; display:none; }
.menu-overlay.visible { display:block; }

/* Small responsive tweaks */
@media (max-width:720px) {
    .category-bar { padding:8px; gap:10px; }
}
